Don't Swap buffer if a DRIDrawable is entirely obscured
authorXiang, Haihao <haihao.xiang@intel.com>
Wed, 5 Dec 2007 02:31:35 +0000 (10:31 +0800)
committerXiang, Haihao <haihao.xiang@intel.com>
Wed, 5 Dec 2007 02:31:35 +0000 (10:31 +0800)
by another window.

src/mesa/drivers/dri/common/dri_util.c

index 2e2e64c4d180e7fa709197b7c05b08b6f4ce279a..2b378a531e038525124a2a368ec0480d03c66a0d 100644 (file)
@@ -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 */