diff options
Diffstat (limited to 'external')
-rw-r--r-- | external/skia/0001-AvoidCombiningExtrememelyLargeMeshes.patch.1 | 34 | ||||
-rw-r--r-- | external/skia/Library_skia.mk | 22 | ||||
-rw-r--r-- | external/skia/UnpackedTarball_skia.mk | 2 | ||||
-rw-r--r-- | external/skia/always_inline_and_multiversioning_conflict.patch.1 | 12 | ||||
-rw-r--r-- | external/skia/make-api-visible.patch.1 | 8 | ||||
-rw-r--r-- | external/skia/share-grcontext.patch.1 | 87 | ||||
-rw-r--r-- | external/skia/source/skia_opts.cxx | 1 |
7 files changed, 77 insertions, 89 deletions
diff --git a/external/skia/0001-AvoidCombiningExtrememelyLargeMeshes.patch.1 b/external/skia/0001-AvoidCombiningExtrememelyLargeMeshes.patch.1 deleted file mode 100644 index ca58048a75f0..000000000000 --- a/external/skia/0001-AvoidCombiningExtrememelyLargeMeshes.patch.1 +++ /dev/null @@ -1,34 +0,0 @@ -From 6169a1fabae1743709bc9641ad43fcbb6a4f62e1 Mon Sep 17 00:00:00 2001 -From: John Stiles <johnstiles@google.com> -Date: Fri, 24 Nov 2023 09:40:11 -0500 -Subject: [PATCH] Avoid combining extremely large meshes. - -Bug: chromium:1505053 -Change-Id: I42f2ff872bbf054686ec7af0cc85ff63055fcfbf -Reviewed-on: https://skia-review.googlesource.com/c/skia/+/782936 -Commit-Queue: Michael Ludwig <michaelludwig@google.com> -Reviewed-by: Michael Ludwig <michaelludwig@google.com> -Auto-Submit: John Stiles <johnstiles@google.com> ---- - src/gpu/ganesh/ops/DrawMeshOp.cpp | 5 ++++- - 1 file changed, 4 insertions(+), 1 deletion(-) - -diff --git a/src/gpu/ganesh/ops/DrawMeshOp.cpp b/src/gpu/ganesh/ops/DrawMeshOp.cpp -index d827009b993..eed2757579e 100644 ---- a/src/gpu/ganesh/ops/DrawMeshOp.cpp -+++ b/src/gpu/ganesh/ops/DrawMeshOp.cpp -@@ -1178,10 +1178,13 @@ GrOp::CombineResult MeshOp::onCombineIfPossible(GrOp* t, SkArenaAlloc*, const Gr - return CombineResult::kCannotCombine; - } - -+ if (fVertexCount > INT32_MAX - that->fVertexCount) { -+ return CombineResult::kCannotCombine; -+ } - if (SkToBool(fIndexCount) != SkToBool(that->fIndexCount)) { - return CombineResult::kCannotCombine; - } -- if (SkToBool(fIndexCount) && fVertexCount + that->fVertexCount > SkToInt(UINT16_MAX)) { -+ if (SkToBool(fIndexCount) && fVertexCount > UINT16_MAX - that->fVertexCount) { - return CombineResult::kCannotCombine; - } - diff --git a/external/skia/Library_skia.mk b/external/skia/Library_skia.mk index 5875b7513fcb..0e874352e940 100644 --- a/external/skia/Library_skia.mk +++ b/external/skia/Library_skia.mk @@ -356,6 +356,7 @@ $(eval $(call gb_Library_add_generated_exception_objects,skia,\ UnpackedTarball/skia/src/core/SkBlendModeBlender \ UnpackedTarball/skia/src/core/SkBlitMask_opts \ UnpackedTarball/skia/src/core/SkBlitRow_D32 \ + UnpackedTarball/skia/src/core/SkBlitRow_opts \ UnpackedTarball/skia/src/core/SkBlitter \ UnpackedTarball/skia/src/core/SkBlitter_A8 \ UnpackedTarball/skia/src/core/SkBlitter_ARGB32 \ @@ -368,7 +369,6 @@ $(eval $(call gb_Library_add_generated_exception_objects,skia,\ UnpackedTarball/skia/src/core/SkCanvas_Raster \ UnpackedTarball/skia/src/core/SkCapabilities \ UnpackedTarball/skia/src/core/SkChecksum \ - UnpackedTarball/skia/src/core/SkChromeRemoteGlyphCache \ UnpackedTarball/skia/src/core/SkClipStack \ UnpackedTarball/skia/src/core/SkClipStackDevice \ UnpackedTarball/skia/src/core/SkColor \ @@ -433,12 +433,13 @@ $(eval $(call gb_Library_add_generated_exception_objects,skia,\ UnpackedTarball/skia/src/core/SkMaskGamma \ UnpackedTarball/skia/src/core/SkMatrix \ UnpackedTarball/skia/src/core/SkMatrixInvert \ + UnpackedTarball/skia/src/core/SkMemset_opts \ + UnpackedTarball/skia/src/core/SkMemset_opts_erms \ UnpackedTarball/skia/src/core/SkMesh \ UnpackedTarball/skia/src/core/SkMipmap \ UnpackedTarball/skia/src/core/SkMipmapAccessor \ UnpackedTarball/skia/src/core/SkMipmapBuilder \ UnpackedTarball/skia/src/core/SkOpts \ - UnpackedTarball/skia/src/core/SkOpts_erms \ UnpackedTarball/skia/src/core/SkOverdrawCanvas \ UnpackedTarball/skia/src/core/SkPaint \ UnpackedTarball/skia/src/core/SkPaintPriv \ @@ -497,6 +498,7 @@ $(eval $(call gb_Library_add_generated_exception_objects,skia,\ UnpackedTarball/skia/src/core/SkStrokeRec \ UnpackedTarball/skia/src/core/SkStrokerPriv \ UnpackedTarball/skia/src/core/SkSwizzle \ + UnpackedTarball/skia/src/core/SkSwizzler_opts \ UnpackedTarball/skia/src/core/SkTaskGroup \ UnpackedTarball/skia/src/core/SkTextBlob \ UnpackedTarball/skia/src/core/SkTextBlobTrace \ @@ -976,8 +978,6 @@ $(eval $(call gb_Library_add_generated_exception_objects,skia,\ UnpackedTarball/skia/src/gpu/ganesh/effects/GrCustomXfermode \ UnpackedTarball/skia/src/gpu/ganesh/effects/GrDisableColorXP \ UnpackedTarball/skia/src/gpu/ganesh/effects/GrDistanceFieldGeoProc \ - UnpackedTarball/skia/src/gpu/ganesh/effects/GrGaussianConvolutionFragmentProcessor \ - UnpackedTarball/skia/src/gpu/ganesh/effects/GrMatrixConvolutionEffect \ UnpackedTarball/skia/src/gpu/ganesh/effects/GrMatrixEffect \ UnpackedTarball/skia/src/gpu/ganesh/effects/GrModulateAtlasCoverageEffect \ UnpackedTarball/skia/src/gpu/ganesh/effects/GrOvalEffect \ @@ -1074,6 +1074,7 @@ $(eval $(call gb_Library_add_generated_exception_objects,skia,\ UnpackedTarball/skia/src/gpu/AtlasTypes \ UnpackedTarball/skia/src/gpu/Blend \ UnpackedTarball/skia/src/gpu/BlendFormula \ + UnpackedTarball/skia/src/gpu/BlurUtils \ UnpackedTarball/skia/src/gpu/DitherUtils \ UnpackedTarball/skia/src/gpu/PipelineUtils \ UnpackedTarball/skia/src/gpu/RectanizerPow2 \ @@ -1088,6 +1089,7 @@ $(eval $(call gb_Library_add_generated_exception_objects,skia,\ UnpackedTarball/skia/src/text/gpu/GlyphVector \ UnpackedTarball/skia/src/text/gpu/SDFMaskFilter \ UnpackedTarball/skia/src/text/gpu/SDFTControl \ + UnpackedTarball/skia/src/text/gpu/SkChromeRemoteGlyphCache \ UnpackedTarball/skia/src/text/gpu/Slug \ UnpackedTarball/skia/src/text/gpu/SlugImpl \ UnpackedTarball/skia/src/text/gpu/StrikeCache \ @@ -1103,6 +1105,8 @@ endif # ifeq ($(SKIA_GPU),VULKAN) $(eval $(call gb_Library_add_generated_exception_objects,skia,\ + UnpackedTarball/skia/src/gpu/ganesh/vk/AHardwareBufferVk \ + UnpackedTarball/skia/src/gpu/ganesh/vk/GrVkBackendSurface \ UnpackedTarball/skia/src/gpu/ganesh/vk/GrVkBuffer \ UnpackedTarball/skia/src/gpu/ganesh/vk/GrVkCaps \ UnpackedTarball/skia/src/gpu/ganesh/vk/GrVkCommandBuffer \ @@ -1227,20 +1231,22 @@ endif $(eval $(call gb_Library_add_exception_objects,skia,\ external/skia/source/skia_opts_ssse3, $(CXXFLAGS_INTRINSICS_SSSE3) $(LO_CLANG_CXXFLAGS_INTRINSICS_SSSE3) \ )) - $(eval $(call gb_Library_add_generated_exception_objects,skia,\ - UnpackedTarball/skia/src/opts/SkOpts_avx, $(CXXFLAGS_INTRINSICS_AVX) $(LO_CLANG_CXXFLAGS_INTRINSICS_AVX) \ - $(LO_SKIA_AVOID_INLINE_COPIES) \ + UnpackedTarball/skia/src/core/SkMemset_opts_avx, \ + $(CXXFLAGS_INTRINSICS_AVX) $(LO_CLANG_CXXFLAGS_INTRINSICS_AVX) \ + $(LO_SKIA_AVOID_INLINE_COPIES) \ )) $(eval $(call gb_Library_add_generated_exception_objects,skia,\ UnpackedTarball/skia/src/opts/SkOpts_hsw \ + UnpackedTarball/skia/src/core/SkSwizzler_opts_hsw \ + UnpackedTarball/skia/src/core/SkBlitRow_opts_hsw \ UnpackedTarball/skia/src/core/SkBitmapProcState_opts_hsw, \ $(CXXFLAGS_INTRINSICS_AVX2) $(CXXFLAGS_INTRINSICS_F16C) $(CXXFLAGS_INTRINSICS_FMA) \ $(LO_CLANG_CXXFLAGS_INTRINSICS_AVX2) $(LO_CLANG_CXXFLAGS_INTRINSICS_F16C) $(LO_CLANG_CXXFLAGS_INTRINSICS_FMA) \ $(LO_SKIA_AVOID_INLINE_COPIES) \ )) $(eval $(call gb_Library_add_generated_exception_objects,skia,\ - UnpackedTarball/skia/src/opts/SkOpts_ssse3 \ + UnpackedTarball/skia/src/core/SkSwizzler_opts_ssse3 \ UnpackedTarball/skia/src/core/SkBlitMask_opts_ssse3 \ UnpackedTarball/skia/src/core/SkBitmapProcState_opts_ssse3, \ $(CXXFLAGS_INTRINSICS_SSSE3) $(LO_CLANG_CXXFLAGS_INTRINSICS_SSSE3) \ diff --git a/external/skia/UnpackedTarball_skia.mk b/external/skia/UnpackedTarball_skia.mk index ff3a93e74f48..a97025a1678f 100644 --- a/external/skia/UnpackedTarball_skia.mk +++ b/external/skia/UnpackedTarball_skia.mk @@ -40,8 +40,8 @@ skia_patches := \ incomplete.patch.0 \ ubsan-missing-typeinfo.patch.1 \ incomplete-type-SkImageGenerator.patch.1 \ - 0001-AvoidCombiningExtrememelyLargeMeshes.patch.1 \ help-msvc-analyzer.patch \ + always_inline_and_multiversioning_conflict.patch.1 \ $(eval $(call gb_UnpackedTarball_set_patchlevel,skia,1)) diff --git a/external/skia/always_inline_and_multiversioning_conflict.patch.1 b/external/skia/always_inline_and_multiversioning_conflict.patch.1 new file mode 100644 index 000000000000..b1c648b41f66 --- /dev/null +++ b/external/skia/always_inline_and_multiversioning_conflict.patch.1 @@ -0,0 +1,12 @@ +diff -ur skia.org/src/opts/SkOpts_SetTarget.h skia/src/opts/SkOpts_SetTarget.h +--- skia.org/src/opts/SkOpts_SetTarget.h 2024-10-07 14:32:40.495792300 +0200 ++++ skia/src/opts/SkOpts_SetTarget.h 2024-10-07 14:45:58.375485000 +0200 +@@ -58,6 +58,8 @@ + // Each of the specific intrinsic headers also checks to ensure that immintrin.h has been + // included, so do that here, first. + #if defined(__clang__) && defined(_MSC_VER) ++ // workaround for https://github.com/llvm/llvm-project/issues/95133 ++ #define __RTMINTRIN_H + #include <immintrin.h> + #endif + diff --git a/external/skia/make-api-visible.patch.1 b/external/skia/make-api-visible.patch.1 index 8b8e37359ec5..f8bf5d5debbb 100644 --- a/external/skia/make-api-visible.patch.1 +++ b/external/skia/make-api-visible.patch.1 @@ -30,12 +30,12 @@ diff -ur skia.org/tools/window/unix/WindowContextFactory_unix.h skia/tools/windo +SK_API std::unique_ptr<WindowContext> MakeGLForXlib(const XlibWindowInfo&, const DisplayParams&); #endif - #ifdef SK_DAWN --std::unique_ptr<WindowContext> MakeDawnVulkanForXlib(const XlibWindowInfo&, const DisplayParams&); -+SK_API std::unique_ptr<WindowContext> MakeDawnVulkanForXlib(const XlibWindowInfo&, const DisplayParams&); + #if defined(SK_DAWN) && defined(SK_GRAPHITE) +-std::unique_ptr<WindowContext> MakeGraphiteDawnVulkanForXlib(const XlibWindowInfo&, ++SK_API std::unique_ptr<WindowContext> MakeGraphiteDawnVulkanForXlib(const XlibWindowInfo&, + const DisplayParams&); #endif - #if defined(SK_DAWN) && defined(SK_GRAPHITE) @@ -55,7 +55,7 @@ const DisplayParams&); #endif diff --git a/external/skia/share-grcontext.patch.1 b/external/skia/share-grcontext.patch.1 index 1ccf95699593..a5ba9f1a4f25 100644 --- a/external/skia/share-grcontext.patch.1 +++ b/external/skia/share-grcontext.patch.1 @@ -1,6 +1,6 @@ diff -ur skia.org/tools/window/mac/MetalWindowContext_mac.mm skia/tools/window/mac/MetalWindowContext_mac.mm ---- skia.org/tools/window/mac/MetalWindowContext_mac.mm 2024-10-06 14:30:21.225939090 +0200 -+++ skia/tools/window/mac/MetalWindowContext_mac.mm 2024-10-06 14:31:51.351498737 +0200 +--- skia.org/tools/window/mac/MetalWindowContext_mac.mm 2024-10-07 10:24:45.995984589 +0200 ++++ skia/tools/window/mac/MetalWindowContext_mac.mm 2024-10-07 10:27:27.598123570 +0200 @@ -47,10 +47,14 @@ } @@ -18,8 +18,8 @@ diff -ur skia.org/tools/window/mac/MetalWindowContext_mac.mm skia/tools/window/m // resize ignores the passed values and uses the fMainView directly. diff -ur skia.org/tools/window/MetalWindowContext.h skia/tools/window/MetalWindowContext.h ---- skia.org/tools/window/MetalWindowContext.h 2024-10-06 14:30:21.225939090 +0200 -+++ skia/tools/window/MetalWindowContext.h 2024-10-06 14:31:51.352498743 +0200 +--- skia.org/tools/window/MetalWindowContext.h 2024-10-07 10:24:45.995984589 +0200 ++++ skia/tools/window/MetalWindowContext.h 2024-10-07 10:27:27.606123626 +0200 @@ -14,13 +14,18 @@ #include "tools/window/WindowContext.h" @@ -58,7 +58,7 @@ diff -ur skia.org/tools/window/MetalWindowContext.h skia/tools/window/MetalWindo - GrMTLHandle fDrawableHandle; #if SKGPU_GRAPHITE_METAL_SDK_VERSION >= 230 // wrapping this in sk_cfp throws up an availability warning, so we'll track lifetime manually - id<MTLBinaryArchive> fPipelineArchive SK_API_AVAILABLE(macos(11.0), ios(14.0)); + id<MTLBinaryArchive> fPipelineArchive SK_API_AVAILABLE(macos(11.0),ios(14.0),tvos(14.0)); #endif + + sk_sp<GrDirectContext> fContext; @@ -79,8 +79,8 @@ diff -ur skia.org/tools/window/MetalWindowContext.h skia/tools/window/MetalWindo } // namespace skwindow::internal diff -ur skia.org/tools/window/MetalWindowContext.mm skia/tools/window/MetalWindowContext.mm ---- skia.org/tools/window/MetalWindowContext.mm 2024-10-06 14:30:21.225939090 +0200 -+++ skia/tools/window/MetalWindowContext.mm 2024-10-06 14:31:51.352498743 +0200 +--- skia.org/tools/window/MetalWindowContext.mm 2024-10-07 10:24:45.995984589 +0200 ++++ skia/tools/window/MetalWindowContext.mm 2024-10-07 10:31:33.430849254 +0200 @@ -39,24 +39,30 @@ } @@ -101,7 +101,7 @@ diff -ur skia.org/tools/window/MetalWindowContext.mm skia/tools/window/MetalWind + d->fQueue.reset([*d->fDevice newCommandQueue]); if (fDisplayParams.fMSAASampleCount > 1) { - if (@available(macOS 10.11, iOS 9.0, *)) { + if (@available(macOS 10.11, iOS 9.0, tvOS 9.0, *)) { - if (![*fDevice supportsTextureSampleCount:fDisplayParams.fMSAASampleCount]) { + if (![*d->fDevice supportsTextureSampleCount:fDisplayParams.fMSAASampleCount]) { + fGlobalShared.reset(); @@ -138,7 +138,7 @@ diff -ur skia.org/tools/window/MetalWindowContext.mm skia/tools/window/MetalWind @@ -76,46 +82,75 @@ } } else { - if (@available(macOS 11.0, iOS 14.0, *)) { + if (@available(macOS 11.0, iOS 14.0, tvOS 14.0, *)) { - fPipelineArchive = nil; + d->fPipelineArchive = nil; } @@ -151,7 +151,7 @@ diff -ur skia.org/tools/window/MetalWindowContext.mm skia/tools/window/MetalWind + backendContext.fDevice.retain((GrMTLHandle)d->fDevice.get()); + backendContext.fQueue.retain((GrMTLHandle)d->fQueue.get()); #if SKGPU_GRAPHITE_METAL_SDK_VERSION >= 230 - if (@available(macOS 11.0, iOS 14.0, *)) { + if (@available(macOS 11.0, iOS 14.0, tvOS 14.0, *)) { - backendContext.fBinaryArchive.retain((__bridge GrMTLHandle)fPipelineArchive); + backendContext.fBinaryArchive.retain((__bridge GrMTLHandle)d->fPipelineArchive); } @@ -212,7 +212,7 @@ diff -ur skia.org/tools/window/MetalWindowContext.mm skia/tools/window/MetalWind + } + #if SKGPU_GRAPHITE_METAL_SDK_VERSION >= 230 - if (@available(macOS 11.0, iOS 14.0, *)) { + if (@available(macOS 11.0, iOS 14.0, tvOS 14.0, *)) { - [fPipelineArchive release]; + [fGlobalShared->fPipelineArchive release]; } @@ -226,7 +226,7 @@ diff -ur skia.org/tools/window/MetalWindowContext.mm skia/tools/window/MetalWind } sk_sp<SkSurface> MetalWindowContext::getBackbufferSurface() { -@@ -161,7 +196,7 @@ +@@ -158,7 +193,7 @@ void MetalWindowContext::onSwapBuffers() { id<CAMetalDrawable> currentDrawable = (id<CAMetalDrawable>)fDrawableHandle; @@ -235,10 +235,10 @@ diff -ur skia.org/tools/window/MetalWindowContext.mm skia/tools/window/MetalWind commandBuffer.label = @"Present"; [commandBuffer presentDrawable:currentDrawable]; -@@ -182,9 +217,9 @@ +@@ -179,9 +214,9 @@ if (!isActive) { #if SKGPU_GRAPHITE_METAL_SDK_VERSION >= 230 - if (@available(macOS 11.0, iOS 14.0, *)) { + if (@available(macOS 11.0, iOS 14.0, tvOS 14.0, *)) { - if (fPipelineArchive) { + if (fShared->fPipelineArchive) { NSError* error; @@ -247,7 +247,7 @@ diff -ur skia.org/tools/window/MetalWindowContext.mm skia/tools/window/MetalWind if (error) { SkDebugf("Error storing MTLBinaryArchive:\n%s\n", error.debugDescription.UTF8String); -@@ -195,4 +230,11 @@ +@@ -192,4 +227,11 @@ } } @@ -259,9 +259,11 @@ diff -ur skia.org/tools/window/MetalWindowContext.mm skia/tools/window/MetalWind +} + } //namespace skwindow::internal +Only in skia/tools/window: MetalWindowContext.mm.orig +Only in skia/tools/window: MetalWindowContext.mm.rej diff -ur skia.org/tools/window/unix/VulkanWindowContext_unix.cpp skia/tools/window/unix/VulkanWindowContext_unix.cpp ---- skia.org/tools/window/unix/VulkanWindowContext_unix.cpp 2024-10-06 14:30:21.226939096 +0200 -+++ skia/tools/window/unix/VulkanWindowContext_unix.cpp 2024-10-06 14:32:20.232679644 +0200 +--- skia.org/tools/window/unix/VulkanWindowContext_unix.cpp 2024-10-07 10:24:45.996984596 +0200 ++++ skia/tools/window/unix/VulkanWindowContext_unix.cpp 2024-10-07 10:27:27.606123626 +0200 @@ -24,7 +24,7 @@ return nullptr; } @@ -291,9 +293,9 @@ diff -ur skia.org/tools/window/unix/VulkanWindowContext_unix.cpp skia/tools/wind } return ctx; diff -ur skia.org/tools/window/VulkanWindowContext.cpp skia/tools/window/VulkanWindowContext.cpp ---- skia.org/tools/window/VulkanWindowContext.cpp 2024-10-06 14:30:21.225939090 +0200 -+++ skia/tools/window/VulkanWindowContext.cpp 2024-10-06 14:32:40.756808630 +0200 -@@ -25,9 +25,13 @@ +--- skia.org/tools/window/VulkanWindowContext.cpp 2024-10-07 10:24:45.995984589 +0200 ++++ skia/tools/window/VulkanWindowContext.cpp 2024-10-07 10:27:27.606123626 +0200 +@@ -26,9 +26,13 @@ #endif #define GET_PROC(F) f ## F = \ @@ -309,7 +311,7 @@ diff -ur skia.org/tools/window/VulkanWindowContext.cpp skia/tools/window/VulkanW namespace skwindow::internal { -@@ -49,32 +53,39 @@ +@@ -50,32 +54,39 @@ } void VulkanWindowContext::initializeContext() { @@ -362,7 +364,7 @@ diff -ur skia.org/tools/window/VulkanWindowContext.cpp skia/tools/window/VulkanW PFN_vkGetPhysicalDeviceProperties localGetPhysicalDeviceProperties = reinterpret_cast<PFN_vkGetPhysicalDeviceProperties>( -@@ -82,21 +93,30 @@ +@@ -83,21 +94,30 @@ backendContext.fInstance, VK_NULL_HANDLE)); if (!localGetPhysicalDeviceProperties) { @@ -401,7 +403,7 @@ diff -ur skia.org/tools/window/VulkanWindowContext.cpp skia/tools/window/VulkanW GET_PROC(DestroySurfaceKHR); GET_PROC(GetPhysicalDeviceSurfaceSupportKHR); GET_PROC(GetPhysicalDeviceSurfaceCapabilitiesKHR); -@@ -104,7 +124,6 @@ +@@ -105,7 +125,6 @@ GET_PROC(GetPhysicalDeviceSurfacePresentModesKHR); GET_DEV_PROC(DeviceWaitIdle); GET_DEV_PROC(QueueWaitIdle); @@ -409,7 +411,7 @@ diff -ur skia.org/tools/window/VulkanWindowContext.cpp skia/tools/window/VulkanW GET_DEV_PROC(CreateSwapchainKHR); GET_DEV_PROC(DestroySwapchainKHR); GET_DEV_PROC(GetSwapchainImagesKHR); -@@ -112,46 +131,44 @@ +@@ -113,46 +132,44 @@ GET_DEV_PROC(QueuePresentKHR); GET_DEV_PROC(GetDeviceQueue); @@ -466,7 +468,7 @@ diff -ur skia.org/tools/window/VulkanWindowContext.cpp skia/tools/window/VulkanW nullptr); if (VK_SUCCESS != res) { return false; -@@ -159,14 +176,14 @@ +@@ -160,14 +177,14 @@ SkAutoMalloc surfaceFormatAlloc(surfaceFormatCount * sizeof(VkSurfaceFormatKHR)); VkSurfaceFormatKHR* surfaceFormats = (VkSurfaceFormatKHR*)surfaceFormatAlloc.get(); @@ -483,7 +485,7 @@ diff -ur skia.org/tools/window/VulkanWindowContext.cpp skia/tools/window/VulkanW nullptr); if (VK_SUCCESS != res) { return false; -@@ -174,7 +191,7 @@ +@@ -175,7 +192,7 @@ SkAutoMalloc presentModeAlloc(presentModeCount * sizeof(VkPresentModeKHR)); VkPresentModeKHR* presentModes = (VkPresentModeKHR*)presentModeAlloc.get(); @@ -492,7 +494,7 @@ diff -ur skia.org/tools/window/VulkanWindowContext.cpp skia/tools/window/VulkanW presentModes); if (VK_SUCCESS != res) { return false; -@@ -290,8 +307,8 @@ +@@ -291,8 +308,8 @@ swapchainCreateInfo.imageArrayLayers = 1; swapchainCreateInfo.imageUsage = usageFlags; @@ -503,7 +505,7 @@ diff -ur skia.org/tools/window/VulkanWindowContext.cpp skia/tools/window/VulkanW swapchainCreateInfo.imageSharingMode = VK_SHARING_MODE_CONCURRENT; swapchainCreateInfo.queueFamilyIndexCount = 2; swapchainCreateInfo.pQueueFamilyIndices = queueFamilies; -@@ -307,27 +324,27 @@ +@@ -308,27 +325,27 @@ swapchainCreateInfo.clipped = true; swapchainCreateInfo.oldSwapchain = fSwapchain; @@ -536,7 +538,7 @@ diff -ur skia.org/tools/window/VulkanWindowContext.cpp skia/tools/window/VulkanW } return true; -@@ -337,10 +354,9 @@ +@@ -338,10 +355,9 @@ VkImageUsageFlags usageFlags, SkColorType colorType, VkSharingMode sharingMode) { @@ -548,7 +550,7 @@ diff -ur skia.org/tools/window/VulkanWindowContext.cpp skia/tools/window/VulkanW // set up initial image layouts and create surfaces fImageLayouts = new VkImageLayout[fImageCount]; -@@ -356,7 +372,7 @@ +@@ -357,7 +373,7 @@ info.fFormat = format; info.fImageUsageFlags = usageFlags; info.fLevelCount = 1; @@ -557,7 +559,7 @@ diff -ur skia.org/tools/window/VulkanWindowContext.cpp skia/tools/window/VulkanW info.fProtected = skgpu::Protected(fDisplayParams.fCreateProtectedNativeBackend); info.fSharingMode = sharingMode; -@@ -398,8 +414,8 @@ +@@ -400,8 +416,8 @@ fBackbuffers = new BackbufferInfo[fImageCount + 1]; for (uint32_t i = 0; i < fImageCount + 1; ++i) { fBackbuffers[i].fImageIndex = -1; @@ -568,7 +570,7 @@ diff -ur skia.org/tools/window/VulkanWindowContext.cpp skia/tools/window/VulkanW &fBackbuffers[i].fRenderSemaphore)); SkASSERT(result == VK_SUCCESS); } -@@ -412,8 +428,8 @@ +@@ -414,8 +430,8 @@ if (fBackbuffers) { for (uint32_t i = 0; i < fImageCount + 1; ++i) { fBackbuffers[i].fImageIndex = -1; @@ -579,7 +581,7 @@ diff -ur skia.org/tools/window/VulkanWindowContext.cpp skia/tools/window/VulkanW fBackbuffers[i].fRenderSemaphore, nullptr)); } -@@ -438,42 +454,59 @@ +@@ -440,42 +456,59 @@ void VulkanWindowContext::destroyContext() { if (this->isValid()) { fQueueWaitIdle(fPresentQueue); @@ -653,7 +655,7 @@ diff -ur skia.org/tools/window/VulkanWindowContext.cpp skia/tools/window/VulkanW } VulkanWindowContext::BackbufferInfo* VulkanWindowContext::getAvailableBackbuffer() { -@@ -499,35 +532,35 @@ +@@ -501,35 +534,35 @@ semaphoreInfo.pNext = nullptr; semaphoreInfo.flags = 0; VkSemaphore semaphore; @@ -695,7 +697,7 @@ diff -ur skia.org/tools/window/VulkanWindowContext.cpp skia/tools/window/VulkanW return nullptr; } } -@@ -553,7 +586,7 @@ +@@ -555,7 +588,7 @@ GrFlushInfo info; info.fNumSemaphores = 1; info.fSignalSemaphores = &beSemaphore; @@ -704,16 +706,17 @@ diff -ur skia.org/tools/window/VulkanWindowContext.cpp skia/tools/window/VulkanW auto dContext = surface->recordingContext()->asDirectContext(); dContext->flush(surface, info, &presentState); dContext->submit(); -@@ -574,4 +607,6 @@ +@@ -576,4 +609,6 @@ fQueuePresentKHR(fPresentQueue, &presentInfo); } +SK_API sk_sp<VulkanWindowContext::Shared> VulkanWindowContext::fGlobalShared; + } // namespace skwindow::internal +Only in skia/tools/window: VulkanWindowContext.cpp.orig diff -ur skia.org/tools/window/VulkanWindowContext.h skia/tools/window/VulkanWindowContext.h ---- skia.org/tools/window/VulkanWindowContext.h 2024-10-06 14:30:21.225939090 +0200 -+++ skia/tools/window/VulkanWindowContext.h 2024-10-06 14:31:51.352498743 +0200 +--- skia.org/tools/window/VulkanWindowContext.h 2024-10-07 10:24:45.995984589 +0200 ++++ skia/tools/window/VulkanWindowContext.h 2024-10-07 10:27:27.606123626 +0200 @@ -15,19 +15,23 @@ #include "tools/gpu/vk/VkTestUtils.h" #include "tools/window/WindowContext.h" @@ -821,8 +824,8 @@ diff -ur skia.org/tools/window/VulkanWindowContext.h skia/tools/window/VulkanWin uint32_t fImageCount; diff -ur skia.org/tools/window/win/VulkanWindowContext_win.cpp skia/tools/window/win/VulkanWindowContext_win.cpp ---- skia.org/tools/window/win/VulkanWindowContext_win.cpp 2024-10-06 14:30:21.225939090 +0200 -+++ skia/tools/window/win/VulkanWindowContext_win.cpp 2024-10-06 14:31:51.352498743 +0200 +--- skia.org/tools/window/win/VulkanWindowContext_win.cpp 2024-10-07 10:24:45.995984589 +0200 ++++ skia/tools/window/win/VulkanWindowContext_win.cpp 2024-10-07 10:27:27.607123633 +0200 @@ -25,7 +25,7 @@ return nullptr; } @@ -852,8 +855,8 @@ diff -ur skia.org/tools/window/win/VulkanWindowContext_win.cpp skia/tools/window } return ctx; diff -ur skia.org/tools/window/WindowContext.h skia/tools/window/WindowContext.h ---- skia.org/tools/window/WindowContext.h 2024-10-06 14:30:21.225939090 +0200 -+++ skia/tools/window/WindowContext.h 2024-10-06 14:31:51.352498743 +0200 +--- skia.org/tools/window/WindowContext.h 2024-10-07 10:24:45.995984589 +0200 ++++ skia/tools/window/WindowContext.h 2024-10-07 10:27:27.607123633 +0200 @@ -10,9 +10,9 @@ #include "include/core/SkRefCnt.h" #include "include/core/SkSurfaceProps.h" diff --git a/external/skia/source/skia_opts.cxx b/external/skia/source/skia_opts.cxx index 7c2dace6d5f0..4dbc2c214e01 100644 --- a/external/skia/source/skia_opts.cxx +++ b/external/skia/source/skia_opts.cxx @@ -13,6 +13,7 @@ #endif #include "src/core/SkCpu.h" #include "src/core/SkOpts.h" +#include "src/core/SkSwizzlePriv.h" #if defined __GNUC__ #pragma GCC diagnostic pop #endif |