diff options
author | Ville Syrjälä <syrjala@sci.fi> | 2011-12-18 18:29:41 +0200 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2011-12-19 22:32:33 -0800 |
commit | 4df65d247b56c6b1b06e17a61236d6637312cdbb (patch) | |
tree | ec0a5fa5cbdc8acbc79984d1b8de741a8d46375b /hw | |
parent | e8fd23fad046877ca0ee08c1e147557756debc8e (diff) |
dri2: Invalidate window pixmaps
While a redirected window is flipped, its pixmap may still be used as
and EGL image and should also get invalidated. When sending invalidate
events for a window, also send the events for its pixmap.
Signed-off-by: Ville Syrjälä <syrjala@sci.fi>
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'hw')
-rw-r--r-- | hw/xfree86/dri2/dri2.c | 3 | ||||
-rw-r--r-- | hw/xfree86/dri2/dri2.h | 3 | ||||
-rw-r--r-- | hw/xfree86/dri2/dri2ext.c | 4 |
3 files changed, 6 insertions, 4 deletions
diff --git a/hw/xfree86/dri2/dri2.c b/hw/xfree86/dri2/dri2.c index 86e98a5e0..d6441a234 100644 --- a/hw/xfree86/dri2/dri2.c +++ b/hw/xfree86/dri2/dri2.c @@ -587,7 +587,7 @@ DRI2InvalidateDrawable(DrawablePtr pDraw) pPriv->needInvalidate = FALSE; list_for_each_entry(ref, &pPriv->reference_list, link) - ref->invalidate(pDraw, ref->priv); + ref->invalidate(pDraw, ref->priv, ref->id); } /* @@ -958,6 +958,7 @@ DRI2SwapBuffers(ClientPtr client, DrawablePtr pDraw, CARD64 target_msc, * windows using the same pixmap */ TraverseTree(pWin, DRI2InvalidateWalk, pPixmap); + DRI2InvalidateDrawable(&pPixmap->drawable); } else DRI2InvalidateDrawable(pDraw); diff --git a/hw/xfree86/dri2/dri2.h b/hw/xfree86/dri2/dri2.h index 9c93209d1..a67e35f73 100644 --- a/hw/xfree86/dri2/dri2.h +++ b/hw/xfree86/dri2/dri2.h @@ -166,7 +166,8 @@ typedef int (*DRI2ScheduleWaitMSCProcPtr)(ClientPtr client, CARD64 remainder); typedef void (*DRI2InvalidateProcPtr)(DrawablePtr pDraw, - void *data); + void *data, + XID id); /** * DRI2 calls this hook when ever swap_limit is going to be changed. Default diff --git a/hw/xfree86/dri2/dri2ext.c b/hw/xfree86/dri2/dri2ext.c index e612cf051..73ef7f25e 100644 --- a/hw/xfree86/dri2/dri2ext.c +++ b/hw/xfree86/dri2/dri2ext.c @@ -156,13 +156,13 @@ ProcDRI2Authenticate(ClientPtr client) } static void -DRI2InvalidateBuffersEvent(DrawablePtr pDraw, void *priv) +DRI2InvalidateBuffersEvent(DrawablePtr pDraw, void *priv, XID id) { xDRI2InvalidateBuffers event; ClientPtr client = priv; event.type = DRI2EventBase + DRI2_InvalidateBuffers; - event.drawable = pDraw->id; + event.drawable = id; WriteEventsToClient(client, 1, (xEvent *)&event); } |