Skip to content

Commit ac9d720

Browse files
krajotavio
authored andcommitted
chromium: Fix build with freetype > 2.11
Fixes ./../third_party/skia/src/ports/SkFontHost_FreeType_common.cpp:715:14: error: use of undeclared identifier 'FT_COLR_PAINTFORMAT_TRANSFORMED'; did you mean 'FT_COLR_PAINTFORMAT_TRANSFORM'? case FT_COLR_PAINTFORMAT_TRANSFORMED: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ FT_COLR_PAINTFORMAT_TRANSFORM Upstream-Status: Pending Signed-off-by: Khem Raj <[email protected]>
1 parent bc555d5 commit ac9d720

File tree

2 files changed

+51
-0
lines changed

2 files changed

+51
-0
lines changed

meta-chromium/recipes-browser/chromium/chromium-gn.inc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ SRC_URI += " \
2424
file://fix-harfbuzz-supp-size-error.patch \
2525
file://fix-ruy-numeric-limits-error.patch \
2626
file://0001-exception_handler.cc-Match-the-types-for-SIGSTKSZ.patch \
27+
file://chromium-freetype-2.11.patch \
2728
"
2829

2930
SRC_URI:append:libc-musl = "\
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
--- a/third_party/skia/src/ports/SkFontHost_FreeType_common.cpp
2+
+++ b/third_party/skia/src/ports/SkFontHost_FreeType_common.cpp
3+
@@ -712,7 +712,11 @@ void colrv1_draw_paint(SkCanvas* canvas,
4+
canvas->drawPaint(colrPaint);
5+
break;
6+
}
7+
+#if FREETYPE_MAJOR == 2 && FREETYPE_MINOR >= 11
8+
+ case FT_COLR_PAINTFORMAT_TRANSFORM:
9+
+#else
10+
case FT_COLR_PAINTFORMAT_TRANSFORMED:
11+
+#endif
12+
case FT_COLR_PAINTFORMAT_TRANSLATE:
13+
case FT_COLR_PAINTFORMAT_ROTATE:
14+
case FT_COLR_PAINTFORMAT_SKEW:
15+
@@ -759,10 +763,17 @@ void colrv1_transform(SkCanvas* canvas,
16+
SkMatrix transform;
17+
18+
switch (colrv1_paint.format) {
19+
+#if FREETYPE_MAJOR == 2 && FREETYPE_MINOR >= 11
20+
+ case FT_COLR_PAINTFORMAT_TRANSFORM: {
21+
+ transform = ToSkMatrix(colrv1_paint.u.transform.affine);
22+
+ break;
23+
+ }
24+
+#else
25+
case FT_COLR_PAINTFORMAT_TRANSFORMED: {
26+
transform = ToSkMatrix(colrv1_paint.u.transformed.affine);
27+
break;
28+
}
29+
+#endif
30+
case FT_COLR_PAINTFORMAT_TRANSLATE: {
31+
transform = SkMatrix::Translate(
32+
SkFixedToScalar(colrv1_paint.u.translate.dx),
33+
@@ -880,10 +891,17 @@ bool colrv1_traverse_paint(SkCanvas* can
34+
traverse_result = colrv1_start_glyph(canvas, palette, face, paint.u.colr_glyph.glyphID,
35+
FT_COLOR_NO_ROOT_TRANSFORM);
36+
break;
37+
+#if FREETYPE_MAJOR == 2 && FREETYPE_MINOR >= 11
38+
+ case FT_COLR_PAINTFORMAT_TRANSFORM:
39+
+ colrv1_transform(canvas, face, paint);
40+
+ traverse_result = colrv1_traverse_paint(canvas, palette, face,
41+
+ paint.u.transform.paint, visited_set);
42+
+#else
43+
case FT_COLR_PAINTFORMAT_TRANSFORMED:
44+
colrv1_transform(canvas, face, paint);
45+
traverse_result = colrv1_traverse_paint(canvas, palette, face,
46+
paint.u.transformed.paint, visited_set);
47+
+#endif
48+
break;
49+
case FT_COLR_PAINTFORMAT_TRANSLATE:
50+
colrv1_transform(canvas, face, paint);

0 commit comments

Comments
 (0)