diff options
author | Jon Turney <jon.turney@dronecode.org.uk> | 2017-03-09 16:11:13 +0000 |
---|---|---|
committer | Jon Turney <jon.turney@dronecode.org.uk> | 2017-03-09 16:11:13 +0000 |
commit | 5b8ea795752c446095605dd7d931226f02bed9ef (patch) | |
tree | a9b4056f3f9b6165a686631cd14a305e39eb83ea /dix/pixmap.c | |
parent | 8c9cea1d7b73629be7d7d6c198e693dff85a9c69 (diff) | |
parent | f23e65f96365706c69fa781b2c6cbf3203619c9f (diff) |
Merge tag 'xorg-server-1.19.2' into cygwin-release-1.19xserver-cygwin-1.19.2-1
xorg-server-1.19.2
Diffstat (limited to 'dix/pixmap.c')
-rw-r--r-- | dix/pixmap.c | 31 |
1 files changed, 24 insertions, 7 deletions
diff --git a/dix/pixmap.c b/dix/pixmap.c index 49267a19b..b67a2e8a6 100644 --- a/dix/pixmap.c +++ b/dix/pixmap.c @@ -172,6 +172,14 @@ PixmapPtr PixmapShareToSlave(PixmapPtr pixmap, ScreenPtr slave) return spix; } +static void +PixmapDirtyDamageDestroy(DamagePtr damage, void *closure) +{ + PixmapDirtyUpdatePtr dirty = closure; + + dirty->damage = NULL; +} + Bool PixmapStartDirtyTracking(PixmapPtr src, PixmapPtr slave_dst, @@ -195,10 +203,10 @@ PixmapStartDirtyTracking(PixmapPtr src, dirty_update->dst_x = dst_x; dirty_update->dst_y = dst_y; dirty_update->rotation = rotation; - dirty_update->damage = DamageCreate(NULL, NULL, + dirty_update->damage = DamageCreate(NULL, PixmapDirtyDamageDestroy, DamageReportNone, TRUE, src->drawable.pScreen, - src->drawable.pScreen); + dirty_update); if (rotation != RR_Rotate_0) { RRTransformCompute(x, y, @@ -233,7 +241,8 @@ PixmapStartDirtyTracking(PixmapPtr src, RegionUnion(damageregion, damageregion, &dstregion); RegionUninit(&dstregion); - DamageRegister(&src->drawable, dirty_update->damage); + DamageRegister(screen->root ? &screen->root->drawable : &src->drawable, + dirty_update->damage); xorg_list_add(&dirty_update->ent, &screen->pixmap_dirty_list); return TRUE; } @@ -246,7 +255,8 @@ PixmapStopDirtyTracking(PixmapPtr src, PixmapPtr slave_dst) xorg_list_for_each_entry_safe(ent, safe, &screen->pixmap_dirty_list, ent) { if (ent->src == src && ent->slave_dst == slave_dst) { - DamageDestroy(ent->damage); + if (ent->damage) + DamageDestroy(ent->damage); xorg_list_del(&ent->ent); free(ent); } @@ -260,6 +270,7 @@ PixmapDirtyCopyArea(PixmapPtr dst, RegionPtr dirty_region) { ScreenPtr pScreen = dirty->src->drawable.pScreen; + DrawablePtr src = pScreen->root ? &pScreen->root->drawable : &dirty->src->drawable; int n; BoxPtr b; GCPtr pGC; @@ -267,7 +278,13 @@ PixmapDirtyCopyArea(PixmapPtr dst, n = RegionNumRects(dirty_region); b = RegionRects(dirty_region); - pGC = GetScratchGC(dirty->src->drawable.depth, pScreen); + pGC = GetScratchGC(src->depth, pScreen); + if (pScreen->root) { + ChangeGCVal subWindowMode; + + subWindowMode.val = IncludeInferiors; + ChangeGC(NullClient, pGC, GCSubwindowMode, &subWindowMode); + } ValidateGC(&dst->drawable, pGC); while (n--) { @@ -278,7 +295,7 @@ PixmapDirtyCopyArea(PixmapPtr dst, w = dst_box.x2 - dst_box.x1; h = dst_box.y2 - dst_box.y1; - pGC->ops->CopyArea(&dirty->src->drawable, &dst->drawable, pGC, + pGC->ops->CopyArea(src, &dst->drawable, pGC, dirty->x + dst_box.x1, dirty->y + dst_box.y1, w, h, dirty->dst_x + dst_box.x1, dirty->dst_y + dst_box.y1); @@ -301,7 +318,7 @@ PixmapDirtyCompositeRotate(PixmapPtr dst_pixmap, int error; src = CreatePicture(None, - &dirty->src->drawable, + &pScreen->root->drawable, format, CPSubwindowMode, &include_inferiors, serverClient, &error); |