[PATCH 07/36] drm: fixed cairo_status_t vs cairo_int_status_t mixup
"Enrico Weigelt, metux IT consult" <[email protected]>
| Newsgroups | gmane.comp.lib.cairo |
|---|---|
| Message-ID | <[email protected]> |
Signed-off-by: Enrico Weigelt, metux IT consult <[email protected]> --- src/drm/cairo-drm-i915-glyphs.c | 14 +++++++------- src/drm/cairo-drm-i915-surface.c | 20 ++++++++++---------- src/drm/cairo-drm-i965-surface.c | 14 +++++++------- src/drm/cairo-drm-intel.c | 12 ++++++------ 4 files changed, 30 insertions(+), 30 deletions(-) diff --git a/src/drm/cairo-drm-i915-glyphs.c b/src/drm/cairo-drm-i915-glyphs.c index f3dbfc4..48d134d 100644 --- a/src/drm/cairo-drm-i915-glyphs.c +++ b/src/drm/cairo-drm-i915-glyphs.c @@ -189,7 +189,7 @@ i915_surface_mask_internal (i915_surface_t *dst, i915_device_t *device; i915_shader_t shader; cairo_region_t *clip_region = NULL; - cairo_status_t status; + cairo_int_status_t status; i915_shader_init (&shader, dst, op, 1.); @@ -295,7 +295,7 @@ i915_surface_glyphs (void *abstract_surface, intel_bo_t *last_bo = NULL; i915_emit_glyph_rectangle_func_t emit_func; cairo_scaled_glyph_t *glyph_cache[64]; - cairo_status_t status; + cairo_int_status_t status; int mask_x = 0, mask_y = 0; int i = 0; @@ -325,7 +325,7 @@ i915_surface_glyphs (void *abstract_surface, if (clip != NULL) { status = _cairo_clip_get_region (clip, &clip_region); - if (unlikely (_cairo_status_is_error (status) || + if (unlikely (_cairo_int_status_is_error (status) || status == CAIRO_INT_STATUS_NOTHING_TO_DO)) { if (have_clip) @@ -480,7 +480,7 @@ i915_surface_glyphs (void *abstract_surface, if (scaled_glyph->surface_private == NULL) { status = intel_get_glyph (&device->intel, scaled_font, scaled_glyph); if (unlikely (status == CAIRO_INT_STATUS_NOTHING_TO_DO)) { - status = CAIRO_STATUS_SUCCESS; + status = CAIRO_INT_STATUS_SUCCESS; continue; } if (unlikely (status)) @@ -516,7 +516,7 @@ i915_surface_glyphs (void *abstract_surface, emit_func (device, &shader, x1, y1, x2, y2, glyph); } - status = CAIRO_STATUS_SUCCESS; + status = CAIRO_INT_STATUS_SUCCESS; FINISH: _cairo_scaled_font_thaw_cache (scaled_font); cairo_device_release (surface->intel.drm.base.device); @@ -535,7 +535,7 @@ i915_surface_glyphs (void *abstract_surface, _cairo_fixed_from_int (mask_x), _cairo_fixed_from_int (mask_y)); } - if (likely (status == CAIRO_STATUS_SUCCESS)) { + if (likely (status == CAIRO_INT_STATUS_SUCCESS)) { status = surface->intel.drm.base.backend->fill (shader.target, shader.op, mask != NULL ? &_cairo_pattern_white.base : source, @@ -549,7 +549,7 @@ i915_surface_glyphs (void *abstract_surface, } if (mask != NULL) { - if (likely (status == CAIRO_STATUS_SUCCESS)) { + if (likely (status == CAIRO_INT_STATUS_SUCCESS)) { status = i915_surface_mask_internal (surface, op, source, mask, clip, &extents); } diff --git a/src/drm/cairo-drm-i915-surface.c b/src/drm/cairo-drm-i915-surface.c index f0d29cb..0b2ad04 100644 --- a/src/drm/cairo-drm-i915-surface.c +++ b/src/drm/cairo-drm-i915-surface.c @@ -1577,7 +1577,7 @@ _composite_boxes (i915_surface_t *dst, cairo_bool_t need_clip_surface = FALSE; cairo_region_t *clip_region = NULL; const struct _cairo_boxes_chunk *chunk; - cairo_status_t status; + cairo_int_status_t status; i915_shader_t shader; i915_device_t *device; int i; @@ -1772,7 +1772,7 @@ _clip_and_composite_boxes (i915_surface_t *dst, cairo_clip_t *clip, double opacity) { - cairo_status_t status; + cairo_int_status_t status; if (boxes->num_boxes == 0) { if (extents->is_bounded) @@ -1885,7 +1885,7 @@ i915_surface_fill_with_alpha (void *abstract_dst, cairo_clip_t local_clip; cairo_bool_t have_clip = FALSE; int num_boxes = ARRAY_LENGTH (boxes_stack); - cairo_status_t status; + cairo_int_status_t status; status = _cairo_composite_rectangles_init_for_fill (&extents, dst->intel.drm.width, @@ -1928,11 +1928,11 @@ i915_surface_fill_with_alpha (void *abstract_dst, _cairo_boxes_init (&boxes); _cairo_boxes_limit (&boxes, clip_boxes, num_boxes); - status = _cairo_path_fixed_fill_rectilinear_to_boxes (path, + cairo_status_t stat = _cairo_path_fixed_fill_rectilinear_to_boxes (path, fill_rule, &boxes); - if (likely (status == CAIRO_STATUS_SUCCESS)) { - status = _clip_and_composite_boxes (dst, op, source, + if (likely (stat == CAIRO_STATUS_SUCCESS)) { + stat = _clip_and_composite_boxes (dst, op, source, &boxes, antialias, &extents, clip, opacity); @@ -2090,7 +2090,7 @@ i915_surface_mask (void *abstract_dst, cairo_region_t *clip_region = NULL; cairo_bool_t need_clip_surface = FALSE; cairo_bool_t have_clip = FALSE; - cairo_status_t status; + cairo_int_status_t status; if (mask->type == CAIRO_PATTERN_TYPE_SOLID) { const cairo_solid_pattern_t *solid = (cairo_solid_pattern_t *) mask; @@ -2237,7 +2237,7 @@ i915_surface_stroke (void *abstract_dst, int num_boxes = ARRAY_LENGTH (boxes_stack); cairo_clip_t local_clip; cairo_bool_t have_clip = FALSE; - cairo_status_t status; + cairo_int_status_t status; status = _cairo_composite_rectangles_init_for_stroke (&extents, dst->intel.drm.width, @@ -2269,11 +2269,11 @@ i915_surface_stroke (void *abstract_dst, _cairo_boxes_init (&boxes); _cairo_boxes_limit (&boxes, clip_boxes, num_boxes); - status = _cairo_path_fixed_stroke_rectilinear_to_boxes (path, + cairo_status_t stat = _cairo_path_fixed_stroke_rectilinear_to_boxes (path, stroke_style, ctm, &boxes); - if (likely (status == CAIRO_STATUS_SUCCESS)) { + if (likely (stat == CAIRO_STATUS_SUCCESS)) { status = _clip_and_composite_boxes (dst, op, source, &boxes, antialias, &extents, clip, 1.); diff --git a/src/drm/cairo-drm-i965-surface.c b/src/drm/cairo-drm-i965-surface.c index ffb5b38..623e75f 100644 --- a/src/drm/cairo-drm-i965-surface.c +++ b/src/drm/cairo-drm-i965-surface.c @@ -761,7 +761,7 @@ i965_fixup_unbounded (i965_surface_t *dst, { i965_shader_t shader; i965_device_t *device; - cairo_status_t status; + cairo_int_status_t status; i965_shader_init (&shader, dst, CAIRO_OPERATOR_CLEAR); @@ -997,7 +997,7 @@ _composite_boxes (i965_surface_t *dst, cairo_bool_t need_clip_surface = FALSE; cairo_region_t *clip_region = NULL; const struct _cairo_boxes_chunk *chunk; - cairo_status_t status; + cairo_int_status_t status; i965_shader_t shader; i965_device_t *device; int i; @@ -1067,7 +1067,7 @@ _clip_and_composite_boxes (i965_surface_t *dst, const cairo_composite_rectangles_t *extents, cairo_clip_t *clip) { - cairo_status_t status; + cairo_int_status_t status; if (boxes->num_boxes == 0) { if (extents->is_bounded) @@ -1299,7 +1299,7 @@ i965_surface_stroke (void *abstract_dst, int num_boxes = ARRAY_LENGTH (boxes_stack); cairo_clip_t local_clip; cairo_bool_t have_clip = FALSE; - cairo_status_t status; + cairo_int_status_t status; status = _cairo_composite_rectangles_init_for_stroke (&extents, dst->intel.drm.width, @@ -1335,7 +1335,7 @@ i965_surface_stroke (void *abstract_dst, stroke_style, ctm, &boxes); - if (likely (status == CAIRO_STATUS_SUCCESS)) { + if (likely (status == CAIRO_INT_STATUS_SUCCESS)) { status = _clip_and_composite_boxes (dst, op, source, &boxes, antialias, &extents, clip); @@ -1406,7 +1406,7 @@ i965_surface_fill (void *abstract_dst, cairo_clip_t local_clip; cairo_bool_t have_clip = FALSE; int num_boxes = ARRAY_LENGTH (boxes_stack); - cairo_status_t status; + cairo_int_status_t status; status = _cairo_composite_rectangles_init_for_fill (&extents, dst->intel.drm.width, @@ -1442,7 +1442,7 @@ i965_surface_fill (void *abstract_dst, status = _cairo_path_fixed_fill_rectilinear_to_boxes (path, fill_rule, &boxes); - if (likely (status == CAIRO_STATUS_SUCCESS)) { + if (likely (status == CAIRO_INT_STATUS_SUCCESS)) { status = _clip_and_composite_boxes (dst, op, source, &boxes, antialias, &extents, clip); diff --git a/src/drm/cairo-drm-intel.c b/src/drm/cairo-drm-intel.c index aabd016..ac622fa 100644 --- a/src/drm/cairo-drm-intel.c +++ b/src/drm/cairo-drm-intel.c @@ -838,7 +838,7 @@ intel_glyph_cache_unpin (intel_device_t *device) _cairo_rtree_unpin (&device->glyph_cache[n].rtree); } -static cairo_status_t +static cairo_int_status_t intel_glyph_cache_add_glyph (intel_device_t *device, intel_buffer_cache_t *cache, cairo_scaled_glyph_t *scaled_glyph) @@ -847,7 +847,7 @@ intel_glyph_cache_add_glyph (intel_device_t *device, intel_glyph_t *glyph; cairo_rtree_node_t *node = NULL; double sf_x, sf_y; - cairo_status_t status; + cairo_int_status_t status; uint8_t *dst, *src; int width, height; @@ -863,7 +863,7 @@ intel_glyph_cache_add_glyph (intel_device_t *device, /* search for an unpinned slot */ if (status == CAIRO_INT_STATUS_UNSUPPORTED) { status = _cairo_rtree_evict_random (&cache->rtree, width, height, &node); - if (status == CAIRO_STATUS_SUCCESS) + if (status == CAIRO_INT_STATUS_SUCCESS) status = _cairo_rtree_node_insert (&cache->rtree, node, width, height, &node); } if (unlikely (status)) @@ -958,7 +958,7 @@ intel_glyph_cache_add_glyph (intel_device_t *device, glyph->width = glyph_surface->width; glyph->height = glyph_surface->height; - return CAIRO_STATUS_SUCCESS; + return CAIRO_INT_STATUS_SUCCESS; } void @@ -1032,7 +1032,7 @@ intel_get_glyph (intel_device_t *device, { cairo_bool_t own_surface = FALSE; intel_buffer_cache_t *cache; - cairo_status_t status; + cairo_int_status_t status; if (scaled_glyph->surface == NULL) { status = @@ -1067,7 +1067,7 @@ intel_get_glyph (intel_device_t *device, return status; status = intel_glyph_cache_add_glyph (device, cache, scaled_glyph); - if (unlikely (_cairo_status_is_error (status))) + if (unlikely (_cairo_int_status_is_error (status))) return status; if (unlikely (status == CAIRO_INT_STATUS_UNSUPPORTED)) { -- 2.6.4.442.g545299f -- cairo mailing list [email protected] http://lists.cairographics.org/mailman/listinfo/cairo