summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSøren Sandmann Pedersen <ssp@localhost.localdomain>2012-01-19 08:18:58 -0500
committerSøren Sandmann Pedersen <ssp@localhost.localdomain>2012-01-19 08:18:58 -0500
commit8aad7d4d95cd095e8e11cabbfde10b5d3b755a72 (patch)
treed5742ca2818d7282e14bf1984b0d7926b98c659a
parentc2ae430e572a1c7c8cebb8174482ded743a0b7f2 (diff)
Track damage for PolyLine fallbacks.
This is a substantial speedup for the Gimp.
-rw-r--r--src/uxa/uxa-unaccel.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/uxa/uxa-unaccel.c b/src/uxa/uxa-unaccel.c
index 2c068a0..f3539da 100644
--- a/src/uxa/uxa-unaccel.c
+++ b/src/uxa/uxa-unaccel.c
@@ -208,23 +208,30 @@ uxa_check_poly_lines(DrawablePtr pDrawable, GCPtr pGC,
int mode, int npt, DDXPointPtr ppt)
{
ScreenPtr screen = pDrawable->pScreen;
+ RegionRec region;
+
+ REGION_INIT (screen, &region, (BoxPtr)NULL, 0);
+ uxa_damage_poly_lines (&region, pDrawable, pGC, mode, npt, ppt);
UXA_FALLBACK(("to %p (%c), width %d, mode %d, count %d\n",
pDrawable, uxa_drawable_location(pDrawable),
pGC->lineWidth, mode, npt));
if (pGC->lineWidth == 0) {
- if (uxa_prepare_access(pDrawable, NULL, UXA_ACCESS_RW)) {
+ if (uxa_prepare_access(pDrawable, &region, UXA_ACCESS_RW)) {
if (uxa_prepare_access_gc(pGC)) {
fbPolyLine(pDrawable, pGC, mode, npt, ppt);
uxa_finish_access_gc(pGC);
}
uxa_finish_access(pDrawable);
}
- return;
+ goto out;
}
/* fb calls mi functions in the lineWidth != 0 case. */
fbPolyLine(pDrawable, pGC, mode, npt, ppt);
+
+ out:
+ REGION_UNINIT (screen, &region);
}
void