diff options
-rw-r--r-- | download.lst | 4 | ||||
-rw-r--r-- | external/skia/Library_skia.mk | 2 | ||||
-rw-r--r-- | external/skia/UnpackedTarball_skia.mk | 2 | ||||
-rw-r--r-- | external/skia/clang-attributes-warning.patch.1 | 4 | ||||
-rw-r--r-- | external/skia/swap-buffers-rect.patch.1 | 2 | ||||
-rw-r--r-- | external/skia/windows-typeface-directwrite.patch.0 | 48 | ||||
-rw-r--r-- | external/skia/windows-typeface-directwrite.patch.1 | 80 |
7 files changed, 86 insertions, 56 deletions
diff --git a/download.lst b/download.lst index e3b77f232600..7ae387ae53d3 100644 --- a/download.lst +++ b/download.lst @@ -626,8 +626,8 @@ RHINO_TARBALL := rhino-1.7.15.zip # three static lines # so that git cherry-pick # will not run into conflicts -SKIA_SHA256SUM := dfdca5cda678da1d3e4277bd828d978276687717123efb215701b37bebbfa084 -SKIA_TARBALL := skia-m125-6f300db00b4cad2cb407cd22bb93ed60d7e1e2ee.tar.xz +SKIA_SHA256SUM := 865f4e343bac2292c5a6dc0e27057e596552a10a099582d5f66c1c5fe97765b3 +SKIA_TARBALL := skia-m126-234e3d4b37e9d398016018ae64c6059ae7eb9559.tar.xz # three static lines # so that git cherry-pick # will not run into conflicts diff --git a/external/skia/Library_skia.mk b/external/skia/Library_skia.mk index 1b55fc8f3704..5c758eb9069b 100644 --- a/external/skia/Library_skia.mk +++ b/external/skia/Library_skia.mk @@ -173,7 +173,6 @@ endif # ifeq ($(OS),WNT) $(eval $(call gb_Library_add_generated_exception_objects,skia,\ - UnpackedTarball/skia/src/fonts/SkFontMgr_indirect \ UnpackedTarball/skia/src/ports/SkFontMgr_win_dw \ UnpackedTarball/skia/src/ports/SkScalerContext_win_dw \ UnpackedTarball/skia/src/ports/SkTypeface_win_dw \ @@ -1207,7 +1206,6 @@ endif # I need these, but they dont appear anywhere in the *.gn* build files? $(eval $(call gb_Library_add_generated_exception_objects,skia,\ - UnpackedTarball/skia/src/fonts/SkRemotableFontMgr \ UnpackedTarball/skia/src/ports/SkImageGenerator_none \ )) ifeq ($(OS),MACOSX) diff --git a/external/skia/UnpackedTarball_skia.mk b/external/skia/UnpackedTarball_skia.mk index 9cc756eb5923..5e164106ce13 100644 --- a/external/skia/UnpackedTarball_skia.mk +++ b/external/skia/UnpackedTarball_skia.mk @@ -24,7 +24,7 @@ skia_patches := \ windows-text-gamma.patch.0 \ windows-force-unicode-api.patch.0 \ fix-without-gl.patch.1 \ - windows-typeface-directwrite.patch.0 \ + windows-typeface-directwrite.patch.1 \ windows-raster-surface-no-copies.patch.1 \ fix-windows-dwrite.patch.1 \ swap-buffers-rect.patch.1 \ diff --git a/external/skia/clang-attributes-warning.patch.1 b/external/skia/clang-attributes-warning.patch.1 index 6e6c34674734..a17cd7fb27bc 100644 --- a/external/skia/clang-attributes-warning.patch.1 +++ b/external/skia/clang-attributes-warning.patch.1 @@ -12,9 +12,9 @@ diff -ur skia.org/include/private/base/SkFloatingPoint.h skia/include/private/ba return static_cast<float>(x); } @@ -161,12 +163,16 @@ - #pragma warning( disable : 4723) + #pragma warning(push) + #pragma warning(disable : 4723) #endif - // Your function +#if defined(__clang__) SK_NO_SANITIZE("float-divide-by-zero") +#endif diff --git a/external/skia/swap-buffers-rect.patch.1 b/external/skia/swap-buffers-rect.patch.1 index 82ea48c9bc17..0b02be761a50 100644 --- a/external/skia/swap-buffers-rect.patch.1 +++ b/external/skia/swap-buffers-rect.patch.1 @@ -125,7 +125,7 @@ diff -ur skia.org/tools/window/WindowContext.cpp skia/tools/window/WindowContext + this->onSwapBuffers(rect); } - } // namespace skwindow + #if defined(SK_GRAPHITE) diff -ur skia.org/tools/window/WindowContext.h skia/tools/window/WindowContext.h --- skia.org/tools/window/WindowContext.h 2024-10-05 18:16:04.521814026 +0200 +++ skia/tools/window/WindowContext.h 2024-10-05 18:22:12.945998819 +0200 diff --git a/external/skia/windows-typeface-directwrite.patch.0 b/external/skia/windows-typeface-directwrite.patch.0 deleted file mode 100644 index 5c19dda32a93..000000000000 --- a/external/skia/windows-typeface-directwrite.patch.0 +++ /dev/null @@ -1,48 +0,0 @@ ---- ./include/ports/SkTypeface_win.h -+++ ./include/ports/SkTypeface_win.h -@@ -75,5 +75,13 @@ SK_API sk_sp<SkFontMgr> SkFontMgr_New_DirectWriteRenderer(sk_sp<SkRemotableFontM - */ - SK_API sk_sp<SkRemotableFontMgr> SkRemotableFontMgr_New_DirectWrite(); - -+struct IDWriteFontFace; -+struct IDWriteFont; -+struct IDWriteFontFamily; -+SK_API SkTypeface* SkCreateTypefaceDirectWrite(sk_sp<SkFontMgr> fontMgr, -+ IDWriteFontFace* fontFace, -+ IDWriteFont* font, -+ IDWriteFontFamily* fontFamily); -+ - #endif // SK_BUILD_FOR_WIN - #endif // SkTypeface_win_DEFINED ---- ./src/ports/SkFontMgr_win_dw.cpp -+++ ./src/ports/SkFontMgr_win_dw.cpp -@@ -320,6 +320,10 @@ private: - - friend class SkFontStyleSet_DirectWrite; - friend class FontFallbackRenderer; -+ friend SK_API SkTypeface* SkCreateTypefaceDirectWrite(sk_sp<SkFontMgr> fontMgr, -+ IDWriteFontFace* fontFace, -+ IDWriteFont* font, -+ IDWriteFontFamily* fontFamily); - }; - - class SkFontStyleSet_DirectWrite : public SkFontStyleSet { -@@ -1215,6 +1219,18 @@ SK_API sk_sp<SkFontMgr> SkFontMgr_New_DirectWrite(IDWriteFactory* factory, - defaultFamilyName, defaultFamilyNameLen); - } - -+SkTypeface* SkCreateTypefaceDirectWrite(sk_sp<SkFontMgr> fontMgr, -+ IDWriteFontFace* fontFace, -+ IDWriteFont* font, -+ IDWriteFontFamily* fontFamily) -+{ -+ SkFontMgr_DirectWrite* mgr = dynamic_cast<SkFontMgr_DirectWrite*>(fontMgr.get()); -+ if(!mgr) -+ return nullptr; -+ sk_sp<SkTypeface> typeface = mgr->makeTypefaceFromDWriteFont(fontFace, font, fontFamily); -+ return typeface.release(); -+} -+ - #include "include/ports/SkFontMgr_indirect.h" - sk_sp<SkFontMgr> SkFontMgr_New_DirectWriteRenderer(sk_sp<SkRemotableFontMgr> proxy) { - sk_sp<SkFontMgr> impl(SkFontMgr_New_DirectWrite()); diff --git a/external/skia/windows-typeface-directwrite.patch.1 b/external/skia/windows-typeface-directwrite.patch.1 new file mode 100644 index 000000000000..b4b493e57201 --- /dev/null +++ b/external/skia/windows-typeface-directwrite.patch.1 @@ -0,0 +1,80 @@ +diff -ur skia.org/include/ports/SkTypeface_win.h skia/include/ports/SkTypeface_win.h +--- skia.org/include/ports/SkTypeface_win.h 2024-10-09 15:15:35.479395601 +0200 ++++ skia/include/ports/SkTypeface_win.h 2024-10-09 15:15:55.130556562 +0200 +@@ -59,5 +59,13 @@ + IDWriteFontCollection* collection, + IDWriteFontFallback* fallback); + ++struct IDWriteFontFace; ++struct IDWriteFont; ++struct IDWriteFontFamily; ++SK_API SkTypeface* SkCreateTypefaceDirectWrite(sk_sp<SkFontMgr> fontMgr, ++ IDWriteFontFace* fontFace, ++ IDWriteFont* font, ++ IDWriteFontFamily* fontFamily); ++ + #endif // SK_BUILD_FOR_WIN + #endif // SkTypeface_win_DEFINED +diff -ur skia.org/include/ports/SkTypeface_win.h.orig skia/include/ports/SkTypeface_win.h.orig +--- skia.org/include/ports/SkTypeface_win.h.orig 2024-10-09 15:15:35.479395601 +0200 ++++ skia/include/ports/SkTypeface_win.h.orig 2024-10-09 15:15:35.472395544 +0200 +@@ -27,7 +27,7 @@ + * corresponding typeface for the specified logfont. The caller is responsible + * for calling unref() when it is finished. + */ +-SK_API sk_sp<SkTypeface> SkCreateTypefaceFromLOGFONT(const LOGFONT&); ++SK_API sk_sp<SkTypeface> SkCreateTypefaceFromLOGFONT(const LOGFONTW&); + + /** + * Copy the LOGFONT associated with this typeface into the lf parameter. Note +@@ -35,7 +35,7 @@ + * not track this (the paint does). + * typeface may be NULL, in which case we return the logfont for the default font. + */ +-SK_API void SkLOGFONTFromTypeface(const SkTypeface* typeface, LOGFONT* lf); ++SK_API void SkLOGFONTFromTypeface(const SkTypeface* typeface, LOGFONTW* lf); + + /** + * Set an optional callback to ensure that the data behind a LOGFONT is loaded. +@@ -43,7 +43,7 @@ + * Normally this is null, and is only required if the font data needs to be + * remotely (re)loaded. + */ +-SK_API void SkTypeface_SetEnsureLOGFONTAccessibleProc(void (*)(const LOGFONT&)); ++SK_API void SkTypeface_SetEnsureLOGFONTAccessibleProc(void (*)(const LOGFONTW&)); + + // Experimental! + // +diff -ur skia.org/src/ports/SkFontMgr_win_dw.cpp skia/src/ports/SkFontMgr_win_dw.cpp +--- skia.org/src/ports/SkFontMgr_win_dw.cpp 2024-10-09 15:15:35.519395929 +0200 ++++ skia/src/ports/SkFontMgr_win_dw.cpp 2024-10-09 15:16:17.314738255 +0200 +@@ -149,6 +149,10 @@ + + friend class SkFontStyleSet_DirectWrite; + friend class FontFallbackRenderer; ++ friend SK_API SkTypeface* SkCreateTypefaceDirectWrite(sk_sp<SkFontMgr> fontMgr, ++ IDWriteFontFace* fontFace, ++ IDWriteFont* font, ++ IDWriteFontFamily* fontFamily); + }; + + class SkFontStyleSet_DirectWrite : public SkFontStyleSet { +@@ -947,4 +951,16 @@ + defaultFamilyName, defaultFamilyNameLen); + } + ++SkTypeface* SkCreateTypefaceDirectWrite(sk_sp<SkFontMgr> fontMgr, ++ IDWriteFontFace* fontFace, ++ IDWriteFont* font, ++ IDWriteFontFamily* fontFamily) ++{ ++ SkFontMgr_DirectWrite* mgr = dynamic_cast<SkFontMgr_DirectWrite*>(fontMgr.get()); ++ if(!mgr) ++ return nullptr; ++ sk_sp<SkTypeface> typeface = mgr->makeTypefaceFromDWriteFont(fontFace, font, fontFamily); ++ return typeface.release(); ++} ++ + #endif//defined(SK_BUILD_FOR_WIN) +Only in skia/src/ports: SkFontMgr_win_dw.cpp.orig +Only in skia/src/ports: SkFontMgr_win_dw.cpp.rej |