summaryrefslogtreecommitdiffstats
path: root/common/pixman_utils.h
diff options
context:
space:
mode:
authorAlexander Larsson <alexl@redhat.com>2010-04-19 15:49:20 +0200
committerAlexander Larsson <alexl@redhat.com>2010-04-23 16:36:32 +0200
commit6dc52f1389b6b1c6ce2589ff183982d65c8c1581 (patch)
treef39b2c64d38513703e8cf007def34f87f15b194d /common/pixman_utils.h
parent8bd1a873704dbaa3a65c1335cb710537080acccd (diff)
downloadspice-6dc52f1389b6b1c6ce2589ff183982d65c8c1581.tar.gz
spice-6dc52f1389b6b1c6ce2589ff183982d65c8c1581.tar.xz
spice-6dc52f1389b6b1c6ce2589ff183982d65c8c1581.zip
Add pixman utilities for bitmap to pixman_image_t conversion
Diffstat (limited to 'common/pixman_utils.h')
-rw-r--r--common/pixman_utils.h23
1 files changed, 23 insertions, 0 deletions
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 <spice/types.h>
+#include <stdlib.h>
#define PIXMAN_DONT_DEFINE_STDINT
#include <pixman.h>
@@ -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,