From 6dc52f1389b6b1c6ce2589ff183982d65c8c1581 Mon Sep 17 00:00:00 2001 From: Alexander Larsson Date: Mon, 19 Apr 2010 15:49:20 +0200 Subject: Add pixman utilities for bitmap to pixman_image_t conversion --- common/pixman_utils.h | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'common/pixman_utils.h') diff --git a/common/pixman_utils.h b/common/pixman_utils.h index 743bd06e..24ecee37 100644 --- a/common/pixman_utils.h +++ b/common/pixman_utils.h @@ -20,6 +20,7 @@ #define _H__PIXMAN_UTILS #include +#include #define PIXMAN_DONT_DEFINE_STDINT #include @@ -51,6 +52,28 @@ typedef enum { } SpiceROP; +int spice_pixman_image_get_bpp(pixman_image_t *image); + +pixman_format_code_t spice_surface_format_to_pixman(uint32_t surface_format); +pixman_format_code_t spice_bitmap_format_to_pixman(int bitmap_format, + uint32_t palette_surface_format); +pixman_image_t *spice_bitmap_try_as_pixman(int src_format, int flags, + int width, int height, + uint8_t *data, int stride); +pixman_image_t *spice_bitmap_to_pixman(pixman_image_t *dest_image, + int src_format, int flags, + int width, int height, + uint8_t *src, int src_stride, + uint32_t palette_surface_format, + SpicePalette *palette); +pixman_image_t *spice_bitmap_convert_to_pixman(pixman_format_code_t dest_format, + pixman_image_t *dest_image, + int src_format, int flags, + int width, int height, + uint8_t *src, int src_stride, + uint32_t palette_surface_format, + SpicePalette *palette); + void spice_pixman_region32_init_from_bitmap(pixman_region32_t *region, uint32_t *data, int width, int height, -- cgit