summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSøren Sandmann Pedersen <ssp@redhat.com>2010-12-30 22:31:49 -0500
committerSøren Sandmann Pedersen <ssp@redhat.com>2011-06-01 09:23:44 -0400
commit979b05b13c50418c56030cd1a826a18e87b766b0 (patch)
tree637ca6fde2a76ca36fc5009acf866727937819e8
parent60fdcf0ba0ac1feb34ac4f12d48de5f589492ad8 (diff)
drop clipped edges to the right
-rw-r--r--pixman/pixman-polygon.c30
1 files changed, 17 insertions, 13 deletions
diff --git a/pixman/pixman-polygon.c b/pixman/pixman-polygon.c
index 2e077749..68c635fe 100644
--- a/pixman/pixman-polygon.c
+++ b/pixman/pixman-polygon.c
@@ -468,21 +468,25 @@ update_active (active_t *active)
edge_t *edge;
active_t *new;
- if (!(new = allocate_edge (active, &edge)))
+ if (active->global_next->line.p1.x < active->x + active->width ||
+ active->global_next->line.p2.x < active->x + active->width)
{
- /* Out of memory. Simply skip to the
- * end of the global list. That way we
- * don't end up in an infinite loop
- * adding edges over and over.
- */
- active->global_next = active->global_last;
- goto oom_bail;
+ if (!(new = allocate_edge (active, &edge)))
+ {
+ /* Out of memory. Simply skip to the
+ * end of the global list. That way we
+ * don't end up in an infinite loop
+ * adding edges over and over.
+ */
+ active->global_next = active->global_last;
+ goto oom_bail;
+ }
+ active = new;
+
+ edge_init (edge, active->global_next, active->x, active->yi);
+
+ list_append (active, edge);
}
- active = new;
-
- edge_init (edge, active->global_next, active->x, active->yi);
-
- list_append (active, edge);
}
active->global_next++;