summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Otte <otte@gnome.org>2009-09-21 15:59:41 +0200
committerBenjamin Otte <otte@gnome.org>2009-11-04 15:50:13 +0100
commitb14556417130f3f036743e8ca80ba9ed9fccee37 (patch)
tree1235aa213245f92ab2efbef7551b416643c920a2
parent18ff0e10ec076b7d7b60ae8a63ea2c00c168aa48 (diff)
Planar support for cairo_image_surface_create_for_pixman_format()
This updates the function prototype to similar changes in pixman.
-rw-r--r--src/cairo-image-surface.c9
-rw-r--r--src/cairo.h2
2 files changed, 7 insertions, 4 deletions
diff --git a/src/cairo-image-surface.c b/src/cairo-image-surface.c
index 15b8f53e..ebf6c39f 100644
--- a/src/cairo-image-surface.c
+++ b/src/cairo-image-surface.c
@@ -365,18 +365,21 @@ cairo_image_surface_create_with_pixman_format (unsigned char *data,
unsigned int pixman_format,
int width,
int height,
- int stride)
+ ...)
{
cairo_surface_t *surface;
pixman_image_t *pixman_image;
+ va_list args;
if (! _cairo_image_surface_is_size_valid (width, height))
{
return _cairo_surface_create_in_error (_cairo_error (CAIRO_STATUS_INVALID_SIZE));
}
- pixman_image = pixman_image_create_bits (pixman_format, width, height,
- (uint32_t *) data, stride);
+ va_start (args, height);
+ pixman_image = pixman_image_create_bits_valist (pixman_format, width, height,
+ (uint32_t *) data, args);
+ va_end (args);
if (unlikely (pixman_image == NULL))
return _cairo_surface_create_in_error (_cairo_error (CAIRO_STATUS_NO_MEMORY));
diff --git a/src/cairo.h b/src/cairo.h
index abbd1d10..227664a3 100644
--- a/src/cairo.h
+++ b/src/cairo.h
@@ -2164,7 +2164,7 @@ cairo_image_surface_create_with_pixman_format (unsigned char *data,
unsigned int pixman_format,
int width,
int height,
- int stride);
+ ...);
cairo_public unsigned char *
cairo_image_surface_get_data (cairo_surface_t *surface);