summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDave Barnish <dave.barnish@arm.com>2014-01-24 15:07:14 +0000
committerDave Barnish <dave.barnish@arm.com>2014-02-12 12:43:09 +0000
commit32fc97d173b1dd83b4524ee6e2e48bc41624ab7a (patch)
tree730ce851a8585ef347957f99b5a0dee260b02e23
parent36c7ca02911cda3b5cf161ce03c96187be0b3256 (diff)
Report damage for drawable in ARMSOCDRI2ScheduleSwap
Based on chromeos xf86-video-armsoc commit https://chromium.googlesource.com/chromiumos/third_party/xf86-video-armsoc/+/81e3f9f Change-Id: Idd7b9df652e26167a14ffff3ddf3156b726bbc88
-rw-r--r--src/armsoc_dri2.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/armsoc_dri2.c b/src/armsoc_dri2.c
index f79ac51..793ea10 100644
--- a/src/armsoc_dri2.c
+++ b/src/armsoc_dri2.c
@@ -607,6 +607,8 @@ ARMSOCDRI2ScheduleSwap(ClientPtr client, DrawablePtr pDraw,
struct armsoc_bo *src_bo, *dst_bo;
int src_fb_id, dst_fb_id;
int new_canflip, ret, do_flip;
+ RegionRec region;
+ PixmapPtr pDstPixmap = draw2pix(dri2draw(pDraw, pDstBuffer));
cmd = calloc(1, sizeof(*cmd));
if (!cmd)
@@ -622,6 +624,13 @@ ARMSOCDRI2ScheduleSwap(ClientPtr client, DrawablePtr pDraw,
cmd->func = func;
cmd->data = data;
+ region.extents.x1 = region.extents.y1 = 0;
+ region.extents.x2 = pDstPixmap->drawable.width;
+ region.extents.y2 = pDstPixmap->drawable.height;
+ region.data = NULL;
+ DamageRegionAppend(&pDstPixmap->drawable, &region);
+ DamageRegionProcessPending(&pDstPixmap->drawable);
+
DEBUG_MSG("%d -> %d", pSrcBuffer->attachment, pDstBuffer->attachment);
/* obtain extra ref on buffers to avoid them going away while we await