From 3dfc6d42edfd469436ad177ad1ebc5526679aa99 Mon Sep 17 00:00:00 2001 From: Luboš Luňák Date: Tue, 30 Jun 2020 17:58:12 +0200 Subject: update Skia to chrome/m85 snapshot MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I3af3517c9c213e0db8365aecd0a008d817ca4dcf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97592 Tested-by: Jenkins Reviewed-by: Luboš Luňák --- external/skia/Library_skia.mk | 17 +++++---- external/skia/UnpackedTarball_skia.mk | 4 +- external/skia/c++20.patch.0 | 10 ----- external/skia/inc/pch/precompiled_skia.hxx | 32 +++++++++++----- external/skia/make-api-visible.patch.1 | 11 ++++-- external/skia/operator-eq-bool.patch.0 | 21 ----------- external/skia/operator-eq-bool.patch.1 | 25 ++++++++++++ .../skia/public-make-from-backend-texture.patch.1 | 44 ++++++++++++++++++++++ external/skia/share-grcontext.patch.1 | 37 +++++++++++------- 9 files changed, 133 insertions(+), 68 deletions(-) delete mode 100644 external/skia/c++20.patch.0 delete mode 100644 external/skia/operator-eq-bool.patch.0 create mode 100644 external/skia/operator-eq-bool.patch.1 create mode 100644 external/skia/public-make-from-backend-texture.patch.1 (limited to 'external/skia') diff --git a/external/skia/Library_skia.mk b/external/skia/Library_skia.mk index 47140da4e50e..1cd4adac9f79 100644 --- a/external/skia/Library_skia.mk +++ b/external/skia/Library_skia.mk @@ -204,6 +204,7 @@ $(eval $(call gb_Library_add_generated_exception_objects,skia,\ UnpackedTarball/skia/src/core/SkImageInfo \ UnpackedTarball/skia/src/core/SkLatticeIter \ UnpackedTarball/skia/src/core/SkLineClipper \ + UnpackedTarball/skia/src/core/SkLegacyGpuBlurUtils \ UnpackedTarball/skia/src/core/SkLocalMatrixImageFilter \ UnpackedTarball/skia/src/core/SkMalloc \ UnpackedTarball/skia/src/core/SkMallocPixelRef \ @@ -227,6 +228,7 @@ $(eval $(call gb_Library_add_generated_exception_objects,skia,\ UnpackedTarball/skia/src/core/SkPaint \ UnpackedTarball/skia/src/core/SkPaintPriv \ UnpackedTarball/skia/src/core/SkPath \ + UnpackedTarball/skia/src/core/SkPathBuilder \ UnpackedTarball/skia/src/core/SkPathEffect \ UnpackedTarball/skia/src/core/SkPathMeasure \ UnpackedTarball/skia/src/core/SkPathRef \ @@ -515,10 +517,8 @@ $(eval $(call gb_Library_add_generated_exception_objects,skia,\ UnpackedTarball/skia/src/gpu/effects/generated/GrHSLToRGBFilterEffect \ UnpackedTarball/skia/src/gpu/effects/generated/GrLumaColorFilterEffect \ UnpackedTarball/skia/src/gpu/effects/generated/GrMagnifierEffect \ - UnpackedTarball/skia/src/gpu/effects/generated/GrMatrixEffect \ UnpackedTarball/skia/src/gpu/effects/generated/GrMixerEffect \ UnpackedTarball/skia/src/gpu/effects/generated/GrOverrideInputFragmentProcessor \ - UnpackedTarball/skia/src/gpu/effects/generated/GrPremulInputFragmentProcessor \ UnpackedTarball/skia/src/gpu/effects/generated/GrRectBlurEffect \ UnpackedTarball/skia/src/gpu/effects/generated/GrRGBToHSLFilterEffect \ UnpackedTarball/skia/src/gpu/effects/generated/GrRRectBlurEffect \ @@ -532,6 +532,7 @@ $(eval $(call gb_Library_add_generated_exception_objects,skia,\ UnpackedTarball/skia/src/gpu/effects/GrDistanceFieldGeoProc \ UnpackedTarball/skia/src/gpu/effects/GrGaussianConvolutionFragmentProcessor \ UnpackedTarball/skia/src/gpu/effects/GrMatrixConvolutionEffect \ + UnpackedTarball/skia/src/gpu/effects/GrMatrixEffect \ UnpackedTarball/skia/src/gpu/effects/GrOvalEffect \ UnpackedTarball/skia/src/gpu/effects/GrPorterDuffXferProcessor \ UnpackedTarball/skia/src/gpu/effects/GrRRectEffect \ @@ -629,6 +630,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/GrRectanizerPow2 \ UnpackedTarball/skia/src/gpu/GrRectanizerSkyline \ UnpackedTarball/skia/src/gpu/GrRenderTask \ UnpackedTarball/skia/src/gpu/GrReducedClip \ @@ -638,6 +640,7 @@ $(eval $(call gb_Library_add_generated_exception_objects,skia,\ UnpackedTarball/skia/src/gpu/GrResourceAllocator \ UnpackedTarball/skia/src/gpu/GrResourceCache \ UnpackedTarball/skia/src/gpu/GrResourceProvider \ + UnpackedTarball/skia/src/gpu/GrRingBuffer \ UnpackedTarball/skia/src/gpu/GrSamplePatternDictionary \ UnpackedTarball/skia/src/gpu/GrShaderCaps \ UnpackedTarball/skia/src/gpu/GrShaderUtils \ @@ -657,6 +660,7 @@ $(eval $(call gb_Library_add_generated_exception_objects,skia,\ UnpackedTarball/skia/src/gpu/GrSWMaskHelper \ UnpackedTarball/skia/src/gpu/GrTestUtils \ UnpackedTarball/skia/src/gpu/GrTriangulator \ + UnpackedTarball/skia/src/gpu/GrUniformDataManager \ UnpackedTarball/skia/src/gpu/GrTextureAdjuster \ UnpackedTarball/skia/src/gpu/GrTexture \ UnpackedTarball/skia/src/gpu/GrTextureMaker \ @@ -677,7 +681,6 @@ $(eval $(call gb_Library_add_generated_exception_objects,skia,\ UnpackedTarball/skia/src/gpu/ops/GrAALinearizingConvexPathRenderer \ UnpackedTarball/skia/src/gpu/ops/GrAtlasTextOp \ UnpackedTarball/skia/src/gpu/ops/GrClearOp \ - UnpackedTarball/skia/src/gpu/ops/GrClearStencilClipOp \ UnpackedTarball/skia/src/gpu/ops/GrDashLinePathRenderer \ UnpackedTarball/skia/src/gpu/ops/GrDashOp \ UnpackedTarball/skia/src/gpu/ops/GrDefaultPathRenderer \ @@ -708,15 +711,16 @@ $(eval $(call gb_Library_add_generated_exception_objects,skia,\ UnpackedTarball/skia/src/gpu/tessellate/GrDrawAtlasPathOp \ UnpackedTarball/skia/src/gpu/tessellate/GrFillPathShader \ UnpackedTarball/skia/src/gpu/tessellate/GrStencilPathShader \ + UnpackedTarball/skia/src/gpu/tessellate/GrStrokeGeometry \ UnpackedTarball/skia/src/gpu/tessellate/GrTessellatePathOp \ UnpackedTarball/skia/src/gpu/tessellate/GrTessellationPathRenderer \ UnpackedTarball/skia/src/gpu/text/GrAtlasManager \ UnpackedTarball/skia/src/gpu/text/GrDistanceFieldAdjustTable \ UnpackedTarball/skia/src/gpu/text/GrSDFMaskFilter \ + UnpackedTarball/skia/src/gpu/text/GrSDFTOptions \ UnpackedTarball/skia/src/gpu/text/GrStrikeCache \ UnpackedTarball/skia/src/gpu/text/GrTextBlobCache \ UnpackedTarball/skia/src/gpu/text/GrTextBlob \ - UnpackedTarball/skia/src/gpu/text/GrTextContext \ UnpackedTarball/skia/src/image/SkImage_GpuBase \ UnpackedTarball/skia/src/image/SkImage_Gpu \ UnpackedTarball/skia/src/image/SkImage_GpuYUVA \ @@ -788,11 +792,8 @@ $(eval $(call gb_Library_add_generated_exception_objects,skia,\ UnpackedTarball/skia/src/opts/SkOpts_crc32 \ )) -# This one needs to #define some things before #include , but the header would get introduced -# already by the PCH. Add a dummy flag to avoid PCH use. $(eval $(call gb_Library_add_generated_exception_objects,skia,\ - UnpackedTarball/skia/src/core/SkOpts_skx, \ - -DDUMMY_AVOID_PCH=1 \ + UnpackedTarball/skia/src/opts/SkOpts_skx, $(CXXFLAGS_INTRINSICS_AVX512) $(CLANG_CXXFLAGS_INTRINSICS_AVX512)\ )) $(eval $(call gb_Library_add_generated_exception_objects,skia,\ diff --git a/external/skia/UnpackedTarball_skia.mk b/external/skia/UnpackedTarball_skia.mk index 20b81c35ce39..5caeff270e0c 100644 --- a/external/skia/UnpackedTarball_skia.mk +++ b/external/skia/UnpackedTarball_skia.mk @@ -32,13 +32,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.0 \ + operator-eq-bool.patch.1 \ fix-without-gl.patch.0 \ extend-rgb-to-rgba.patch.0 \ windows-typeface-directwrite.patch.0 \ windows-raster-surface-no-copies.patch.1 \ fix-windows-dwrite.patch.1 \ - c++20.patch.0 \ + public-make-from-backend-texture.patch.1 \ $(eval $(call gb_UnpackedTarball_set_patchlevel,skia,1)) diff --git a/external/skia/c++20.patch.0 b/external/skia/c++20.patch.0 deleted file mode 100644 index 167c8d89c92d..000000000000 --- a/external/skia/c++20.patch.0 +++ /dev/null @@ -1,10 +0,0 @@ ---- src/core/SkVM.h -+++ src/core/SkVM.h -@@ -909,6 +909,7 @@ - static inline F32 max(float x, F32 y) { return y->max(x,y); } - - static inline I32 operator==(F32 x, F32a y) { return x->eq(x,y); } -+ static inline I32 operator==(F32 x, float y) { return x->eq(x,y); } - static inline I32 operator==(float x, F32 y) { return y->eq(x,y); } - static inline I32 eq_op(float x, F32 y) { return y->eq(x,y); } - diff --git a/external/skia/inc/pch/precompiled_skia.hxx b/external/skia/inc/pch/precompiled_skia.hxx index e3d41a03f41a..a28dd583e72a 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-05-18 11:43:55 using: + Generated on 2020-06-30 17:38:10 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: @@ -70,7 +70,7 @@ #include #include #endif // PCH_LEVEL >= 2 -#if PCH_LEVEL >= 3 +// PCH_LEVEL >= 3 #include #include #include @@ -125,6 +125,7 @@ #include #include #include +#include #include #include #include @@ -150,6 +151,7 @@ #include #include #include +#include #include #include #include @@ -195,6 +197,7 @@ #include #include #include +#include #include #include #include @@ -320,6 +323,7 @@ #include #include #include +#include #include #include #include @@ -330,6 +334,7 @@ #include #include #include +#include #include #include #include @@ -407,7 +412,6 @@ #include #include #include -#include #include #include #include @@ -480,7 +484,9 @@ #include #include #include +#include #include +#include #include #include #include @@ -547,6 +553,7 @@ #include #include #include +#include #include #include #include @@ -560,11 +567,13 @@ #include #include #include +#include #include #include #include #include #include +#include #include #include #include @@ -599,6 +608,7 @@ #include #include #include +#include #include #include #include @@ -641,6 +651,7 @@ #include #include #include +#include #include #include #include @@ -664,10 +675,8 @@ #include #include #include -#include #include #include -#include #include #include #include @@ -719,7 +728,6 @@ #include #include #include -#include #include #include #include @@ -749,16 +757,19 @@ #include #include #include +#include #include +#include #include #include +#include #include #include #include +#include #include #include #include -#include #include #include #include @@ -907,6 +918,7 @@ #include #include #include +#include #include #include #include @@ -941,8 +953,8 @@ #include #include #include -#endif // PCH_LEVEL >= 3 -#if PCH_LEVEL >= 4 -#endif // PCH_LEVEL >= 4 +#include +// PCH_LEVEL >= 4 +// PCH_LEVEL >= 5 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/external/skia/make-api-visible.patch.1 b/external/skia/make-api-visible.patch.1 index 2bf3a0f3d73a..bb574b762f5b 100644 --- a/external/skia/make-api-visible.patch.1 +++ b/external/skia/make-api-visible.patch.1 @@ -1,5 +1,5 @@ diff --git a/tools/sk_app/unix/WindowContextFactory_unix.h b/tools/sk_app/unix/WindowContextFactory_unix.h -index 47310970d5..e02e6eb5b7 100644 +index 11bd2d2ac2..09c92dc417 100644 --- a/tools/sk_app/unix/WindowContextFactory_unix.h +++ b/tools/sk_app/unix/WindowContextFactory_unix.h @@ -36,15 +36,15 @@ struct XlibWindowInfo { @@ -23,10 +23,10 @@ index 47310970d5..e02e6eb5b7 100644 } // namespace window_context_factory diff --git a/tools/sk_app/win/WindowContextFactory_win.h b/tools/sk_app/win/WindowContextFactory_win.h -index 33dd6d413b..647e5ff81a 100644 +index c05a4f0acf..fc27cd2afb 100644 --- a/tools/sk_app/win/WindowContextFactory_win.h +++ b/tools/sk_app/win/WindowContextFactory_win.h -@@ -20,17 +20,17 @@ struct DisplayParams; +@@ -20,21 +20,21 @@ struct DisplayParams; namespace window_context_factory { @@ -39,6 +39,11 @@ index 33dd6d413b..647e5ff81a 100644 -std::unique_ptr MakeANGLEForWin(HWND, const DisplayParams&); +SK_API std::unique_ptr MakeANGLEForWin(HWND, const DisplayParams&); + #ifdef SK_DIRECT3D +-std::unique_ptr MakeD3D12ForWin(HWND, const DisplayParams&); ++SK_API std::unique_ptr MakeD3D12ForWin(HWND, const DisplayParams&); + #endif + #ifdef SK_DAWN -std::unique_ptr MakeDawnD3D12ForWin(HWND, const DisplayParams&); +SK_API std::unique_ptr MakeDawnD3D12ForWin(HWND, const DisplayParams&); diff --git a/external/skia/operator-eq-bool.patch.0 b/external/skia/operator-eq-bool.patch.0 deleted file mode 100644 index 1c2c77beb96f..000000000000 --- a/external/skia/operator-eq-bool.patch.0 +++ /dev/null @@ -1,21 +0,0 @@ ---- ./src/core/SkVM.cpp.sav 2020-04-06 12:42:22.976205876 +0200 -+++ ./src/core/SkVM.cpp 2020-04-06 12:50:57.465941063 +0200 -@@ -1162,7 +1162,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); ---- ./src/core/SkVM.h.sav 2020-04-06 12:08:50.833128845 +0200 -+++ ./src/core/SkVM.h 2020-04-06 12:51:13.369987701 +0200 -@@ -875,6 +875,7 @@ namespace skvm { - - static inline I32 operator==(F32 x, F32a y) { return x->eq(x,y); } - static inline I32 operator==(float x, F32 y) { return y->eq(x,y); } -+ static inline I32 eq_op(float x, F32 y) { return y->eq(x,y); } - - static inline I32 operator!=(F32 x, F32a y) { return x->neq(x,y); } - static inline I32 operator!=(float x, F32 y) { return y->neq(x,y); } diff --git a/external/skia/operator-eq-bool.patch.1 b/external/skia/operator-eq-bool.patch.1 new file mode 100644 index 000000000000..d6dc3c139d36 --- /dev/null +++ b/external/skia/operator-eq-bool.patch.1 @@ -0,0 +1,25 @@ +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/public-make-from-backend-texture.patch.1 b/external/skia/public-make-from-backend-texture.patch.1 new file mode 100644 index 000000000000..7543ff816bcd --- /dev/null +++ b/external/skia/public-make-from-backend-texture.patch.1 @@ -0,0 +1,44 @@ +diff --git a/include/core/SkSurface.h b/include/core/SkSurface.h +index bf151c05de..95e84022d4 100644 +--- a/include/core/SkSurface.h ++++ b/include/core/SkSurface.h +@@ -243,7 +243,7 @@ public: + RenderTargetReleaseProc releaseProc = nullptr, + ReleaseContext releaseContext = nullptr); + +-#if GR_TEST_UTILS ++//#if GR_TEST_UTILS + // TODO: Remove this. + static sk_sp MakeFromBackendTextureAsRenderTarget(GrContext* context, + const GrBackendTexture& backendTexture, +@@ -252,7 +252,7 @@ public: + SkColorType colorType, + sk_sp colorSpace, + const SkSurfaceProps* surfaceProps); +-#endif ++//#endif + + #if defined(SK_BUILD_FOR_ANDROID) && __ANDROID_API__ >= 26 + /** Private. +diff --git a/src/image/SkSurface_Gpu.cpp b/src/image/SkSurface_Gpu.cpp +index 87c7a81b16..1842487030 100644 +--- a/src/image/SkSurface_Gpu.cpp ++++ b/src/image/SkSurface_Gpu.cpp +@@ -666,7 +666,7 @@ sk_sp SkSurface::MakeFromBackendRenderTarget(GrContext* context, + return sk_make_sp(std::move(device)); + } + +-#if GR_TEST_UTILS ++//#if GR_TEST_UTILS + sk_sp SkSurface::MakeFromBackendTextureAsRenderTarget(GrContext* context, + const GrBackendTexture& tex, + GrSurfaceOrigin origin, +@@ -700,7 +700,7 @@ sk_sp SkSurface::MakeFromBackendTextureAsRenderTarget(GrContext* cont + } + return sk_make_sp(std::move(device)); + } +-#endif ++//#endif + + #if defined(SK_BUILD_FOR_ANDROID) && __ANDROID_API__ >= 26 + sk_sp SkSurface::MakeFromAHardwareBuffer(GrContext* context, diff --git a/external/skia/share-grcontext.patch.1 b/external/skia/share-grcontext.patch.1 index a6d815d0024a..1c7da21d6b6c 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 c2b26b4254..fe1afd30a1 100644 +index 970c67ec0c..371bd8ab0c 100644 --- a/tools/sk_app/VulkanWindowContext.cpp +++ b/tools/sk_app/VulkanWindowContext.cpp @@ -24,8 +24,10 @@ @@ -228,11 +228,11 @@ index c2b26b4254..fe1afd30a1 100644 + fDestroySwapchainKHR(fShared->fDevice, swapchainCreateInfo.oldSwapchain, nullptr); } - this->createBuffers(swapchainCreateInfo.imageFormat, colorType); -@@ -323,10 +340,10 @@ bool VulkanWindowContext::createSwapchain(int width, int height, - } + this->createBuffers(swapchainCreateInfo.imageFormat, colorType, +@@ -325,10 +342,10 @@ bool VulkanWindowContext::createSwapchain(int width, int height, - void VulkanWindowContext::createBuffers(VkFormat format, SkColorType colorType) { + void VulkanWindowContext::createBuffers(VkFormat format, SkColorType colorType, + VkSharingMode sharingMode) { - fGetSwapchainImagesKHR(fDevice, fSwapchain, &fImageCount, nullptr); + fGetSwapchainImagesKHR(fShared->fDevice, fSwapchain, &fImageCount, nullptr); SkASSERT(fImageCount); @@ -242,16 +242,16 @@ index c2b26b4254..fe1afd30a1 100644 // set up initial image layouts and create surfaces fImageLayouts = new VkImageLayout[fImageCount]; -@@ -341,7 +358,7 @@ void VulkanWindowContext::createBuffers(VkFormat format, SkColorType colorType) +@@ -343,7 +360,7 @@ void VulkanWindowContext::createBuffers(VkFormat format, SkColorType colorType, info.fImageTiling = VK_IMAGE_TILING_OPTIMAL; info.fFormat = format; info.fLevelCount = 1; - info.fCurrentQueueFamily = fPresentQueueIndex; + info.fCurrentQueueFamily = fShared->fPresentQueueIndex; + info.fSharingMode = sharingMode; if (fSampleCount == 1) { - GrBackendRenderTarget backendRT(fWidth, fHeight, fSampleCount, info); -@@ -372,8 +389,8 @@ void VulkanWindowContext::createBuffers(VkFormat format, SkColorType colorType) +@@ -375,8 +392,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 c2b26b4254..fe1afd30a1 100644 &fBackbuffers[i].fRenderSemaphore)); SkASSERT(result == VK_SUCCESS); } -@@ -385,8 +402,8 @@ void VulkanWindowContext::destroyBuffers() { +@@ -388,8 +405,8 @@ void VulkanWindowContext::destroyBuffers() { if (fBackbuffers) { for (uint32_t i = 0; i < fImageCount + 1; ++i) { fBackbuffers[i].fImageIndex = -1; @@ -273,7 +273,7 @@ index c2b26b4254..fe1afd30a1 100644 fBackbuffers[i].fRenderSemaphore, nullptr)); } -@@ -411,41 +428,59 @@ VulkanWindowContext::~VulkanWindowContext() { +@@ -414,41 +431,59 @@ VulkanWindowContext::~VulkanWindowContext() { void VulkanWindowContext::destroyContext() { if (this->isValid()) { fQueueWaitIdle(fPresentQueue); @@ -346,7 +346,7 @@ index c2b26b4254..fe1afd30a1 100644 } VulkanWindowContext::BackbufferInfo* VulkanWindowContext::getAvailableBackbuffer() { -@@ -471,35 +506,35 @@ sk_sp VulkanWindowContext::getBackbufferSurface() { +@@ -474,35 +509,35 @@ sk_sp VulkanWindowContext::getBackbufferSurface() { semaphoreInfo.pNext = nullptr; semaphoreInfo.flags = 0; VkSemaphore semaphore; @@ -388,7 +388,16 @@ index c2b26b4254..fe1afd30a1 100644 return nullptr; } } -@@ -543,4 +578,6 @@ void VulkanWindowContext::swapBuffers() { +@@ -528,7 +563,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(); + +@@ -548,4 +583,6 @@ void VulkanWindowContext::swapBuffers() { fQueuePresentKHR(fPresentQueue, &presentInfo); } @@ -396,7 +405,7 @@ index c2b26b4254..fe1afd30a1 100644 + } //namespace sk_app diff --git a/tools/sk_app/VulkanWindowContext.h b/tools/sk_app/VulkanWindowContext.h -index 2db9e79ae6..aa48fc2951 100644 +index 5e245aff70..c6c866372f 100644 --- a/tools/sk_app/VulkanWindowContext.h +++ b/tools/sk_app/VulkanWindowContext.h @@ -19,18 +19,36 @@ @@ -455,7 +464,7 @@ index 2db9e79ae6..aa48fc2951 100644 struct BackbufferInfo { uint32_t fImageIndex; // image this is associated with @@ -64,11 +88,6 @@ private: - void createBuffers(VkFormat format, SkColorType colorType); + void createBuffers(VkFormat format, SkColorType colorType, VkSharingMode); void destroyBuffers(); - VkInstance fInstance = VK_NULL_HANDLE; -- cgit