Commit b5b29289 authored by Michel Dänzer's avatar Michel Dänzer Committed by Adam Jackson

prime: Sync shared pixmap from root window instead of screen pixmap

The screen pixmap doesn't receive updates while there's a Present flip
window.
Reviewed-by: default avatarAlex Deucher <alexander.deucher@amd.com>
Signed-off-by: Michel Dänzer's avatarMichel Dänzer <michel.daenzer@amd.com>
parent eb04b201
......@@ -233,7 +233,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;
}
......@@ -260,6 +261,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 +269,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 +286,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 +309,7 @@ PixmapDirtyCompositeRotate(PixmapPtr dst_pixmap,
int error;
src = CreatePicture(None,
&dirty->src->drawable,
&pScreen->root->drawable,
format,
CPSubwindowMode,
&include_inferiors, serverClient, &error);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment