summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/cairo-image-surface.c7
-rw-r--r--src/cairo-xlib-display.c1
-rw-r--r--src/cairo.h6
-rw-r--r--src/cairoint.h2
4 files changed, 14 insertions, 2 deletions
diff --git a/src/cairo-image-surface.c b/src/cairo-image-surface.c
index 8e741504..48ef658e 100644
--- a/src/cairo-image-surface.c
+++ b/src/cairo-image-surface.c
@@ -94,6 +94,8 @@ _cairo_format_from_pixman_format (pixman_format_code_t pixman_format)
return CAIRO_FORMAT_RGBA32;
case PIXMAN_b8g8r8a8:
return CAIRO_FORMAT_BGRA32;
+ case PIXMAN_y444:
+ return CAIRO_FORMAT_PLANAR_444;
case PIXMAN_x8b8g8r8: case PIXMAN_r8g8b8:
case PIXMAN_b8g8r8: case PIXMAN_b5g6r5:
case PIXMAN_a1r5g5b5: case PIXMAN_x1r5g5b5: case PIXMAN_a1b5g5r5:
@@ -280,6 +282,9 @@ _cairo_format_to_pixman_format_code (cairo_format_t format)
case CAIRO_FORMAT_A8:
ret = PIXMAN_a8;
break;
+ case CAIRO_FORMAT_PLANAR_444:
+ ret = PIXMAN_y444;
+ break;
case CAIRO_FORMAT_RGB24:
ret = PIXMAN_x8r8g8b8;
break;
@@ -794,6 +799,7 @@ _cairo_content_from_format (cairo_format_t format)
return CAIRO_CONTENT_COLOR_ALPHA;
case CAIRO_FORMAT_RGB24:
case CAIRO_FORMAT_RGB16_565:
+ case CAIRO_FORMAT_PLANAR_444:
return CAIRO_CONTENT_COLOR;
case CAIRO_FORMAT_A8:
case CAIRO_FORMAT_A1:
@@ -819,6 +825,7 @@ _cairo_format_bits_per_pixel (cairo_format_t format)
case CAIRO_FORMAT_RGB16_565:
return 16;
case CAIRO_FORMAT_A8:
+ case CAIRO_FORMAT_PLANAR_444:
return 8;
case CAIRO_FORMAT_A1:
return 1;
diff --git a/src/cairo-xlib-display.c b/src/cairo-xlib-display.c
index 757c8838..8a4e6679 100644
--- a/src/cairo-xlib-display.c
+++ b/src/cairo-xlib-display.c
@@ -598,6 +598,7 @@ _cairo_xlib_display_get_xrender_format (cairo_xlib_display_t *display,
case CAIRO_FORMAT_RGBA32:
case CAIRO_FORMAT_ABGR32:
case CAIRO_FORMAT_BGRA32:
+ case CAIRO_FORMAT_PLANAR_444:
ASSERT_NOT_REACHED;
case CAIRO_FORMAT_ARGB32:
pict_format = PictStandardARGB32; break;
diff --git a/src/cairo.h b/src/cairo.h
index 04548815..4a06785c 100644
--- a/src/cairo.h
+++ b/src/cairo.h
@@ -2279,6 +2279,9 @@ cairo_surface_has_show_text_glyphs (cairo_surface_t *surface);
* @CAIRO_FORMAT_BGRA32: each pixel is a 32-bit quantity, with
* blue in the upper 8 bits, then green, then red, then alpha.
* The 32-bit quantities are stored native-endian.
+ * @CAIRO_FORMAT_PLANAR_444: A planar format with 3 planes. The
+ * red, green and blue values are stored in their own plane
+ * each.
*
* #cairo_format_t is used to identify the memory format of
* image data.
@@ -2303,7 +2306,8 @@ typedef enum _cairo_format {
CAIRO_FORMAT_RGB16_565 = 4,
CAIRO_FORMAT_RGBA32 = 5,
CAIRO_FORMAT_ABGR32 = 6,
- CAIRO_FORMAT_BGRA32 = 7
+ CAIRO_FORMAT_BGRA32 = 7,
+ CAIRO_FORMAT_PLANAR_444 = 8
} cairo_format_t;
/**
diff --git a/src/cairoint.h b/src/cairoint.h
index 00ac0713..12124c0b 100644
--- a/src/cairoint.h
+++ b/src/cairoint.h
@@ -2117,7 +2117,7 @@ _cairo_surface_has_device_transform (cairo_surface_t *surface) cairo_pure;
/* cairo-image-surface.c */
#define CAIRO_FORMAT_VALID(format) ((format) >= CAIRO_FORMAT_ARGB32 && \
- (format) <= CAIRO_FORMAT_BGRA32)
+ (format) <= CAIRO_FORMAT_PLANAR_444)
#define CAIRO_FORMAT_MAX_PLANES 4
#define CAIRO_COLOR_SPACE_VALID(colorspace) ((colorspace) <= CAIRO_COLOR_SPACE_YCBCR_JPEG)