diff options
author | Kristian Høgsberg <krh@bitplanet.net> | 2010-05-10 08:36:02 -0400 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2010-05-12 10:00:15 -0700 |
commit | 4f0006c2203abe0b7660c5068d6afe236f9bd2a4 (patch) | |
tree | ba3d354e43cdafed7739b4ee29f02c09465c4b13 /hw/xfree86/dri2 | |
parent | ba1f1f9d9e48226f1ef6b3222a8d92fc969d6560 (diff) |
dri2: Copy front to fake front in swapbuffer
If we don't have a fake front, nothing will happen. The fix was extracted
from a bigger patch from Francisco Jerez.
https://bugs.freedesktop.org/show_bug.cgi?id=27305
Signed-off-by: Kristian Høgsberg <krh@bitplanet.net>
Reviewed-by: Pauli Nieminen <suokkos@gmail.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'hw/xfree86/dri2')
-rw-r--r-- | hw/xfree86/dri2/dri2.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/hw/xfree86/dri2/dri2.c b/hw/xfree86/dri2/dri2.c index 11442d092..143163d8f 100644 --- a/hw/xfree86/dri2/dri2.c +++ b/hw/xfree86/dri2/dri2.c @@ -634,6 +634,8 @@ DRI2SwapComplete(ClientPtr client, DrawablePtr pDraw, int frame, ScreenPtr pScreen = pDraw->pScreen; DRI2DrawablePtr pPriv; CARD64 ust = 0; + BoxRec box; + RegionRec region; pPriv = DRI2GetDrawable(pDraw); if (pPriv == NULL) { @@ -645,6 +647,14 @@ DRI2SwapComplete(ClientPtr client, DrawablePtr pDraw, int frame, pPriv->swapsPending--; pPriv->swap_count++; + box.x1 = 0; + box.y1 = 0; + box.x2 = pDraw->width; + box.y2 = pDraw->height; + REGION_INIT(pScreen, ®ion, &box, 0); + DRI2CopyRegion(pDraw, ®ion, DRI2BufferFakeFrontLeft, + DRI2BufferFrontLeft); + ust = ((CARD64)tv_sec * 1000000) + tv_usec; if (swap_complete) swap_complete(client, swap_data, type, ust, frame, pPriv->swap_count); |