summarylogtreecommitdiffstats
path: root/chromium-freetype-2.11.patch
blob: 82811defc38025c0ca56f7597d55c52ddd0d620a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
--- a/third_party/skia/src/ports/SkFontHost_FreeType_common.cpp
+++ b/third_party/skia/src/ports/SkFontHost_FreeType_common.cpp
@@ -665,8 +665,13 @@
             canvas->drawPaint(paint);
             break;
         }
+#if FREETYPE_MAJOR == 2 && FREETYPE_MINOR >= 11
+        case FT_COLR_PAINTFORMAT_TRANSFORM: {
+            SkMatrix transform = ToSkMatrix(colrv1_paint.u.transform.affine);
+#else
         case FT_COLR_PAINTFORMAT_TRANSFORMED: {
             SkMatrix transform = ToSkMatrix(colrv1_paint.u.transformed.affine);
+#endif
 
             canvas->concat(transform);
             break;
@@ -768,12 +773,21 @@
             traverse_result = colrv1_start_glyph(canvas, palette, face, paint.u.colr_glyph.glyphID,
                                                  FT_COLOR_NO_ROOT_TRANSFORM);
             break;
+#if FREETYPE_MAJOR == 2 && FREETYPE_MINOR >= 11
+        case FT_COLR_PAINTFORMAT_TRANSFORM:
+            canvas->saveLayer(nullptr, nullptr);
+            // Traverse / draw operation will apply transform.
+            colrv1_draw_paint(canvas, palette, face, paint);
+            traverse_result =
+                    colrv1_traverse_paint(canvas, palette, face, paint.u.transform.paint);
+#else
         case FT_COLR_PAINTFORMAT_TRANSFORMED:
             canvas->saveLayer(nullptr, nullptr);
             // Traverse / draw operation will apply transform.
             colrv1_draw_paint(canvas, palette, face, paint);
             traverse_result =
                     colrv1_traverse_paint(canvas, palette, face, paint.u.transformed.paint);
+#endif
             canvas->restore();
             break;
       case FT_COLR_PAINTFORMAT_TRANSLATE: