[PATCH] Track damage for fbTrapezoids() and fbTriangles().

Søren Sandmann sandmann at cs.au.dk
Mon Mar 28 08:47:29 PDT 2011


From: Søren Sandmann Pedersen <ssp at redhat.com>

These calls no longer go through the miComposite(), 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.

Signed-off-by: Søren Sandmann <ssp at redhat.com>
---
 fb/fbtrap.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/fb/fbtrap.c b/fb/fbtrap.c
index 2554fcc..23dac95 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"
 
 void
 fbAddTraps (PicturePtr	pPicture,
@@ -117,6 +118,8 @@ fbShapes (CompositeShapesFunc	composite,
     {
 	pixman_format_code_t format;
 
+	DamageRegionAppend (pDst->pDrawable, pDst->pCompositeClip);
+
 	if (!maskFormat)
 	{
 	    int i;
-- 
1.7.4



More information about the xorg-devel mailing list