mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-05-05 06:28:01 +02:00
Use new pixman formats
b132fae5e8 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.
This commit is contained in:
parent
b60694cbc7
commit
aa646e47f3
3 changed files with 9 additions and 13 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue