diff --git a/include/core/SkColor.h b/include/core/SkColor.h index 9cba771ddd..6d324b75d0 100644 --- a/include/core/SkColor.h +++ b/include/core/SkColor.h @@ -420,6 +420,7 @@ using SkColor4f = SkRGBA4f; 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 aba610eacf..792da4e9fb 100644 --- a/include/private/SkColorData.h +++ b/include/private/SkColorData.h @@ -442,4 +442,6 @@ constexpr SkPMColor4f SK_PMColor4fILLEGAL = { SK_FloatNegativeInfinity, SK_FloatNegativeInfinity, SK_FloatNegativeInfinity }; +template <> uint32_t SkPMColor4f::toBytes_RGBA() const; + #endif diff --git a/src/core/SkM44.cpp b/src/core/SkM44.cpp index 248917423f..3d0bc00307 100644 --- a/src/core/SkM44.cpp +++ b/src/core/SkM44.cpp @@ -283,6 +283,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/gpu/gl/GrGLGpu.cpp b/src/gpu/gl/GrGLGpu.cpp index 76f69754c6..01ce4a1e2d 100644 --- a/src/gpu/gl/GrGLGpu.cpp +++ b/src/gpu/gl/GrGLGpu.cpp @@ -3531,6 +3531,8 @@ void GrGLGpu::xferBarrier(GrRenderTarget* rt, GrXferBarrierType type) { } } +#undef MemoryBarrier + void GrGLGpu::insertManualFramebufferBarrier() { SkASSERT(this->caps()->requiresManualFBBarrierAfterTessellatedStencilDraw()); GL_CALL(MemoryBarrier(GR_GL_FRAMEBUFFER_BARRIER_BIT)); diff --git a/src/gpu/text/GrTextBlobCache.h b/src/gpu/text/GrTextBlobCache.h index c973384081..8943198ddd 100644 --- a/src/gpu/text/GrTextBlobCache.h +++ b/src/gpu/text/GrTextBlobCache.h @@ -91,4 +91,6 @@ private: SkMessageBus::Inbox fPurgeBlobInbox SK_GUARDED_BY(fSpinLock); }; +template<> SkMessageBus* SkMessageBus::Get(); + #endif diff --git a/src/gpu/vk/GrVkSemaphore.cpp b/src/gpu/vk/GrVkSemaphore.cpp index 23bf656bf8..f926ebfdc2 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 af4909aaaf..825ec35c83 100644 --- a/src/utils/win/SkDWriteGeometrySink.h +++ b/src/utils/win/SkDWriteGeometrySink.h @@ -13,6 +13,8 @@ class SkPath; +#define CONST const + #include #include diff --git a/third_party/skcms/skcms.cc b/third_party/skcms/skcms.cc index 4f983439b9..f6fc53c91a 100644 --- a/third_party/skcms/skcms.cc +++ b/third_party/skcms/skcms.cc @@ -130,7 +130,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,K_minus_1; }; // We didn't originally support a scale factor K for HLG, and instead just stored 0 in @@ -2059,7 +2060,9 @@ typedef enum { Op_store_hhhh, Op_store_fff, Op_store_ffff, -} Op; +} Op_skcms; + +#define Op Op_skcms #if defined(__clang__) template using Vec = T __attribute__((ext_vector_type(N)));