[cairo-commit] src/cairo-traps-compositor.c src/cairo-xcb-surface-render.c
Chris Wilson
ickle at kemper.freedesktop.org
Mon Aug 25 00:58:07 PDT 2014
src/cairo-traps-compositor.c | 4 ++--
src/cairo-xcb-surface-render.c | 5 +++--
2 files changed, 5 insertions(+), 4 deletions(-)
New commits:
commit a5f51588afd9d5629b03297eb29ff46350b6ba50
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date: Mon Aug 25 08:55:24 2014 +0100
traps,xcb: Set the box count after filtering
After converting, the number of boxes should only count the number of
non-zero boxes and forget about the zero-sized boxes we skipped over.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=81699
Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
diff --git a/src/cairo-traps-compositor.c b/src/cairo-traps-compositor.c
index 88c7597..3414fc2 100644
--- a/src/cairo-traps-compositor.c
+++ b/src/cairo-traps-compositor.c
@@ -1417,9 +1417,7 @@ boxes_for_traps (cairo_boxes_t *boxes,
_cairo_boxes_init (boxes);
- boxes->num_boxes = traps->num_traps;
boxes->chunks.base = (cairo_box_t *) traps->traps;
- boxes->chunks.count = traps->num_traps;
boxes->chunks.size = traps->num_traps;
if (antialias != CAIRO_ANTIALIAS_NONE) {
@@ -1464,6 +1462,8 @@ boxes_for_traps (cairo_boxes_t *boxes,
boxes->chunks.base[j].p1.y != boxes->chunks.base[j].p2.y);
}
}
+ boxes->chunks.count = j;
+ boxes->num_boxes = j;
return CAIRO_INT_STATUS_SUCCESS;
}
diff --git a/src/cairo-xcb-surface-render.c b/src/cairo-xcb-surface-render.c
index 3361f9c..edfa34c 100644
--- a/src/cairo-xcb-surface-render.c
+++ b/src/cairo-xcb-surface-render.c
@@ -2906,9 +2906,7 @@ _boxes_for_traps (cairo_boxes_t *boxes,
_cairo_boxes_init (boxes);
- boxes->num_boxes = traps->num_traps;
boxes->chunks.base = (cairo_box_t *) traps->traps;
- boxes->chunks.count = traps->num_traps;
boxes->chunks.size = traps->num_traps;
if (antialias != CAIRO_ANTIALIAS_NONE) {
@@ -2954,6 +2952,9 @@ _boxes_for_traps (cairo_boxes_t *boxes,
boxes->chunks.base[j].p1.y != boxes->chunks.base[j].p2.y);
}
}
+
+ boxes->num_boxes = j;
+ boxes->chunks.count = j;
}
static cairo_status_t
More information about the cairo-commit
mailing list