diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2012-03-19 08:25:22 +0000 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2012-03-19 08:28:07 +0000 |
commit | c0bab1df509d1f7fe36173715846c13b931e9be1 (patch) | |
tree | 91fc6b34feb5bc74355b1c2bfd047faeaafcd6ea | |
parent | 17c19ea8e21e1b20eee446045573dfd94ce6f537 (diff) |
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@gmail.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r-- | src/sna/sna_dri.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/sna/sna_dri.c b/src/sna/sna_dri.c index e2eed1d6..95ec07e0 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; |