Skip to content

Commit

Permalink
fallback: Sanitize code that queries surface extents
Browse files Browse the repository at this point in the history
The previous code was setting extents.is_bounded, but that value has a
completely different meaning.
  • Loading branch information
Benjamin Otte committed Apr 28, 2010
1 parent 1391403 commit 393da36
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions src/cairo-surface-fallback.c
Original file line number Diff line number Diff line change
Expand Up @@ -907,8 +907,8 @@ _cairo_surface_fallback_paint (cairo_surface_t *surface,
cairo_status_t status;
cairo_traps_t traps;

extents.is_bounded = _cairo_surface_get_extents (surface, &rect);
assert (extents.is_bounded || clip);
if (!_cairo_surface_get_extents (surface, &rect))
ASSERT_NOT_REACHED;

status = _cairo_composite_rectangles_init_for_paint (&extents,
rect.width,
Expand Down Expand Up @@ -1001,8 +1001,8 @@ _cairo_surface_fallback_mask (cairo_surface_t *surface,
cairo_rectangle_int_t rect;
cairo_status_t status;

extents.is_bounded = _cairo_surface_get_extents (surface, &rect);
assert (extents.is_bounded || clip);
if (!_cairo_surface_get_extents (surface, &rect))
ASSERT_NOT_REACHED;

status = _cairo_composite_rectangles_init_for_mask (&extents,
rect.width, rect.height,
Expand Down Expand Up @@ -1045,8 +1045,8 @@ _cairo_surface_fallback_stroke (cairo_surface_t *surface,
cairo_rectangle_int_t rect;
cairo_status_t status;

extents.is_bounded = _cairo_surface_get_extents (surface, &rect);
assert (extents.is_bounded || clip);
if (!_cairo_surface_get_extents (surface, &rect))
ASSERT_NOT_REACHED;

status = _cairo_composite_rectangles_init_for_stroke (&extents,
rect.width,
Expand Down Expand Up @@ -1151,8 +1151,8 @@ _cairo_surface_fallback_fill (cairo_surface_t *surface,
cairo_rectangle_int_t rect;
cairo_status_t status;

extents.is_bounded = _cairo_surface_get_extents (surface, &rect);
assert (extents.is_bounded || clip);
if (!_cairo_surface_get_extents (surface, &rect))
ASSERT_NOT_REACHED;

status = _cairo_composite_rectangles_init_for_fill (&extents,
rect.width,
Expand Down Expand Up @@ -1319,8 +1319,8 @@ _cairo_surface_fallback_show_glyphs (cairo_surface_t *surface,
cairo_rectangle_int_t rect;
cairo_status_t status;

extents.is_bounded = _cairo_surface_get_extents (surface, &rect);
assert (extents.is_bounded || clip);
if (!_cairo_surface_get_extents (surface, &rect))
ASSERT_NOT_REACHED;

status = _cairo_composite_rectangles_init_for_glyphs (&extents,
rect.width,
Expand Down

0 comments on commit 393da36

Please sign in to comment.