static Bool _glamor_copy_plane(DrawablePtr pSrc, DrawablePtr pDst, GCPtr pGC, int srcx, int srcy, int w, int h, int dstx, int dsty, unsigned long bitPlane, RegionPtr *pRegion, Bool fallback) { if (!fallback && glamor_ddx_fallback_check_gc(pGC) && glamor_ddx_fallback_check_pixmap(pSrc) && glamor_ddx_fallback_check_pixmap(pDst)) goto fail; if (glamor_prepare_access(pDst, GLAMOR_ACCESS_RW) && glamor_prepare_access(pSrc, GLAMOR_ACCESS_RO) && glamor_prepare_access_gc(pGC)) { *pRegion = fbCopyPlane(pSrc, pDst, pGC, srcx, srcy, w, h, dstx, dsty, bitPlane); } glamor_finish_access_gc(pGC); glamor_finish_access(pSrc); glamor_finish_access(pDst); return TRUE; fail: return FALSE; }
RegionPtr vivante_unaccel_CopyPlane(DrawablePtr pSrc, DrawablePtr pDst, GCPtr pGC, int srcx, int srcy, int w, int h, int dstx, int dsty, unsigned long bitPlane) { RegionPtr ret; vivante_prepare_drawable(pDst, ACCESS_RW); vivante_prepare_drawable(pSrc, ACCESS_RO); ret = fbCopyPlane(pSrc, pDst, pGC, srcx, srcy, w, h, dstx, dsty, bitPlane); vivante_finish_drawable(pSrc, ACCESS_RO); vivante_finish_drawable(pDst, ACCESS_RW); return ret; }
static RegionPtr radeon_glamor_copy_plane_nodstbo(DrawablePtr pSrc, DrawablePtr pDst, GCPtr pGC, int srcx, int srcy, int w, int h, int dstx, int dsty, unsigned long bitPlane) { ScrnInfoPtr scrn = xf86ScreenToScrn(pDst->pScreen); PixmapPtr src_pix = get_drawable_pixmap(pSrc); struct radeon_pixmap *src_priv = radeon_get_pixmap_private(src_pix); RegionPtr ret = NULL; if (radeon_glamor_prepare_access_cpu_ro(scrn, src_pix, src_priv)) { ret = fbCopyPlane(pSrc, pDst, pGC, srcx, srcy, w, h, dstx, dsty, bitPlane); radeon_glamor_finish_access_cpu(src_pix); } return ret; }
RegionPtr uxa_check_copy_plane(DrawablePtr pSrc, DrawablePtr pDst, GCPtr pGC, int srcx, int srcy, int w, int h, int dstx, int dsty, unsigned long bitPlane) { ScreenPtr screen = pSrc->pScreen; RegionPtr ret = NULL; UXA_FALLBACK(("from %p to %p (%c,%c)\n", pSrc, pDst, uxa_drawable_location(pSrc), uxa_drawable_location(pDst))); if (uxa_prepare_access(pDst, UXA_ACCESS_RW)) { if (uxa_prepare_access(pSrc, UXA_ACCESS_RO)) { ret = fbCopyPlane(pSrc, pDst, pGC, srcx, srcy, w, h, dstx, dsty, bitPlane); uxa_finish_access(pSrc, UXA_ACCESS_RO); } uxa_finish_access(pDst, UXA_ACCESS_RW); } return ret; }