No subject

=3D?UTF-8?q?S=3DC3=3DB8ren=3D20Sandmann=3D20Pedersen?=3D ssp at redhat.=
Mon Mar 28 09:12:28 PDT 2011

Date: Mon, 28 Mar 2011 11:38:11 -0400
Subject: [PATCH] Track damage for fbTrapezoids() and fbTriangles().
MIME-Version: 1.0
Content-Type: text/plain; charset=3DUTF-8
Content-Transfer-Encoding: 8bit

These calls no longer go through the CompositePicture() hook, so
damage was no longer generated for them. This patch simply damages the
entire destination clip region.

It would be possible to generate tighter damage for certain operators
such as Over and Add, where blank source pixels have no effect on the
destination, but given that virtually all trapezoid rendering takes
place on pixmaps, it's unlikely that anybody would actually benefit
from this optimization, and the miTrapezoidBounds function did
sometimes show up on profiles, probably because it does several
divisions per trapezoid.

V2: Call DamageRegionProcessPending() - pointed out by Michel D=C3=A4nzer.

Signed-off-by: S=C3=B8ren Sandmann <ssp at>
 fb/fbtrap.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/fb/fbtrap.c b/fb/fbtrap.c
index 2554fcc..1880a24 100644
--- a/fb/fbtrap.c
+++ b/fb/fbtrap.c
@@ -29,6 +29,7 @@
 #include "picturestr.h"
 #include "mipict.h"
 #include "fbpict.h"
+#include "damage.h"
 fbAddTraps (PicturePtr	pPicture,
@@ -117,6 +118,9 @@ fbShapes (CompositeShapesFunc	composite,
 	pixman_format_code_t format;
+	DamageRegionAppend (pDst->pDrawable, pDst->pCompositeClip);
+	DamageRegionProcessPending (pDst->pDrawable);
 	if (!maskFormat)
 	    int i;

More information about the xorg-devel mailing list