[fallback] Avoid tessellating empty polygons

I added an assert inside the tessellator to ensure that empty polygon were
not being propagated that far...
This commit is contained in:
Chris Wilson 2009-08-03 08:27:01 +01:00
parent 09377a7163
commit 0f8af05484

View file

@ -663,8 +663,8 @@ _clip_and_composite_trapezoids (const cairo_pattern_t *src,
cairo_bool_t clip_surface = FALSE;
cairo_status_t status;
if (_cairo_operator_bounded_by_mask (op) && traps->num_traps == 0)
return CAIRO_STATUS_SUCCESS;
if (traps->num_traps == 0 && _cairo_operator_bounded_by_mask (op))
return CAIRO_STATUS_SUCCESS;
if (clip != NULL) {
status = _cairo_clip_get_region (clip, &clip_region);
@ -1019,6 +1019,9 @@ _cairo_surface_fallback_stroke (cairo_surface_t *surface,
if (unlikely (status))
goto CLEANUP;
if (polygon.num_edges == 0)
goto DO_TRAPS;
if (_cairo_operator_bounded_by_mask (op)) {
cairo_rectangle_int_t polygon_extents;
@ -1161,6 +1164,9 @@ _cairo_surface_fallback_fill (cairo_surface_t *surface,
if (unlikely (status))
goto CLEANUP;
if (polygon.num_edges == 0)
goto DO_TRAPS;
if (_cairo_operator_bounded_by_mask (op)) {
cairo_rectangle_int_t polygon_extents;