summaryrefslogtreecommitdiff
path: root/external
diff options
context:
space:
mode:
authorLuboš Luňák <l.lunak@collabora.com>2019-10-12 16:48:26 +0200
committerLuboš Luňák <l.lunak@collabora.com>2019-11-27 09:55:05 +0100
commit736e7ceee814eac3689e588b5032fe29cc229bf7 (patch)
treed2108a54c03be28fb2f8cb086d36b22abed645c9 /external
parentceec41680fe1b06b778c3a73af21434f3b9496d4 (diff)
build Skia also on Windows
Change-Id: Ic86aac42745c3241ce14235cc1b4f4adb39eba2d
Diffstat (limited to 'external')
-rw-r--r--external/skia/Library_skia.mk157
-rw-r--r--external/skia/UnpackedTarball_skia.mk3
-rw-r--r--external/skia/configs/SkUserConfig.h191
-rw-r--r--external/skia/fix-ddi.patch9
-rw-r--r--external/skia/fix-pch.patch46
5 files changed, 162 insertions, 244 deletions
diff --git a/external/skia/Library_skia.mk b/external/skia/Library_skia.mk
index cb8a05c4c9d1..87d85831e5bc 100644
--- a/external/skia/Library_skia.mk
+++ b/external/skia/Library_skia.mk
@@ -15,37 +15,73 @@ $(eval $(call gb_Library_use_unpacked,skia,skia))
$(eval $(call gb_Library_set_precompiled_header,skia,external/skia/inc/pch/precompiled_skia))
+# TODO SKIA
$(eval $(call gb_Library_add_defs,skia,\
- -DSK_GAMMA_SRGB \
- -DSK_GAMMA_APPLY_TO_A8 \
- -DSK_ALLOW_STATIC_GLOBAL_INITIALIZERS=1 \
- -DSK_SCALAR_IS_FLOAT \
- -DSK_CAN_USE_FLOAT \
- -DSK_BUILD_FOR_UNIX \
- -DSK_USE_POSIX_THREADS \
- -DSK_RELEASE \
- -DGR_RELEASE=1 \
- -DNDEBUG \
+ -DSK_SUPPORT_GPU=1 \
-DSKIA_DLL \
+ -DSKIA_IMPLEMENTATION=1 \
+ -DSK_GL=1 \
+ -DSK_VULKAN=1 \
-DSK_HAS_JPEG_LIBRARY=1 \
-DSK_HAS_PNG_LIBRARY=1 \
+ -DSK_GAMMA_APPLY_TO_A8 \
))
-# TODO SKIA
+ifneq (,$(gb_ENABLE_DBGUTIL))
+$(eval $(call gb_Library_add_defs,skia,\
+ -DSK_DEBUG \
+ -DSK_ENABLE_DUMP_GPU \
+))
+else
$(eval $(call gb_Library_add_defs,skia,\
- -DSK_USER_CONFIG_HEADER="<$(SRCDIR)/external/skia/configs/SkUserConfig.h>" \
+ -DSK_RELEASE \
+ -DNDEBUG \
))
+endif
+ifeq ($(OS),WNT)
# TODO SKIA
$(eval $(call gb_Library_add_defs,skia,\
- -DSK_SUPPORT_GPU=1 \
- -DSK_GL=1 \
- -DSK_VULKAN=1 \
+ -DSK_BUILD_FOR_WIN \
+ -DSK_CPU_SSE_LEVEL=SK_CPU_SSE_LEVEL_SSSE3 \
+))
+
+$(eval $(call gb_Library_add_cxxflags,skia, \
+ -arch:SSE2 \
+))
+ifneq ($(gb_ENABLE_PCH),)
+$(eval $(call gb_Library_add_cxxflags,skia, \
+ -FIsrc/utils/win/SkDWriteNTDDI_VERSION.h \
+))
+endif
+
+$(eval $(call gb_Library_use_system_win32_libs,skia,\
+ fontsub \
+ ole32 \
+ oleaut32 \
+ user32 \
+ usp10 \
+ opengl32 \
+ gdi32 \
+))
+else
+$(eval $(call gb_Library_add_defs,skia,\
+ -DSK_BUILD_FOR_UNIX \
+ -DSK_R32_SHIFT=16 \
+))
+
+# TODO SKIA
+$(eval $(call gb_Library_add_cxxflags,skia, \
+ -mssse3 \
))
$(eval $(call gb_Library_use_externals,skia,\
freetype \
fontconfig \
+))
+endif
+
+$(eval $(call gb_Library_use_externals,skia,\
zlib \
libjpeg \
libpng \
@@ -63,15 +99,12 @@ $(eval $(call gb_Library_use_libraries,skia,\
sal \
))
-$(eval $(call gb_Library_add_cxxflags,skia, \
- -mssse3 \
-))
-
$(eval $(call gb_Library_set_include,skia,\
$$(INCLUDE) \
-I$(call gb_UnpackedTarball_get_dir,skia) \
-I$(call gb_UnpackedTarball_get_dir,skia)/include/third_party/skcms/ \
-I$(call gb_UnpackedTarball_get_dir,skia)/third_party/vulkanmemoryallocator/ \
+ -I$(call gb_UnpackedTarball_get_dir,skia)/include/third_party/vulkan/ \
))
$(eval $(call gb_Library_add_exception_objects,skia,\
@@ -338,7 +371,6 @@ $(eval $(call gb_Library_add_generated_exception_objects,skia,\
UnpackedTarball/skia/src/effects/SkTrimPathEffect \
UnpackedTarball/skia/src/effects/Sk1DPathEffect \
UnpackedTarball/skia/src/effects/Sk2DPathEffect \
- UnpackedTarball/skia/src/fonts/SkFontMgr_indirect \
UnpackedTarball/skia/src/fonts/SkRemotableFontMgr \
UnpackedTarball/skia/src/image/SkImage \
UnpackedTarball/skia/src/image/SkImage_Lazy \
@@ -486,26 +518,6 @@ $(eval $(call gb_Library_add_generated_exception_objects,skia,\
))
$(eval $(call gb_Library_add_generated_exception_objects,skia,\
- UnpackedTarball/skia/src/opts/SkOpts_avx \
- UnpackedTarball/skia/src/opts/SkOpts_crc32 \
- UnpackedTarball/skia/src/opts/SkOpts_hsw \
- UnpackedTarball/skia/src/opts/SkOpts_sse41 \
- UnpackedTarball/skia/src/opts/SkOpts_sse42 \
- UnpackedTarball/skia/src/opts/SkOpts_ssse3 \
- UnpackedTarball/skia/src/ports/SkDebug_stdio \
- UnpackedTarball/skia/src/ports/SkGlobalInitialization_default \
- UnpackedTarball/skia/src/ports/SkFontHost_FreeType_common \
- UnpackedTarball/skia/src/ports/SkFontHost_FreeType \
- UnpackedTarball/skia/src/ports/SkFontMgr_fontconfig \
- UnpackedTarball/skia/src/ports/SkFontMgr_fontconfig_factory \
- UnpackedTarball/skia/src/ports/SkImageGenerator_none \
- UnpackedTarball/skia/src/ports/SkOSFile_posix \
- UnpackedTarball/skia/src/ports/SkOSFile_stdio \
- UnpackedTarball/skia/src/ports/SkOSLibrary_posix \
- UnpackedTarball/skia/src/ports/SkTLS_pthread \
-))
-
-$(eval $(call gb_Library_add_generated_exception_objects,skia,\
UnpackedTarball/skia/src/core/SkGpuBlurUtils \
UnpackedTarball/skia/src/gpu/ccpr/GrCCAtlas \
UnpackedTarball/skia/src/gpu/ccpr/GrCCClipPath \
@@ -764,7 +776,6 @@ $(eval $(call gb_Library_add_generated_exception_objects,skia,\
UnpackedTarball/skia/src/image/SkImage_Gpu \
UnpackedTarball/skia/src/image/SkImage_GpuYUVA \
UnpackedTarball/skia/src/image/SkSurface_Gpu \
- UnpackedTarball/skia/src/gpu/gl/glx/GrGLMakeNativeInterface_glx \
UnpackedTarball/skia/src/gpu/vk/GrVkAMDMemoryAllocator \
UnpackedTarball/skia/src/gpu/vk/GrVkBuffer \
UnpackedTarball/skia/src/gpu/vk/GrVkBufferView \
@@ -808,6 +819,58 @@ $(eval $(call gb_Library_add_generated_exception_objects,skia,\
UnpackedTarball/skia/src/gpu/vk/GrVkVertexBuffer \
))
+$(eval $(call gb_Library_add_generated_exception_objects,skia,\
+ UnpackedTarball/skia/src/opts/SkOpts_avx \
+ UnpackedTarball/skia/src/opts/SkOpts_crc32 \
+ UnpackedTarball/skia/src/opts/SkOpts_hsw \
+ UnpackedTarball/skia/src/opts/SkOpts_sse41 \
+ UnpackedTarball/skia/src/opts/SkOpts_sse42 \
+ UnpackedTarball/skia/src/opts/SkOpts_ssse3 \
+ UnpackedTarball/skia/src/ports/SkGlobalInitialization_default \
+ UnpackedTarball/skia/src/ports/SkImageGenerator_none \
+ UnpackedTarball/skia/src/ports/SkOSFile_stdio \
+))
+
+ifeq ($(OS),WNT)
+$(eval $(call gb_Library_add_generated_exception_objects,skia,\
+ UnpackedTarball/skia/src/gpu/gl/win/GrGLMakeNativeInterface_win \
+ UnpackedTarball/skia/src/ports/SkDebug_win \
+ UnpackedTarball/skia/src/ports/SkFontHost_win \
+ UnpackedTarball/skia/src/fonts/SkFontMgr_indirect \
+ UnpackedTarball/skia/src/ports/SkFontMgr_win_dw \
+ UnpackedTarball/skia/src/ports/SkFontMgr_win_dw_factory \
+ UnpackedTarball/skia/src/ports/SkOSFile_win \
+ UnpackedTarball/skia/src/ports/SkOSLibrary_win \
+ UnpackedTarball/skia/src/ports/SkScalerContext_win_dw \
+ UnpackedTarball/skia/src/ports/SkTLS_win \
+ UnpackedTarball/skia/src/ports/SkTypeface_win_dw \
+ UnpackedTarball/skia/src/utils/win/SkAutoCoInitialize \
+ UnpackedTarball/skia/src/utils/win/SkDWrite \
+ UnpackedTarball/skia/src/utils/win/SkDWriteFontFileStream \
+ UnpackedTarball/skia/src/utils/win/SkDWriteGeometrySink \
+ UnpackedTarball/skia/src/utils/win/SkHRESULT \
+ UnpackedTarball/skia/src/utils/win/SkIStream \
+ UnpackedTarball/skia/src/utils/win/SkWGL_win \
+))
+else
+$(eval $(call gb_Library_add_generated_exception_objects,skia,\
+ UnpackedTarball/skia/src/gpu/gl/glx/GrGLMakeNativeInterface_glx \
+ UnpackedTarball/skia/src/ports/SkDebug_stdio \
+ UnpackedTarball/skia/src/ports/SkFontConfigInterface \
+ UnpackedTarball/skia/src/ports/SkFontConfigInterface_direct \
+ UnpackedTarball/skia/src/ports/SkFontConfigInterface_direct_factory \
+ UnpackedTarball/skia/src/ports/SkFontHost_FreeType_common \
+ UnpackedTarball/skia/src/ports/SkFontHost_FreeType \
+ UnpackedTarball/skia/src/ports/SkFontMgr_FontConfigInterface \
+ UnpackedTarball/skia/src/ports/SkFontMgr_fontconfig \
+ UnpackedTarball/skia/src/ports/SkFontMgr_fontconfig_factory \
+ UnpackedTarball/skia/src/ports/SkOSFile_posix \
+ UnpackedTarball/skia/src/ports/SkOSLibrary_posix \
+ UnpackedTarball/skia/src/ports/SkTLS_pthread \
+))
+endif
+
+
# UnpackedTarball/skia/src/android/SkAndroidFrameworkUtils \
# UnpackedTarball/skia/src/android/SkAnimatedImage \
# UnpackedTarball/skia/src/android/SkBitmapRegionCodec \
@@ -824,16 +887,13 @@ $(eval $(call gb_Library_add_generated_exception_objects,skia,\
# UnpackedTarball/skia/src/gpu/gl/glfw/GrGLMakeNativeInterface_glfw \
# UnpackedTarball/skia/src/gpu/gl/iOS/GrGLMakeNativeInterface_iOS \
# UnpackedTarball/skia/src/gpu/gl/mac/GrGLMakeNativeInterface_mac \
-# UnpackedTarball/skia/src/gpu/gl/win/GrGLMakeNativeInterface_win \
# UnpackedTarball/skia/src/ports/SkDebug_android \
-# UnpackedTarball/skia/src/ports/SkDebug_win \
# UnpackedTarball/skia/src/ports/SkDiscardableMemory_none \
# UnpackedTarball/skia/src/ports/SkFontConfigInterface \
# UnpackedTarball/skia/src/ports/SkFontConfigInterface_direct \
# UnpackedTarball/skia/src/ports/SkFontConfigInterface_direct_factory \
# UnpackedTarball/skia/src/ports/SkFontHost_mac \
-# UnpackedTarball/skia/src/ports/SkFontHost_win \
# UnpackedTarball/skia/src/ports/SkFontMgr_android \
# UnpackedTarball/skia/src/ports/SkFontMgr_android_factory \
# UnpackedTarball/skia/src/ports/SkFontMgr_android_parser \
@@ -848,22 +908,15 @@ $(eval $(call gb_Library_add_generated_exception_objects,skia,\
# UnpackedTarball/skia/src/ports/SkFontMgr_FontConfigInterface \
# UnpackedTarball/skia/src/ports/SkFontMgr_FontConfigInterface_factory \
# UnpackedTarball/skia/src/ports/SkFontMgr_fuchsia \
-# UnpackedTarball/skia/src/ports/SkFontMgr_win_dw \
-# UnpackedTarball/skia/src/ports/SkFontMgr_win_dw_factory \
# UnpackedTarball/skia/src/ports/SkImageEncoder_CG \
# UnpackedTarball/skia/src/ports/SkImageEncoder_WIC \
# UnpackedTarball/skia/src/ports/SkImageGeneratorCG \
-# UnpackedTarball/skia/src/ports/SkImageGenerator_skia \
# UnpackedTarball/skia/src/ports/SkImageGeneratorWIC \
+# UnpackedTarball/skia/src/ports/SkImageGenerator_skia \
# UnpackedTarball/skia/src/ports/SkMemory_malloc \
# UnpackedTarball/skia/src/ports/SkMemory_mozalloc \
-# UnpackedTarball/skia/src/ports/SkOSFile_win \
-# UnpackedTarball/skia/src/ports/SkOSLibrary_win \
# UnpackedTarball/skia/src/ports/SkRemotableFontMgr_win_dw \
-# UnpackedTarball/skia/src/ports/SkScalerContext_win_dw \
# UnpackedTarball/skia/src/ports/SkTLS_none \
-# UnpackedTarball/skia/src/ports/SkTLS_win \
-# UnpackedTarball/skia/src/ports/SkTypeface_win_dw \
# UnpackedTarball/skia/src/utils/mac/SkCreateCGImageRef \
# UnpackedTarball/skia/src/utils/mac/SkStream_mac \
diff --git a/external/skia/UnpackedTarball_skia.mk b/external/skia/UnpackedTarball_skia.mk
index 2221e5a00ebb..7ae3bf4427fc 100644
--- a/external/skia/UnpackedTarball_skia.mk
+++ b/external/skia/UnpackedTarball_skia.mk
@@ -11,7 +11,8 @@ $(eval $(call gb_UnpackedTarball_UnpackedTarball,skia))
$(eval $(call gb_UnpackedTarball_set_tarball,skia,$(SKIA_TARBALL)))
-skia_patches := lerp.patch
+# TODO
+skia_patches := lerp.patch fix-pch.patch fix-ddi.patch
$(eval $(call gb_UnpackedTarball_set_patchlevel,skia,1))
diff --git a/external/skia/configs/SkUserConfig.h b/external/skia/configs/SkUserConfig.h
deleted file mode 100644
index 19372a4621ba..000000000000
--- a/external/skia/configs/SkUserConfig.h
+++ /dev/null
@@ -1,191 +0,0 @@
-
-/*
- * Copyright 2006 The Android Open Source Project
- *
- * Use of this source code is governed by a BSD-style license that can be
- * found in the LICENSE file.
- */
-
-#ifndef SkUserConfig_DEFINED
-#define SkUserConfig_DEFINED
-
-/* SkTypes.h, the root of the public header files, does the following trick:
-
- #include "SkPreConfig.h"
- #include "SkUserConfig.h"
- #include "SkPostConfig.h"
-
- SkPreConfig.h runs first, and it is responsible for initializing certain
- skia defines.
-
- SkPostConfig.h runs last, and its job is to just check that the final
- defines are consistent (i.e. that we don't have mutually conflicting
- defines).
-
- SkUserConfig.h (this file) runs in the middle. It gets to change or augment
- the list of flags initially set in preconfig, and then postconfig checks
- that everything still makes sense.
-
- Below are optional defines that add, subtract, or change default behavior
- in Skia. Your port can locally edit this file to enable/disable flags as
- you choose, or these can be delared on your command line (i.e. -Dfoo).
-
- By default, this include file will always default to having all of the flags
- commented out, so including it will have no effect.
-*/
-
-///////////////////////////////////////////////////////////////////////////////
-
-/* Scalars (the fractional value type in skia) can be implemented either as
- floats or 16.16 integers (fixed). Exactly one of these two symbols must be
- defined.
-*/
-#define SK_SCALAR_IS_FLOAT
-//#define SK_SCALAR_IS_FIXED
-
-/* For some performance-critical scalar operations, skia will optionally work
- around the standard float operators if it knows that the CPU does not have
- native support for floats. If your environment uses software floating point,
- define this flag.
- */
-//#define SK_SOFTWARE_FLOAT
-
-/* Skia has lots of debug-only code. Often this is just null checks or other
- parameter checking, but sometimes it can be quite intrusive (e.g. check that
- each 32bit pixel is in premultiplied form). This code can be very useful
- during development, but will slow things down in a shipping product.
-
- By default, these mutually exclusive flags are defined in SkPreConfig.h,
- based on the presence or absence of NDEBUG, but that decision can be changed
- here.
- */
-//#define SK_DEBUG
-//#define SK_RELEASE
-
-/* Skia has certain debug-only code that is extremely intensive even for debug
- builds. This code is useful for diagnosing specific issues, but is not
- generally applicable, therefore it must be explicitly enabled to avoid
- the performance impact. By default these flags are undefined, but can be
- enabled by uncommenting them below.
- */
-//#define SK_DEBUG_GLYPH_CACHE
-//#define SK_DEBUG_PATH
-
-/* To assist debugging, Skia provides an instance counting utility in
- include/core/SkInstCount.h. This flag turns on and off that utility to
- allow instance count tracking in either debug or release builds. By
- default it is enabled in debug but disabled in release.
- */
-//#define SK_ENABLE_INST_COUNT 1
-
-/* If, in debugging mode, Skia needs to stop (presumably to invoke a debugger)
- it will call SK_CRASH(). If this is not defined it, it is defined in
- SkPostConfig.h to write to an illegal address
- */
-//#define SK_CRASH() *(int *)(uintptr_t)0 = 0
-
-/* preconfig will have attempted to determine the endianness of the system,
- but you can change these mutually exclusive flags here.
- */
-//#define SK_CPU_BENDIAN
-//#define SK_CPU_LENDIAN
-
-/* Most compilers use the same bit endianness for bit flags in a byte as the
- system byte endianness, and this is the default. If for some reason this
- needs to be overridden, specify which of the mutually exclusive flags to
- use. For example, some atom processors in certain configurations have big
- endian byte order but little endian bit orders.
-*/
-//#define SK_UINT8_BITFIELD_BENDIAN
-//#define SK_UINT8_BITFIELD_LENDIAN
-
-/* Some compilers don't support long long for 64bit integers. If yours does
- not, define this to the appropriate type.
- */
-//#define SkLONGLONG int64_t
-
-/* To write debug messages to a console, skia will call SkDebugf(...) following
- printf conventions (e.g. const char* format, ...). If you want to redirect
- this to something other than printf, define yours here
- */
-//#define SkDebugf(...) MyFunction(__VA_ARGS__)
-
-/*
- * To specify a different default font cache limit, define this. If this is
- * undefined, skia will use a built-in value.
- */
-//#define SK_DEFAULT_FONT_CACHE_LIMIT (1024 * 1024)
-
-/* If defined, use CoreText instead of ATSUI on OS X.
-*/
-//#define SK_USE_MAC_CORE_TEXT
-
-/* If zlib is available and you want to support the flate compression
- algorithm (used in PDF generation), define SK_ZLIB_INCLUDE to be the
- include path. Alternatively, define SK_SYSTEM_ZLIB to use the system zlib
- library specified as "#include <zlib.h>".
- */
-//#define SK_ZLIB_INCLUDE <zlib.h>
-#define SK_SYSTEM_ZLIB
-
-/* Define this to allow PDF scalars above 32k. The PDF/A spec doesn't allow
- them, but modern PDF interpreters should handle them just fine.
- */
-#define SK_ALLOW_LARGE_PDF_SCALARS
-
-/* Define this to provide font subsetter in PDF generation.
- */
-//#define SK_SFNTLY_SUBSETTER "sfntly/subsetter/font_subsetter.h"
-
-/* Define this to remove dimension checks on bitmaps. Not all blits will be
- correct yet, so this is mostly for debugging the implementation.
- */
-#define SK_ALLOW_OVER_32K_BITMAPS
-
-/**
- * To revert to int-only srcrect behavior in drawBitmapRect(ToRect),
- * define this symbol.
- */
-//#define SK_SUPPORT_INT_SRCRECT_DRAWBITMAPRECT
-
-/* Define this to set the upper limit for text to support LCD. Values that
- are very large increase the cost in the font cache and draw slower, without
- improving readability. If this is undefined, Skia will use its default
- value (e.g. 48)
- */
-//#define SK_MAX_SIZE_FOR_LCDTEXT 48
-
-/* If SK_DEBUG is defined, then you can optionally define SK_SUPPORT_UNITTEST
- which will run additional self-tests at startup. These can take a long time,
- so this flag is optional.
- */
-#ifdef SK_DEBUG
-//#define SK_SUPPORT_UNITTEST
-#endif
-
-/* If your system embeds skia and has complex event logging, define this
- symbol to name a file that maps the following macros to your system's
- equivalents:
- SK_TRACE_EVENT0(event)
- SK_TRACE_EVENT1(event, name1, value1)
- SK_TRACE_EVENT2(event, name1, value1, name2, value2)
- src/utils/SkDebugTrace.h has a trivial implementation that writes to
- the debug output stream. If SK_USER_TRACE_INCLUDE_FILE is not defined,
- SkTrace.h will define the above three macros to do nothing.
-*/
-//#undef SK_USER_TRACE_INCLUDE_FILE
-
-/* Change the kN32_SkColorType ordering to BGRA to work in X windows.
- */
-//#define SK_R32_SHIFT 16
-
-/* Determines whether to build code that supports the GPU backend. Some classes
- that are not GPU-specific, such as SkShader subclasses, have optional code
- that is used allows them to interact with the GPU backend. If you'd like to
- omit this code set SK_SUPPORT_GPU to 0. This also allows you to omit the gpu
- directories from your include search path when you're not building the GPU
- backend. Defaults to 1 (build the GPU code).
- */
-//#define SK_SUPPORT_GPU 1
-
-#endif
diff --git a/external/skia/fix-ddi.patch b/external/skia/fix-ddi.patch
new file mode 100644
index 000000000000..f827c1d69553
--- /dev/null
+++ b/external/skia/fix-ddi.patch
@@ -0,0 +1,9 @@
+--- skia/src/utils/win/SkDWriteNTDDI_VERSION.h.sav 2019-08-15 21:59:46.000000000 +0200
++++ skia/src/utils/win/SkDWriteNTDDI_VERSION.h 2019-09-26 15:30:36.395622200 +0200
+@@ -28,4 +28,6 @@
+ # endif
+ #endif
+
++#define NTDDI_VERSION 0x0A000002 // NTDDI_WIN10_RS1
++
+ #endif
diff --git a/external/skia/fix-pch.patch b/external/skia/fix-pch.patch
new file mode 100644
index 000000000000..9078a8a12e51
--- /dev/null
+++ b/external/skia/fix-pch.patch
@@ -0,0 +1,46 @@
+--- skia/src/utils/Sk3D.cpp.sav 2019-08-15 21:59:46.324369467 +0200
++++ skia/src/utils/Sk3D.cpp 2019-09-26 13:13:34.153647165 +0200
+@@ -38,6 +38,9 @@ void Sk3LookAt(SkMatrix44* dst, const Sk
+ dst->invert(dst);
+ }
+
++#undef far
++#undef near
++
+ bool Sk3Perspective(SkMatrix44* dst, float near, float far, float angle) {
+ SkASSERT(far > near);
+
+--- skia/src/gpu/vk/GrVkSemaphore.cpp.sav 2019-08-15 21:59:46.292369407 +0200
++++ skia/src/gpu/vk/GrVkSemaphore.cpp 2019-09-26 13:12:56.041647516 +0200
+@@ -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
+--- skia/third_party/skcms/skcms.cc.sav 2019-09-26 13:03:33.997652697 +0200
++++ skia/third_party/skcms/skcms.cc 2019-09-26 13:13:19.185647303 +0200
+@@ -1817,7 +1817,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)));
+--- skia/src/utils/win/SkDWriteGeometrySink.h.sav 2019-08-15 22:00:07.552409373 +0200
++++ skia/src/utils/win/SkDWriteGeometrySink.h 2019-09-26 13:54:17.725624642 +0200
+@@ -12,6 +12,8 @@
+
+ class SkPath;
+
++#define CONST const
++
+ #include <dwrite.h>
+ #include <d2d1.h>
+