xf86-video-intel: src/sna/sna_dri.c
Chris Wilson
ickle at kemper.freedesktop.org
Mon Mar 19 01:29:35 PDT 2012
src/sna/sna_dri.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
New commits:
commit c0bab1df509d1f7fe36173715846c13b931e9be1
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date: Mon Mar 19 08:25:22 2012 +0000
sna/dri: Make the drawable as damaged for the off-screen immediate exchange
In some cases off-screen is stil visible, for example under a rotation.
As such xrandr -o left; glxgears -fullscreen was broken.
Reported-by: Phillip Haddad <phillip.haddad at gmail.com>
Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
diff --git a/src/sna/sna_dri.c b/src/sna/sna_dri.c
index e2eed1d..95ec07e 100644
--- a/src/sna/sna_dri.c
+++ b/src/sna/sna_dri.c
@@ -1294,12 +1294,24 @@ sna_dri_schedule_flip(ClientPtr client, DrawablePtr draw, DRI2BufferPtr front,
/* Drawable not displayed... just complete the swap */
pipe = sna_dri_get_pipe(draw);
if (pipe == -1) {
+ RegionRec region;
+
DBG(("%s: off-screen, immediate update\n", __FUNCTION__));
sna_dri_exchange_attachment(front, back);
get_private(back)->pixmap = get_private(front)->pixmap;
get_private(front)->pixmap = NULL;
set_bo(get_private(back)->pixmap, get_private(back)->bo);
+
+ /* XXX can we query whether we need to process damage? */
+ region.extents.x1 = draw->x;
+ region.extents.y1 = draw->y;
+ region.extents.x2 = draw->x + draw->width;
+ region.extents.y2 = draw->y + draw->height;
+ region.data = NULL;
+ DamageRegionAppend(draw, ®ion);
+ DamageRegionProcessPending(draw);
+
DRI2SwapComplete(client, draw, 0, 0, 0,
DRI2_EXCHANGE_COMPLETE, func, data);
return TRUE;
More information about the xorg-commit
mailing list