From 443fefae4d78f887679bd1c39aeafb30f0465587 Mon Sep 17 00:00:00 2001 From: Dan Raffel Date: Sat, 23 May 2026 10:24:14 -0700 Subject: [PATCH] Patch m149 D3D release build --- build-skia.py | 1 + patches/fix_m149_d3d_backend_surface.patch | 36 ++++++++++++++++++++++ 2 files changed, 37 insertions(+) create mode 100644 patches/fix_m149_d3d_backend_surface.patch diff --git a/build-skia.py b/build-skia.py index 1c02804..416cd2e 100755 --- a/build-skia.py +++ b/build-skia.py @@ -223,6 +223,7 @@ def colored_print(message, color): "win": """ skia_use_dawn = true + # Keep Direct3D enabled; the m149 build patch handles the Release-only issue. skia_use_direct3d = true is_trivial_abi = false """, diff --git a/patches/fix_m149_d3d_backend_surface.patch b/patches/fix_m149_d3d_backend_surface.patch new file mode 100644 index 0000000..a08b383 --- /dev/null +++ b/patches/fix_m149_d3d_backend_surface.patch @@ -0,0 +1,36 @@ +diff --git a/src/gpu/ganesh/d3d/GrD3DBackendSurface.cpp b/src/gpu/ganesh/d3d/GrD3DBackendSurface.cpp +index 8d20c4fbda..e4d94b0c76 100644 +--- a/src/gpu/ganesh/d3d/GrD3DBackendSurface.cpp ++++ b/src/gpu/ganesh/d3d/GrD3DBackendSurface.cpp +@@ -39,7 +39,6 @@ private: + + GrColorFormatDesc desc() const override { return GrDxgiFormatDesc(fFormat); } + +-#if defined(GPU_TEST_UTILS) + bool equal(const GrBackendFormatData* that) const override { + SkASSERT(!that || that->type() == GrBackendApi::kDirect3D); + if (auto otherD3D = static_cast(that)) { +@@ -47,7 +46,6 @@ private: + } + return false; + } +-#endif + + std::string toString() const override { + #if defined(SK_DEBUG) || defined(GPU_TEST_UTILS) +@@ -114,6 +112,7 @@ private: + + bool isProtected() const override { return false; } + ++#if defined(GPU_TEST_UTILS) + bool equal(const GrBackendTextureData* that) const override { + SkASSERT(!that || that->type() == GrBackendApi::kDirect3D); + #if defined(GPU_TEST_UTILS) +@@ -123,6 +122,7 @@ private: + #endif + return false; + } ++#endif + + bool isSameTexture(const GrBackendTextureData* that) const override { + SkASSERT(!that || that->type() == GrBackendApi::kDirect3D);