|
| 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