office-gobmx/external/skia/fix-graphite-ifdef.patch.1
Stephan Bergmann 9fd65d8f94 Revert "Update skia to m110"
This reverts commit aef70869b0 plus follow-up
4172fcb751 "Fix no-pch Windows build: missing
include".  It caused my Windows build `instdir/program/soffice` to immediatley
fail with

> skia\include/core/SkRefCnt.h(62): fatal error: "assert(this->getRefCnt() > 0)"
> warn:skia:10572:7804:external/skia/source/SkMemory_malloc.cxx:32: sk_abort_no_print

on start.

Change-Id: I751f83eda28d9a5a8f9dd4b2429389906ffce983
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146132
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-01-25 17:25:32 +00:00

48 lines
1.4 KiB
Groff

diff --git a/include/core/SkImage.h b/include/core/SkImage.h
index 9ca9317408..fee18fe58c 100644
--- a/include/core/SkImage.h
+++ b/include/core/SkImage.h
@@ -17,7 +17,7 @@
#if SK_SUPPORT_GPU
#include "include/gpu/GrTypes.h"
#endif
-#if SK_GRAPHITE_ENABLED
+#ifdef SK_GRAPHITE_ENABLED
#include "include/gpu/graphite/GraphiteTypes.h"
#endif
#include <functional> // std::function
@@ -49,7 +49,7 @@ class SkYUVAPixmaps;
enum class SkEncodedImageFormat;
-#if SK_GRAPHITE_ENABLED
+#ifdef SK_GRAPHITE_ENABLED
namespace skgpu::graphite {
class Recorder;
};
diff --git a/include/core/SkTypes.h b/include/core/SkTypes.h
index 5301361a2b..8adaf3ac09 100644
--- a/include/core/SkTypes.h
+++ b/include/core/SkTypes.h
@@ -236,7 +236,7 @@
# define SK_SUPPORT_GPU 1
#endif
-#if SK_SUPPORT_GPU || SK_GRAPHITE_ENABLED
+#if SK_SUPPORT_GPU || defined(SK_GRAPHITE_ENABLED)
# if !defined(SK_ENABLE_SKSL)
# define SK_ENABLE_SKSL
# endif
diff --git a/tools/sk_app/WindowContext.h b/tools/sk_app/WindowContext.h
index 65ab8b9aa4..c1bc7fb03a 100644
--- a/tools/sk_app/WindowContext.h
+++ b/tools/sk_app/WindowContext.h
@@ -58,7 +58,7 @@ protected:
virtual bool isGpuContext() { return true; }
sk_sp<GrDirectContext> fContext;
-#if SK_GRAPHITE_ENABLED
+#ifdef SK_GRAPHITE_ENABLED
std::unique_ptr<skgpu::graphite::Context> fGraphiteContext;
std::unique_ptr<skgpu::graphite::Recorder> fGraphiteRecorder;
#endif