[Xf86-video-armsoc] [PATCH 1/1] Report damage for drawable in ARMSOCDRI2ScheduleSwap

armsoc-bugs at arm.com armsoc-bugs at arm.com
Thu Feb 20 09:46:43 PST 2014


From: Dave Barnish <dave.barnish at arm.com>

Based on chromeos xf86-video-armsoc commit
https://chromium.googlesource.com/chromiumos/third_party/xf86-video-armsoc/+/81e3f9f

Change-Id: Idd7b9df652e26167a14ffff3ddf3156b726bbc88
---
 src/armsoc_dri2.c |    9 +++++++++
 1 file changed, 9 insertions(+)

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
-- 
1.7.9.5



More information about the Xf86-video-armsoc mailing list