[cairo] [PATCH 52/71] drm/i915: fixed calls to _cairo_clip_get_region()
Enrico Weigelt, metux IT consult
enrico.weigelt at gr13.net
Mon Apr 17 16:57:31 UTC 2017
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 <enrico.weigelt at gr13.net>
---
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 a8a790e5a..32d53398f 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 35113d669..1f979e85e 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 f6ee67f86..f8c81104a 100644
--- a/src/drm/cairo-drm-i915-surface.c
+++ b/src/drm/cairo-drm-i915-surface.c
@@ -781,14 +781,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)
@@ -897,12 +891,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;
@@ -1616,9 +1606,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);
}
@@ -2144,9 +2133,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.11.0.rc0.7.gbe5a750
More information about the cairo
mailing list