[PATCH 30/41] drm/i915: fixed calls to _cairo_clip_get_region()
"Enrico Weigelt, metux IT consult" <[email protected]>
| Newsgroups | gmane.comp.lib.cairo |
|---|---|
| Message-ID | <[email protected]> |
The second (return buffer) parameter of _cairo_clip_get_region() had been dropped, but several callers yet need to be updated. Signed-off-by: Enrico Weigelt, metux IT consult <[email protected]> --- src/drm/cairo-drm-i915-glyphs.c | 15 +++++++-------- src/drm/cairo-drm-i915-surface.c | 26 +++++++------------------- 2 files changed, 14 insertions(+), 27 deletions(-) diff --git a/src/drm/cairo-drm-i915-glyphs.c b/src/drm/cairo-drm-i915-glyphs.c index 3359b21..8f27df5 100644 --- a/src/drm/cairo-drm-i915-glyphs.c +++ b/src/drm/cairo-drm-i915-glyphs.c @@ -224,12 +224,12 @@ i915_surface_mask_internal (i915_surface_t *dst, shader.mask.base.map[1] = mask->map1; if (clip != NULL) { - status = _cairo_clip_get_region (clip, &clip_region); + clip_region = _cairo_clip_get_region (clip); if (clip_region != NULL && cairo_region_num_rectangles (clip_region) == 1) clip_region = NULL; - if (status == CAIRO_INT_STATUS_UNSUPPORTED) + if (clip_region == NULL) i915_shader_set_clip (&shader, clip); } @@ -322,13 +322,12 @@ i915_surface_glyphs (void *abstract_surface, } if (clip != NULL) { - status = _cairo_clip_get_region (clip, &clip_region); - if (unlikely (_cairo_int_status_is_error (status) || - status == CAIRO_INT_STATUS_NOTHING_TO_DO)) + clip_region = _cairo_clip_get_region (clip); + if (unlikely (clip_region == NULL)) { if (have_clip) _cairo_clip_fini (&local_clip); - return status; + return CAIRO_INT_STATUS_NOTHING_TO_DO; } } @@ -381,12 +380,12 @@ i915_surface_glyphs (void *abstract_surface, return status; if (clip != NULL) { - status = _cairo_clip_get_region (clip, &clip_region); + clip_region = _cairo_clip_get_region (clip); if (clip_region != NULL && cairo_region_num_rectangles (clip_region) == 1) clip_region = NULL; - if (status == CAIRO_INT_STATUS_UNSUPPORTED) + if (clip_region == NULL) i915_shader_set_clip (&shader, clip); } } diff --git a/src/drm/cairo-drm-i915-surface.c b/src/drm/cairo-drm-i915-surface.c index 7b40278..a59c33e 100644 --- a/src/drm/cairo-drm-i915-surface.c +++ b/src/drm/cairo-drm-i915-surface.c @@ -784,14 +784,8 @@ i915_fixup_unbounded (i915_surface_t *dst, cairo_status_t status; if (clip != NULL) { - cairo_region_t *clip_region = NULL; - - status = _cairo_clip_get_region (clip, &clip_region); - assert (status == CAIRO_STATUS_SUCCESS || status == CAIRO_INT_STATUS_UNSUPPORTED); + cairo_region_t *clip_region = _cairo_clip_get_region (clip); assert (clip_region == NULL); - - if (status != CAIRO_INT_STATUS_UNSUPPORTED) - clip = NULL; } else { if (extents->bounded.width == extents->unbounded.width && extents->bounded.height == extents->unbounded.height) @@ -899,12 +893,8 @@ i915_fixup_unbounded_boxes (i915_surface_t *dst, box.p2.x = _cairo_fixed_from_int (extents->unbounded.x); box.p2.y = _cairo_fixed_from_int (extents->unbounded.y + extents->unbounded.height); - if (clip != NULL) { - status = _cairo_clip_get_region (clip, &clip_region); - assert (status == CAIRO_STATUS_SUCCESS || status == CAIRO_INT_STATUS_UNSUPPORTED); - if (status != CAIRO_INT_STATUS_UNSUPPORTED) - clip = NULL; - } + if (clip != NULL) + clip_region = _cairo_clip_get_region (clip); if (clip_region == NULL) { cairo_boxes_t tmp; @@ -1615,9 +1605,8 @@ _composite_boxes (i915_surface_t *dst, return status; if (clip != NULL) { - status = _cairo_clip_get_region (clip, &clip_region); - assert (status == CAIRO_STATUS_SUCCESS || status == CAIRO_INT_STATUS_UNSUPPORTED); - need_clip_surface = status == CAIRO_INT_STATUS_UNSUPPORTED; + clip_region = _cairo_clip_get_region (clip); + need_clip_surface = (clip_region == NULL); if (need_clip_surface) i915_shader_set_clip (&shader, clip); } @@ -2140,9 +2129,8 @@ i915_surface_mask (void *abstract_dst, goto err_shader; if (clip != NULL) { - status = _cairo_clip_get_region (clip, &clip_region); - if (unlikely (_cairo_status_is_error (status) || - status == CAIRO_INT_STATUS_NOTHING_TO_DO)) + clip_region = _cairo_clip_get_region (clip); + if (unlikely (clip_region == NULL)) { goto err_shader; } -- 2.6.4.442.g545299f -- cairo mailing list [email protected] http://lists.cairographics.org/mailman/listinfo/cairo