diff options
author | Siarhei Siamashka <siarhei.siamashka@gmail.com> | 2012-12-20 05:29:30 +0200 |
---|---|---|
committer | Siarhei Siamashka <siarhei.siamashka@gmail.com> | 2012-12-20 05:29:30 +0200 |
commit | 69fd5b753f7e6f93922c7c079e01b967dbda3c1a (patch) | |
tree | 0d3cccc7cf524374f952181bc0a2e17ed7f2edf2 | |
parent | 0477ba7457a705b6b668ab497a9a591fd503759a (diff) |
Various remaining fixes needed for successful compilation with C++cplusplus-v2
-rw-r--r-- | pixman/pixman-access.c | 2 | ||||
-rw-r--r-- | pixman/pixman-bits-image.c | 4 | ||||
-rw-r--r-- | pixman/pixman-general.c | 8 | ||||
-rw-r--r-- | pixman/pixman-glyph.c | 2 | ||||
-rw-r--r-- | pixman/pixman-private.h | 19 | ||||
-rw-r--r-- | pixman/pixman-region.c | 16 | ||||
-rw-r--r-- | pixman/pixman-x86.c | 7 | ||||
-rw-r--r-- | pixman/pixman.c | 2 |
8 files changed, 33 insertions, 27 deletions
diff --git a/pixman/pixman-access.c b/pixman/pixman-access.c index b5c8e40..046d2f1 100644 --- a/pixman/pixman-access.c +++ b/pixman/pixman-access.c @@ -465,7 +465,7 @@ convert_and_store_pixel (bits_image_t * image, bits, offset, PIXMAN_ ## format); \ } \ \ - static const void *const __dummy__ ## format + static const void *const __dummy__ ## format = 0 MAKE_ACCESSORS(a8r8g8b8); MAKE_ACCESSORS(x8r8g8b8); diff --git a/pixman/pixman-bits-image.c b/pixman/pixman-bits-image.c index 75a39a1..7650bdc 100644 --- a/pixman/pixman-bits-image.c +++ b/pixman/pixman-bits-image.c @@ -40,7 +40,7 @@ static uint32_t * _pixman_image_get_scanline_generic_float (pixman_iter_t * iter, const uint32_t *mask) { - pixman_iter_get_scanline_t fetch_32 = iter->data; + pixman_iter_get_scanline_t fetch_32 = (pixman_iter_get_scanline_t)iter->data; uint32_t *buffer = iter->buffer; fetch_32 (iter, NULL); @@ -1508,7 +1508,7 @@ _pixman_bits_image_src_iter_init (pixman_image_t *image, pixman_iter_t *iter) } else { - iter->data = info->get_scanline_32; + iter->data = (void *)info->get_scanline_32; iter->get_scanline = info->get_scanline_float; } return; diff --git a/pixman/pixman-general.c b/pixman/pixman-general.c index 0bf91e4..4354fd2 100644 --- a/pixman/pixman-general.c +++ b/pixman/pixman-general.c @@ -129,7 +129,7 @@ general_composite_rect (pixman_implementation_t *imp, } else { - narrow = 0; + narrow = (iter_flags_t)0; Bpp = 16; } @@ -154,7 +154,7 @@ general_composite_rect (pixman_implementation_t *imp, } /* src iter */ - src_iter_flags = narrow | op_flags[op].src; + src_iter_flags = (iter_flags_t)(narrow | op_flags[op].src); _pixman_implementation_src_iter_init (imp->toplevel, &src_iter, src_image, src_x, src_y, width, height, @@ -178,12 +178,12 @@ general_composite_rect (pixman_implementation_t *imp, _pixman_implementation_src_iter_init ( imp->toplevel, &mask_iter, mask_image, mask_x, mask_y, width, height, - mask_buffer, narrow | (component_alpha? 0 : ITER_IGNORE_RGB), info->mask_flags); + mask_buffer, (iter_flags_t)(narrow | (component_alpha? 0 : ITER_IGNORE_RGB)), info->mask_flags); /* dest iter */ _pixman_implementation_dest_iter_init ( imp->toplevel, &dest_iter, dest_image, dest_x, dest_y, width, height, - dest_buffer, narrow | op_flags[op].dst, info->dest_flags); + dest_buffer, (iter_flags_t)(narrow | op_flags[op].dst), info->dest_flags); compose = _pixman_implementation_lookup_combiner ( imp->toplevel, op, component_alpha, narrow); diff --git a/pixman/pixman-glyph.c b/pixman/pixman-glyph.c index 6d2c8bb..022ae6e 100644 --- a/pixman/pixman-glyph.c +++ b/pixman/pixman-glyph.c @@ -361,7 +361,7 @@ pixman_glyph_get_mask_format (pixman_glyph_cache_t *cache, for (i = 0; i < n_glyphs; ++i) { - const glyph_t *glyph = glyphs[i].glyph; + const glyph_t *glyph = (const glyph_t *)glyphs[i].glyph; pixman_format_code_t glyph_format = glyph->image->bits.format; if (PIXMAN_FORMAT_TYPE (glyph_format) == PIXMAN_TYPE_A) diff --git a/pixman/pixman-private.h b/pixman/pixman-private.h index d2ab942..2275900 100644 --- a/pixman/pixman-private.h +++ b/pixman/pixman-private.h @@ -653,14 +653,14 @@ _pixman_iter_get_scanline_noop (pixman_iter_t *iter, const uint32_t *mask); /* These "formats" all have depth 0, so they * will never clash with any real ones */ -#define PIXMAN_null PIXMAN_FORMAT (0, 0, 0, 0, 0, 0) -#define PIXMAN_solid PIXMAN_FORMAT (0, 1, 0, 0, 0, 0) -#define PIXMAN_pixbuf PIXMAN_FORMAT (0, 2, 0, 0, 0, 0) -#define PIXMAN_rpixbuf PIXMAN_FORMAT (0, 3, 0, 0, 0, 0) -#define PIXMAN_unknown PIXMAN_FORMAT (0, 4, 0, 0, 0, 0) -#define PIXMAN_any PIXMAN_FORMAT (0, 5, 0, 0, 0, 0) +#define PIXMAN_null ((pixman_format_code_t) PIXMAN_FORMAT (0, 0, 0, 0, 0, 0)) +#define PIXMAN_solid ((pixman_format_code_t) PIXMAN_FORMAT (0, 1, 0, 0, 0, 0)) +#define PIXMAN_pixbuf ((pixman_format_code_t) PIXMAN_FORMAT (0, 2, 0, 0, 0, 0)) +#define PIXMAN_rpixbuf ((pixman_format_code_t) PIXMAN_FORMAT (0, 3, 0, 0, 0, 0)) +#define PIXMAN_unknown ((pixman_format_code_t) PIXMAN_FORMAT (0, 4, 0, 0, 0, 0)) +#define PIXMAN_any ((pixman_format_code_t) PIXMAN_FORMAT (0, 5, 0, 0, 0, 0)) -#define PIXMAN_OP_any (PIXMAN_N_OPERATORS + 1) +#define PIXMAN_OP_any ((pixman_op_t)(PIXMAN_N_OPERATORS + 1)) #define FAST_PATH_ID_TRANSFORM (1 << 0) #define FAST_PATH_NO_ALPHA_MAP (1 << 1) @@ -770,9 +770,14 @@ get_implementation (void) /* This function is exported for the sake of the test suite and not part * of the ABI. */ + +PIXMAN_BEGIN_DECLS + PIXMAN_EXPORT pixman_implementation_t * _pixman_internal_only_get_implementation (void); +PIXMAN_END_DECLS + /* Memory allocation helpers */ static inline void * diff --git a/pixman/pixman-region.c b/pixman/pixman-region.c index 2d6f157..4ae74cf 100644 --- a/pixman/pixman-region.c +++ b/pixman/pixman-region.c @@ -1564,17 +1564,17 @@ quick_sort_rects ( *----------------------------------------------------------------------- */ +/* Descriptor for regions under construction in Step 2. */ +typedef struct +{ + region_type_t reg; + int prev_band; + int cur_band; +} region_info_t; + static pixman_bool_t validate (region_type_t * badreg) { - /* Descriptor for regions under construction in Step 2. */ - typedef struct - { - region_type_t reg; - int prev_band; - int cur_band; - } region_info_t; - region_info_t stack_regions[64]; int numRects; /* Original numRects for badreg */ diff --git a/pixman/pixman-x86.c b/pixman/pixman-x86.c index 57e4d1f..3a61fb4 100644 --- a/pixman/pixman-x86.c +++ b/pixman/pixman-x86.c @@ -33,14 +33,15 @@ * it. */ -typedef enum -{ +typedef int cpu_features_t; + +enum { X86_MMX = (1 << 0), X86_MMX_EXTENSIONS = (1 << 1), X86_SSE = (1 << 2) | X86_MMX_EXTENSIONS, X86_SSE2 = (1 << 3), X86_CMOV = (1 << 4) -} cpu_features_t; +}; #ifdef HAVE_GETISAX diff --git a/pixman/pixman.c b/pixman/pixman.c index 3fabed1..f2dada4 100644 --- a/pixman/pixman.c +++ b/pixman/pixman.c @@ -149,7 +149,7 @@ optimize_operator (pixman_op_t op, is_dest_opaque >>= OPAQUE_SHIFT - 1; is_source_opaque >>= OPAQUE_SHIFT; - return operator_table[op].opaque_info[is_dest_opaque | is_source_opaque]; + return (pixman_op_t)operator_table[op].opaque_info[is_dest_opaque | is_source_opaque]; } /* |