external/cairo/cairo/cairo-1.10.2.patch | 26 +++++++++++++------------- vcl/headless/svpgdi.cxx | 16 ++++++++-------- 2 files changed, 21 insertions(+), 21 deletions(-)
New commits: commit f5fd3d4887351e63f669425a9e1b50869500517a Author: Ashod Nakashian <ashod.nakash...@collabora.co.uk> Date: Sun Dec 17 14:27:20 2017 -0500 svp: CAIRO_FORMAT_24BIT_RGB -> CAIRO_FORMAT_RGB24_888 This is more consistent with the Cairo naming convention. Change-Id: Ia71b069e02de0f91c8369428ded864833a43bff9 Reviewed-on: https://gerrit.libreoffice.org/46675 Reviewed-by: Ashod Nakashian <ashnak...@gmail.com> Tested-by: Ashod Nakashian <ashnak...@gmail.com> diff --git a/external/cairo/cairo/cairo-1.10.2.patch b/external/cairo/cairo/cairo-1.10.2.patch index c11a68675069..f50501926faa 100644 --- a/external/cairo/cairo/cairo-1.10.2.patch +++ b/external/cairo/cairo/cairo-1.10.2.patch @@ -122,12 +122,12 @@ diff -ruNw misc/cairo-1.10.2/configure misc/build/cairo-1.10.2/configure { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether cairo's xml surface backend feature could be enabled" >&5 diff -ruNw misc/cairo-1.10.2/src/cairo.h misc/build/cairo-1.10.2/src/cairo.h --- misc/cairo-1.10.2/src/cairo.h 2015-10-27 17:04:21.000000000 -0400 -+++ misc/build/cairo-1.10.2/src/cairo.h 2017-12-10 18:26:56.584047695 -0500 ++++ misc/build/cairo-1.10.2/src/cairo.h 2017-12-17 12:09:59.880406411 -0500 @@ -397,6 +397,8 @@ * with red in the upper 5 bits, then green in the middle * 6 bits, and blue in the lower 5 bits. (Since 1.2) * @CAIRO_FORMAT_RGB30: like RGB24 but with 10bpc. (Since 1.12) -+ * @CAIRO_FORMAT_24BIT_RGB: each pixel is a 24-bit quantity, ++ * @CAIRO_FORMAT_RGB24_888: each pixel is a 24-bit quantity, + * with Red, Green, Blue taking 8-bits each, in that order. (Since 1.1x) * * #cairo_format_t is used to identify the memory format of @@ -138,26 +138,26 @@ diff -ruNw misc/cairo-1.10.2/src/cairo.h misc/build/cairo-1.10.2/src/cairo.h CAIRO_FORMAT_RGB16_565 = 4, - CAIRO_FORMAT_RGB30 = 5 + CAIRO_FORMAT_RGB30 = 5, -+ CAIRO_FORMAT_24BIT_RGB = 6 ++ CAIRO_FORMAT_RGB24_888 = 6 } cairo_format_t; +/** -+ * Need this until CAIRO_FORMAT_24BIT_RGB is in some official release. ++ * Need this until CAIRO_FORMAT_RGB24_888 is in some official release. + * Otherwise we can't reliably check if this is available or we should + * convert from 24-bit RGB to 32-bit RGB before passing to Cairo. + **/ -+#define HAVE_CAIRO_FORMAT_24BIT_RGB ++#define HAVE_CAIRO_FORMAT_RGB24_888 /** * cairo_write_func_t: diff -ruNw misc/cairo-1.10.2/src/cairo-image-source.c misc/build/cairo-1.10.2/src/cairo-image-source.c --- misc/cairo-1.10.2/src/cairo-image-source.c 2015-10-27 17:04:30.000000000 -0400 -+++ misc/build/cairo-1.10.2/src/cairo-image-source.c 2017-12-10 22:31:08.911151137 -0500 ++++ misc/build/cairo-1.10.2/src/cairo-image-source.c 2017-12-17 12:09:56.076344387 -0500 @@ -508,6 +508,19 @@ color.blue = expand_channel(pixel & 0x3fff, 10); return pixman_image_create_solid_fill (&color); -+ case CAIRO_FORMAT_24BIT_RGB: ++ case CAIRO_FORMAT_RGB24_888: + pixel = *(uint32_t *) (image->data + y * image->stride + 3 * x); + pixel &= 0x00ffffff; /* ignore next pixel bits */ + if (pixel == 0) @@ -175,13 +175,13 @@ diff -ruNw misc/cairo-1.10.2/src/cairo-image-source.c misc/build/cairo-1.10.2/sr pixel = *(uint32_t *) (image->data + y * image->stride + 4 * x); diff -ruNw misc/cairo-1.10.2/src/cairo-image-surface.c misc/build/cairo-1.10.2/src/cairo-image-surface.c --- misc/cairo-1.10.2/src/cairo-image-surface.c 2015-10-27 17:04:30.000000000 -0400 -+++ misc/build/cairo-1.10.2/src/cairo-image-surface.c 2017-12-09 16:23:41.702363265 -0500 ++++ misc/build/cairo-1.10.2/src/cairo-image-surface.c 2017-12-17 12:09:59.876406346 -0500 @@ -104,13 +104,15 @@ return CAIRO_FORMAT_A1; case PIXMAN_r5g6b5: return CAIRO_FORMAT_RGB16_565; + case PIXMAN_r8g8b8: -+ return CAIRO_FORMAT_24BIT_RGB; ++ return CAIRO_FORMAT_RGB24_888; #if PIXMAN_VERSION >= PIXMAN_VERSION_ENCODE(0,22,0) case PIXMAN_r8g8b8a8: case PIXMAN_r8g8b8x8: #endif @@ -197,7 +197,7 @@ diff -ruNw misc/cairo-1.10.2/src/cairo-image-surface.c misc/build/cairo-1.10.2/s case CAIRO_FORMAT_RGB16_565: ret = PIXMAN_r5g6b5; break; -+ case CAIRO_FORMAT_24BIT_RGB: ++ case CAIRO_FORMAT_RGB24_888: + ret = PIXMAN_r8g8b8; + break; case CAIRO_FORMAT_ARGB32: @@ -207,20 +207,20 @@ diff -ruNw misc/cairo-1.10.2/src/cairo-image-surface.c misc/build/cairo-1.10.2/s case CAIRO_FORMAT_RGB30: case CAIRO_FORMAT_RGB24: return 32; -+ case CAIRO_FORMAT_24BIT_RGB: ++ case CAIRO_FORMAT_RGB24_888: + return 24; case CAIRO_FORMAT_RGB16_565: return 16; case CAIRO_FORMAT_A8: diff -ruNw misc/cairo-1.10.2/src/cairoint.h misc/build/cairo-1.10.2/src/cairoint.h --- misc/cairo-1.10.2/src/cairoint.h 2015-10-27 17:04:30.000000000 -0400 -+++ misc/build/cairo-1.10.2/src/cairoint.h 2017-12-09 14:32:01.555523101 -0500 ++++ misc/build/cairo-1.10.2/src/cairoint.h 2017-12-17 12:09:59.880406411 -0500 @@ -1486,7 +1486,7 @@ * in cairo-xlib-surface.c--again see -Wswitch-enum). */ #define CAIRO_FORMAT_VALID(format) ((format) >= CAIRO_FORMAT_ARGB32 && \ - (format) <= CAIRO_FORMAT_RGB30) -+ (format) <= CAIRO_FORMAT_24BIT_RGB) ++ (format) <= CAIRO_FORMAT_RGB24_888) /* pixman-required stride alignment in bytes. */ #define CAIRO_STRIDE_ALIGNMENT (sizeof (uint32_t)) diff --git a/vcl/headless/svpgdi.cxx b/vcl/headless/svpgdi.cxx index f54f7a531352..e928961055c3 100644 --- a/vcl/headless/svpgdi.cxx +++ b/vcl/headless/svpgdi.cxx @@ -103,7 +103,7 @@ namespace cairo_format_t getCairoFormat(const BitmapBuffer& rBuffer) { cairo_format_t nFormat; -#ifdef HAVE_CAIRO_FORMAT_24BIT_RGB +#ifdef HAVE_CAIRO_FORMAT_RGB24_888 assert(rBuffer.mnBitCount == 32 || rBuffer.mnBitCount == 24 || rBuffer.mnBitCount == 1); #else assert(rBuffer.mnBitCount == 32 || rBuffer.mnBitCount == 1); @@ -111,9 +111,9 @@ namespace if (rBuffer.mnBitCount == 32) nFormat = CAIRO_FORMAT_ARGB32; -#ifdef HAVE_CAIRO_FORMAT_24BIT_RGB +#ifdef HAVE_CAIRO_FORMAT_RGB24_888 else if (rBuffer.mnBitCount == 24) - nFormat = CAIRO_FORMAT_24BIT_RGB; + nFormat = CAIRO_FORMAT_RGB24_888; #endif else nFormat = CAIRO_FORMAT_A1; @@ -188,7 +188,7 @@ namespace { if ((SVP_CAIRO_FORMAT & ~ScanlineFormat::TopDown) == ScanlineFormat::N32BitTcRgba) { - assert((SVP_24BIT_FORMAT & ~ScanlineFormat::TopDown) == ScanlineFormat::N32BitTcRgb); + assert((SVP_24BIT_FORMAT & ~ScanlineFormat::TopDown) == ScanlineFormat::N24BitTcRgb); pD[0] = pS[0]; pD[1] = pS[1]; pD[2] = pS[2]; @@ -196,7 +196,7 @@ namespace } else if ((SVP_CAIRO_FORMAT & ~ScanlineFormat::TopDown) == ScanlineFormat::N32BitTcBgra) { - assert((SVP_24BIT_FORMAT & ~ScanlineFormat::TopDown) == ScanlineFormat::N32BitTcBgr); + assert((SVP_24BIT_FORMAT & ~ScanlineFormat::TopDown) == ScanlineFormat::N24BitTcBgr); pD[0] = pS[0]; pD[1] = pS[1]; pD[2] = pS[2]; @@ -204,7 +204,7 @@ namespace } else if ((SVP_CAIRO_FORMAT & ~ScanlineFormat::TopDown) == ScanlineFormat::N32BitTcArgb) { - assert((SVP_24BIT_FORMAT & ~ScanlineFormat::TopDown) == ScanlineFormat::N32BitTcRgb); + assert((SVP_24BIT_FORMAT & ~ScanlineFormat::TopDown) == ScanlineFormat::N24BitTcRgb); pD[0] = 0xff; // Alpha pD[1] = pS[0]; pD[2] = pS[1]; @@ -229,7 +229,7 @@ namespace explicit SourceHelper(const SalBitmap& rSourceBitmap) { const SvpSalBitmap& rSrcBmp = static_cast<const SvpSalBitmap&>(rSourceBitmap); -#ifdef HAVE_CAIRO_FORMAT_24BIT_RGB +#ifdef HAVE_CAIRO_FORMAT_RGB24_888 if (rSrcBmp.GetBitCount() != 32 && rSrcBmp.GetBitCount() != 24) #else if (rSrcBmp.GetBitCount() != 32) @@ -1456,7 +1456,7 @@ namespace return false; // We use Cairo that supports 24-bit RGB. -#ifdef HAVE_CAIRO_FORMAT_24BIT_RGB +#ifdef HAVE_CAIRO_FORMAT_RGB24_888 if (pBuffer->mnBitCount != 32 && pBuffer->mnBitCount != 24 && pBuffer->mnBitCount != 1) #else if (pBuffer->mnBitCount != 32 && pBuffer->mnBitCount != 1) _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits