summaryrefslogtreecommitdiffstats
path: root/external/skia
diff options
context:
space:
mode:
authorLuboš Luňák <l.lunak@collabora.com>2020-08-25 11:01:39 +0200
committerLuboš Luňák <l.lunak@collabora.com>2020-08-26 11:47:22 +0200
commiteaf4f6d3b1e64bc7b057e70cffe0bda0ed42c49f (patch)
tree1d0966b937e97558ca8c4778b40f46e88078b092 /external/skia
parentuse more fastparser in SdXMLMasterPageContext (diff)
downloadcore-eaf4f6d3b1e64bc7b057e70cffe0bda0ed42c49f.tar.gz
core-eaf4f6d3b1e64bc7b057e70cffe0bda0ed42c49f.zip
update Skia to chrome/m86 snapshot
Change-Id: Id0c0679bc1ca546a75f71d4716ba151ae46569bd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101311 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
Diffstat (limited to 'external/skia')
-rw-r--r--external/skia/Library_skia.mk32
-rw-r--r--external/skia/UnpackedTarball_skia.mk4
-rw-r--r--external/skia/Wdeprecated-copy-dtor.patch.011
-rw-r--r--external/skia/clang-attributes-warning.patch.110
-rw-r--r--external/skia/constexpr-debug-std-max.patch.137
-rw-r--r--external/skia/fix-msvc.patch.113
-rw-r--r--external/skia/fix-pch.patch.189
-rw-r--r--external/skia/inc/pch/precompiled_skia.hxx54
-rw-r--r--external/skia/missing-include.patch.111
-rw-r--r--external/skia/no-trace-resources-on-exit.patch.113
-rw-r--r--external/skia/operator-eq-bool.patch.125
-rw-r--r--external/skia/share-grcontext.patch.172
12 files changed, 174 insertions, 197 deletions
diff --git a/external/skia/Library_skia.mk b/external/skia/Library_skia.mk
index 5fea049c901b..735152808f12 100644
--- a/external/skia/Library_skia.mk
+++ b/external/skia/Library_skia.mk
@@ -226,7 +226,7 @@ $(eval $(call gb_Library_add_generated_exception_objects,skia,\
UnpackedTarball/skia/src/core/SkM44 \
UnpackedTarball/skia/src/core/SkMD5 \
UnpackedTarball/skia/src/core/SkMiniRecorder \
- UnpackedTarball/skia/src/core/SkMipMap \
+ UnpackedTarball/skia/src/core/SkMipmap \
UnpackedTarball/skia/src/core/SkModeColorFilter \
UnpackedTarball/skia/src/core/SkOpts \
UnpackedTarball/skia/src/core/SkOverdrawCanvas \
@@ -367,6 +367,7 @@ $(eval $(call gb_Library_add_generated_exception_objects,skia,\
UnpackedTarball/skia/src/image/SkImage \
UnpackedTarball/skia/src/image/SkImage_Lazy \
UnpackedTarball/skia/src/image/SkImage_Raster \
+ UnpackedTarball/skia/src/image/SkRescaleAndReadPixels \
UnpackedTarball/skia/src/image/SkSurface \
UnpackedTarball/skia/src/image/SkSurface_Raster \
UnpackedTarball/skia/src/images/SkImageEncoder \
@@ -428,12 +429,14 @@ $(eval $(call gb_Library_add_generated_exception_objects,skia,\
UnpackedTarball/skia/src/sksl/ir/SkSLType \
UnpackedTarball/skia/src/sksl/ir/SkSLVariableReference \
UnpackedTarball/skia/src/sksl/SkSLASTNode \
+ UnpackedTarball/skia/src/sksl/SkSLAnalysis \
UnpackedTarball/skia/src/sksl/SkSLByteCode \
UnpackedTarball/skia/src/sksl/SkSLByteCodeGenerator \
UnpackedTarball/skia/src/sksl/SkSLCFGGenerator \
UnpackedTarball/skia/src/sksl/SkSLCompiler \
UnpackedTarball/skia/src/sksl/SkSLCPPCodeGenerator \
UnpackedTarball/skia/src/sksl/SkSLCPPUniformCTypes \
+ UnpackedTarball/skia/src/sksl/SkSLDehydrator \
UnpackedTarball/skia/src/sksl/SkSLGLSLCodeGenerator \
UnpackedTarball/skia/src/sksl/SkSLHCodeGenerator \
UnpackedTarball/skia/src/sksl/SkSLIRGenerator \
@@ -442,7 +445,8 @@ $(eval $(call gb_Library_add_generated_exception_objects,skia,\
UnpackedTarball/skia/src/sksl/SkSLOutputStream \
UnpackedTarball/skia/src/sksl/SkSLParser \
UnpackedTarball/skia/src/sksl/SkSLPipelineStageCodeGenerator \
- UnpackedTarball/skia/src/sksl/SkSLSampleMatrix \
+ UnpackedTarball/skia/src/sksl/SkSLRehydrator \
+ UnpackedTarball/skia/src/sksl/SkSLSampleUsage \
UnpackedTarball/skia/src/sksl/SkSLSPIRVCodeGenerator \
UnpackedTarball/skia/src/sksl/SkSLSPIRVtoHLSL \
UnpackedTarball/skia/src/sksl/SkSLSectionAndParameterHelper \
@@ -479,7 +483,6 @@ $(eval $(call gb_Library_add_generated_exception_objects,skia,\
UnpackedTarball/skia/src/utils/SkThreadUtils_pthread \
UnpackedTarball/skia/src/utils/SkThreadUtils_win \
UnpackedTarball/skia/src/utils/SkUTF \
- UnpackedTarball/skia/src/utils/SkWhitelistTypefaces \
UnpackedTarball/skia/src/xps/SkXPSDevice \
UnpackedTarball/skia/src/xps/SkXPSDocument \
))
@@ -509,6 +512,7 @@ $(eval $(call gb_Library_add_generated_exception_objects,skia,\
UnpackedTarball/skia/src/gpu/ccpr/GrVSCoverageProcessor \
UnpackedTarball/skia/src/gpu/effects/generated/GrAARectEffect \
UnpackedTarball/skia/src/gpu/effects/generated/GrAlphaThresholdFragmentProcessor \
+ UnpackedTarball/skia/src/gpu/effects/generated/GrArithmeticProcessor \
UnpackedTarball/skia/src/gpu/effects/generated/GrBlurredEdgeFragmentProcessor \
UnpackedTarball/skia/src/gpu/effects/generated/GrCircleBlurFragmentProcessor \
UnpackedTarball/skia/src/gpu/effects/generated/GrCircleEffect \
@@ -517,9 +521,11 @@ $(eval $(call gb_Library_add_generated_exception_objects,skia,\
UnpackedTarball/skia/src/gpu/effects/generated/GrComposeLerpEffect \
UnpackedTarball/skia/src/gpu/effects/generated/GrConfigConversionEffect \
UnpackedTarball/skia/src/gpu/effects/generated/GrConstColorProcessor \
+ UnpackedTarball/skia/src/gpu/effects/generated/GrDitherEffect \
UnpackedTarball/skia/src/gpu/effects/generated/GrEllipseEffect \
UnpackedTarball/skia/src/gpu/effects/generated/GrDeviceSpaceEffect \
UnpackedTarball/skia/src/gpu/effects/generated/GrHSLToRGBFilterEffect \
+ UnpackedTarball/skia/src/gpu/effects/generated/GrHighContrastFilterEffect \
UnpackedTarball/skia/src/gpu/effects/generated/GrLumaColorFilterEffect \
UnpackedTarball/skia/src/gpu/effects/generated/GrMagnifierEffect \
UnpackedTarball/skia/src/gpu/effects/generated/GrMixerEffect \
@@ -530,6 +536,7 @@ $(eval $(call gb_Library_add_generated_exception_objects,skia,\
UnpackedTarball/skia/src/gpu/effects/GrBezierEffect \
UnpackedTarball/skia/src/gpu/effects/GrBicubicEffect \
UnpackedTarball/skia/src/gpu/effects/GrBitmapTextGeoProc \
+ UnpackedTarball/skia/src/gpu/effects/GrBlendFragmentProcessor \
UnpackedTarball/skia/src/gpu/effects/GrConvexPolyEffect \
UnpackedTarball/skia/src/gpu/effects/GrCoverageSetOpXP \
UnpackedTarball/skia/src/gpu/effects/GrCustomXfermode \
@@ -544,7 +551,6 @@ $(eval $(call gb_Library_add_generated_exception_objects,skia,\
UnpackedTarball/skia/src/gpu/effects/GrShadowGeoProc \
UnpackedTarball/skia/src/gpu/effects/GrSkSLFP \
UnpackedTarball/skia/src/gpu/effects/GrTextureEffect \
- UnpackedTarball/skia/src/gpu/effects/GrXfermodeFragmentProcessor \
UnpackedTarball/skia/src/gpu/effects/GrYUVtoRGBEffect \
UnpackedTarball/skia/src/gpu/geometry/GrPathUtils \
UnpackedTarball/skia/src/gpu/geometry/GrQuad \
@@ -570,7 +576,6 @@ $(eval $(call gb_Library_add_generated_exception_objects,skia,\
UnpackedTarball/skia/src/gpu/gradients/generated/GrRadialGradientLayout \
UnpackedTarball/skia/src/gpu/gradients/generated/GrSingleIntervalGradientColorizer \
UnpackedTarball/skia/src/gpu/gradients/generated/GrSweepGradientLayout \
- UnpackedTarball/skia/src/gpu/gradients/generated/GrTextureGradientColorizer \
UnpackedTarball/skia/src/gpu/gradients/generated/GrTiledGradientEffect \
UnpackedTarball/skia/src/gpu/gradients/generated/GrTwoPointConicalGradientLayout \
UnpackedTarball/skia/src/gpu/gradients/generated/GrUnrolledBinaryGradientColorizer \
@@ -579,6 +584,7 @@ $(eval $(call gb_Library_add_generated_exception_objects,skia,\
UnpackedTarball/skia/src/gpu/GrAHardwareBufferImageGenerator \
UnpackedTarball/skia/src/gpu/GrAHardwareBufferUtils \
UnpackedTarball/skia/src/gpu/GrAuditTrail \
+ UnpackedTarball/skia/src/gpu/GrBackendSemaphore \
UnpackedTarball/skia/src/gpu/GrBackendSurface \
UnpackedTarball/skia/src/gpu/GrBackendTextureImageGenerator \
UnpackedTarball/skia/src/gpu/GrBitmapTextureMaker \
@@ -598,6 +604,7 @@ $(eval $(call gb_Library_add_generated_exception_objects,skia,\
UnpackedTarball/skia/src/gpu/GrDataUtils \
UnpackedTarball/skia/src/gpu/GrDDLContext \
UnpackedTarball/skia/src/gpu/GrDefaultGeoProcFactory \
+ UnpackedTarball/skia/src/gpu/GrDirectContext \
UnpackedTarball/skia/src/gpu/GrDistanceFieldGenFromVector \
UnpackedTarball/skia/src/gpu/GrDrawingManager \
UnpackedTarball/skia/src/gpu/GrDrawOpAtlas \
@@ -612,7 +619,6 @@ $(eval $(call gb_Library_add_generated_exception_objects,skia,\
UnpackedTarball/skia/src/gpu/GrGpuResource \
UnpackedTarball/skia/src/gpu/GrImageContext \
UnpackedTarball/skia/src/gpu/GrImageTextureMaker \
- UnpackedTarball/skia/src/gpu/GrLegacyDirectContext \
UnpackedTarball/skia/src/gpu/GrManagedResource \
UnpackedTarball/skia/src/gpu/GrMemoryPool \
UnpackedTarball/skia/src/gpu/GrOnFlushResourceProvider \
@@ -635,6 +641,7 @@ $(eval $(call gb_Library_add_generated_exception_objects,skia,\
UnpackedTarball/skia/src/gpu/GrProgramInfo \
UnpackedTarball/skia/src/gpu/GrProxyProvider \
UnpackedTarball/skia/src/gpu/GrRecordingContext \
+ UnpackedTarball/skia/src/gpu/GrRecordingContextPriv \
UnpackedTarball/skia/src/gpu/GrRectanizerPow2 \
UnpackedTarball/skia/src/gpu/GrRectanizerSkyline \
UnpackedTarball/skia/src/gpu/GrRenderTask \
@@ -653,7 +660,7 @@ $(eval $(call gb_Library_add_generated_exception_objects,skia,\
UnpackedTarball/skia/src/gpu/GrSoftwarePathRenderer \
UnpackedTarball/skia/src/gpu/GrSPIRVUniformHandler \
UnpackedTarball/skia/src/gpu/GrSPIRVVaryingHandler \
- UnpackedTarball/skia/src/gpu/GrStagingBuffer \
+ UnpackedTarball/skia/src/gpu/GrStagingBufferManager \
UnpackedTarball/skia/src/gpu/GrStencilAttachment \
UnpackedTarball/skia/src/gpu/GrStencilMaskHelper \
UnpackedTarball/skia/src/gpu/GrStencilSettings \
@@ -674,9 +681,9 @@ $(eval $(call gb_Library_add_generated_exception_objects,skia,\
UnpackedTarball/skia/src/gpu/GrTextureRenderTargetProxy \
UnpackedTarball/skia/src/gpu/GrTextureResolveRenderTask \
UnpackedTarball/skia/src/gpu/GrTransferFromRenderTask \
+ UnpackedTarball/skia/src/gpu/GrUtil \
UnpackedTarball/skia/src/gpu/GrWaitRenderTask \
UnpackedTarball/skia/src/gpu/GrXferProcessor \
- UnpackedTarball/skia/src/gpu/GrYUVProvider \
UnpackedTarball/skia/src/gpu/mock/GrMockCaps \
UnpackedTarball/skia/src/gpu/mock/GrMockGpu \
UnpackedTarball/skia/src/gpu/mock/GrMockTypes \
@@ -704,9 +711,11 @@ $(eval $(call gb_Library_add_generated_exception_objects,skia,\
UnpackedTarball/skia/src/gpu/ops/GrShadowRRectOp \
UnpackedTarball/skia/src/gpu/ops/GrSimpleMeshDrawOpHelper \
UnpackedTarball/skia/src/gpu/ops/GrSimpleMeshDrawOpHelperWithStencil \
+ UnpackedTarball/skia/src/gpu/ops/GrSmallPathAtlasMgr \
UnpackedTarball/skia/src/gpu/ops/GrSmallPathRenderer \
UnpackedTarball/skia/src/gpu/ops/GrStencilAndCoverPathRenderer \
UnpackedTarball/skia/src/gpu/ops/GrStencilPathOp \
+ UnpackedTarball/skia/src/gpu/ops/GrSmallPathShapeData \
UnpackedTarball/skia/src/gpu/ops/GrStrokeRectOp \
UnpackedTarball/skia/src/gpu/ops/GrTriangulatingPathRenderer \
UnpackedTarball/skia/src/gpu/ops/GrTextureOp \
@@ -715,9 +724,11 @@ $(eval $(call gb_Library_add_generated_exception_objects,skia,\
UnpackedTarball/skia/src/gpu/SkGr \
UnpackedTarball/skia/src/gpu/tessellate/GrDrawAtlasPathOp \
UnpackedTarball/skia/src/gpu/tessellate/GrFillPathShader \
+ UnpackedTarball/skia/src/gpu/tessellate/GrPathTessellateOp \
UnpackedTarball/skia/src/gpu/tessellate/GrStencilPathShader \
- UnpackedTarball/skia/src/gpu/tessellate/GrStrokeGeometry \
- UnpackedTarball/skia/src/gpu/tessellate/GrTessellatePathOp \
+ UnpackedTarball/skia/src/gpu/tessellate/GrStrokePatchBuilder \
+ UnpackedTarball/skia/src/gpu/tessellate/GrStrokeTessellateOp \
+ UnpackedTarball/skia/src/gpu/tessellate/GrStrokeTessellateShader \
UnpackedTarball/skia/src/gpu/tessellate/GrTessellationPathRenderer \
UnpackedTarball/skia/src/gpu/text/GrAtlasManager \
UnpackedTarball/skia/src/gpu/text/GrDistanceFieldAdjustTable \
@@ -804,6 +815,7 @@ $(eval $(call gb_Library_add_generated_exception_objects,skia,\
$(eval $(call gb_Library_add_generated_exception_objects,skia,\
UnpackedTarball/skia/tools/gpu/vk/VkTestUtils \
UnpackedTarball/skia/tools/sk_app/VulkanWindowContext \
+ UnpackedTarball/skia/tools/sk_app/WindowContext \
))
ifeq ($(OS),WNT)
diff --git a/external/skia/UnpackedTarball_skia.mk b/external/skia/UnpackedTarball_skia.mk
index f95d0d5f7118..0e486a916388 100644
--- a/external/skia/UnpackedTarball_skia.mk
+++ b/external/skia/UnpackedTarball_skia.mk
@@ -23,7 +23,6 @@ skia_patches := \
libvulkan-name.patch.1 \
share-grcontext.patch.1 \
Wdeprecated-copy-dtor.patch.0 \
- fix-msvc.patch.1 \
fix-gcc-x86.patch.1 \
fix-sse.patch.1 \
clang11-flax-vector-conversion.patch.0 \
@@ -32,14 +31,13 @@ skia_patches := \
windows-do-not-modify-logfont.patch.0 \
windows-text-gamma.patch.0 \
windows-force-unicode-api.patch.0 \
- operator-eq-bool.patch.1 \
fix-without-gl.patch.0 \
windows-typeface-directwrite.patch.0 \
windows-raster-surface-no-copies.patch.1 \
fix-windows-dwrite.patch.1 \
public-make-from-backend-texture.patch.1 \
c++20.patch.0 \
- missing-include.patch.1 \
+ constexpr-debug-std-max.patch.1 \
$(eval $(call gb_UnpackedTarball_set_patchlevel,skia,1))
diff --git a/external/skia/Wdeprecated-copy-dtor.patch.0 b/external/skia/Wdeprecated-copy-dtor.patch.0
index 710fe9c249d9..7c49627d8714 100644
--- a/external/skia/Wdeprecated-copy-dtor.patch.0
+++ b/external/skia/Wdeprecated-copy-dtor.patch.0
@@ -8,14 +8,3 @@
GrDriverBugWorkarounds& operator=(const GrDriverBugWorkarounds&) = default;
---- tools/sk_app/VulkanWindowContext.h
-+++ tools/sk_app/VulkanWindowContext.h
-@@ -33,6 +33,8 @@
- SharedGrContext() {}
- GrContext* getGrContext() { return shared ? shared->fContext.get() : nullptr; }
- ~SharedGrContext() { shared.reset(); checkDestroyShared(); }
-+ SharedGrContext(SharedGrContext const &) = default;
-+ SharedGrContext & operator =(SharedGrContext const &) = default;
- bool operator!() const { return !shared; }
- void reset() { shared.reset(); }
- private:
diff --git a/external/skia/clang-attributes-warning.patch.1 b/external/skia/clang-attributes-warning.patch.1
index 1e30e290b85d..6384735e9c05 100644
--- a/external/skia/clang-attributes-warning.patch.1
+++ b/external/skia/clang-attributes-warning.patch.1
@@ -1,5 +1,5 @@
diff --git a/include/private/SkFloatingPoint.h b/include/private/SkFloatingPoint.h
-index 110dda2ae4..530634b815 100644
+index 3c6d22c310..60500b2d2c 100644
--- a/include/private/SkFloatingPoint.h
+++ b/include/private/SkFloatingPoint.h
@@ -159,7 +159,9 @@ static inline int64_t sk_float_saturate2int64(float x) {
@@ -7,24 +7,24 @@ index 110dda2ae4..530634b815 100644
// Clang thinks this is undefined, but it's actually implementation defined to return either
// the largest float or infinity (one of the two bracketing representable floats). Good enough!
+#if defined(__clang__)
- [[clang::no_sanitize("float-cast-overflow")]]
+ SK_ATTRIBUTE(no_sanitize("float-cast-overflow"))
+#endif
static inline float sk_double_to_float(double x) {
return static_cast<float>(x);
}
-@@ -226,12 +228,16 @@ static inline float sk_float_rsqrt(float x) {
+@@ -242,12 +244,16 @@ static inline int sk_float_nextlog2(float x) {
// IEEE defines how float divide behaves for non-finite values and zero-denoms, but C does not
// so we have a helper that suppresses the possible undefined-behavior warnings.
+#if defined(__clang__)
- [[clang::no_sanitize("float-divide-by-zero")]]
+ SK_ATTRIBUTE(no_sanitize("float-divide-by-zero"))
+#endif
static inline float sk_ieee_float_divide(float numer, float denom) {
return numer / denom;
}
+#if defined(__clang__)
- [[clang::no_sanitize("float-divide-by-zero")]]
+ SK_ATTRIBUTE(no_sanitize("float-divide-by-zero"))
+#endif
static inline double sk_ieee_double_divide(double numer, double denom) {
return numer / denom;
diff --git a/external/skia/constexpr-debug-std-max.patch.1 b/external/skia/constexpr-debug-std-max.patch.1
new file mode 100644
index 000000000000..b35b978e4041
--- /dev/null
+++ b/external/skia/constexpr-debug-std-max.patch.1
@@ -0,0 +1,37 @@
+diff --git a/src/shaders/SkImageShader.cpp b/src/shaders/SkImageShader.cpp
+index 52dda13e29..cafe2e672a 100755
+--- a/src/shaders/SkImageShader.cpp
++++ b/src/shaders/SkImageShader.cpp
+@@ -322,6 +322,18 @@ sk_sp<SkShader> SkImageShader::Make(sk_sp<SkImage> image, SkTileMode tmx, SkTile
+ #include "src/gpu/effects/GrBlendFragmentProcessor.h"
+ #include "src/gpu/effects/GrTextureEffect.h"
+
++namespace {
++template<typename T>
++constexpr T skia_max( std::initializer_list<T> list )
++{
++T max = *list.begin();
++for(auto i: list)
++ if( max < i )
++ max = i;
++return max;
++}
++}
++
+ std::unique_ptr<GrFragmentProcessor> SkImageShader::asFragmentProcessor(
+ const GrFPArgs& args) const {
+ const auto lm = this->totalLocalMatrix(args.fPreLocalMatrix);
+@@ -331,11 +343,11 @@ std::unique_ptr<GrFragmentProcessor> SkImageShader::asFragmentProcessor(
+ }
+
+ // This would all be much nicer with std::variant.
+- static constexpr size_t kSize = std::max({sizeof(GrYUVAImageTextureMaker),
++ static constexpr size_t kSize = skia_max({sizeof(GrYUVAImageTextureMaker),
+ sizeof(GrTextureAdjuster ),
+ sizeof(GrImageTextureMaker ),
+ sizeof(GrBitmapTextureMaker )});
+- static constexpr size_t kAlign = std::max({alignof(GrYUVAImageTextureMaker),
++ static constexpr size_t kAlign = skia_max({alignof(GrYUVAImageTextureMaker),
+ alignof(GrTextureAdjuster ),
+ alignof(GrImageTextureMaker ),
+ alignof(GrBitmapTextureMaker )});
diff --git a/external/skia/fix-msvc.patch.1 b/external/skia/fix-msvc.patch.1
deleted file mode 100644
index ffbf19883988..000000000000
--- a/external/skia/fix-msvc.patch.1
+++ /dev/null
@@ -1,13 +0,0 @@
-diff --git a/src/gpu/GrFragmentProcessor.h b/src/gpu/GrFragmentProcessor.h
-index 03d22aeaae..0f91f6f73c 100644
---- a/src/gpu/GrFragmentProcessor.h
-+++ b/src/gpu/GrFragmentProcessor.h
-@@ -603,7 +603,7 @@ public:
- operator bool() const { return fFPIter; }
- bool operator!=(const FPItemEndIter&) { return (bool)*this; }
-
-- FPItemIter(const FPItemIter&) = delete;
-+ FPItemIter(const FPItemIter&) = default;
- FPItemIter& operator=(const FPItemIter&) = delete;
-
- private:
diff --git a/external/skia/fix-pch.patch.1 b/external/skia/fix-pch.patch.1
index 9c89edbfeb9f..8fb6ea870c10 100644
--- a/external/skia/fix-pch.patch.1
+++ b/external/skia/fix-pch.patch.1
@@ -1,8 +1,8 @@
diff --git a/include/core/SkColor.h b/include/core/SkColor.h
-index 53df435e46..ce74db8b27 100644
+index 36527e38e5..ef9065ce75 100644
--- a/include/core/SkColor.h
+++ b/include/core/SkColor.h
-@@ -400,6 +400,7 @@ using SkColor4f = SkRGBA4f<kUnpremul_SkAlphaType>;
+@@ -414,6 +414,7 @@ using SkColor4f = SkRGBA4f<kUnpremul_SkAlphaType>;
template <> SK_API SkColor4f SkColor4f::FromColor(SkColor);
template <> SK_API SkColor SkColor4f::toSkColor() const;
@@ -11,29 +11,55 @@ index 53df435e46..ce74db8b27 100644
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
+index aba610eacf..792da4e9fb 100644
--- a/include/private/SkColorData.h
+++ b/include/private/SkColorData.h
-@@ -441,4 +441,6 @@ constexpr SkPMColor4f SK_PMColor4fILLEGAL = { SK_FloatNegativeInfinity,
+@@ -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 628e135348..5173a54575 100644
+--- a/src/gpu/gl/GrGLGpu.cpp
++++ b/src/gpu/gl/GrGLGpu.cpp
+@@ -3561,6 +3561,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 1484cee527..dcb53b20a1 100644
+index 1e6dd9e02b..d917b0e0be 100644
--- a/src/gpu/text/GrTextBlobCache.h
+++ b/src/gpu/text/GrTextBlobCache.h
-@@ -197,4 +197,6 @@ private:
- SkMessageBus<PurgeBlobMessage>::Inbox fPurgeBlobInbox;
+@@ -93,4 +93,6 @@ private:
+ SkMessageBus<PurgeBlobMessage>::Inbox fPurgeBlobInbox SK_GUARDED_BY(fSpinLock);
};
+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
+index 23bf656bf8..f926ebfdc2 100644
--- a/src/gpu/vk/GrVkSemaphore.cpp
+++ b/src/gpu/vk/GrVkSemaphore.cpp
@@ -10,6 +10,7 @@
@@ -45,7 +71,7 @@ index 191b6a3ce5..26754acccd 100644
#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
+index af4909aaaf..825ec35c83 100644
--- a/src/utils/win/SkDWriteGeometrySink.h
+++ b/src/utils/win/SkDWriteGeometrySink.h
@@ -13,6 +13,8 @@
@@ -58,10 +84,10 @@ index 019539b191..5dd7bef353 100644
#include <d2d1.h>
diff --git a/third_party/skcms/skcms.cc b/third_party/skcms/skcms.cc
-index cc5738d977..c67310f6cc 100644
+index 3b7806081c..a76eb0a451 100644
--- a/third_party/skcms/skcms.cc
+++ b/third_party/skcms/skcms.cc
-@@ -124,7 +124,8 @@ static float minus_1_ulp(float x) {
+@@ -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.
@@ -71,7 +97,7 @@ index cc5738d977..c67310f6cc 100644
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 {
+@@ -2047,7 +2048,9 @@ typedef enum {
Op_store_hhhh,
Op_store_fff,
Op_store_ffff,
@@ -82,42 +108,3 @@ index cc5738d977..c67310f6cc 100644
#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));
diff --git a/external/skia/inc/pch/precompiled_skia.hxx b/external/skia/inc/pch/precompiled_skia.hxx
index 0813bcd8e238..67460c3f8013 100644
--- a/external/skia/inc/pch/precompiled_skia.hxx
+++ b/external/skia/inc/pch/precompiled_skia.hxx
@@ -13,7 +13,7 @@
manual changes will be rewritten by the next run of update_pch.sh (which presumably
also fixes all possible problems, so it's usually better to use it).
- Generated on 2020-08-12 11:04:47 using:
+ Generated on 2020-08-25 10:25:07 using:
./bin/update_pch external/skia skia --cutoff=1 --exclude:system --include:module --include:local
If after updating build fails, use the following command to locate conflicting headers:
@@ -22,6 +22,7 @@
#if PCH_LEVEL >= 1
#include <algorithm>
+#include <array>
#include <assert.h>
#include <atomic>
#include <bitset>
@@ -39,6 +40,7 @@
#include <deque>
#include <errno.h>
#include <float.h>
+#include <fstream>
#include <functional>
#include <inttypes.h>
#include <iterator>
@@ -70,7 +72,7 @@
#include <rtl/alloc.h>
#include <sal/log.hxx>
#endif // PCH_LEVEL >= 2
-#if PCH_LEVEL >= 3
+// PCH_LEVEL >= 3
#include <include/c/sk_canvas.h>
#include <include/c/sk_colorspace.h>
#include <include/c/sk_data.h>
@@ -213,7 +215,9 @@
#include <include/gpu/GrContext.h>
#include <include/gpu/GrContextOptions.h>
#include <include/gpu/GrContextThreadSafeProxy.h>
+#include <include/gpu/GrDirectContext.h>
#include <include/gpu/GrDriverBugWorkarounds.h>
+#include <include/gpu/GrRecordingContext.h>
#include <include/gpu/GrTypes.h>
#include <include/gpu/mock/GrMockTypes.h>
#include <include/gpu/vk/GrVkBackendContext.h>
@@ -224,7 +228,6 @@
#include <include/ports/SkRemotableFontMgr.h>
#include <include/private/GrContext_Base.h>
#include <include/private/GrImageContext.h>
-#include <include/private/GrRecordingContext.h>
#include <include/private/GrResourceKey.h>
#include <include/private/GrSingleOwner.h>
#include <include/private/GrTypesPriv.h>
@@ -245,6 +248,7 @@
#include <include/private/SkNx.h>
#include <include/private/SkOnce.h>
#include <include/private/SkPathRef.h>
+#include <include/private/SkSLSampleUsage.h>
#include <include/private/SkSafe32.h>
#include <include/private/SkSemaphore.h>
#include <include/private/SkShadowFlags.h>
@@ -331,7 +335,6 @@
#include <src/core/SkCompressedDataUtils.h>
#include <src/core/SkConvertPixels.h>
#include <src/core/SkCoreBlitters.h>
-#include <src/core/SkCoverageModePriv.h>
#include <src/core/SkCpu.h>
#include <src/core/SkCubicClipper.h>
#include <src/core/SkDeferredDisplayListPriv.h>
@@ -386,7 +389,7 @@
#include <src/core/SkMatrixUtils.h>
#include <src/core/SkMessageBus.h>
#include <src/core/SkMiniRecorder.h>
-#include <src/core/SkMipMap.h>
+#include <src/core/SkMipmap.h>
#include <src/core/SkModeColorFilter.h>
#include <src/core/SkNextID.h>
#include <src/core/SkOSFile.h>
@@ -396,6 +399,7 @@
#include <src/core/SkPathMakers.h>
#include <src/core/SkPathMeasurePriv.h>
#include <src/core/SkPathPriv.h>
+#include <src/core/SkPathView.h>
#include <src/core/SkPictureCommon.h>
#include <src/core/SkPictureData.h>
#include <src/core/SkPictureFlat.h>
@@ -503,7 +507,6 @@
#include <src/gpu/GrColorSpaceXform.h>
#include <src/gpu/GrContextPriv.h>
#include <src/gpu/GrContextThreadSafeProxyPriv.h>
-#include <src/gpu/GrCoordTransform.h>
#include <src/gpu/GrCopyRenderTask.h>
#include <src/gpu/GrCpuBuffer.h>
#include <src/gpu/GrDataUtils.h>
@@ -559,7 +562,6 @@
#include <src/gpu/GrRenderTarget.h>
#include <src/gpu/GrRenderTargetContext.h>
#include <src/gpu/GrRenderTargetContextPriv.h>
-#include <src/gpu/GrRenderTargetPriv.h>
#include <src/gpu/GrRenderTargetProxy.h>
#include <src/gpu/GrRenderTargetProxyPriv.h>
#include <src/gpu/GrRenderTask.h>
@@ -580,7 +582,7 @@
#include <src/gpu/GrShaderVar.h>
#include <src/gpu/GrSimpleMesh.h>
#include <src/gpu/GrSoftwarePathRenderer.h>
-#include <src/gpu/GrStagingBuffer.h>
+#include <src/gpu/GrStagingBufferManager.h>
#include <src/gpu/GrStencilAttachment.h>
#include <src/gpu/GrStencilClip.h>
#include <src/gpu/GrStencilMaskHelper.h>
@@ -589,7 +591,6 @@
#include <src/gpu/GrSurface.h>
#include <src/gpu/GrSurfaceContext.h>
#include <src/gpu/GrSurfaceContextPriv.h>
-#include <src/gpu/GrSurfacePriv.h>
#include <src/gpu/GrSurfaceProxy.h>
#include <src/gpu/GrSurfaceProxyPriv.h>
#include <src/gpu/GrSurfaceProxyView.h>
@@ -598,7 +599,6 @@
#include <src/gpu/GrTexture.h>
#include <src/gpu/GrTextureAdjuster.h>
#include <src/gpu/GrTextureMaker.h>
-#include <src/gpu/GrTexturePriv.h>
#include <src/gpu/GrTextureProducer.h>
#include <src/gpu/GrTextureProxy.h>
#include <src/gpu/GrTextureProxyCacheAccess.h>
@@ -609,12 +609,12 @@
#include <src/gpu/GrTransferFromRenderTask.h>
#include <src/gpu/GrTriangulator.h>
#include <src/gpu/GrUniformDataManager.h>
+#include <src/gpu/GrUnrefDDLTask.h>
#include <src/gpu/GrUserStencilSettings.h>
#include <src/gpu/GrVertexWriter.h>
#include <src/gpu/GrWaitRenderTask.h>
#include <src/gpu/GrWindowRectangles.h>
#include <src/gpu/GrXferProcessor.h>
-#include <src/gpu/GrYUVProvider.h>
#include <src/gpu/SkGpuDevice.h>
#include <src/gpu/SkGr.h>
#include <src/gpu/ccpr/GrAutoMapVertexBuffer.h>
@@ -644,6 +644,7 @@
#include <src/gpu/effects/GrBezierEffect.h>
#include <src/gpu/effects/GrBicubicEffect.h>
#include <src/gpu/effects/GrBitmapTextGeoProc.h>
+#include <src/gpu/effects/GrBlendFragmentProcessor.h>
#include <src/gpu/effects/GrConvexPolyEffect.h>
#include <src/gpu/effects/GrCoverageSetOpXP.h>
#include <src/gpu/effects/GrCustomXfermode.h>
@@ -658,10 +659,10 @@
#include <src/gpu/effects/GrShadowGeoProc.h>
#include <src/gpu/effects/GrSkSLFP.h>
#include <src/gpu/effects/GrTextureEffect.h>
-#include <src/gpu/effects/GrXfermodeFragmentProcessor.h>
#include <src/gpu/effects/GrYUVtoRGBEffect.h>
#include <src/gpu/effects/generated/GrAARectEffect.h>
#include <src/gpu/effects/generated/GrAlphaThresholdFragmentProcessor.h>
+#include <src/gpu/effects/generated/GrArithmeticProcessor.h>
#include <src/gpu/effects/generated/GrBlurredEdgeFragmentProcessor.h>
#include <src/gpu/effects/generated/GrCircleBlurFragmentProcessor.h>
#include <src/gpu/effects/generated/GrCircleEffect.h>
@@ -671,8 +672,10 @@
#include <src/gpu/effects/generated/GrConfigConversionEffect.h>
#include <src/gpu/effects/generated/GrConstColorProcessor.h>
#include <src/gpu/effects/generated/GrDeviceSpaceEffect.h>
+#include <src/gpu/effects/generated/GrDitherEffect.h>
#include <src/gpu/effects/generated/GrEllipseEffect.h>
#include <src/gpu/effects/generated/GrHSLToRGBFilterEffect.h>
+#include <src/gpu/effects/generated/GrHighContrastFilterEffect.h>
#include <src/gpu/effects/generated/GrLumaColorFilterEffect.h>
#include <src/gpu/effects/generated/GrMagnifierEffect.h>
#include <src/gpu/effects/generated/GrMixerEffect.h>
@@ -712,7 +715,6 @@
#include <src/gpu/gradients/generated/GrRadialGradientLayout.h>
#include <src/gpu/gradients/generated/GrSingleIntervalGradientColorizer.h>
#include <src/gpu/gradients/generated/GrSweepGradientLayout.h>
-#include <src/gpu/gradients/generated/GrTextureGradientColorizer.h>
#include <src/gpu/gradients/generated/GrTiledGradientEffect.h>
#include <src/gpu/gradients/generated/GrTwoPointConicalGradientLayout.h>
#include <src/gpu/gradients/generated/GrUnrolledBinaryGradientColorizer.h>
@@ -747,7 +749,9 @@
#include <src/gpu/ops/GrShadowRRectOp.h>
#include <src/gpu/ops/GrSimpleMeshDrawOpHelper.h>
#include <src/gpu/ops/GrSimpleMeshDrawOpHelperWithStencil.h>
+#include <src/gpu/ops/GrSmallPathAtlasMgr.h>
#include <src/gpu/ops/GrSmallPathRenderer.h>
+#include <src/gpu/ops/GrSmallPathShapeData.h>
#include <src/gpu/ops/GrStencilAndCoverPathRenderer.h>
#include <src/gpu/ops/GrStencilPathOp.h>
#include <src/gpu/ops/GrStrokeRectOp.h>
@@ -757,11 +761,14 @@
#include <src/gpu/tessellate/GrFillPathShader.h>
#include <src/gpu/tessellate/GrMiddleOutPolygonTriangulator.h>
#include <src/gpu/tessellate/GrMidpointContourParser.h>
+#include <src/gpu/tessellate/GrPathTessellateOp.h>
#include <src/gpu/tessellate/GrResolveLevelCounter.h>
#include <src/gpu/tessellate/GrStencilPathShader.h>
-#include <src/gpu/tessellate/GrStrokeGeometry.h>
-#include <src/gpu/tessellate/GrTessellatePathOp.h>
+#include <src/gpu/tessellate/GrStrokePatchBuilder.h>
+#include <src/gpu/tessellate/GrStrokeTessellateOp.h>
+#include <src/gpu/tessellate/GrStrokeTessellateShader.h>
#include <src/gpu/tessellate/GrTessellationPathRenderer.h>
+#include <src/gpu/tessellate/GrVectorXform.h>
#include <src/gpu/tessellate/GrWangsFormula.h>
#include <src/gpu/text/GrAtlasManager.h>
#include <src/gpu/text/GrDistanceFieldAdjustTable.h>
@@ -770,7 +777,6 @@
#include <src/gpu/text/GrStrikeCache.h>
#include <src/gpu/text/GrTextBlob.h>
#include <src/gpu/text/GrTextBlobCache.h>
-#include <src/gpu/text/GrTextTarget.h>
#include <src/gpu/vk/GrVkBuffer.h>
#include <src/gpu/vk/GrVkCaps.h>
#include <src/gpu/vk/GrVkCommandBuffer.h>
@@ -812,6 +818,7 @@
#include <src/image/SkImage_GpuYUVA.h>
#include <src/image/SkImage_Lazy.h>
#include <src/image/SkReadPixelsRec.h>
+#include <src/image/SkRescaleAndReadPixels.h>
#include <src/image/SkSurface_Base.h>
#include <src/image/SkSurface_Gpu.h>
#include <src/images/SkImageEncoderPriv.h>
@@ -864,6 +871,7 @@
#include <src/shaders/gradients/SkTwoPointConicalGradient.h>
#include <src/sksl/GLSL.std.450.h>
#include <src/sksl/SkSLASTNode.h>
+#include <src/sksl/SkSLAnalysis.h>
#include <src/sksl/SkSLByteCode.h>
#include <src/sksl/SkSLByteCodeGenerator.h>
#include <src/sksl/SkSLCFGGenerator.h>
@@ -871,6 +879,7 @@
#include <src/sksl/SkSLCPPUniformCTypes.h>
#include <src/sksl/SkSLCompiler.h>
#include <src/sksl/SkSLContext.h>
+#include <src/sksl/SkSLDehydrator.h>
#include <src/sksl/SkSLGLSLCodeGenerator.h>
#include <src/sksl/SkSLHCodeGenerator.h>
#include <src/sksl/SkSLIRGenerator.h>
@@ -879,14 +888,15 @@
#include <src/sksl/SkSLOutputStream.h>
#include <src/sksl/SkSLParser.h>
#include <src/sksl/SkSLPipelineStageCodeGenerator.h>
+#include <src/sksl/SkSLRehydrator.h>
#include <src/sksl/SkSLSPIRVCodeGenerator.h>
#include <src/sksl/SkSLSPIRVtoHLSL.h>
-#include <src/sksl/SkSLSampleMatrix.h>
#include <src/sksl/SkSLSectionAndParameterHelper.h>
#include <src/sksl/SkSLString.h>
#include <src/sksl/SkSLStringStream.h>
#include <src/sksl/SkSLUtil.h>
#include <src/sksl/ir/SkSLBinaryExpression.h>
+#include <src/sksl/ir/SkSLBlock.h>
#include <src/sksl/ir/SkSLBoolLiteral.h>
#include <src/sksl/ir/SkSLBreakStatement.h>
#include <src/sksl/ir/SkSLConstructor.h>
@@ -919,15 +929,19 @@
#include <src/sksl/ir/SkSLPostfixExpression.h>
#include <src/sksl/ir/SkSLPrefixExpression.h>
#include <src/sksl/ir/SkSLProgram.h>
+#include <src/sksl/ir/SkSLProgramElement.h>
#include <src/sksl/ir/SkSLReturnStatement.h>
#include <src/sksl/ir/SkSLSection.h>
#include <src/sksl/ir/SkSLSetting.h>
+#include <src/sksl/ir/SkSLStatement.h>
#include <src/sksl/ir/SkSLSwitchCase.h>
#include <src/sksl/ir/SkSLSwitchStatement.h>
#include <src/sksl/ir/SkSLSwizzle.h>
+#include <src/sksl/ir/SkSLSymbol.h>
#include <src/sksl/ir/SkSLSymbolTable.h>
#include <src/sksl/ir/SkSLTernaryExpression.h>
#include <src/sksl/ir/SkSLType.h>
+#include <src/sksl/ir/SkSLTypeReference.h>
#include <src/sksl/ir/SkSLUnresolvedFunction.h>
#include <src/sksl/ir/SkSLVarDeclarations.h>
#include <src/sksl/ir/SkSLVarDeclarationsStatement.h>
@@ -952,11 +966,11 @@
#include <tools/gpu/vk/GrVulkanDefines.h>
#include <tools/gpu/vk/VkTestUtils.h>
#include <tools/sk_app/VulkanWindowContext.h>
+#include <tools/sk_app/WindowContext.h>
#include <vulkan/vulkan_core.h>
-#endif // PCH_LEVEL >= 3
-#if PCH_LEVEL >= 4
#include <skia_compiler.hxx>
#include <skia_opts.hxx>
-#endif // PCH_LEVEL >= 4
+// PCH_LEVEL >= 4
+// PCH_LEVEL >= 5
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/external/skia/missing-include.patch.1 b/external/skia/missing-include.patch.1
deleted file mode 100644
index 91bc4d977416..000000000000
--- a/external/skia/missing-include.patch.1
+++ /dev/null
@@ -1,11 +0,0 @@
-diff --git a/include/private/SkPathRef.h b/include/private/SkPathRef.h
---- a/include/private/SkPathRef.h
-+++ b/include/private/SkPathRef.h
-@@ -21,6 +21,7 @@
-
- #include <atomic>
- #include <limits>
-+#include <tuple>
-
- class SkRBuffer;
- class SkWBuffer;
diff --git a/external/skia/no-trace-resources-on-exit.patch.1 b/external/skia/no-trace-resources-on-exit.patch.1
index 5b8607d55683..fa563fee21d0 100644
--- a/external/skia/no-trace-resources-on-exit.patch.1
+++ b/external/skia/no-trace-resources-on-exit.patch.1
@@ -1,16 +1,3 @@
-diff --git a/src/gpu/vk/GrVkCommandPool.h b/src/gpu/vk/GrVkCommandPool.h
-index fd44d62e94..f9e90f185f 100644
---- a/src/gpu/vk/GrVkCommandPool.h
-+++ b/src/gpu/vk/GrVkCommandPool.h
-@@ -41,7 +41,7 @@ public:
- // returns true if close() has not been called
- bool isOpen() const { return fOpen; }
-
--#ifdef SK_DEBUG
-+#ifdef SK_TRACE_MANAGED_RESOURCES
- void dumpInfo() const override {
- SkDebugf("GrVkCommandPool: %p (%d refs)\n", fCommandPool, this->getRefCnt());
- }
diff --git a/src/gpu/vk/GrVkResource.h b/src/gpu/vk/GrVkResource.h
index 7b9949ba1b..4e8fb48c7c 100644
--- a/src/gpu/GrManagedResource.h
diff --git a/external/skia/operator-eq-bool.patch.1 b/external/skia/operator-eq-bool.patch.1
deleted file mode 100644
index d6dc3c139d36..000000000000
--- a/external/skia/operator-eq-bool.patch.1
+++ /dev/null
@@ -1,25 +0,0 @@
-diff --git a/src/core/SkVM.cpp b/src/core/SkVM.cpp
-index 654ab8f97c..e7b3137d8e 100644
---- a/src/core/SkVM.cpp
-+++ b/src/core/SkVM.cpp
-@@ -1173,7 +1173,7 @@ namespace skvm {
- // Map min channel to 0, max channel to s, and scale the middle proportionally.
- auto scale = [&](auto c) {
- // TODO: better to divide and check for non-finite result?
-- return select(sat == 0.0f, 0.0f
-+ return select(eq_op(0.0f, sat), 0.0f
- , ((c - mn) * s) / sat);
- };
- *r = scale(*r);
-diff --git a/src/core/SkVM.h b/src/core/SkVM.h
-index db5b273c45..5cf1ebba3c 100644
---- a/src/core/SkVM.h
-+++ b/src/core/SkVM.h
-@@ -882,6 +882,7 @@ namespace skvm {
- static inline I32 operator==(I32 x, I32 y) { return x->eq(x,y); }
- static inline I32 operator==(I32 x, int y) { return x->eq(x,y); }
- static inline I32 operator==(int x, I32 y) { return y->eq(x,y); }
-+ static inline I32 eq_op(float x, F32 y) { return y->eq(x,y); }
-
- static inline I32 operator!=(I32 x, I32 y) { return x->neq(x,y); }
- static inline I32 operator!=(I32 x, int y) { return x->neq(x,y); }
diff --git a/external/skia/share-grcontext.patch.1 b/external/skia/share-grcontext.patch.1
index 1c7da21d6b6c..1a525650d9d2 100644
--- a/external/skia/share-grcontext.patch.1
+++ b/external/skia/share-grcontext.patch.1
@@ -1,5 +1,5 @@
diff --git a/tools/sk_app/VulkanWindowContext.cpp b/tools/sk_app/VulkanWindowContext.cpp
-index 970c67ec0c..371bd8ab0c 100644
+index 968b4ac82e..66670c892e 100644
--- a/tools/sk_app/VulkanWindowContext.cpp
+++ b/tools/sk_app/VulkanWindowContext.cpp
@@ -24,8 +24,10 @@
@@ -27,10 +27,10 @@ index 970c67ec0c..371bd8ab0c 100644
+ fGlobalShared = sk_make_sp<Shared>();
+ Shared* d = fGlobalShared.get(); // shorter variable name
+
+ SkASSERT(!fContext);
// any config code here (particularly for msaa)?
- PFN_vkGetInstanceProcAddr getInstanceProc = fGetInstanceProcAddr;
-@@ -62,24 +72,25 @@ void VulkanWindowContext::initializeContext() {
+@@ -63,24 +73,25 @@ void VulkanWindowContext::initializeContext() {
};
GrVkBackendContext backendContext;
GrVkExtensions extensions;
@@ -66,7 +66,7 @@ index 970c67ec0c..371bd8ab0c 100644
PFN_vkGetPhysicalDeviceProperties localGetPhysicalDeviceProperties =
reinterpret_cast<PFN_vkGetPhysicalDeviceProperties>(
-@@ -87,21 +98,30 @@ void VulkanWindowContext::initializeContext() {
+@@ -88,21 +99,30 @@ void VulkanWindowContext::initializeContext() {
backendContext.fInstance,
VK_NULL_HANDLE));
if (!localGetPhysicalDeviceProperties) {
@@ -89,7 +89,7 @@ index 970c67ec0c..371bd8ab0c 100644
- GET_PROC(DestroyInstance);
- if (fDebugCallback != VK_NULL_HANDLE) {
- GET_PROC(DestroyDebugReportCallbackEXT);
-+ d->fContext = GrContext::MakeVulkan(backendContext, fDisplayParams.fGrContextOptions);
++ d->fContext = GrDirectContext::MakeVulkan(backendContext, fDisplayParams.fGrContextOptions);
+
+ GET_PROC_GLOBAL(DestroyInstance);
+ GET_DEV_PROC_GLOBAL(DestroyDevice);
@@ -105,7 +105,7 @@ index 970c67ec0c..371bd8ab0c 100644
GET_PROC(DestroySurfaceKHR);
GET_PROC(GetPhysicalDeviceSurfaceSupportKHR);
GET_PROC(GetPhysicalDeviceSurfaceCapabilitiesKHR);
-@@ -109,7 +129,6 @@ void VulkanWindowContext::initializeContext() {
+@@ -110,7 +130,6 @@ void VulkanWindowContext::initializeContext() {
GET_PROC(GetPhysicalDeviceSurfacePresentModesKHR);
GET_DEV_PROC(DeviceWaitIdle);
GET_DEV_PROC(QueueWaitIdle);
@@ -113,11 +113,11 @@ index 970c67ec0c..371bd8ab0c 100644
GET_DEV_PROC(CreateSwapchainKHR);
GET_DEV_PROC(DestroySwapchainKHR);
GET_DEV_PROC(GetSwapchainImagesKHR);
-@@ -117,46 +136,44 @@ void VulkanWindowContext::initializeContext() {
+@@ -118,46 +137,44 @@ void VulkanWindowContext::initializeContext() {
GET_DEV_PROC(QueuePresentKHR);
GET_DEV_PROC(GetDeviceQueue);
-- fContext = GrContext::MakeVulkan(backendContext, fDisplayParams.fGrContextOptions);
+- fContext = GrDirectContext::MakeVulkan(backendContext, fDisplayParams.fGrContextOptions);
+ // No actual window, used just to create the shared GrContext.
+ if(fCreateVkSurfaceFn == nullptr)
+ return;
@@ -170,7 +170,7 @@ index 970c67ec0c..371bd8ab0c 100644
nullptr);
if (VK_SUCCESS != res) {
return false;
-@@ -164,14 +181,14 @@ bool VulkanWindowContext::createSwapchain(int width, int height,
+@@ -165,14 +182,14 @@ bool VulkanWindowContext::createSwapchain(int width, int height,
SkAutoMalloc surfaceFormatAlloc(surfaceFormatCount * sizeof(VkSurfaceFormatKHR));
VkSurfaceFormatKHR* surfaceFormats = (VkSurfaceFormatKHR*)surfaceFormatAlloc.get();
@@ -187,7 +187,7 @@ index 970c67ec0c..371bd8ab0c 100644
nullptr);
if (VK_SUCCESS != res) {
return false;
-@@ -179,7 +196,7 @@ bool VulkanWindowContext::createSwapchain(int width, int height,
+@@ -180,7 +197,7 @@ bool VulkanWindowContext::createSwapchain(int width, int height,
SkAutoMalloc presentModeAlloc(presentModeCount * sizeof(VkPresentModeKHR));
VkPresentModeKHR* presentModes = (VkPresentModeKHR*)presentModeAlloc.get();
@@ -196,7 +196,7 @@ index 970c67ec0c..371bd8ab0c 100644
presentModes);
if (VK_SUCCESS != res) {
return false;
-@@ -286,8 +303,8 @@ bool VulkanWindowContext::createSwapchain(int width, int height,
+@@ -287,8 +304,8 @@ bool VulkanWindowContext::createSwapchain(int width, int height,
swapchainCreateInfo.imageArrayLayers = 1;
swapchainCreateInfo.imageUsage = usageFlags;
@@ -207,7 +207,7 @@ index 970c67ec0c..371bd8ab0c 100644
swapchainCreateInfo.imageSharingMode = VK_SHARING_MODE_CONCURRENT;
swapchainCreateInfo.queueFamilyIndexCount = 2;
swapchainCreateInfo.pQueueFamilyIndices = queueFamilies;
-@@ -303,18 +320,18 @@ bool VulkanWindowContext::createSwapchain(int width, int height,
+@@ -304,18 +321,18 @@ bool VulkanWindowContext::createSwapchain(int width, int height,
swapchainCreateInfo.clipped = true;
swapchainCreateInfo.oldSwapchain = fSwapchain;
@@ -229,7 +229,7 @@ index 970c67ec0c..371bd8ab0c 100644
}
this->createBuffers(swapchainCreateInfo.imageFormat, colorType,
-@@ -325,10 +342,10 @@ bool VulkanWindowContext::createSwapchain(int width, int height,
+@@ -326,10 +343,10 @@ bool VulkanWindowContext::createSwapchain(int width, int height,
void VulkanWindowContext::createBuffers(VkFormat format, SkColorType colorType,
VkSharingMode sharingMode) {
@@ -242,7 +242,7 @@ index 970c67ec0c..371bd8ab0c 100644
// set up initial image layouts and create surfaces
fImageLayouts = new VkImageLayout[fImageCount];
-@@ -343,7 +360,7 @@ void VulkanWindowContext::createBuffers(VkFormat format, SkColorType colorType,
+@@ -344,7 +361,7 @@ void VulkanWindowContext::createBuffers(VkFormat format, SkColorType colorType,
info.fImageTiling = VK_IMAGE_TILING_OPTIMAL;
info.fFormat = format;
info.fLevelCount = 1;
@@ -251,7 +251,7 @@ index 970c67ec0c..371bd8ab0c 100644
info.fSharingMode = sharingMode;
if (fSampleCount == 1) {
-@@ -375,8 +392,8 @@ void VulkanWindowContext::createBuffers(VkFormat format, SkColorType colorType,
+@@ -376,8 +393,8 @@ void VulkanWindowContext::createBuffers(VkFormat format, SkColorType colorType,
fBackbuffers = new BackbufferInfo[fImageCount + 1];
for (uint32_t i = 0; i < fImageCount + 1; ++i) {
fBackbuffers[i].fImageIndex = -1;
@@ -262,7 +262,7 @@ index 970c67ec0c..371bd8ab0c 100644
&fBackbuffers[i].fRenderSemaphore));
SkASSERT(result == VK_SUCCESS);
}
-@@ -388,8 +405,8 @@ void VulkanWindowContext::destroyBuffers() {
+@@ -389,8 +406,8 @@ void VulkanWindowContext::destroyBuffers() {
if (fBackbuffers) {
for (uint32_t i = 0; i < fImageCount + 1; ++i) {
fBackbuffers[i].fImageIndex = -1;
@@ -273,7 +273,7 @@ index 970c67ec0c..371bd8ab0c 100644
fBackbuffers[i].fRenderSemaphore,
nullptr));
}
-@@ -414,41 +431,59 @@ VulkanWindowContext::~VulkanWindowContext() {
+@@ -415,41 +432,59 @@ VulkanWindowContext::~VulkanWindowContext() {
void VulkanWindowContext::destroyContext() {
if (this->isValid()) {
fQueueWaitIdle(fPresentQueue);
@@ -346,7 +346,7 @@ index 970c67ec0c..371bd8ab0c 100644
}
VulkanWindowContext::BackbufferInfo* VulkanWindowContext::getAvailableBackbuffer() {
-@@ -474,35 +509,35 @@ sk_sp<SkSurface> VulkanWindowContext::getBackbufferSurface() {
+@@ -475,35 +510,35 @@ sk_sp<SkSurface> VulkanWindowContext::getBackbufferSurface() {
semaphoreInfo.pNext = nullptr;
semaphoreInfo.flags = 0;
VkSemaphore semaphore;
@@ -388,16 +388,16 @@ index 970c67ec0c..371bd8ab0c 100644
return nullptr;
}
}
-@@ -528,7 +563,7 @@ void VulkanWindowContext::swapBuffers() {
+@@ -529,7 +564,7 @@ void VulkanWindowContext::swapBuffers() {
GrFlushInfo info;
info.fNumSemaphores = 1;
info.fSignalSemaphores = &beSemaphore;
- GrBackendSurfaceMutableState presentState(VK_IMAGE_LAYOUT_PRESENT_SRC_KHR, fPresentQueueIndex);
+ GrBackendSurfaceMutableState presentState(VK_IMAGE_LAYOUT_PRESENT_SRC_KHR, fShared->fPresentQueueIndex);
surface->flush(info, &presentState);
- surface->getContext()->submit();
+ surface->recordingContext()->asDirectContext()->submit();
-@@ -548,4 +583,6 @@ void VulkanWindowContext::swapBuffers() {
+@@ -549,4 +584,6 @@ void VulkanWindowContext::swapBuffers() {
fQueuePresentKHR(fPresentQueue, &presentInfo);
}
@@ -405,10 +405,10 @@ index 970c67ec0c..371bd8ab0c 100644
+
} //namespace sk_app
diff --git a/tools/sk_app/VulkanWindowContext.h b/tools/sk_app/VulkanWindowContext.h
-index 5e245aff70..c6c866372f 100644
+index 5e245aff70..07a18a46a9 100644
--- a/tools/sk_app/VulkanWindowContext.h
+++ b/tools/sk_app/VulkanWindowContext.h
-@@ -19,18 +19,36 @@
+@@ -19,18 +19,38 @@
#include "tools/gpu/vk/VkTestUtils.h"
#include "tools/sk_app/WindowContext.h"
@@ -424,20 +424,22 @@ index 5e245aff70..c6c866372f 100644
public:
~VulkanWindowContext() override;
-+ class SharedGrContext {
++ class SharedGrDirectContext {
+ public:
-+ SharedGrContext() {}
-+ GrContext* getGrContext() { return shared ? shared->fContext.get() : nullptr; }
-+ ~SharedGrContext() { shared.reset(); checkDestroyShared(); }
++ SharedGrDirectContext() {}
++ GrDirectContext* getGrDirectContext() { return shared ? shared->fContext.get() : nullptr; }
++ ~SharedGrDirectContext() { shared.reset(); checkDestroyShared(); }
++ SharedGrDirectContext(SharedGrDirectContext const &) = default;
++ SharedGrDirectContext & operator =(SharedGrDirectContext const &) = default;
+ bool operator!() const { return !shared; }
+ void reset() { shared.reset(); }
+ private:
+ friend class VulkanWindowContext;
-+ SharedGrContext(sk_sp<Shared>& sh ) : shared( sh ) {}
++ SharedGrDirectContext(sk_sp<Shared>& sh ) : shared( sh ) {}
+ sk_sp<Shared> shared;
+ };
+
-+ static SharedGrContext getSharedGrContext() { return SharedGrContext( fGlobalShared ); }
++ static SharedGrDirectContext getSharedGrDirectContext() { return SharedGrDirectContext( fGlobalShared ); }
+
sk_sp<SkSurface> getBackbufferSurface() override;
void swapBuffers() override;
@@ -447,7 +449,7 @@ index 5e245aff70..c6c866372f 100644
void resize(int w, int h) override {
this->createSwapchain(w, h, fDisplayParams);
-@@ -50,9 +68,15 @@ public:
+@@ -50,9 +70,15 @@ public:
VulkanWindowContext(const DisplayParams&, CreateVkSurfaceFn, CanPresentFn,
PFN_vkGetInstanceProcAddr, PFN_vkGetDeviceProcAddr);
@@ -463,7 +465,7 @@ index 5e245aff70..c6c866372f 100644
struct BackbufferInfo {
uint32_t fImageIndex; // image this is associated with
-@@ -64,11 +88,6 @@ private:
+@@ -64,11 +90,6 @@ private:
void createBuffers(VkFormat format, SkColorType colorType, VkSharingMode);
void destroyBuffers();
@@ -475,7 +477,7 @@ index 5e245aff70..c6c866372f 100644
// Create functions
CreateVkSurfaceFn fCreateVkSurfaceFn;
CanPresentFn fCanPresentFn;
-@@ -90,20 +109,44 @@ private:
+@@ -90,20 +111,44 @@ private:
PFN_vkAcquireNextImageKHR fAcquireNextImageKHR = nullptr;
PFN_vkQueuePresentKHR fQueuePresentKHR = nullptr;
@@ -486,7 +488,7 @@ index 5e245aff70..c6c866372f 100644
- PFN_vkDestroyDevice fDestroyDevice = nullptr;
PFN_vkGetDeviceQueue fGetDeviceQueue = nullptr;
-+ // We need to use just one GrContext, so share all the relevant data.
++ // We need to use just one GrDirectContext, so share all the relevant data.
+ struct Shared : public SkRefCnt
+ {
+ PFN_vkDestroyInstance fDestroyInstance = nullptr;
@@ -513,7 +515,7 @@ index 5e245aff70..c6c866372f 100644
VkQueue fGraphicsQueue;
uint32_t fPresentQueueIndex;
+
-+ sk_sp<GrContext> fContext;
++ sk_sp<GrDirectContext> fContext;
+ };
+
+ sk_sp<Shared> fShared;
@@ -526,7 +528,7 @@ index 5e245aff70..c6c866372f 100644
uint32_t fImageCount;
diff --git a/tools/sk_app/unix/VulkanWindowContext_unix.cpp b/tools/sk_app/unix/VulkanWindowContext_unix.cpp
-index 6f0ce0aceb..877578cede 100644
+index 34f6640c76..5478b75dac 100644
--- a/tools/sk_app/unix/VulkanWindowContext_unix.cpp
+++ b/tools/sk_app/unix/VulkanWindowContext_unix.cpp
@@ -30,7 +30,7 @@ std::unique_ptr<WindowContext> MakeVulkanForXlib(const XlibWindowInfo& info,