[PATCH 22/41] drm/i915: 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 ++++++++++----------
 2 files changed, 17 insertions(+), 17 deletions(-)

diff --git a/src/drm/cairo-drm-i915-glyphs.c b/src/drm/cairo-drm-i915-glyphs.c
index 3b0efc2..8bb10eb 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 39b42cd..0e32ee4 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.);
-- 
2.6.4.442.g545299f

-- 
cairo mailing list
[email protected]
http://lists.cairographics.org/mailman/listinfo/cairo
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.