diff --git a/src/cairo-analysis-surface.c b/src/cairo-analysis-surface.c index 29b74f3dd..357e79a50 100644 --- a/src/cairo-analysis-surface.c +++ b/src/cairo-analysis-surface.c @@ -221,28 +221,24 @@ _cairo_analysis_surface_intersect_clip_path (void *abstract_surface, cairo_analysis_surface_t *surface = abstract_surface; double x1, y1, x2, y2; cairo_rectangle_int_t extent; - cairo_status_t status; if (path == NULL) { surface->current_clip.x = 0; surface->current_clip.y = 0; - surface->current_clip.width = surface->width; + surface->current_clip.width = surface->width; surface->current_clip.height = surface->height; - status = CAIRO_STATUS_SUCCESS; } else { - status = _cairo_path_fixed_bounds (path, &x1, &y1, &x2, &y2); - if (status) - return status; + _cairo_path_fixed_bounds (path, &x1, &y1, &x2, &y2); extent.x = floor (x1); extent.y = floor (y1); - extent.width = ceil (x2) - extent.x; + extent.width = ceil (x2) - extent.x; extent.height = ceil (y2) - extent.y; _cairo_rectangle_intersect (&surface->current_clip, &extent); } - return status; + return CAIRO_STATUS_SUCCESS; } static cairo_int_status_t diff --git a/src/cairo-path-bounds.c b/src/cairo-path-bounds.c index 49b4ab983..55a64e537 100644 --- a/src/cairo-path-bounds.c +++ b/src/cairo-path-bounds.c @@ -148,7 +148,7 @@ _cairo_path_bounder_close_path (void *closure) } /* XXX: Perhaps this should compute a PixRegion rather than 4 doubles */ -cairo_status_t +void _cairo_path_fixed_bounds (cairo_path_fixed_t *path, double *x1, double *y1, double *x2, double *y2) @@ -165,7 +165,9 @@ _cairo_path_fixed_bounds (cairo_path_fixed_t *path, _cairo_path_bounder_curve_to, _cairo_path_bounder_close_path, &bounder); - if (status || ! bounder.has_point) { + assert (status == CAIRO_STATUS_SUCCESS); + + if (! bounder.has_point) { *x1 = *y1 = *x2 = *y2 = 0.; } else { *x1 = _cairo_fixed_to_double (bounder.min_x); @@ -175,6 +177,4 @@ _cairo_path_fixed_bounds (cairo_path_fixed_t *path, } _cairo_path_bounder_fini (&bounder); - - return status; }