diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-27 16:51:28 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-27 16:51:28 +0000 |
commit | 940b4d1848e8c70ab7642901a68594e8016caffc (patch) | |
tree | eb72f344ee6c3d9b80a7ecc079ea79e9fba8676d /external/skia/fix-pch.patch.1 | |
parent | Initial commit. (diff) | |
download | libreoffice-upstream.tar.xz libreoffice-upstream.zip |
Adding upstream version 1:7.0.4.upstream/1%7.0.4upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'external/skia/fix-pch.patch.1')
-rw-r--r-- | external/skia/fix-pch.patch.1 | 123 |
1 files changed, 123 insertions, 0 deletions
diff --git a/external/skia/fix-pch.patch.1 b/external/skia/fix-pch.patch.1 new file mode 100644 index 000000000..9c89edbfe --- /dev/null +++ b/external/skia/fix-pch.patch.1 @@ -0,0 +1,123 @@ +diff --git a/include/core/SkColor.h b/include/core/SkColor.h +index 53df435e46..ce74db8b27 100644 +--- a/include/core/SkColor.h ++++ b/include/core/SkColor.h +@@ -400,6 +400,7 @@ using SkColor4f = SkRGBA4f<kUnpremul_SkAlphaType>; + + template <> SK_API SkColor4f SkColor4f::FromColor(SkColor); + template <> SK_API SkColor SkColor4f::toSkColor() const; ++template <> uint32_t SkColor4f::toBytes_RGBA() const; + + namespace SkColors { + constexpr SkColor4f kTransparent = {0, 0, 0, 0}; +diff --git a/include/private/SkColorData.h b/include/private/SkColorData.h +index 2090ab4b7e..801511586f 100644 +--- a/include/private/SkColorData.h ++++ b/include/private/SkColorData.h +@@ -441,4 +441,6 @@ constexpr SkPMColor4f SK_PMColor4fILLEGAL = { SK_FloatNegativeInfinity, + SK_FloatNegativeInfinity, + SK_FloatNegativeInfinity }; + ++template <> uint32_t SkPMColor4f::toBytes_RGBA() const; ++ + #endif +diff --git a/src/gpu/text/GrTextBlobCache.h b/src/gpu/text/GrTextBlobCache.h +index 1484cee527..dcb53b20a1 100644 +--- a/src/gpu/text/GrTextBlobCache.h ++++ b/src/gpu/text/GrTextBlobCache.h +@@ -197,4 +197,6 @@ private: + SkMessageBus<PurgeBlobMessage>::Inbox fPurgeBlobInbox; + }; + ++template<> SkMessageBus<GrTextBlobCache::PurgeBlobMessage>* SkMessageBus<GrTextBlobCache::PurgeBlobMessage>::Get(); ++ + #endif +diff --git a/src/gpu/vk/GrVkSemaphore.cpp b/src/gpu/vk/GrVkSemaphore.cpp +index 191b6a3ce5..26754acccd 100644 +--- a/src/gpu/vk/GrVkSemaphore.cpp ++++ b/src/gpu/vk/GrVkSemaphore.cpp +@@ -10,6 +10,7 @@ + #include "include/gpu/GrBackendSemaphore.h" + #include "src/gpu/vk/GrVkGpu.h" + #include "src/gpu/vk/GrVkUtil.h" ++#include "tools/gpu/vk/GrVulkanDefines.h" + + #ifdef VK_USE_PLATFORM_WIN32_KHR + // windows wants to define this as CreateSemaphoreA or CreateSemaphoreW +diff --git a/src/utils/win/SkDWriteGeometrySink.h b/src/utils/win/SkDWriteGeometrySink.h +index 019539b191..5dd7bef353 100644 +--- a/src/utils/win/SkDWriteGeometrySink.h ++++ b/src/utils/win/SkDWriteGeometrySink.h +@@ -13,6 +13,8 @@ + + class SkPath; + ++#define CONST const ++ + #include <dwrite.h> + #include <d2d1.h> + +diff --git a/third_party/skcms/skcms.cc b/third_party/skcms/skcms.cc +index cc5738d977..c67310f6cc 100644 +--- a/third_party/skcms/skcms.cc ++++ b/third_party/skcms/skcms.cc +@@ -124,7 +124,8 @@ static float minus_1_ulp(float x) { + // Most transfer functions we work with are sRGBish. + // For exotic HDR transfer functions, we encode them using a tf.g that makes no sense, + // and repurpose the other fields to hold the parameters of the HDR functions. +-enum TFKind { Bad, sRGBish, PQish, HLGish, HLGinvish }; ++enum TFKind_skcms { Bad, sRGBish, PQish, HLGish, HLGinvish }; ++#define TFKind TFKind_skcms + struct TF_PQish { float A,B,C,D,E,F; }; + struct TF_HLGish { float R,G,a,b,c; }; + +@@ -2011,7 +2012,9 @@ typedef enum { + Op_store_hhhh, + Op_store_fff, + Op_store_ffff, +-} Op; ++} Op_skcms; ++ ++#define Op Op_skcms + + #if defined(__clang__) + template <int N, typename T> using Vec = T __attribute__((ext_vector_type(N))); +diff --git a/src/core/SkM44.cpp b/src/core/SkM44.cpp +index 2c82a0abd7..8505253d12 100644 +--- a/src/core/SkM44.cpp ++++ b/src/core/SkM44.cpp +@@ -300,6 +300,8 @@ SkM44 Sk3LookAt(const SkV3& eye, const SkV3& center, const SkV3& up) { + return m; + } + ++#undef near ++#undef far + SkM44 Sk3Perspective(float near, float far, float angle) { + SkASSERT(far > near); + +diff --git a/src/shaders/SkImageShader.cpp b/src/shaders/SkImageShader.cpp +index b8fd426e13..5e6f2a9b28 100755 +--- a/src/shaders/SkImageShader.cpp ++++ b/src/shaders/SkImageShader.cpp +@@ -808,6 +808,8 @@ skvm::Color SkImageShader::onProgram(skv + + // See GrCubicEffect for details of these weights. + // TODO: these maybe don't seem right looking at gm/bicubic and GrBicubicEffect. ++#undef near ++#undef far + auto near = [&](skvm::F32 t) { + // 1/18 + 9/18t + 27/18t^2 - 21/18t^3 == t ( t ( -21/18t + 27/18) + 9/18) + 1/18 + return t * (t * (t * (-21/18.0f) + 27/18.0f) + 9/18.0f) + 1/18.0f; +diff --git a/src/gpu/gl/GrGLGpu.cpp b/src/gpu/gl/GrGLGpu.cpp +index 191b6a3ce5..26754acccd 100644 +--- a/src/gpu/gl/GrGLGpu.cpp ++++ b/src/gpu/gl/GrGLGpu.cpp +@@ -3766,6 +3766,8 @@ + } + } + ++#undef MemoryBarrier ++ + void GrGLGpu::insertManualFramebufferBarrier() { + SkASSERT(this->caps()->requiresManualFBBarrierAfterTessellatedStencilDraw()); + GL_CALL(MemoryBarrier(GR_GL_FRAMEBUFFER_BARRIER_BIT)); |