[PATCH 37/43] 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-spans.c | 2 +- src/drm/cairo-drm-i915-surface.c | 26 +++++++------------------- 3 files changed, 15 insertions(+), 28 deletions(-) diff --git a/src/drm/cairo-drm-i915-glyphs.c b/src/drm/cairo-drm-i915-glyphs.c index f9884d5..6c9a77a 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); } @@ -337,13 +337,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; } } @@ -396,12 +395,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-spans.c b/src/drm/cairo-drm-i915-spans.c index 35113d6..1f979e8 100644 --- a/src/drm/cairo-drm-i915-spans.c +++ b/src/drm/cairo-drm-i915-spans.c @@ -614,7 +614,7 @@ i915_spans_init (i915_spans_t *spans, if (clip != NULL) { cairo_region_t *clip_region = NULL; - status = _cairo_clip_get_region (clip, &clip_region); + clip_region = _cairo_clip_get_region (clip); assert (status == CAIRO_STATUS_SUCCESS || status == CAIRO_INT_STATUS_UNSUPPORTED); if (clip_region != NULL && cairo_region_num_rectangles (clip_region) == 1) diff --git a/src/drm/cairo-drm-i915-surface.c b/src/drm/cairo-drm-i915-surface.c index e2e8881..bea2013 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; @@ -1618,9 +1608,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); } @@ -2145,9 +2134,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