summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorXiang, Haihao <[email protected]>2007-12-05 10:31:35 +0800
committerXiang, Haihao <[email protected]>2007-12-05 10:31:35 +0800
commit2407e48f2805e27e76e2e1d7083926c4077d9032 (patch)
tree2afc1f24eaa4a0d3efe38617dc06648ac91f6ae0 /src/mesa
parent5b91ee27c0f6e6379a9dc0bb41f4aef2f66b6346 (diff)
Don't Swap buffer if a DRIDrawable is entirely obscured
by another window.
Diffstat (limited to 'src/mesa')
-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 2e2e64c4d18..2b378a531e0 100644
--- a/src/mesa/drivers/dri/common/dri_util.c
+++ b/src/mesa/drivers/dri/common/dri_util.c
@@ -336,6 +336,9 @@ static void driSwapBuffers(__DRIdrawable *drawable)
__DRIdrawablePrivate *dPriv = drawable->private;
drm_clip_rect_t rect;
+ if (!dPriv->numClipRects)
+ return;
+
dPriv->swapBuffers(dPriv);
/* Check that we actually have the new damage report method */