Signed-off-by: Francisco Jerez <curroje...@riseup.net> --- glx/glxdri2.c | 28 +++++++++++++++++++++++++--- 1 files changed, 25 insertions(+), 3 deletions(-)
diff --git a/glx/glxdri2.c b/glx/glxdri2.c index c5e7b0b..0ac6900 100644 --- a/glx/glxdri2.c +++ b/glx/glxdri2.c @@ -67,6 +67,7 @@ struct __GLXDRIscreen { xf86EnterVTProc *enterVT; xf86LeaveVTProc *leaveVT; + PreConfigureWindowProcPtr PreConfigureWindow; const __DRIcoreExtension *core; const __DRIdri2Extension *dri2; @@ -218,13 +219,13 @@ __glXDRIdrawableSwapBuffers(ClientPtr client, __GLXdrawable *drawable) CARD64 unused; int type; - if (screen->flush) - (*screen->flush->flushInvalidate)(priv->driDrawable); - if (DRI2SwapBuffers(client, drawable->pDraw, 0, 0, 0, &unused, &type, __glXdriSwapEvent, drawable->pDraw) != Success) return FALSE; + if (type != DRI2_SWAP_BLIT && screen->flush) + (*screen->flush->invalidate)(priv->driDrawable); + return TRUE; } @@ -608,6 +609,24 @@ glxDRILeaveVT (int index, int flags) } static void +glxDRIPreConfigureWindow(WindowPtr pWin, int x, int y, int w, int h, int bw, + WindowPtr pSib) +{ + ScreenPtr pScreen = pWin->drawable.pScreen; + __GLXDRIscreen *screen = (__GLXDRIscreen *)glxGetScreen(pScreen); + __GLXDRIdrawable *draw = (__GLXDRIdrawable *)glxGetDrawableFromWindow(pWin); + + if (screen->PreConfigureWindow) + (*screen->PreConfigureWindow)(pWin, x, y, w, h, bw, pSib); + + if (!draw || (draw->height == h && draw->width == w)) + return; + + if (screen->flush) + screen->flush->invalidate(draw->driDrawable); +} + +static void initializeExtensions(__GLXDRIscreen *screen) { const __DRIextension **extensions; @@ -783,6 +802,9 @@ __glXDRIscreenProbe(ScreenPtr pScreen) screen->leaveVT = pScrn->LeaveVT; pScrn->LeaveVT = glxDRILeaveVT; + screen->PreConfigureWindow = pScreen->PreConfigureWindow; + pScreen->PreConfigureWindow = glxDRIPreConfigureWindow; + LogMessage(X_INFO, "AIGLX: Loaded and initialized %s\n", filename); -- 1.6.4.4 ------------------------------------------------------------------------------ Throughout its 18-year history, RSA Conference consistently attracts the world's best and brightest in the field, creating opportunities for Conference attendees to learn about information security's most important issues through interactions with peers, luminaries and emerging and established companies. http://p.sf.net/sfu/rsaconf-dev2dev _______________________________________________ Mesa3d-dev mailing list Mesa3d-dev@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mesa3d-dev