[cairo] [PATCH 19/54] drm: fixed const constraints
Enrico Weigelt, metux IT consult
enrico.weigelt at gr13.net
Wed Dec 23 02:23:03 PST 2015
Signed-off-by: Enrico Weigelt, metux IT consult <enrico.weigelt at gr13.net>
---
src/drm/cairo-drm-i915-glyphs.c | 4 ++--
src/drm/cairo-drm-i915-private.h | 8 ++++----
src/drm/cairo-drm-i915-shader.c | 2 +-
src/drm/cairo-drm-i915-spans.c | 4 ++--
src/drm/cairo-drm-i915-surface.c | 28 ++++++++++++++--------------
src/drm/cairo-drm-i965-glyphs.c | 6 +++---
src/drm/cairo-drm-i965-private.h | 8 ++++----
src/drm/cairo-drm-i965-shader.c | 2 +-
src/drm/cairo-drm-i965-spans.c | 2 +-
src/drm/cairo-drm-i965-surface.c | 22 +++++++++++-----------
src/drm/cairo-drm-intel-surface.c | 14 +++++++-------
src/drm/cairo-drm-radeon-surface.c | 14 +++++++-------
12 files changed, 57 insertions(+), 57 deletions(-)
diff --git a/src/drm/cairo-drm-i915-glyphs.c b/src/drm/cairo-drm-i915-glyphs.c
index 232a1cc..8048e94 100644
--- a/src/drm/cairo-drm-i915-glyphs.c
+++ b/src/drm/cairo-drm-i915-glyphs.c
@@ -183,7 +183,7 @@ i915_surface_mask_internal (i915_surface_t *dst,
cairo_operator_t op,
const cairo_pattern_t *source,
i915_surface_t *mask,
- cairo_clip_t *clip,
+ const cairo_clip_t *clip,
const cairo_composite_rectangles_t *extents)
{
i915_device_t *device;
@@ -280,7 +280,7 @@ i915_surface_glyphs (void *abstract_surface,
cairo_glyph_t *glyphs,
int num_glyphs,
cairo_scaled_font_t *scaled_font,
- cairo_clip_t *clip,
+ const cairo_clip_t *clip,
int *num_remaining)
{
i915_surface_t *surface = _cairo_abstract_surface_cast_i915 (abstract_surface);
diff --git a/src/drm/cairo-drm-i915-private.h b/src/drm/cairo-drm-i915-private.h
index 02d28e9..e718261 100644
--- a/src/drm/cairo-drm-i915-private.h
+++ b/src/drm/cairo-drm-i915-private.h
@@ -897,7 +897,7 @@ i915_clip_and_composite_spans (i915_surface_t *dst,
i915_spans_func_t draw_func,
void *draw_closure,
const cairo_composite_rectangles_t*extents,
- cairo_clip_t *clip,
+ const cairo_clip_t *clip,
double opacity);
cairo_private cairo_surface_t *
@@ -921,7 +921,7 @@ i915_surface_glyphs (void *abstract_surface,
cairo_glyph_t *glyphs,
int num_glyphs,
cairo_scaled_font_t *scaled_font,
- cairo_clip_t *clip,
+ const cairo_clip_t *clip,
int *num_remaining);
static inline int cairo_const
@@ -1227,7 +1227,7 @@ i915_shader_acquire_pattern (i915_shader_t *shader,
cairo_private void
i915_shader_set_clip (i915_shader_t *shader,
- cairo_clip_t *clip);
+ const cairo_clip_t *clip);
cairo_private int
i915_shader_num_texcoords (const i915_shader_t *shader);
@@ -1249,7 +1249,7 @@ i915_shader_fini (i915_shader_t *shader);
cairo_private cairo_status_t
i915_fixup_unbounded (i915_surface_t *dst,
const cairo_composite_rectangles_t *extents,
- cairo_clip_t *clip);
+ const cairo_clip_t *clip);
static inline cairo_bool_t
i915_surface_needs_tiling (i915_surface_t *dst)
diff --git a/src/drm/cairo-drm-i915-shader.c b/src/drm/cairo-drm-i915-shader.c
index 370c86d..b7a23b9 100644
--- a/src/drm/cairo-drm-i915-shader.c
+++ b/src/drm/cairo-drm-i915-shader.c
@@ -2501,7 +2501,7 @@ i915_shader_fini (i915_shader_t *shader)
void
i915_shader_set_clip (i915_shader_t *shader,
- cairo_clip_t *clip)
+ const cairo_clip_t *clip)
{
cairo_surface_t *clip_surface;
int clip_x, clip_y;
diff --git a/src/drm/cairo-drm-i915-spans.c b/src/drm/cairo-drm-i915-spans.c
index b3f4e0a..35113d6 100644
--- a/src/drm/cairo-drm-i915-spans.c
+++ b/src/drm/cairo-drm-i915-spans.c
@@ -582,7 +582,7 @@ i915_spans_init (i915_spans_t *spans,
cairo_operator_t op,
const cairo_pattern_t *pattern,
cairo_antialias_t antialias,
- cairo_clip_t *clip,
+ const cairo_clip_t *clip,
double opacity,
const cairo_composite_rectangles_t *extents)
{
@@ -681,7 +681,7 @@ i915_clip_and_composite_spans (i915_surface_t *dst,
i915_spans_func_t draw_func,
void *draw_closure,
const cairo_composite_rectangles_t*extents,
- cairo_clip_t *clip,
+ const cairo_clip_t *clip,
double opacity)
{
i915_spans_t spans;
diff --git a/src/drm/cairo-drm-i915-surface.c b/src/drm/cairo-drm-i915-surface.c
index 41bc66e..340dd49 100644
--- a/src/drm/cairo-drm-i915-surface.c
+++ b/src/drm/cairo-drm-i915-surface.c
@@ -776,7 +776,7 @@ CLEANUP:
cairo_status_t
i915_fixup_unbounded (i915_surface_t *dst,
const cairo_composite_rectangles_t *extents,
- cairo_clip_t *clip)
+ const cairo_clip_t *clip)
{
i915_shader_t shader;
i915_device_t *device;
@@ -878,7 +878,7 @@ i915_fixup_unbounded (i915_surface_t *dst,
static cairo_status_t
i915_fixup_unbounded_boxes (i915_surface_t *dst,
const cairo_composite_rectangles_t *extents,
- cairo_clip_t *clip,
+ const cairo_clip_t *clip,
cairo_boxes_t *boxes)
{
cairo_boxes_t clear;
@@ -1569,7 +1569,7 @@ _composite_boxes (i915_surface_t *dst,
const cairo_pattern_t *pattern,
cairo_boxes_t *boxes,
cairo_antialias_t antialias,
- cairo_clip_t *clip,
+ const cairo_clip_t *clip,
double opacity,
const cairo_composite_rectangles_t *extents)
{
@@ -1768,7 +1768,7 @@ _clip_and_composite_boxes (i915_surface_t *dst,
cairo_boxes_t *boxes,
cairo_antialias_t antialias,
const cairo_composite_rectangles_t *extents,
- cairo_clip_t *clip,
+ const cairo_clip_t *clip,
double opacity)
{
cairo_int_status_t status;
@@ -1816,7 +1816,7 @@ _clip_and_composite_boxes (i915_surface_t *dst,
}
static cairo_clip_path_t *
-_clip_get_solitary_path (cairo_clip_t *clip)
+_clip_get_solitary_path (const cairo_clip_t *clip)
{
cairo_clip_path_t *iter = clip->path;
cairo_clip_path_t *path = NULL;
@@ -1870,11 +1870,11 @@ static cairo_int_status_t
i915_surface_fill_with_alpha (void *abstract_dst,
cairo_operator_t op,
const cairo_pattern_t *source,
- cairo_path_fixed_t *path,
+ const cairo_path_fixed_t *path,
cairo_fill_rule_t fill_rule,
double tolerance,
cairo_antialias_t antialias,
- cairo_clip_t *clip,
+ const cairo_clip_t *clip,
double opacity)
{
i915_surface_t *dst = _cairo_abstract_surface_cast_i915 (abstract_dst);
@@ -1987,7 +1987,7 @@ static cairo_int_status_t
i915_surface_paint_with_alpha (void *abstract_dst,
cairo_operator_t op,
const cairo_pattern_t *source,
- cairo_clip_t *clip,
+ const cairo_clip_t *clip,
double opacity)
{
i915_surface_t *dst = abstract_dst;
@@ -2060,7 +2060,7 @@ static cairo_int_status_t
i915_surface_paint (void *abstract_dst,
cairo_operator_t op,
const cairo_pattern_t *source,
- cairo_clip_t *clip)
+ const cairo_clip_t *clip)
{
i915_surface_t *dst = abstract_dst;
@@ -2079,7 +2079,7 @@ i915_surface_mask (void *abstract_dst,
cairo_operator_t op,
const cairo_pattern_t *source,
const cairo_pattern_t *mask,
- cairo_clip_t *clip)
+ const cairo_clip_t *clip)
{
i915_surface_t *dst = abstract_dst;
i915_device_t *device;
@@ -2221,13 +2221,13 @@ static cairo_int_status_t
i915_surface_stroke (void *abstract_dst,
cairo_operator_t op,
const cairo_pattern_t *source,
- cairo_path_fixed_t *path,
+ const cairo_path_fixed_t *path,
const cairo_stroke_style_t *stroke_style,
const cairo_matrix_t *ctm,
const cairo_matrix_t *ctm_inverse,
double tolerance,
cairo_antialias_t antialias,
- cairo_clip_t *clip)
+ const cairo_clip_t *clip)
{
i915_surface_t *dst = abstract_dst;
cairo_composite_rectangles_t extents;
@@ -2332,11 +2332,11 @@ static cairo_int_status_t
i915_surface_fill (void *abstract_dst,
cairo_operator_t op,
const cairo_pattern_t*source,
- cairo_path_fixed_t *path,
+ const cairo_path_fixed_t *path,
cairo_fill_rule_t fill_rule,
double tolerance,
cairo_antialias_t antialias,
- cairo_clip_t *clip)
+ const cairo_clip_t *clip)
{
return i915_surface_fill_with_alpha (abstract_dst, op, source, path, fill_rule, tolerance, antialias, clip, 1.);
}
diff --git a/src/drm/cairo-drm-i965-glyphs.c b/src/drm/cairo-drm-i965-glyphs.c
index 0ae52c7..cbf1cba 100644
--- a/src/drm/cairo-drm-i965-glyphs.c
+++ b/src/drm/cairo-drm-i965-glyphs.c
@@ -129,7 +129,7 @@ i965_surface_mask_internal (i965_surface_t *dst,
cairo_operator_t op,
const cairo_pattern_t *source,
i965_surface_t *mask,
- cairo_clip_t *clip,
+ const cairo_clip_t *clip,
const cairo_composite_rectangles_t *extents)
{
i965_device_t *device;
@@ -222,10 +222,10 @@ i965_surface_glyphs (void *abstract_surface,
cairo_glyph_t *g,
int num_glyphs,
cairo_scaled_font_t *scaled_font,
- cairo_clip_t *clip,
+ const cairo_clip_t *clip,
int *num_remaining)
{
- i965_surface_t *surface = abstract_surface;
+ i965_surface_t *surface = cairo_abstract_surface_cast_i965(abstract_surface);
i965_surface_t *mask = NULL;
i965_device_t *device;
i965_glyphs_t glyphs;
diff --git a/src/drm/cairo-drm-i965-private.h b/src/drm/cairo-drm-i965-private.h
index 7805c1f..bf54034 100644
--- a/src/drm/cairo-drm-i965-private.h
+++ b/src/drm/cairo-drm-i965-private.h
@@ -674,7 +674,7 @@ i965_clip_and_composite_spans (i965_surface_t *dst,
i965_spans_func_t draw_func,
void *draw_closure,
const cairo_composite_rectangles_t*extents,
- cairo_clip_t *clip);
+ const cairo_clip_t *clip);
cairo_private cairo_int_status_t
i965_surface_glyphs (void *abstract_surface,
@@ -683,7 +683,7 @@ i965_surface_glyphs (void *abstract_surface,
cairo_glyph_t *glyphs,
int num_glyphs,
cairo_scaled_font_t *scaled_font,
- cairo_clip_t *clip,
+ const cairo_clip_t *clip,
int *num_remaining);
cairo_private void
@@ -699,7 +699,7 @@ i965_shader_acquire_pattern (i965_shader_t *shader,
cairo_private void
i965_shader_set_clip (i965_shader_t *shader,
- cairo_clip_t *clip);
+ const cairo_clip_t *clip);
cairo_private cairo_status_t
i965_shader_commit (i965_shader_t *shader,
@@ -714,7 +714,7 @@ i965_device_flush (i965_device_t *device);
cairo_private cairo_status_t
i965_fixup_unbounded (i965_surface_t *dst,
const cairo_composite_rectangles_t *extents,
- cairo_clip_t *clip);
+ const cairo_clip_t *clip);
static inline int
i965_filter (cairo_filter_t filter)
diff --git a/src/drm/cairo-drm-i965-shader.c b/src/drm/cairo-drm-i965-shader.c
index eb8ea00..d5eca79 100644
--- a/src/drm/cairo-drm-i965-shader.c
+++ b/src/drm/cairo-drm-i965-shader.c
@@ -729,7 +729,7 @@ i965_shader_fini (i965_shader_t *shader)
void
i965_shader_set_clip (i965_shader_t *shader,
- cairo_clip_t *clip)
+ const cairo_clip_t *clip)
{
cairo_surface_t *clip_surface;
int clip_x, clip_y;
diff --git a/src/drm/cairo-drm-i965-spans.c b/src/drm/cairo-drm-i965-spans.c
index 5cba7ce..036a54c 100644
--- a/src/drm/cairo-drm-i965-spans.c
+++ b/src/drm/cairo-drm-i965-spans.c
@@ -365,7 +365,7 @@ i965_clip_and_composite_spans (i965_surface_t *dst,
i965_spans_func_t draw_func,
void *draw_closure,
const cairo_composite_rectangles_t*extents,
- cairo_clip_t *clip)
+ const cairo_clip_t *clip)
{
i965_spans_t spans;
i965_device_t *device;
diff --git a/src/drm/cairo-drm-i965-surface.c b/src/drm/cairo-drm-i965-surface.c
index 1ed5322..3774ef0 100644
--- a/src/drm/cairo-drm-i965-surface.c
+++ b/src/drm/cairo-drm-i965-surface.c
@@ -756,7 +756,7 @@ _composite_boxes_spans (void *closure,
cairo_status_t
i965_fixup_unbounded (i965_surface_t *dst,
const cairo_composite_rectangles_t *extents,
- cairo_clip_t *clip)
+ const cairo_clip_t *clip)
{
i965_shader_t shader;
i965_device_t *device;
@@ -872,7 +872,7 @@ i965_fixup_unbounded (i965_surface_t *dst,
static cairo_status_t
i965_fixup_unbounded_boxes (i965_surface_t *dst,
const cairo_composite_rectangles_t *extents,
- cairo_clip_t *clip,
+ const cairo_clip_t *clip,
cairo_boxes_t *boxes)
{
cairo_boxes_t clear;
@@ -990,7 +990,7 @@ _composite_boxes (i965_surface_t *dst,
const cairo_pattern_t *pattern,
cairo_boxes_t *boxes,
cairo_antialias_t antialias,
- cairo_clip_t *clip,
+ const cairo_clip_t *clip,
const cairo_composite_rectangles_t *extents)
{
cairo_bool_t need_clip_surface = FALSE;
@@ -1064,7 +1064,7 @@ _clip_and_composite_boxes (i965_surface_t *dst,
cairo_boxes_t *boxes,
cairo_antialias_t antialias,
const cairo_composite_rectangles_t *extents,
- cairo_clip_t *clip)
+ const cairo_clip_t *clip)
{
cairo_int_status_t status;
@@ -1092,7 +1092,7 @@ static cairo_int_status_t
i965_surface_paint (void *abstract_dst,
cairo_operator_t op,
const cairo_pattern_t *source,
- cairo_clip_t *clip)
+ const cairo_clip_t *clip)
{
i965_surface_t *dst = cairo_abstract_surface_cast_i965(abstract_dst);
cairo_composite_rectangles_t extents;
@@ -1147,7 +1147,7 @@ i965_surface_mask (void *abstract_dst,
cairo_operator_t op,
const cairo_pattern_t *source,
const cairo_pattern_t *mask,
- cairo_clip_t *clip)
+ const cairo_clip_t *clip)
{
i965_surface_t *dst = abstract_dst;
cairo_composite_rectangles_t extents;
@@ -1283,13 +1283,13 @@ static cairo_int_status_t
i965_surface_stroke (void *abstract_dst,
cairo_operator_t op,
const cairo_pattern_t *source,
- cairo_path_fixed_t *path,
+ const cairo_path_fixed_t *path,
const cairo_stroke_style_t *stroke_style,
const cairo_matrix_t *ctm,
const cairo_matrix_t *ctm_inverse,
double tolerance,
cairo_antialias_t antialias,
- cairo_clip_t *clip)
+ const cairo_clip_t *clip)
{
i965_surface_t *dst = abstract_dst;
cairo_composite_rectangles_t extents;
@@ -1392,13 +1392,13 @@ static cairo_int_status_t
i965_surface_fill (void *abstract_dst,
cairo_operator_t op,
const cairo_pattern_t*source,
- cairo_path_fixed_t *path,
+ const cairo_path_fixed_t *path,
cairo_fill_rule_t fill_rule,
double tolerance,
cairo_antialias_t antialias,
- cairo_clip_t *clip)
+ const cairo_clip_t *clip)
{
- i965_surface_t *dst = abstract_dst;
+ i965_surface_t *dst = cairo_abstract_surface_cast_i965(abstract_dst);
cairo_composite_rectangles_t extents;
composite_polygon_info_t info;
cairo_box_t boxes_stack[32], *clip_boxes = boxes_stack;
diff --git a/src/drm/cairo-drm-intel-surface.c b/src/drm/cairo-drm-intel-surface.c
index cc0b29b..beaf57b 100644
--- a/src/drm/cairo-drm-intel-surface.c
+++ b/src/drm/cairo-drm-intel-surface.c
@@ -187,7 +187,7 @@ static cairo_int_status_t
intel_surface_paint (void *abstract_surface,
cairo_operator_t op,
const cairo_pattern_t *source,
- cairo_clip_t *clip)
+ const cairo_clip_t *clip)
{
return _cairo_surface_paint (intel_surface_map_to_image (abstract_surface),
op, source, clip);
@@ -198,7 +198,7 @@ intel_surface_mask (void *abstract_surface,
cairo_operator_t op,
const cairo_pattern_t *source,
const cairo_pattern_t *mask,
- cairo_clip_t *clip)
+ const cairo_clip_t *clip)
{
return _cairo_surface_mask (intel_surface_map_to_image (abstract_surface),
op, source, mask, clip);
@@ -208,13 +208,13 @@ static cairo_int_status_t
intel_surface_stroke (void *abstract_surface,
cairo_operator_t op,
const cairo_pattern_t *source,
- cairo_path_fixed_t *path,
+ const cairo_path_fixed_t *path,
const cairo_stroke_style_t *stroke_style,
const cairo_matrix_t *ctm,
const cairo_matrix_t *ctm_inverse,
double tolerance,
cairo_antialias_t antialias,
- cairo_clip_t *clip)
+ const cairo_clip_t *clip)
{
return _cairo_surface_stroke (intel_surface_map_to_image (abstract_surface),
op, source, path, stroke_style, ctm, ctm_inverse,
@@ -225,11 +225,11 @@ static cairo_int_status_t
intel_surface_fill (void *abstract_surface,
cairo_operator_t op,
const cairo_pattern_t *source,
- cairo_path_fixed_t *path,
+ const cairo_path_fixed_t *path,
cairo_fill_rule_t fill_rule,
double tolerance,
cairo_antialias_t antialias,
- cairo_clip_t *clip)
+ const cairo_clip_t *clip)
{
return _cairo_surface_fill (intel_surface_map_to_image (abstract_surface),
op, source, path, fill_rule,
@@ -243,7 +243,7 @@ intel_surface_glyphs (void *abstract_surface,
cairo_glyph_t *glyphs,
int num_glyphs,
cairo_scaled_font_t *scaled_font,
- cairo_clip_t *clip,
+ const cairo_clip_t *clip,
int *num_remaining)
{
*num_remaining = 0;
diff --git a/src/drm/cairo-drm-radeon-surface.c b/src/drm/cairo-drm-radeon-surface.c
index 6288590..5b374c5 100644
--- a/src/drm/cairo-drm-radeon-surface.c
+++ b/src/drm/cairo-drm-radeon-surface.c
@@ -173,7 +173,7 @@ static cairo_int_status_t
radeon_surface_paint (void *abstract_surface,
cairo_operator_t op,
const cairo_pattern_t *source,
- cairo_clip_t *clip)
+ const cairo_clip_t *clip)
{
return _cairo_surface_paint (radeon_surface_map_to_image (abstract_surface),
op, source, clip);
@@ -184,7 +184,7 @@ radeon_surface_mask (void *abstract_surface,
cairo_operator_t op,
const cairo_pattern_t *source,
const cairo_pattern_t *mask,
- cairo_clip_t *clip)
+ const cairo_clip_t *clip)
{
return _cairo_surface_mask (radeon_surface_map_to_image (abstract_surface),
op, source, mask, clip);
@@ -194,13 +194,13 @@ static cairo_int_status_t
radeon_surface_stroke (void *abstract_surface,
cairo_operator_t op,
const cairo_pattern_t *source,
- cairo_path_fixed_t *path,
+ const cairo_path_fixed_t *path,
const cairo_stroke_style_t *stroke_style,
const cairo_matrix_t *ctm,
const cairo_matrix_t *ctm_inverse,
double tolerance,
cairo_antialias_t antialias,
- cairo_clip_t *clip)
+ const cairo_clip_t *clip)
{
return _cairo_surface_stroke (radeon_surface_map_to_image (abstract_surface),
op, source, path, stroke_style, ctm, ctm_inverse,
@@ -211,11 +211,11 @@ static cairo_int_status_t
radeon_surface_fill (void *abstract_surface,
cairo_operator_t op,
const cairo_pattern_t *source,
- cairo_path_fixed_t *path,
+ const cairo_path_fixed_t *path,
cairo_fill_rule_t fill_rule,
double tolerance,
cairo_antialias_t antialias,
- cairo_clip_t *clip)
+ const cairo_clip_t *clip)
{
return _cairo_surface_fill (radeon_surface_map_to_image (abstract_surface),
op, source, path, fill_rule,
@@ -229,7 +229,7 @@ radeon_surface_glyphs (void *abstract_surface,
cairo_glyph_t *glyphs,
int num_glyphs,
cairo_scaled_font_t *scaled_font,
- cairo_clip_t *clip,
+ const cairo_clip_t *clip,
int *num_remaining)
{
*num_remaining = 0;
--
2.6.4.442.g545299f
More information about the cairo
mailing list