From: Xiang, Haihao Date: Wed, 5 Dec 2007 02:31:35 +0000 (+0800) Subject: Don't Swap buffer if a DRIDrawable is entirely obscured X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=2407e48f2805e27e76e2e1d7083926c4077d9032;p=mesa.git Don't Swap buffer if a DRIDrawable is entirely obscured by another window. --- 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 */