[cairo-commit] configure.ac src/cairo-gl-surface.c src/cairo-vg-surface.c
Andrea Canciani
ranma42 at kemper.freedesktop.org
Thu Jul 21 11:16:30 PDT 2011
configure.ac | 2 +-
src/cairo-gl-surface.c | 14 +++++---------
src/cairo-vg-surface.c | 6 +++---
3 files changed, 9 insertions(+), 13 deletions(-)
New commits:
commit aa646e47f31cabff6731aa0212d6b9de55823fad
Author: Andrea Canciani <ranma42 at gmail.com>
Date: Thu Jul 21 19:54:46 2011 +0200
Use new pixman formats
b132fae5e843c329d1414d1a65b2e8d66b99852f introduced the usage of two
new pixman formats. This requires pixman 0.22, but makes it possible
to fix some TODO's left behind in gl and vg.
diff --git a/configure.ac b/configure.ac
index 9748f08..8e6bc4d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -602,7 +602,7 @@ CAIRO_ENABLE(test_surfaces, test surfaces, no)
dnl ===========================================================================
CAIRO_ENABLE_SURFACE_BACKEND(image, image, always, [
- pixman_REQUIRES="pixman-1 >= 0.20.2"
+ pixman_REQUIRES="pixman-1 >= 0.22.0"
PKG_CHECK_MODULES(pixman, $pixman_REQUIRES, , [AC_MSG_RESULT(no)
use_image="no (requires $pixman_REQUIRES http://cairographics.org/releases/)"])
image_REQUIRES=$pixman_REQUIRES
diff --git a/src/cairo-gl-surface.c b/src/cairo-gl-surface.c
index 1b001b6..95707dd 100644
--- a/src/cairo-gl-surface.c
+++ b/src/cairo-gl-surface.c
@@ -942,15 +942,11 @@ _cairo_gl_surface_get_image (cairo_gl_surface_t *surface,
if (ctx->gl_flavor == CAIRO_GL_FLAVOR_ES) {
format = GL_RGBA;
if (!_cairo_is_little_endian ()) {
- ASSERT_NOT_REACHED;
- /* TODO: Add r8g8b8a8 support to pixman and enable this
- if (surface->base.content == CAIRO_CONTENT_COLOR)
- pixman_format = PIXMAN_r8g8b8x8;
- else
- pixman_format = PIXMAN_r8g8b8a8;
- */
- }
- else {
+ if (surface->base.content == CAIRO_CONTENT_COLOR)
+ pixman_format = PIXMAN_r8g8b8x8;
+ else
+ pixman_format = PIXMAN_r8g8b8a8;
+ } else {
if (surface->base.content == CAIRO_CONTENT_COLOR)
pixman_format = PIXMAN_x8b8g8r8;
else
diff --git a/src/cairo-vg-surface.c b/src/cairo-vg-surface.c
index 06d46c1..eccf129 100644
--- a/src/cairo-vg-surface.c
+++ b/src/cairo-vg-surface.c
@@ -246,9 +246,9 @@ _vg_format_to_pixman (VGImageFormat format,
*needs_premult_fixup = FALSE;
switch (format) {
/* RGB{A,X} channel ordering */
- case VG_sRGBX_8888: return 0; //PIXMAN_r8g8b8x8;
- case VG_sRGBA_8888: return 0;
- case VG_sRGBA_8888_PRE: return 0; //PIXMAN_r8b8g8a8;
+ case VG_sRGBX_8888: return PIXMAN_r8g8b8x8;
+ case VG_sRGBA_8888: *needs_premult_fixup = TRUE; return PIXMAN_r8g8b8a8;
+ case VG_sRGBA_8888_PRE: return PIXMAN_r8b8g8a8;
case VG_sRGB_565: return PIXMAN_r5g6b5;
case VG_sRGBA_5551: return 0;
case VG_sRGBA_4444: return 0;
More information about the cairo-commit
mailing list