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>
This commit is contained in:
@@ -241,8 +241,8 @@ export RHINO_SHA256SUM := 1fb458d6aab06932693cc8a9b6e4e70944ee1ff052fa63606e3131
|
||||
export RHINO_TARBALL := 798b2ffdc8bcfe7bca2cf92b62caf685-rhino1_5R5.zip
|
||||
export SERF_SHA256SUM := 6988d394b62c3494635b6f0760bc3079f9a0cd380baf0f6b075af1eb9fa5e700
|
||||
export SERF_TARBALL := serf-1.2.1.tar.bz2
|
||||
export SKIA_SHA256SUM := 3294877fa2b61b220d98a0f7bfc11325429b13edd2cf455444c703ee3a14d760
|
||||
export SKIA_TARBALL := skia-m85-e684c6daef6bfb774a325a069eda1f76ca6ac26c.tar.xz
|
||||
export SKIA_SHA256SUM := d6fe401003854f0487473f5692a4d37998c5eb82b501b2e4de72ad263467a0e6
|
||||
export SKIA_TARBALL := skia-m86-e1e24080421116cf5d63b55cd5042176bebc0a43.tar.xz
|
||||
export STAROFFICE_SHA256SUM := f94fb0ad8216f97127bedef163a45886b43c62deac5e5b0f5e628e234220c8db
|
||||
export STAROFFICE_VERSION_MICRO := 7
|
||||
export STAROFFICE_TARBALL := libstaroffice-0.0.$(STAROFFICE_VERSION_MICRO).tar.xz
|
||||
|
32
external/skia/Library_skia.mk
vendored
32
external/skia/Library_skia.mk
vendored
@@ -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)
|
||||
|
4
external/skia/UnpackedTarball_skia.mk
vendored
4
external/skia/UnpackedTarball_skia.mk
vendored
@@ -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))
|
||||
|
||||
|
11
external/skia/Wdeprecated-copy-dtor.patch.0
vendored
11
external/skia/Wdeprecated-copy-dtor.patch.0
vendored
@@ -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:
|
||||
|
10
external/skia/clang-attributes-warning.patch.1
vendored
10
external/skia/clang-attributes-warning.patch.1
vendored
@@ -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;
|
||||
|
37
external/skia/constexpr-debug-std-max.patch.1
vendored
Normal file
37
external/skia/constexpr-debug-std-max.patch.1
vendored
Normal file
@@ -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 )});
|
13
external/skia/fix-msvc.patch.1
vendored
13
external/skia/fix-msvc.patch.1
vendored
@@ -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:
|
89
external/skia/fix-pch.patch.1
vendored
89
external/skia/fix-pch.patch.1
vendored
@@ -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));
|
||||
|
54
external/skia/inc/pch/precompiled_skia.hxx
vendored
54
external/skia/inc/pch/precompiled_skia.hxx
vendored
@@ -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: */
|
||||
|
11
external/skia/missing-include.patch.1
vendored
11
external/skia/missing-include.patch.1
vendored
@@ -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;
|
13
external/skia/no-trace-resources-on-exit.patch.1
vendored
13
external/skia/no-trace-resources-on-exit.patch.1
vendored
@@ -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
|
||||
|
25
external/skia/operator-eq-bool.patch.1
vendored
25
external/skia/operator-eq-bool.patch.1
vendored
@@ -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); }
|
72
external/skia/share-grcontext.patch.1
vendored
72
external/skia/share-grcontext.patch.1
vendored
@@ -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,
|
||||
|
@@ -309,7 +309,6 @@ protected:
|
||||
// The Skia surface that is target of all the rendering.
|
||||
sk_sp<SkSurface> mSurface;
|
||||
bool mIsGPU; // whether the surface is GPU-backed
|
||||
// Keep reference to shared GrContext.
|
||||
vcl::Region mClipRegion;
|
||||
Color mLineColor;
|
||||
Color mFillColor;
|
||||
|
@@ -30,8 +30,8 @@
|
||||
|
||||
namespace SkiaHelper
|
||||
{
|
||||
// Get the one shared GrContext instance.
|
||||
GrContext* getSharedGrContext();
|
||||
// Get the one shared GrDirectContext instance.
|
||||
GrDirectContext* getSharedGrDirectContext();
|
||||
|
||||
void disableRenderMethod(RenderMethod method);
|
||||
|
||||
|
@@ -59,18 +59,18 @@ You can also use 'visualbackendtest' to visually check some operations. Use some
|
||||
SAL_SKIA=raster SAL_ENABLESKIA=1 SAL_USE_VCLPLUGIN=gen [srcdir]/bin/run visualbackendtest
|
||||
|
||||
|
||||
GrContext sharing:
|
||||
==================
|
||||
GrDirectContext sharing:
|
||||
========================
|
||||
|
||||
We use Skia's sk_app::WindowContext class for creating surfaces for windows, that class
|
||||
takes care of the internals. But of offscreen drawing, we need an instance of class
|
||||
GrContext. There is sk_app::WindowContext::getGrContext(), but each instance creates
|
||||
its own GrContext, and apparently it does not work to mix them. Which means that
|
||||
GrDirectContext. There is sk_app::WindowContext::getGrDirectContext(), but each instance creates
|
||||
its own GrDirectContext, and apparently it does not work to mix them. Which means that
|
||||
for offscreen drawing we would need to know which window (and only that window)
|
||||
the contents will be eventually painted to, which is not possible (it may not even
|
||||
be known at the time).
|
||||
|
||||
To solve this problem we patch sk_app::WindowContext to create just one GrContext object
|
||||
and share it between instances. Additionally, using sk_app::WindowContext::SharedGrContext
|
||||
To solve this problem we patch sk_app::WindowContext to create just one GrDirectContext object
|
||||
and share it between instances. Additionally, using sk_app::WindowContext::SharedGrDirectContext
|
||||
it is possible to share it also for offscreen drawing, including keeping proper reference
|
||||
count.
|
||||
|
@@ -37,6 +37,7 @@ bool isVCLSkiaEnabled() { return false; }
|
||||
#include <SkPaint.h>
|
||||
#include <SkSurface.h>
|
||||
#include <SkGraphics.h>
|
||||
#include <GrDirectContext.h>
|
||||
#include <skia_compiler.hxx>
|
||||
#include <skia_opts.hxx>
|
||||
|
||||
@@ -140,7 +141,7 @@ static void writeSkiaRasterInfo()
|
||||
writeToLog(logFile, "Compiler", skia_compiler_name());
|
||||
}
|
||||
|
||||
static sk_app::VulkanWindowContext::SharedGrContext getTemporaryGrContext();
|
||||
static sk_app::VulkanWindowContext::SharedGrDirectContext getTemporaryGrDirectContext();
|
||||
|
||||
static void checkDeviceDenylisted(bool blockDisable = false)
|
||||
{
|
||||
@@ -154,23 +155,23 @@ static void checkDeviceDenylisted(bool blockDisable = false)
|
||||
{
|
||||
case RenderVulkan:
|
||||
{
|
||||
// First try if a GrContext already exists.
|
||||
sk_app::VulkanWindowContext::SharedGrContext grContext
|
||||
= sk_app::VulkanWindowContext::getSharedGrContext();
|
||||
if (!grContext.getGrContext())
|
||||
// First try if a GrDirectContext already exists.
|
||||
sk_app::VulkanWindowContext::SharedGrDirectContext grDirectContext
|
||||
= sk_app::VulkanWindowContext::getSharedGrDirectContext();
|
||||
if (!grDirectContext.getGrDirectContext())
|
||||
{
|
||||
// This function is called from isVclSkiaEnabled(), which
|
||||
// may be called when deciding which X11 visual to use,
|
||||
// and that visual is normally needed when creating
|
||||
// Skia's VulkanWindowContext, which is needed for the GrContext.
|
||||
// Avoid the loop by creating a temporary GrContext
|
||||
// Skia's VulkanWindowContext, which is needed for the GrDirectContext.
|
||||
// Avoid the loop by creating a temporary GrDirectContext
|
||||
// that will use the default X11 visual (that shouldn't matter
|
||||
// for just finding out information about Vulkan) and destroying
|
||||
// the temporary context will clean up again.
|
||||
grContext = getTemporaryGrContext();
|
||||
grDirectContext = getTemporaryGrDirectContext();
|
||||
}
|
||||
bool denylisted = true; // assume the worst
|
||||
if (grContext.getGrContext()) // Vulkan was initialized properly
|
||||
if (grDirectContext.getGrDirectContext()) // Vulkan was initialized properly
|
||||
{
|
||||
denylisted
|
||||
= isVulkanDenylisted(sk_app::VulkanWindowContext::getPhysDeviceProperties());
|
||||
@@ -324,7 +325,7 @@ void disableRenderMethod(RenderMethod method)
|
||||
methodToUse = RenderRaster;
|
||||
}
|
||||
|
||||
static sk_app::VulkanWindowContext::SharedGrContext* sharedGrContext;
|
||||
static sk_app::VulkanWindowContext::SharedGrDirectContext* sharedGrDirectContext;
|
||||
|
||||
static std::unique_ptr<sk_app::WindowContext> (*createVulkanWindowContextFunction)(bool) = nullptr;
|
||||
static void setCreateVulkanWindowContext(std::unique_ptr<sk_app::WindowContext> (*function)(bool))
|
||||
@@ -332,22 +333,22 @@ static void setCreateVulkanWindowContext(std::unique_ptr<sk_app::WindowContext>
|
||||
createVulkanWindowContextFunction = function;
|
||||
}
|
||||
|
||||
GrContext* getSharedGrContext()
|
||||
GrDirectContext* getSharedGrDirectContext()
|
||||
{
|
||||
SkiaZone zone;
|
||||
assert(renderMethodToUse() == RenderVulkan);
|
||||
if (sharedGrContext)
|
||||
return sharedGrContext->getGrContext();
|
||||
if (sharedGrDirectContext)
|
||||
return sharedGrDirectContext->getGrDirectContext();
|
||||
// TODO mutex?
|
||||
// Set up the shared GrContext from Skia's (patched) VulkanWindowContext, if it's been
|
||||
// Set up the shared GrDirectContext from Skia's (patched) VulkanWindowContext, if it's been
|
||||
// already set up.
|
||||
sk_app::VulkanWindowContext::SharedGrContext context
|
||||
= sk_app::VulkanWindowContext::getSharedGrContext();
|
||||
GrContext* grContext = context.getGrContext();
|
||||
if (grContext)
|
||||
sk_app::VulkanWindowContext::SharedGrDirectContext context
|
||||
= sk_app::VulkanWindowContext::getSharedGrDirectContext();
|
||||
GrDirectContext* grDirectContext = context.getGrDirectContext();
|
||||
if (grDirectContext)
|
||||
{
|
||||
sharedGrContext = new sk_app::VulkanWindowContext::SharedGrContext(context);
|
||||
return grContext;
|
||||
sharedGrDirectContext = new sk_app::VulkanWindowContext::SharedGrDirectContext(context);
|
||||
return grDirectContext;
|
||||
}
|
||||
static bool done = false;
|
||||
if (done)
|
||||
@@ -357,24 +358,24 @@ GrContext* getSharedGrContext()
|
||||
return nullptr; // not initialized properly (e.g. used from a VCL backend with no Skia support)
|
||||
std::unique_ptr<sk_app::WindowContext> tmpContext = createVulkanWindowContextFunction(false);
|
||||
// Set up using the shared context created by the call above, if successful.
|
||||
context = sk_app::VulkanWindowContext::getSharedGrContext();
|
||||
grContext = context.getGrContext();
|
||||
if (grContext)
|
||||
context = sk_app::VulkanWindowContext::getSharedGrDirectContext();
|
||||
grDirectContext = context.getGrDirectContext();
|
||||
if (grDirectContext)
|
||||
{
|
||||
sharedGrContext = new sk_app::VulkanWindowContext::SharedGrContext(context);
|
||||
return grContext;
|
||||
sharedGrDirectContext = new sk_app::VulkanWindowContext::SharedGrDirectContext(context);
|
||||
return grDirectContext;
|
||||
}
|
||||
disableRenderMethod(RenderVulkan);
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
static sk_app::VulkanWindowContext::SharedGrContext getTemporaryGrContext()
|
||||
static sk_app::VulkanWindowContext::SharedGrDirectContext getTemporaryGrDirectContext()
|
||||
{
|
||||
if (createVulkanWindowContextFunction == nullptr)
|
||||
return sk_app::VulkanWindowContext::SharedGrContext();
|
||||
return sk_app::VulkanWindowContext::SharedGrDirectContext();
|
||||
std::unique_ptr<sk_app::WindowContext> tmpContext = createVulkanWindowContextFunction(true);
|
||||
// Set up using the shared context created by the call above, if successful.
|
||||
return sk_app::VulkanWindowContext::getSharedGrContext();
|
||||
return sk_app::VulkanWindowContext::getSharedGrDirectContext();
|
||||
}
|
||||
|
||||
sk_sp<SkSurface> createSkSurface(int width, int height, SkColorType type)
|
||||
@@ -386,10 +387,10 @@ sk_sp<SkSurface> createSkSurface(int width, int height, SkColorType type)
|
||||
{
|
||||
case SkiaHelper::RenderVulkan:
|
||||
{
|
||||
if (GrContext* grContext = getSharedGrContext())
|
||||
if (GrDirectContext* grDirectContext = getSharedGrDirectContext())
|
||||
{
|
||||
surface = SkSurface::MakeRenderTarget(
|
||||
grContext, SkBudgeted::kNo,
|
||||
grDirectContext, SkBudgeted::kNo,
|
||||
SkImageInfo::Make(width, height, type, kPremul_SkAlphaType));
|
||||
assert(surface);
|
||||
#ifdef DBG_UTIL
|
||||
@@ -419,10 +420,11 @@ sk_sp<SkImage> createSkImage(const SkBitmap& bitmap)
|
||||
{
|
||||
case SkiaHelper::RenderVulkan:
|
||||
{
|
||||
if (GrContext* grContext = getSharedGrContext())
|
||||
if (GrDirectContext* grDirectContext = getSharedGrDirectContext())
|
||||
{
|
||||
sk_sp<SkSurface> surface = SkSurface::MakeRenderTarget(
|
||||
grContext, SkBudgeted::kNo, bitmap.info().makeAlphaType(kPremul_SkAlphaType));
|
||||
sk_sp<SkSurface> surface
|
||||
= SkSurface::MakeRenderTarget(grDirectContext, SkBudgeted::kNo,
|
||||
bitmap.info().makeAlphaType(kPremul_SkAlphaType));
|
||||
assert(surface);
|
||||
SkPaint paint;
|
||||
paint.setBlendMode(SkBlendMode::kSrc); // set as is, including alpha
|
||||
@@ -519,8 +521,8 @@ void removeCachedImage(sk_sp<SkImage> image)
|
||||
|
||||
void cleanup()
|
||||
{
|
||||
delete sharedGrContext;
|
||||
sharedGrContext = nullptr;
|
||||
delete sharedGrDirectContext;
|
||||
sharedGrDirectContext = nullptr;
|
||||
delete imageCache;
|
||||
imageCache = nullptr;
|
||||
imageCacheSize = 0;
|
||||
|
@@ -282,7 +282,7 @@ void SkiaSalGraphicsImpl::createOffscreenSurface()
|
||||
{
|
||||
case SkiaHelper::RenderVulkan:
|
||||
{
|
||||
if (SkiaHelper::getSharedGrContext())
|
||||
if (SkiaHelper::getSharedGrDirectContext())
|
||||
{
|
||||
mSurface = SkiaHelper::createSkSurface(width, height);
|
||||
assert(mSurface);
|
||||
|
@@ -70,7 +70,7 @@ X11SkiaSalGraphicsImpl::createWindowContext(Display* display, Drawable drawable,
|
||||
winInfo.fWidth = width;
|
||||
winInfo.fHeight = height;
|
||||
#ifdef DBG_UTIL
|
||||
// Our patched Skia has VulkanWindowContext that shares GrContext, which requires
|
||||
// Our patched Skia has VulkanWindowContext that shares grDirectContext, which requires
|
||||
// that the X11 visual is always the same. Ensure it is so.
|
||||
static VisualID checkVisualID = -1U;
|
||||
// Exception is for the temporary case during startup, when SkiaHelper's
|
||||
|
Reference in New Issue
Block a user