From ed5640d8b587fbcfed7dd7967f3de04b37a76f26 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 7 Apr 2024 11:06:44 +0200 Subject: Adding upstream version 4:7.4.7. Signed-off-by: Daniel Baumann --- external/skia/fix-windows-dwrite.patch.1 | 40 ++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 external/skia/fix-windows-dwrite.patch.1 (limited to 'external/skia/fix-windows-dwrite.patch.1') diff --git a/external/skia/fix-windows-dwrite.patch.1 b/external/skia/fix-windows-dwrite.patch.1 new file mode 100644 index 000000000..b5f216a52 --- /dev/null +++ b/external/skia/fix-windows-dwrite.patch.1 @@ -0,0 +1,40 @@ +diff --git a/src/ports/SkFontMgr_win_dw.cpp b/src/ports/SkFontMgr_win_dw.cpp +index 6a4748f91c..50086a7780 100644 +--- a/src/ports/SkFontMgr_win_dw.cpp ++++ b/src/ports/SkFontMgr_win_dw.cpp +@@ -361,6 +361,7 @@ static bool FindByDWriteFont(SkTypeface* cached, void* ctx) { + DWriteFontTypeface* cshFace = reinterpret_cast(cached); + ProtoDWriteTypeface* ctxFace = reinterpret_cast(ctx); + ++#if defined(NTDDI_WIN10_RS3) && NTDDI_VERSION >= NTDDI_WIN10_RS3 + // IDWriteFontFace5 introduced both Equals and HasVariations + SkTScopedComPtr cshFontFace5; + SkTScopedComPtr ctxFontFace5; +@@ -369,6 +370,7 @@ static bool FindByDWriteFont(SkTypeface* cached, void* ctx) { + if (cshFontFace5 && ctxFontFace5) { + return cshFontFace5->Equals(ctxFontFace5.get()); + } ++#endif + + bool same; + +diff --git a/src/ports/SkScalerContext_win_dw.cpp b/src/ports/SkScalerContext_win_dw.cpp +index b2df467b22..385094e506 100644 +--- a/src/ports/SkScalerContext_win_dw.cpp ++++ b/src/ports/SkScalerContext_win_dw.cpp +@@ -778,6 +778,7 @@ void SkScalerContext_DW::generateFontMetrics(SkFontMetrics* metrics) { + metrics->fFlags |= SkFontMetrics::kStrikeoutThicknessIsValid_Flag; + metrics->fFlags |= SkFontMetrics::kStrikeoutPositionIsValid_Flag; + ++#if defined(NTDDI_WIN10_RS3) && NTDDI_VERSION >= NTDDI_WIN10_RS3 + SkTScopedComPtr fontFace5; + if (SUCCEEDED(this->getDWriteTypeface()->fDWriteFontFace->QueryInterface(&fontFace5))) { + if (fontFace5->HasVariations()) { +@@ -785,6 +786,7 @@ void SkScalerContext_DW::generateFontMetrics(SkFontMetrics* metrics) { + metrics->fFlags |= SkFontMetrics::kBoundsInvalid_Flag; + } + } ++#endif + + if (this->getDWriteTypeface()->fDWriteFontFace1.get()) { + DWRITE_FONT_METRICS1 dwfm1; -- cgit v1.2.3