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 /dix | |
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 'dix')
-rw-r--r-- | dix/pixmap.c | 24 |
1 files changed, 11 insertions, 13 deletions
diff --git a/dix/pixmap.c b/dix/pixmap.c index b67a2e8a6..81ac5e2d8 100644 --- a/dix/pixmap.c +++ b/dix/pixmap.c @@ -181,12 +181,12 @@ PixmapDirtyDamageDestroy(DamagePtr damage, void *closure) } Bool -PixmapStartDirtyTracking(PixmapPtr src, +PixmapStartDirtyTracking(DrawablePtr src, PixmapPtr slave_dst, int x, int y, int dst_x, int dst_y, Rotation rotation) { - ScreenPtr screen = src->drawable.pScreen; + ScreenPtr screen = src->pScreen; PixmapDirtyUpdatePtr dirty_update; RegionPtr damageregion; RegionRec dstregion; @@ -204,8 +204,7 @@ PixmapStartDirtyTracking(PixmapPtr src, dirty_update->dst_y = dst_y; dirty_update->rotation = rotation; dirty_update->damage = DamageCreate(NULL, PixmapDirtyDamageDestroy, - DamageReportNone, - TRUE, src->drawable.pScreen, + DamageReportNone, TRUE, screen, dirty_update); if (rotation != RR_Rotate_0) { @@ -241,16 +240,15 @@ PixmapStartDirtyTracking(PixmapPtr src, RegionUnion(damageregion, damageregion, &dstregion); RegionUninit(&dstregion); - DamageRegister(screen->root ? &screen->root->drawable : &src->drawable, - dirty_update->damage); + DamageRegister(src, dirty_update->damage); xorg_list_add(&dirty_update->ent, &screen->pixmap_dirty_list); return TRUE; } Bool -PixmapStopDirtyTracking(PixmapPtr src, PixmapPtr slave_dst) +PixmapStopDirtyTracking(DrawablePtr src, PixmapPtr slave_dst) { - ScreenPtr screen = src->drawable.pScreen; + ScreenPtr screen = src->pScreen; PixmapDirtyUpdatePtr ent, safe; xorg_list_for_each_entry_safe(ent, safe, &screen->pixmap_dirty_list, ent) { @@ -269,8 +267,8 @@ PixmapDirtyCopyArea(PixmapPtr dst, PixmapDirtyUpdatePtr dirty, RegionPtr dirty_region) { - ScreenPtr pScreen = dirty->src->drawable.pScreen; - DrawablePtr src = pScreen->root ? &pScreen->root->drawable : &dirty->src->drawable; + DrawablePtr src = dirty->src; + ScreenPtr pScreen = src->pScreen; int n; BoxPtr b; GCPtr pGC; @@ -309,7 +307,7 @@ PixmapDirtyCompositeRotate(PixmapPtr dst_pixmap, PixmapDirtyUpdatePtr dirty, RegionPtr dirty_region) { - ScreenPtr pScreen = dirty->src->drawable.pScreen; + ScreenPtr pScreen = dirty->src->pScreen; PictFormatPtr format = PictureWindowFormat(pScreen->root); PicturePtr src, dst; XID include_inferiors = IncludeInferiors; @@ -318,7 +316,7 @@ PixmapDirtyCompositeRotate(PixmapPtr dst_pixmap, int error; src = CreatePicture(None, - &pScreen->root->drawable, + dirty->src, format, CPSubwindowMode, &include_inferiors, serverClient, &error); @@ -367,7 +365,7 @@ PixmapDirtyCompositeRotate(PixmapPtr dst_pixmap, */ Bool PixmapSyncDirtyHelper(PixmapDirtyUpdatePtr dirty) { - ScreenPtr pScreen = dirty->src->drawable.pScreen; + ScreenPtr pScreen = dirty->src->pScreen; RegionPtr region = DamageRegion(dirty->damage); PixmapPtr dst; SourceValidateProcPtr SourceValidate; |