[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-5.3' - external/cairo

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Sun Mar 3 13:27:47 UTC 2019


 external/cairo/UnpackedTarball_cairo.mk      |    1 
 external/cairo/cairo/cairo.oldfreetype.patch |   78 +++++++++++++++++++++++++++
 2 files changed, 79 insertions(+)

New commits:
commit c97621b1b25690eb2c23767c55b7437182baf22b
Author:     Andras Timar <andras.timar at collabora.com>
AuthorDate: Sun Mar 3 08:21:29 2019 -0500
Commit:     Andras Timar <andras.timar at collabora.com>
CommitDate: Sun Mar 3 14:26:11 2019 +0100

    cairo: make it compile with legacy freetype on CentOS 6
    
    Change-Id: I1b20523e2809dc16ff70198abc7c5fae8b962ddb

diff --git a/external/cairo/UnpackedTarball_cairo.mk b/external/cairo/UnpackedTarball_cairo.mk
index 503e762cb4f5..a4f6020ca3a6 100644
--- a/external/cairo/UnpackedTarball_cairo.mk
+++ b/external/cairo/UnpackedTarball_cairo.mk
@@ -13,6 +13,7 @@ $(eval $(call gb_UnpackedTarball_set_tarball,cairo,$(CAIRO_TARBALL),,cairo))
 
 $(eval $(call gb_UnpackedTarball_add_patches,cairo,\
 	external/cairo/cairo/cairo-1.10.2.patch \
+	external/cairo/cairo/cairo.oldfreetype.patch \
 ))
 
 ifeq ($(OS),IOS)
diff --git a/external/cairo/cairo/cairo.oldfreetype.patch b/external/cairo/cairo/cairo.oldfreetype.patch
new file mode 100644
index 000000000000..d994dd5f4b1b
--- /dev/null
+++ b/external/cairo/cairo/cairo.oldfreetype.patch
@@ -0,0 +1,78 @@
+From c0ed8ce1a111cb9472aef080ac3aa31526443f7c Mon Sep 17 00:00:00 2001
+From: suzuki toshiya <mpsuzuki at hiroshima-u.ac.jp>
+Date: Thu, 13 Dec 2018 14:36:56 +0900
+Subject: [PATCH] [cairo-ft-font.c] conditionalize the changes by 3ec4aa24 on 2018-07-16 for legacy FreeType2 without color font feature
+
+---
+ src/cairo-ft-font.c |   10 ++++++++++
+ 1 files changed, 10 insertions(+), 0 deletions(-)
+
+diff --git a/src/cairo-ft-font.c b/src/cairo-ft-font.c
+index 325dd61..1841adb 100644
+--- misc/a/src/cairo-ft-font.c
++++ misc/b/src/cairo-ft-font.c
+@@ -976,10 +976,12 @@ _compute_xrender_bitmap_size(FT_Bitmap      *target,
+ 	pitch = width * 4;
+ 	break;
+ 
++#ifdef FT_PIXEL_MODE_BGRA
+     case FT_PIXEL_MODE_BGRA:
+ 	/* each pixel is replicated into a 32-bit ARGB value */
+ 	pitch = width * 4;
+ 	break;
++#endif
+ 
+     default:  /* unsupported source format */
+ 	return -1;
+@@ -1177,10 +1179,12 @@ _fill_xrender_bitmap(FT_Bitmap      *target,
+ 	}
+ 	break;
+ 
++#ifdef FT_PIXEL_MODE_BGRA
+     case FT_PIXEL_MODE_BGRA:
+ 	for (h = height; h > 0; h--, srcLine += src_pitch, dstLine += pitch)
+ 	    memcpy (dstLine, srcLine, width * 4);
+ 	break;
++#endif
+ 
+     default:
+ 	assert (0);
+@@ -1289,6 +1293,7 @@ _get_bitmap_surface (FT_Bitmap		     *bitmap,
+ 	    component_alpha = TRUE;
+ 	}
+ 	break;
++#ifdef FT_PIXEL_MODE_BGRA
+     case FT_PIXEL_MODE_BGRA:
+ 	stride = width * 4;
+ 	if (own_buffer) {
+@@ -1311,6 +1316,7 @@ _get_bitmap_surface (FT_Bitmap		     *bitmap,
+ 	}
+ 	format = CAIRO_FORMAT_ARGB32;
+ 	break;
++#endif
+     case FT_PIXEL_MODE_GRAY2:
+     case FT_PIXEL_MODE_GRAY4:
+     convert:
+@@ -2487,7 +2493,9 @@ _cairo_ft_scaled_glyph_init (void			*abstract_font,
+ 	vertical_layout = TRUE;
+     }
+ 
++#ifdef FT_LOAD_COLOR
+     load_flags |= FT_LOAD_COLOR;
++#endif
+ 
+ 
+     if (info & CAIRO_SCALED_GLYPH_INFO_METRICS) {
+@@ -2656,7 +2664,9 @@ LOAD:
+          */
+ 	scaled_glyph_loaded = FALSE;
+         info &= ~CAIRO_SCALED_GLYPH_INFO_METRICS;
++#ifdef FT_LOAD_COLOR
+         load_flags &= ~FT_LOAD_COLOR;
++#endif
+         goto LOAD;
+     }
+ 
+-- 
+1.7.1
+


More information about the Libreoffice-commits mailing list