diff options
author | Michel Dänzer <michel.daenzer@amd.com> | 2017-04-14 19:08:41 +0900 |
---|---|---|
committer | Michel Dänzer <michel@daenzer.net> | 2017-08-15 17:01:39 +0900 |
commit | 8e3b26ceaa86eaf98a78f6b84f46a4a86aed8ef8 (patch) | |
tree | 9ee1bd8eca3025785dd8b0f2f1cf3a3e8b2992cf /randr | |
parent | c52f77e4ca2cda878da341a6228e6411eec7b1a0 (diff) |
Make PixmapDirtyUpdateRec::src a DrawablePtr
This allows making the master screen's pixmap_dirty_list entries
explicitly reflect that we're now tracking the root window instead of
the screen pixmap, in order to allow Present page flipping on master
outputs while there are active slave outputs.
Define HAS_DIRTYTRACKING_DRAWABLE_SRC for drivers to check, but leave
HAS_DIRTYTRACKING_ROTATION defined as well to make things slightly
easier for drivers.
Reviewed-by: Adam Jackson <ajax@redhat.com>
Diffstat (limited to 'randr')
-rw-r--r-- | randr/randrstr.h | 2 | ||||
-rw-r--r-- | randr/rrcrtc.c | 20 |
2 files changed, 10 insertions, 12 deletions
diff --git a/randr/randrstr.h b/randr/randrstr.h index 706e9a7b0..95979a8c6 100644 --- a/randr/randrstr.h +++ b/randr/randrstr.h @@ -279,7 +279,7 @@ typedef Bool (*RRSetConfigProcPtr) (ScreenPtr pScreen, typedef Bool (*RRCrtcSetScanoutPixmapProcPtr)(RRCrtcPtr crtc, PixmapPtr pixmap); -typedef Bool (*RRStartFlippingPixmapTrackingProcPtr)(RRCrtcPtr, PixmapPtr, +typedef Bool (*RRStartFlippingPixmapTrackingProcPtr)(RRCrtcPtr, DrawablePtr, PixmapPtr, PixmapPtr, int x, int y, int dst_x, int dst_y, diff --git a/randr/rrcrtc.c b/randr/rrcrtc.c index 401a1c178..2eb9fbdc8 100644 --- a/randr/rrcrtc.c +++ b/randr/rrcrtc.c @@ -388,12 +388,12 @@ RRCrtcDetachScanoutPixmap(RRCrtcPtr crtc) if (crtc->scanout_pixmap) { ScreenPtr master = crtc->pScreen->current_master; - PixmapPtr mscreenpix = master->GetScreenPixmap(master); + DrawablePtr mrootdraw = &master->root->drawable; if (crtc->scanout_pixmap_back) { pScrPriv->rrDisableSharedPixmapFlipping(crtc); - master->StopFlippingPixmapTracking(mscreenpix, + master->StopFlippingPixmapTracking(mrootdraw, crtc->scanout_pixmap, crtc->scanout_pixmap_back); @@ -402,7 +402,8 @@ RRCrtcDetachScanoutPixmap(RRCrtcPtr crtc) } else { pScrPriv->rrCrtcSetScanoutPixmap(crtc, NULL); - master->StopPixmapTracking(mscreenpix, crtc->scanout_pixmap); + master->StopPixmapTracking(mrootdraw, + crtc->scanout_pixmap); } rrDestroySharedPixmap(crtc, crtc->scanout_pixmap); @@ -491,9 +492,8 @@ rrSetupPixmapSharing(RRCrtcPtr crtc, int width, int height, ScreenPtr master = crtc->pScreen->current_master; rrScrPrivPtr pMasterScrPriv = rrGetScrPriv(master); rrScrPrivPtr pSlaveScrPriv = rrGetScrPriv(crtc->pScreen); - - int depth; - PixmapPtr mscreenpix; + DrawablePtr mrootdraw = &master->root->drawable; + int depth = mrootdraw->depth; PixmapPtr spix_front; /* Create a pixmap on the master screen, then get a shared handle for it. @@ -515,9 +515,6 @@ rrSetupPixmapSharing(RRCrtcPtr crtc, int width, int height, defer to the slave. */ - mscreenpix = master->GetScreenPixmap(master); - depth = mscreenpix->drawable.depth; - if (crtc->scanout_pixmap) RRCrtcDetachScanoutPixmap(crtc); @@ -553,7 +550,8 @@ rrSetupPixmapSharing(RRCrtcPtr crtc, int width, int height, crtc->scanout_pixmap = spix_front; crtc->scanout_pixmap_back = spix_back; - if (!pMasterScrPriv->rrStartFlippingPixmapTracking(crtc, mscreenpix, + if (!pMasterScrPriv->rrStartFlippingPixmapTracking(crtc, + mrootdraw, spix_front, spix_back, x, y, 0, 0, @@ -588,7 +586,7 @@ fail: /* If flipping funcs fail, just fall back to unsynchronized */ } crtc->scanout_pixmap = spix_front; - master->StartPixmapTracking(mscreenpix, spix_front, x, y, 0, 0, rotation); + master->StartPixmapTracking(mrootdraw, spix_front, x, y, 0, 0, rotation); return TRUE; } |