summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorXiang, Haihao <[email protected]>2007-12-05 10:31:35 +0800
committerMichel Dänzer <[email protected]>2008-02-28 11:43:54 +0100
commit8998f52b97caf4e42439085b9ce63d088bfbaa87 (patch)
tree2aff43bf64276c757e8f44a6f44680e703476a53 /src
parent0fd38dcc8361df865fec7c9be8cb94ed8d9f449b (diff)
Don't Swap buffer if a DRIDrawable is entirely obscured by another window.
Diffstat (limited to 'src')
-rw-r--r--src/mesa/drivers/dri/common/dri_util.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/common/dri_util.c b/src/mesa/drivers/dri/common/dri_util.c
index c30e66f1722..77cbd8109ea 100644
--- a/src/mesa/drivers/dri/common/dri_util.c
+++ b/src/mesa/drivers/dri/common/dri_util.c
@@ -486,6 +486,9 @@ static void driSwapBuffers( __DRInativeDisplay *dpy, void *drawablePrivate )
__DRIdrawablePrivate *dPriv = (__DRIdrawablePrivate *) drawablePrivate;
drm_clip_rect_t rect;
+ if (!dPriv->numClipRects)
+ return;
+
dPriv->swapBuffers(dPriv);
/* Check that we actually have the new damage report method */