fixup stamp so driver updates drawable info
authorDave Airlie <airliedfreedesktop.org>
Fri, 30 Dec 2005 10:12:26 +0000 (10:12 +0000)
committerDave Airlie <airliedfreedesktop.org>
Fri, 30 Dec 2005 10:12:26 +0000 (10:12 +0000)
src/egl/drivers/dri/egldri.c

index 504fa9f43d0bc1c064f6059fc401b3672b1b9fc7..cab0be2bd1820ce48c7864b39c9b28d07540e58e 100644 (file)
@@ -713,17 +713,32 @@ __eglGetDrawableInfo(__DRInativeDisplay * ndpy, int screen, __DRIid drawable,
                      int* backX, int* backY,
                      int* numBackClipRects, drm_clip_rect_t ** pBackClipRects )
 {
+    __DRIscreen *pDRIScreen;
+    __DRIscreenPrivate *psp;
    driSurface *surf = Lookup_driSurface(drawable);
 
+   pDRIScreen = __eglFindDRIScreen(ndpy, screen);
+
+   if ( (pDRIScreen == NULL) || (pDRIScreen->private == NULL) ) {
+       return GL_FALSE;
+   }
+   psp = (__DRIscreenPrivate *) pDRIScreen->private;
    *X = 0;
    *Y = 0;
    *W = surf->Base.Width;
    *H = surf->Base.Height;
 
+   *backX = 0;
+   *backY = 0;
+   *numBackClipRects = 0;
+   *pBackClipRects = NULL;
+
    *numClipRects = 1;
    *pClipRects = malloc(sizeof(**pClipRects));
    **pClipRects = (drm_clip_rect_t){0, 0, surf->Base.Width, surf->Base.Height};
 
+   psp->pSAREA->drawableTable[0].stamp = 1;
+   *stamp = 1;
 #if 0
     GLXDrawable drawable = (GLXDrawable) draw;
     drm_clip_rect_t * cliprect;