@shopify/react-native-skia 2.6.5 → 2.6.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/android/CMakeLists.txt +1 -0
- package/android/src/paper/java/com/facebook/react/viewmanagers/SkiaWebGPUViewManagerDelegate.java +35 -0
- package/android/src/paper/java/com/facebook/react/viewmanagers/SkiaWebGPUViewManagerInterface.java +17 -0
- package/cpp/api/JsiSkCanvas.h +33 -0
- package/cpp/api/JsiSkImage.h +12 -4
- package/cpp/api/JsiSkSurface.h +5 -1
- package/cpp/rnwgpu/api/GPU.cpp +0 -3
- package/cpp/rnwgpu/api/GPUAdapter.cpp +9 -5
- package/cpp/rnwgpu/api/GPUDevice.cpp +55 -4
- package/cpp/rnwgpu/api/GPUDevice.h +6 -0
- package/cpp/rnwgpu/api/GPUShaderModule.cpp +1 -1
- package/cpp/rnwgpu/api/GPUSharedFence.cpp +80 -0
- package/cpp/rnwgpu/api/GPUSharedFence.h +53 -0
- package/cpp/rnwgpu/api/GPUSharedTextureMemory.cpp +64 -11
- package/cpp/rnwgpu/api/GPUSharedTextureMemory.h +13 -8
- package/cpp/rnwgpu/api/descriptors/GPUSharedFenceDescriptor.h +58 -0
- package/cpp/rnwgpu/api/descriptors/GPUSharedFenceState.h +51 -0
- package/cpp/skia/include/android/GrAHardwareBufferUtils.h +1 -1
- package/cpp/skia/include/android/SkAndroidFrameworkUtils.h +1 -1
- package/cpp/skia/include/android/SkAnimatedImage.h +1 -1
- package/cpp/skia/include/codec/SkCodec.h +0 -8
- package/cpp/skia/include/codec/SkEncodedOrigin.h +1 -1
- package/cpp/skia/include/codec/SkPngRustDecoder.h +1 -1
- package/cpp/skia/include/core/SkBitmap.h +2 -8
- package/cpp/skia/include/core/SkCPURecorder.h +3 -1
- package/cpp/skia/include/core/SkCanvasVirtualEnforcer.h +1 -1
- package/cpp/skia/include/core/SkColorType.h +5 -3
- package/cpp/skia/include/core/SkContourMeasure.h +1 -1
- package/cpp/skia/include/core/SkCoverageMode.h +1 -1
- package/cpp/skia/include/core/SkCubicMap.h +1 -1
- package/cpp/skia/include/core/SkExecutor.h +1 -1
- package/cpp/skia/include/core/SkFont.h +15 -0
- package/cpp/skia/include/core/SkFontArguments.h +6 -1
- package/cpp/skia/include/core/SkFontMetrics.h +1 -1
- package/cpp/skia/include/core/SkFontMgr.h +36 -1
- package/cpp/skia/include/core/SkFontParameters.h +1 -1
- package/cpp/skia/include/core/SkFontScanner.h +1 -1
- package/cpp/skia/include/core/SkFontTypes.h +1 -1
- package/cpp/skia/include/core/SkM44.h +1 -1
- package/cpp/skia/include/core/SkMilestone.h +1 -1
- package/cpp/skia/include/core/SkOpenTypeSVGDecoder.h +1 -1
- package/cpp/skia/include/core/SkPathBuilder.h +10 -4
- package/cpp/skia/include/core/SkPathIter.h +1 -1
- package/cpp/skia/include/core/SkPathTypes.h +1 -1
- package/cpp/skia/include/core/SkPixelRef.h +4 -1
- package/cpp/skia/include/core/SkRecorder.h +2 -1
- package/cpp/skia/include/core/SkRegion.h +7 -1
- package/cpp/skia/include/core/SkSamplingOptions.h +1 -1
- package/cpp/skia/include/core/SkSerialProcs.h +8 -1
- package/cpp/skia/include/core/SkShader.h +3 -5
- package/cpp/skia/include/core/SkSpan.h +1 -1
- package/cpp/skia/include/core/SkStream.h +1 -1
- package/cpp/skia/include/core/SkStrikeRef.h +80 -0
- package/cpp/skia/include/core/SkTileMode.h +1 -1
- package/cpp/skia/include/core/SkVertices.h +1 -1
- package/cpp/skia/include/core/SkYUVAPixmaps.h +3 -5
- package/cpp/skia/include/docs/SkPDFDocument.h +1 -1
- package/cpp/skia/include/docs/SkXPSDocument.h +1 -1
- package/cpp/skia/include/effects/SkGradient.h +1 -1
- package/cpp/skia/include/effects/SkHighContrastFilter.h +1 -1
- package/cpp/skia/include/effects/SkShaderMaskFilter.h +1 -1
- package/cpp/skia/include/effects/SkTrimPathEffect.h +1 -1
- package/cpp/skia/include/encode/SkEncoder.h +1 -1
- package/cpp/skia/include/encode/SkJpegEncoder.h +1 -1
- package/cpp/skia/include/encode/SkPngEncoder.h +1 -1
- package/cpp/skia/include/encode/SkPngRustEncoder.h +1 -1
- package/cpp/skia/include/encode/SkWebpEncoder.h +1 -1
- package/cpp/skia/include/gpu/GpuTypes.h +2 -0
- package/cpp/skia/include/gpu/MutableTextureState.h +1 -1
- package/cpp/skia/include/gpu/ganesh/GrBackendSemaphore.h +1 -1
- package/cpp/skia/include/gpu/ganesh/GrBackendSurface.h +6 -62
- package/cpp/skia/include/gpu/ganesh/GrContextThreadSafeProxy.h +1 -1
- package/cpp/skia/include/gpu/ganesh/GrDirectContext.h +1 -1
- package/cpp/skia/include/gpu/ganesh/GrDriverBugWorkarounds.h +1 -1
- package/cpp/skia/include/gpu/ganesh/GrRecordingContext.h +2 -1
- package/cpp/skia/include/gpu/ganesh/mock/GrMockBackendSurface.h +59 -0
- package/cpp/skia/include/gpu/ganesh/mock/GrMockTypes.h +1 -1
- package/cpp/skia/include/gpu/ganesh/mtl/GrMtlBackendContext.h +1 -1
- package/cpp/skia/include/gpu/ganesh/mtl/GrMtlTypes.h +1 -1
- package/cpp/skia/include/gpu/ganesh/vk/GrBackendDrawableInfo.h +1 -1
- package/cpp/skia/include/gpu/graphite/Context.h +11 -4
- package/cpp/skia/include/gpu/graphite/GraphiteTypes.h +6 -0
- package/cpp/skia/include/gpu/graphite/Image.h +82 -9
- package/cpp/skia/include/gpu/graphite/PrecompileContext.h +7 -2
- package/cpp/skia/include/gpu/graphite/Recorder.h +6 -4
- package/cpp/skia/include/gpu/graphite/precompile/PrecompileColorFilter.h +11 -1
- package/cpp/skia/include/gpu/graphite/precompile/PrecompileShader.h +1 -0
- package/cpp/skia/include/gpu/graphite/vk/VulkanGraphiteTypes.h +1 -1
- package/cpp/skia/include/gpu/mtl/MtlMemoryAllocator.h +1 -1
- package/cpp/skia/include/gpu/vk/VulkanExtensions.h +1 -1
- package/cpp/skia/include/gpu/vk/VulkanMemoryAllocator.h +1 -1
- package/cpp/skia/include/gpu/vk/VulkanTypes.h +1 -1
- package/cpp/skia/include/ports/SkCFObject.h +1 -1
- package/cpp/skia/include/ports/SkFontMgr_Fontations.h +1 -1
- package/cpp/skia/include/ports/SkFontMgr_android_ndk.h +1 -1
- package/cpp/skia/include/ports/SkFontMgr_data.h +1 -1
- package/cpp/skia/include/ports/SkFontMgr_fuchsia.h +1 -1
- package/cpp/skia/include/ports/SkFontMgr_mac_ct.h +1 -1
- package/cpp/skia/include/ports/SkFontScanner_Fontations.h +1 -1
- package/cpp/skia/include/ports/SkFontScanner_FreeType.h +1 -1
- package/cpp/skia/include/ports/SkTypeface_fontations.h +1 -1
- package/cpp/skia/include/private/SkExif.h +1 -1
- package/cpp/skia/include/private/SkGainmapInfo.h +1 -1
- package/cpp/skia/include/private/SkGainmapShader.h +1 -1
- package/cpp/skia/include/private/SkHdrMetadata.h +21 -0
- package/cpp/skia/include/private/SkJpegGainmapEncoder.h +1 -1
- package/cpp/skia/include/private/SkPixelStorage.h +37 -0
- package/cpp/skia/include/private/SkXmp.h +1 -1
- package/cpp/skia/include/private/base/SkAssert.h +6 -5
- package/cpp/skia/include/private/base/SkContainers.h +1 -1
- package/cpp/skia/include/private/base/SkFeatures.h +30 -30
- package/cpp/skia/include/private/base/SkLog.h +1 -7
- package/cpp/skia/include/private/base/SkLogPriority.h +4 -5
- package/cpp/skia/include/private/base/SkMacros.h +1 -1
- package/cpp/skia/include/private/base/SkMalloc.h +1 -1
- package/cpp/skia/include/private/base/SkSafe32.h +1 -1
- package/cpp/skia/include/private/base/SkSpan_impl.h +1 -1
- package/cpp/skia/include/private/base/SkTDArray.h +13 -1
- package/cpp/skia/include/private/base/SkTPin.h +1 -1
- package/cpp/skia/include/private/base/SkTo.h +1 -1
- package/cpp/skia/include/private/chromium/GrVkSecondaryCBDrawContext.h +1 -1
- package/cpp/skia/include/private/chromium/SkChromeRemoteGlyphCache.h +1 -1
- package/cpp/skia/include/private/chromium/SkCodecsICCProfileChromium.h +52 -0
- package/cpp/skia/include/private/chromium/SkExifChromium.h +26 -0
- package/cpp/skia/include/private/gpu/ganesh/GrContext_Base.h +1 -1
- package/cpp/skia/include/private/gpu/ganesh/GrImageContext.h +1 -1
- package/cpp/skia/include/private/gpu/ganesh/GrTypesPriv.h +2 -1
- package/cpp/skia/include/private/gpu/vk/SkiaVulkan.h +1 -1
- package/cpp/skia/include/sksl/SkSLDebugTrace.h +1 -1
- package/cpp/skia/include/third_party/vulkan/vulkan/vk_icd.h +41 -51
- package/cpp/skia/include/third_party/vulkan/vulkan/vk_layer.h +42 -53
- package/cpp/skia/include/third_party/vulkan/vulkan/vk_platform.h +2 -1
- package/cpp/skia/include/third_party/vulkan/vulkan/vk_video/vulkan_video_codec_av1std.h +158 -154
- package/cpp/skia/include/third_party/vulkan/vulkan/vk_video/vulkan_video_codec_av1std_decode.h +68 -65
- package/cpp/skia/include/third_party/vulkan/vulkan/vk_video/vulkan_video_codec_av1std_encode.h +90 -87
- package/cpp/skia/include/third_party/vulkan/vulkan/vk_video/vulkan_video_codec_h264std.h +9 -9
- package/cpp/skia/include/third_party/vulkan/vulkan/vk_video/vulkan_video_codec_h264std_decode.h +2 -2
- package/cpp/skia/include/third_party/vulkan/vulkan/vk_video/vulkan_video_codec_h264std_encode.h +82 -79
- package/cpp/skia/include/third_party/vulkan/vulkan/vk_video/vulkan_video_codec_h265std.h +24 -24
- package/cpp/skia/include/third_party/vulkan/vulkan/vk_video/vulkan_video_codec_h265std_decode.h +2 -2
- package/cpp/skia/include/third_party/vulkan/vulkan/vk_video/vulkan_video_codec_h265std_encode.h +95 -96
- package/cpp/skia/include/third_party/vulkan/vulkan/vk_video/vulkan_video_codec_vp9std.h +151 -0
- package/cpp/skia/include/third_party/vulkan/vulkan/vk_video/vulkan_video_codec_vp9std_decode.h +68 -0
- package/cpp/skia/include/third_party/vulkan/vulkan/vk_video/vulkan_video_codecs_common.h +1 -1
- package/cpp/skia/include/third_party/vulkan/vulkan/vulkan.h +5 -1
- package/cpp/skia/include/third_party/vulkan/vulkan/vulkan_android.h +7 -1
- package/cpp/skia/include/third_party/vulkan/vulkan/vulkan_beta.h +291 -158
- package/cpp/skia/include/third_party/vulkan/vulkan/vulkan_core.h +13174 -10113
- package/cpp/skia/include/third_party/vulkan/vulkan/vulkan_directfb.h +23 -19
- package/cpp/skia/include/third_party/vulkan/vulkan/vulkan_fuchsia.h +159 -165
- package/cpp/skia/include/third_party/vulkan/vulkan/vulkan_ggp.h +22 -19
- package/cpp/skia/include/third_party/vulkan/vulkan/vulkan_ios.h +3 -1
- package/cpp/skia/include/third_party/vulkan/vulkan/vulkan_macos.h +3 -1
- package/cpp/skia/include/third_party/vulkan/vulkan/vulkan_metal.h +94 -88
- package/cpp/skia/include/third_party/vulkan/vulkan/vulkan_ohos.h +120 -0
- package/cpp/skia/include/third_party/vulkan/vulkan/vulkan_screen.h +55 -51
- package/cpp/skia/include/third_party/vulkan/vulkan/vulkan_vi.h +18 -15
- package/cpp/skia/include/third_party/vulkan/vulkan/vulkan_wayland.h +23 -19
- package/cpp/skia/include/third_party/vulkan/vulkan/vulkan_win32.h +31 -1
- package/cpp/skia/include/third_party/vulkan/vulkan/vulkan_xcb.h +5 -1
- package/cpp/skia/include/third_party/vulkan/vulkan/vulkan_xlib.h +27 -27
- package/cpp/skia/include/third_party/vulkan/vulkan/vulkan_xlib_xrandr.h +20 -16
- package/cpp/skia/include/utils/SkEventTracer.h +6 -1
- package/cpp/skia/include/utils/SkOrderedFontMgr.h +1 -1
- package/cpp/skia/include/utils/SkShadowUtils.h +1 -1
- package/cpp/skia/include/utils/SkTextUtils.h +1 -1
- package/cpp/skia/modules/jsonreader/SkJSONReader.cpp +20 -4
- package/cpp/skia/modules/skcms/src/Transform_inl.h +11 -15
- package/cpp/skia/modules/skcms/src/skcms_public.h +2 -0
- package/cpp/skia/modules/skottie/include/ExternalLayer.h +1 -1
- package/cpp/skia/modules/skottie/include/Skottie.h +1 -1
- package/cpp/skia/modules/skottie/include/SkottieProperty.h +1 -1
- package/cpp/skia/modules/skottie/include/SlotManager.h +1 -1
- package/cpp/skia/modules/skottie/include/TextShaper.h +1 -1
- package/cpp/skia/modules/skottie/src/SkottieValue.h +1 -1
- package/cpp/skia/modules/skottie/src/animator/Animator.h +1 -1
- package/cpp/skia/modules/skottie/src/text/Font.h +1 -1
- package/cpp/skia/modules/skottie/src/text/TextAdapter.h +1 -1
- package/cpp/skia/modules/skottie/src/text/TextAnimator.h +3 -2
- package/cpp/skia/modules/skottie/src/text/TextValue.h +1 -1
- package/cpp/skia/modules/skparagraph/include/DartTypes.h +1 -1
- package/cpp/skia/modules/skparagraph/include/FontArguments.h +1 -1
- package/cpp/skia/modules/skparagraph/include/FontCollection.h +5 -1
- package/cpp/skia/modules/skparagraph/include/Metrics.h +1 -1
- package/cpp/skia/modules/skparagraph/include/Paragraph.h +1 -1
- package/cpp/skia/modules/skparagraph/include/ParagraphBuilder.h +1 -1
- package/cpp/skia/modules/skparagraph/include/ParagraphCache.h +1 -1
- package/cpp/skia/modules/skparagraph/include/ParagraphPainter.h +1 -1
- package/cpp/skia/modules/skparagraph/include/ParagraphStyle.h +12 -5
- package/cpp/skia/modules/skparagraph/include/TextShadow.h +1 -1
- package/cpp/skia/modules/skparagraph/include/TextStyle.h +1 -1
- package/cpp/skia/modules/skparagraph/include/TypefaceFontProvider.h +1 -1
- package/cpp/skia/modules/sksg/include/SkSGClipEffect.h +1 -1
- package/cpp/skia/modules/sksg/include/SkSGColorFilter.h +1 -1
- package/cpp/skia/modules/sksg/include/SkSGDraw.h +1 -1
- package/cpp/skia/modules/sksg/include/SkSGEffectNode.h +1 -1
- package/cpp/skia/modules/sksg/include/SkSGGeometryEffect.h +1 -1
- package/cpp/skia/modules/sksg/include/SkSGGeometryNode.h +1 -1
- package/cpp/skia/modules/sksg/include/SkSGGradient.h +1 -1
- package/cpp/skia/modules/sksg/include/SkSGGroup.h +1 -1
- package/cpp/skia/modules/sksg/include/SkSGImage.h +1 -1
- package/cpp/skia/modules/sksg/include/SkSGInvalidationController.h +1 -1
- package/cpp/skia/modules/sksg/include/SkSGMaskEffect.h +1 -1
- package/cpp/skia/modules/sksg/include/SkSGMerge.h +1 -1
- package/cpp/skia/modules/sksg/include/SkSGNode.h +1 -1
- package/cpp/skia/modules/sksg/include/SkSGOpacityEffect.h +1 -1
- package/cpp/skia/modules/sksg/include/SkSGPaint.h +1 -1
- package/cpp/skia/modules/sksg/include/SkSGPath.h +1 -1
- package/cpp/skia/modules/sksg/include/SkSGPlane.h +1 -1
- package/cpp/skia/modules/sksg/include/SkSGRect.h +1 -1
- package/cpp/skia/modules/sksg/include/SkSGRenderEffect.h +1 -1
- package/cpp/skia/modules/sksg/include/SkSGRenderNode.h +1 -1
- package/cpp/skia/modules/sksg/include/SkSGScene.h +1 -1
- package/cpp/skia/modules/sksg/include/SkSGText.h +1 -1
- package/cpp/skia/modules/sksg/include/SkSGTransform.h +1 -1
- package/cpp/skia/modules/skshaper/include/SkShaper_coretext.h +8 -1
- package/cpp/skia/modules/svg/include/SkSVGFe.h +1 -1
- package/cpp/skia/modules/svg/include/SkSVGFeBlend.h +1 -1
- package/cpp/skia/modules/svg/include/SkSVGFeColorMatrix.h +1 -1
- package/cpp/skia/modules/svg/include/SkSVGFeComponentTransfer.h +1 -1
- package/cpp/skia/modules/svg/include/SkSVGFeComposite.h +1 -1
- package/cpp/skia/modules/svg/include/SkSVGFeDisplacementMap.h +1 -1
- package/cpp/skia/modules/svg/include/SkSVGFeFlood.h +1 -1
- package/cpp/skia/modules/svg/include/SkSVGFeGaussianBlur.h +1 -1
- package/cpp/skia/modules/svg/include/SkSVGFeImage.h +1 -1
- package/cpp/skia/modules/svg/include/SkSVGFeLightSource.h +1 -1
- package/cpp/skia/modules/svg/include/SkSVGFeLighting.h +1 -1
- package/cpp/skia/modules/svg/include/SkSVGFeMerge.h +1 -1
- package/cpp/skia/modules/svg/include/SkSVGFeMorphology.h +1 -1
- package/cpp/skia/modules/svg/include/SkSVGFeOffset.h +1 -1
- package/cpp/skia/modules/svg/include/SkSVGFeTurbulence.h +1 -1
- package/cpp/skia/modules/svg/include/SkSVGFilter.h +1 -1
- package/cpp/skia/modules/svg/include/SkSVGFilterContext.h +1 -1
- package/cpp/skia/modules/svg/include/SkSVGGradient.h +1 -1
- package/cpp/skia/modules/svg/include/SkSVGImage.h +1 -1
- package/cpp/skia/modules/svg/include/SkSVGMask.h +1 -1
- package/cpp/skia/modules/svg/include/SkSVGOpenTypeSVGDecoder.h +1 -1
- package/cpp/skia/modules/svg/include/SkSVGPattern.h +1 -1
- package/cpp/skia/modules/svg/include/SkSVGRadialGradient.h +1 -1
- package/cpp/skia/modules/svg/include/SkSVGText.h +1 -1
- package/cpp/skia/modules/svg/include/SkSVGUse.h +1 -1
- package/cpp/skia/src/base/SkAutoLocaleSetter.h +94 -0
- package/cpp/skia/src/base/SkUTF.h +1 -1
- package/lib/commonjs/skia/types/WebGPU.d.ts +70 -5
- package/lib/commonjs/skia/types/WebGPU.js.map +1 -1
- package/lib/module/skia/types/WebGPU.d.ts +70 -5
- package/lib/module/skia/types/WebGPU.js.map +1 -1
- package/lib/typescript/src/skia/types/WebGPU.d.ts +70 -5
- package/package.json +5 -5
- package/src/skia/types/WebGPU.ts +83 -5
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
#define VULKAN_WAYLAND_H_ 1
|
|
3
3
|
|
|
4
4
|
/*
|
|
5
|
-
** Copyright 2015-
|
|
5
|
+
** Copyright 2015-2026 The Khronos Group Inc.
|
|
6
6
|
**
|
|
7
7
|
** SPDX-License-Identifier: Apache-2.0
|
|
8
8
|
*/
|
|
@@ -12,40 +12,44 @@
|
|
|
12
12
|
**
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
|
+
|
|
15
16
|
#ifdef __cplusplus
|
|
16
17
|
extern "C" {
|
|
17
18
|
#endif
|
|
18
19
|
|
|
20
|
+
|
|
21
|
+
|
|
19
22
|
// VK_KHR_wayland_surface is a preprocessor guard. Do not pass it to API calls.
|
|
20
23
|
#define VK_KHR_wayland_surface 1
|
|
21
24
|
#define VK_KHR_WAYLAND_SURFACE_SPEC_VERSION 6
|
|
22
25
|
#define VK_KHR_WAYLAND_SURFACE_EXTENSION_NAME "VK_KHR_wayland_surface"
|
|
23
26
|
typedef VkFlags VkWaylandSurfaceCreateFlagsKHR;
|
|
24
27
|
typedef struct VkWaylandSurfaceCreateInfoKHR {
|
|
25
|
-
VkStructureType
|
|
26
|
-
const void*
|
|
27
|
-
VkWaylandSurfaceCreateFlagsKHR
|
|
28
|
-
struct wl_display*
|
|
29
|
-
struct wl_surface*
|
|
28
|
+
VkStructureType sType;
|
|
29
|
+
const void* pNext;
|
|
30
|
+
VkWaylandSurfaceCreateFlagsKHR flags;
|
|
31
|
+
struct wl_display* display;
|
|
32
|
+
struct wl_surface* surface;
|
|
30
33
|
} VkWaylandSurfaceCreateInfoKHR;
|
|
31
34
|
|
|
32
|
-
typedef VkResult(VKAPI_PTR*
|
|
33
|
-
|
|
34
|
-
const VkWaylandSurfaceCreateInfoKHR* pCreateInfo,
|
|
35
|
-
const VkAllocationCallbacks* pAllocator,
|
|
36
|
-
VkSurfaceKHR* pSurface);
|
|
37
|
-
typedef VkBool32(VKAPI_PTR* PFN_vkGetPhysicalDeviceWaylandPresentationSupportKHR)(
|
|
38
|
-
VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, struct wl_display* display);
|
|
35
|
+
typedef VkResult (VKAPI_PTR *PFN_vkCreateWaylandSurfaceKHR)(VkInstance instance, const VkWaylandSurfaceCreateInfoKHR* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface);
|
|
36
|
+
typedef VkBool32 (VKAPI_PTR *PFN_vkGetPhysicalDeviceWaylandPresentationSupportKHR)(VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, struct wl_display* display);
|
|
39
37
|
|
|
40
38
|
#ifndef VK_NO_PROTOTYPES
|
|
41
|
-
|
|
42
|
-
vkCreateWaylandSurfaceKHR(
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
39
|
+
#ifndef VK_ONLY_EXPORTED_PROTOTYPES
|
|
40
|
+
VKAPI_ATTR VkResult VKAPI_CALL vkCreateWaylandSurfaceKHR(
|
|
41
|
+
VkInstance instance,
|
|
42
|
+
const VkWaylandSurfaceCreateInfoKHR* pCreateInfo,
|
|
43
|
+
const VkAllocationCallbacks* pAllocator,
|
|
44
|
+
VkSurfaceKHR* pSurface);
|
|
45
|
+
#endif
|
|
46
46
|
|
|
47
|
+
#ifndef VK_ONLY_EXPORTED_PROTOTYPES
|
|
47
48
|
VKAPI_ATTR VkBool32 VKAPI_CALL vkGetPhysicalDeviceWaylandPresentationSupportKHR(
|
|
48
|
-
|
|
49
|
+
VkPhysicalDevice physicalDevice,
|
|
50
|
+
uint32_t queueFamilyIndex,
|
|
51
|
+
struct wl_display* display);
|
|
52
|
+
#endif
|
|
49
53
|
#endif
|
|
50
54
|
|
|
51
55
|
#ifdef __cplusplus
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
#define VULKAN_WIN32_H_ 1
|
|
3
3
|
|
|
4
4
|
/*
|
|
5
|
-
** Copyright 2015-
|
|
5
|
+
** Copyright 2015-2026 The Khronos Group Inc.
|
|
6
6
|
**
|
|
7
7
|
** SPDX-License-Identifier: Apache-2.0
|
|
8
8
|
*/
|
|
@@ -36,16 +36,20 @@ typedef VkResult (VKAPI_PTR *PFN_vkCreateWin32SurfaceKHR)(VkInstance instance, c
|
|
|
36
36
|
typedef VkBool32 (VKAPI_PTR *PFN_vkGetPhysicalDeviceWin32PresentationSupportKHR)(VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex);
|
|
37
37
|
|
|
38
38
|
#ifndef VK_NO_PROTOTYPES
|
|
39
|
+
#ifndef VK_ONLY_EXPORTED_PROTOTYPES
|
|
39
40
|
VKAPI_ATTR VkResult VKAPI_CALL vkCreateWin32SurfaceKHR(
|
|
40
41
|
VkInstance instance,
|
|
41
42
|
const VkWin32SurfaceCreateInfoKHR* pCreateInfo,
|
|
42
43
|
const VkAllocationCallbacks* pAllocator,
|
|
43
44
|
VkSurfaceKHR* pSurface);
|
|
45
|
+
#endif
|
|
44
46
|
|
|
47
|
+
#ifndef VK_ONLY_EXPORTED_PROTOTYPES
|
|
45
48
|
VKAPI_ATTR VkBool32 VKAPI_CALL vkGetPhysicalDeviceWin32PresentationSupportKHR(
|
|
46
49
|
VkPhysicalDevice physicalDevice,
|
|
47
50
|
uint32_t queueFamilyIndex);
|
|
48
51
|
#endif
|
|
52
|
+
#endif
|
|
49
53
|
|
|
50
54
|
|
|
51
55
|
// VK_KHR_external_memory_win32 is a preprocessor guard. Do not pass it to API calls.
|
|
@@ -85,17 +89,21 @@ typedef VkResult (VKAPI_PTR *PFN_vkGetMemoryWin32HandleKHR)(VkDevice device, con
|
|
|
85
89
|
typedef VkResult (VKAPI_PTR *PFN_vkGetMemoryWin32HandlePropertiesKHR)(VkDevice device, VkExternalMemoryHandleTypeFlagBits handleType, HANDLE handle, VkMemoryWin32HandlePropertiesKHR* pMemoryWin32HandleProperties);
|
|
86
90
|
|
|
87
91
|
#ifndef VK_NO_PROTOTYPES
|
|
92
|
+
#ifndef VK_ONLY_EXPORTED_PROTOTYPES
|
|
88
93
|
VKAPI_ATTR VkResult VKAPI_CALL vkGetMemoryWin32HandleKHR(
|
|
89
94
|
VkDevice device,
|
|
90
95
|
const VkMemoryGetWin32HandleInfoKHR* pGetWin32HandleInfo,
|
|
91
96
|
HANDLE* pHandle);
|
|
97
|
+
#endif
|
|
92
98
|
|
|
99
|
+
#ifndef VK_ONLY_EXPORTED_PROTOTYPES
|
|
93
100
|
VKAPI_ATTR VkResult VKAPI_CALL vkGetMemoryWin32HandlePropertiesKHR(
|
|
94
101
|
VkDevice device,
|
|
95
102
|
VkExternalMemoryHandleTypeFlagBits handleType,
|
|
96
103
|
HANDLE handle,
|
|
97
104
|
VkMemoryWin32HandlePropertiesKHR* pMemoryWin32HandleProperties);
|
|
98
105
|
#endif
|
|
106
|
+
#endif
|
|
99
107
|
|
|
100
108
|
|
|
101
109
|
// VK_KHR_win32_keyed_mutex is a preprocessor guard. Do not pass it to API calls.
|
|
@@ -158,15 +166,19 @@ typedef VkResult (VKAPI_PTR *PFN_vkImportSemaphoreWin32HandleKHR)(VkDevice devic
|
|
|
158
166
|
typedef VkResult (VKAPI_PTR *PFN_vkGetSemaphoreWin32HandleKHR)(VkDevice device, const VkSemaphoreGetWin32HandleInfoKHR* pGetWin32HandleInfo, HANDLE* pHandle);
|
|
159
167
|
|
|
160
168
|
#ifndef VK_NO_PROTOTYPES
|
|
169
|
+
#ifndef VK_ONLY_EXPORTED_PROTOTYPES
|
|
161
170
|
VKAPI_ATTR VkResult VKAPI_CALL vkImportSemaphoreWin32HandleKHR(
|
|
162
171
|
VkDevice device,
|
|
163
172
|
const VkImportSemaphoreWin32HandleInfoKHR* pImportSemaphoreWin32HandleInfo);
|
|
173
|
+
#endif
|
|
164
174
|
|
|
175
|
+
#ifndef VK_ONLY_EXPORTED_PROTOTYPES
|
|
165
176
|
VKAPI_ATTR VkResult VKAPI_CALL vkGetSemaphoreWin32HandleKHR(
|
|
166
177
|
VkDevice device,
|
|
167
178
|
const VkSemaphoreGetWin32HandleInfoKHR* pGetWin32HandleInfo,
|
|
168
179
|
HANDLE* pHandle);
|
|
169
180
|
#endif
|
|
181
|
+
#endif
|
|
170
182
|
|
|
171
183
|
|
|
172
184
|
// VK_KHR_external_fence_win32 is a preprocessor guard. Do not pass it to API calls.
|
|
@@ -202,15 +214,19 @@ typedef VkResult (VKAPI_PTR *PFN_vkImportFenceWin32HandleKHR)(VkDevice device, c
|
|
|
202
214
|
typedef VkResult (VKAPI_PTR *PFN_vkGetFenceWin32HandleKHR)(VkDevice device, const VkFenceGetWin32HandleInfoKHR* pGetWin32HandleInfo, HANDLE* pHandle);
|
|
203
215
|
|
|
204
216
|
#ifndef VK_NO_PROTOTYPES
|
|
217
|
+
#ifndef VK_ONLY_EXPORTED_PROTOTYPES
|
|
205
218
|
VKAPI_ATTR VkResult VKAPI_CALL vkImportFenceWin32HandleKHR(
|
|
206
219
|
VkDevice device,
|
|
207
220
|
const VkImportFenceWin32HandleInfoKHR* pImportFenceWin32HandleInfo);
|
|
221
|
+
#endif
|
|
208
222
|
|
|
223
|
+
#ifndef VK_ONLY_EXPORTED_PROTOTYPES
|
|
209
224
|
VKAPI_ATTR VkResult VKAPI_CALL vkGetFenceWin32HandleKHR(
|
|
210
225
|
VkDevice device,
|
|
211
226
|
const VkFenceGetWin32HandleInfoKHR* pGetWin32HandleInfo,
|
|
212
227
|
HANDLE* pHandle);
|
|
213
228
|
#endif
|
|
229
|
+
#endif
|
|
214
230
|
|
|
215
231
|
|
|
216
232
|
// VK_NV_external_memory_win32 is a preprocessor guard. Do not pass it to API calls.
|
|
@@ -234,12 +250,14 @@ typedef struct VkExportMemoryWin32HandleInfoNV {
|
|
|
234
250
|
typedef VkResult (VKAPI_PTR *PFN_vkGetMemoryWin32HandleNV)(VkDevice device, VkDeviceMemory memory, VkExternalMemoryHandleTypeFlagsNV handleType, HANDLE* pHandle);
|
|
235
251
|
|
|
236
252
|
#ifndef VK_NO_PROTOTYPES
|
|
253
|
+
#ifndef VK_ONLY_EXPORTED_PROTOTYPES
|
|
237
254
|
VKAPI_ATTR VkResult VKAPI_CALL vkGetMemoryWin32HandleNV(
|
|
238
255
|
VkDevice device,
|
|
239
256
|
VkDeviceMemory memory,
|
|
240
257
|
VkExternalMemoryHandleTypeFlagsNV handleType,
|
|
241
258
|
HANDLE* pHandle);
|
|
242
259
|
#endif
|
|
260
|
+
#endif
|
|
243
261
|
|
|
244
262
|
|
|
245
263
|
// VK_NV_win32_keyed_mutex is a preprocessor guard. Do not pass it to API calls.
|
|
@@ -296,25 +314,33 @@ typedef VkResult (VKAPI_PTR *PFN_vkReleaseFullScreenExclusiveModeEXT)(VkDevice d
|
|
|
296
314
|
typedef VkResult (VKAPI_PTR *PFN_vkGetDeviceGroupSurfacePresentModes2EXT)(VkDevice device, const VkPhysicalDeviceSurfaceInfo2KHR* pSurfaceInfo, VkDeviceGroupPresentModeFlagsKHR* pModes);
|
|
297
315
|
|
|
298
316
|
#ifndef VK_NO_PROTOTYPES
|
|
317
|
+
#ifndef VK_ONLY_EXPORTED_PROTOTYPES
|
|
299
318
|
VKAPI_ATTR VkResult VKAPI_CALL vkGetPhysicalDeviceSurfacePresentModes2EXT(
|
|
300
319
|
VkPhysicalDevice physicalDevice,
|
|
301
320
|
const VkPhysicalDeviceSurfaceInfo2KHR* pSurfaceInfo,
|
|
302
321
|
uint32_t* pPresentModeCount,
|
|
303
322
|
VkPresentModeKHR* pPresentModes);
|
|
323
|
+
#endif
|
|
304
324
|
|
|
325
|
+
#ifndef VK_ONLY_EXPORTED_PROTOTYPES
|
|
305
326
|
VKAPI_ATTR VkResult VKAPI_CALL vkAcquireFullScreenExclusiveModeEXT(
|
|
306
327
|
VkDevice device,
|
|
307
328
|
VkSwapchainKHR swapchain);
|
|
329
|
+
#endif
|
|
308
330
|
|
|
331
|
+
#ifndef VK_ONLY_EXPORTED_PROTOTYPES
|
|
309
332
|
VKAPI_ATTR VkResult VKAPI_CALL vkReleaseFullScreenExclusiveModeEXT(
|
|
310
333
|
VkDevice device,
|
|
311
334
|
VkSwapchainKHR swapchain);
|
|
335
|
+
#endif
|
|
312
336
|
|
|
337
|
+
#ifndef VK_ONLY_EXPORTED_PROTOTYPES
|
|
313
338
|
VKAPI_ATTR VkResult VKAPI_CALL vkGetDeviceGroupSurfacePresentModes2EXT(
|
|
314
339
|
VkDevice device,
|
|
315
340
|
const VkPhysicalDeviceSurfaceInfo2KHR* pSurfaceInfo,
|
|
316
341
|
VkDeviceGroupPresentModeFlagsKHR* pModes);
|
|
317
342
|
#endif
|
|
343
|
+
#endif
|
|
318
344
|
|
|
319
345
|
|
|
320
346
|
// VK_NV_acquire_winrt_display is a preprocessor guard. Do not pass it to API calls.
|
|
@@ -325,15 +351,19 @@ typedef VkResult (VKAPI_PTR *PFN_vkAcquireWinrtDisplayNV)(VkPhysicalDevice physi
|
|
|
325
351
|
typedef VkResult (VKAPI_PTR *PFN_vkGetWinrtDisplayNV)(VkPhysicalDevice physicalDevice, uint32_t deviceRelativeId, VkDisplayKHR* pDisplay);
|
|
326
352
|
|
|
327
353
|
#ifndef VK_NO_PROTOTYPES
|
|
354
|
+
#ifndef VK_ONLY_EXPORTED_PROTOTYPES
|
|
328
355
|
VKAPI_ATTR VkResult VKAPI_CALL vkAcquireWinrtDisplayNV(
|
|
329
356
|
VkPhysicalDevice physicalDevice,
|
|
330
357
|
VkDisplayKHR display);
|
|
358
|
+
#endif
|
|
331
359
|
|
|
360
|
+
#ifndef VK_ONLY_EXPORTED_PROTOTYPES
|
|
332
361
|
VKAPI_ATTR VkResult VKAPI_CALL vkGetWinrtDisplayNV(
|
|
333
362
|
VkPhysicalDevice physicalDevice,
|
|
334
363
|
uint32_t deviceRelativeId,
|
|
335
364
|
VkDisplayKHR* pDisplay);
|
|
336
365
|
#endif
|
|
366
|
+
#endif
|
|
337
367
|
|
|
338
368
|
#ifdef __cplusplus
|
|
339
369
|
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
#define VULKAN_XCB_H_ 1
|
|
3
3
|
|
|
4
4
|
/*
|
|
5
|
-
** Copyright 2015-
|
|
5
|
+
** Copyright 2015-2026 The Khronos Group Inc.
|
|
6
6
|
**
|
|
7
7
|
** SPDX-License-Identifier: Apache-2.0
|
|
8
8
|
*/
|
|
@@ -36,18 +36,22 @@ typedef VkResult (VKAPI_PTR *PFN_vkCreateXcbSurfaceKHR)(VkInstance instance, con
|
|
|
36
36
|
typedef VkBool32 (VKAPI_PTR *PFN_vkGetPhysicalDeviceXcbPresentationSupportKHR)(VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, xcb_connection_t* connection, xcb_visualid_t visual_id);
|
|
37
37
|
|
|
38
38
|
#ifndef VK_NO_PROTOTYPES
|
|
39
|
+
#ifndef VK_ONLY_EXPORTED_PROTOTYPES
|
|
39
40
|
VKAPI_ATTR VkResult VKAPI_CALL vkCreateXcbSurfaceKHR(
|
|
40
41
|
VkInstance instance,
|
|
41
42
|
const VkXcbSurfaceCreateInfoKHR* pCreateInfo,
|
|
42
43
|
const VkAllocationCallbacks* pAllocator,
|
|
43
44
|
VkSurfaceKHR* pSurface);
|
|
45
|
+
#endif
|
|
44
46
|
|
|
47
|
+
#ifndef VK_ONLY_EXPORTED_PROTOTYPES
|
|
45
48
|
VKAPI_ATTR VkBool32 VKAPI_CALL vkGetPhysicalDeviceXcbPresentationSupportKHR(
|
|
46
49
|
VkPhysicalDevice physicalDevice,
|
|
47
50
|
uint32_t queueFamilyIndex,
|
|
48
51
|
xcb_connection_t* connection,
|
|
49
52
|
xcb_visualid_t visual_id);
|
|
50
53
|
#endif
|
|
54
|
+
#endif
|
|
51
55
|
|
|
52
56
|
#ifdef __cplusplus
|
|
53
57
|
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
#define VULKAN_XLIB_H_ 1
|
|
3
3
|
|
|
4
4
|
/*
|
|
5
|
-
** Copyright 2015-
|
|
5
|
+
** Copyright 2015-2026 The Khronos Group Inc.
|
|
6
6
|
**
|
|
7
7
|
** SPDX-License-Identifier: Apache-2.0
|
|
8
8
|
*/
|
|
@@ -12,45 +12,45 @@
|
|
|
12
12
|
**
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
|
+
|
|
15
16
|
#ifdef __cplusplus
|
|
16
17
|
extern "C" {
|
|
17
18
|
#endif
|
|
18
19
|
|
|
20
|
+
|
|
21
|
+
|
|
19
22
|
// VK_KHR_xlib_surface is a preprocessor guard. Do not pass it to API calls.
|
|
20
23
|
#define VK_KHR_xlib_surface 1
|
|
21
|
-
#define VK_KHR_XLIB_SURFACE_SPEC_VERSION
|
|
24
|
+
#define VK_KHR_XLIB_SURFACE_SPEC_VERSION 6
|
|
22
25
|
#define VK_KHR_XLIB_SURFACE_EXTENSION_NAME "VK_KHR_xlib_surface"
|
|
23
26
|
typedef VkFlags VkXlibSurfaceCreateFlagsKHR;
|
|
24
27
|
typedef struct VkXlibSurfaceCreateInfoKHR {
|
|
25
|
-
VkStructureType
|
|
26
|
-
const void*
|
|
27
|
-
VkXlibSurfaceCreateFlagsKHR
|
|
28
|
-
Display*
|
|
29
|
-
Window
|
|
28
|
+
VkStructureType sType;
|
|
29
|
+
const void* pNext;
|
|
30
|
+
VkXlibSurfaceCreateFlagsKHR flags;
|
|
31
|
+
Display* dpy;
|
|
32
|
+
Window window;
|
|
30
33
|
} VkXlibSurfaceCreateInfoKHR;
|
|
31
34
|
|
|
32
|
-
typedef VkResult(VKAPI_PTR*
|
|
33
|
-
|
|
34
|
-
const VkXlibSurfaceCreateInfoKHR* pCreateInfo,
|
|
35
|
-
const VkAllocationCallbacks* pAllocator,
|
|
36
|
-
VkSurfaceKHR* pSurface);
|
|
37
|
-
typedef VkBool32(VKAPI_PTR* PFN_vkGetPhysicalDeviceXlibPresentationSupportKHR)(
|
|
38
|
-
VkPhysicalDevice physicalDevice,
|
|
39
|
-
uint32_t queueFamilyIndex,
|
|
40
|
-
Display* dpy,
|
|
41
|
-
VisualID visualID);
|
|
35
|
+
typedef VkResult (VKAPI_PTR *PFN_vkCreateXlibSurfaceKHR)(VkInstance instance, const VkXlibSurfaceCreateInfoKHR* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface);
|
|
36
|
+
typedef VkBool32 (VKAPI_PTR *PFN_vkGetPhysicalDeviceXlibPresentationSupportKHR)(VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, Display* dpy, VisualID visualID);
|
|
42
37
|
|
|
43
38
|
#ifndef VK_NO_PROTOTYPES
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
39
|
+
#ifndef VK_ONLY_EXPORTED_PROTOTYPES
|
|
40
|
+
VKAPI_ATTR VkResult VKAPI_CALL vkCreateXlibSurfaceKHR(
|
|
41
|
+
VkInstance instance,
|
|
42
|
+
const VkXlibSurfaceCreateInfoKHR* pCreateInfo,
|
|
43
|
+
const VkAllocationCallbacks* pAllocator,
|
|
44
|
+
VkSurfaceKHR* pSurface);
|
|
45
|
+
#endif
|
|
46
|
+
|
|
47
|
+
#ifndef VK_ONLY_EXPORTED_PROTOTYPES
|
|
48
|
+
VKAPI_ATTR VkBool32 VKAPI_CALL vkGetPhysicalDeviceXlibPresentationSupportKHR(
|
|
49
|
+
VkPhysicalDevice physicalDevice,
|
|
50
|
+
uint32_t queueFamilyIndex,
|
|
51
|
+
Display* dpy,
|
|
52
|
+
VisualID visualID);
|
|
53
|
+
#endif
|
|
54
54
|
#endif
|
|
55
55
|
|
|
56
56
|
#ifdef __cplusplus
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
#define VULKAN_XLIB_XRANDR_H_ 1
|
|
3
3
|
|
|
4
4
|
/*
|
|
5
|
-
** Copyright 2015-
|
|
5
|
+
** Copyright 2015-2026 The Khronos Group Inc.
|
|
6
6
|
**
|
|
7
7
|
** SPDX-License-Identifier: Apache-2.0
|
|
8
8
|
*/
|
|
@@ -12,31 +12,35 @@
|
|
|
12
12
|
**
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
|
+
|
|
15
16
|
#ifdef __cplusplus
|
|
16
17
|
extern "C" {
|
|
17
18
|
#endif
|
|
18
19
|
|
|
20
|
+
|
|
21
|
+
|
|
19
22
|
// VK_EXT_acquire_xlib_display is a preprocessor guard. Do not pass it to API calls.
|
|
20
23
|
#define VK_EXT_acquire_xlib_display 1
|
|
21
24
|
#define VK_EXT_ACQUIRE_XLIB_DISPLAY_SPEC_VERSION 1
|
|
22
25
|
#define VK_EXT_ACQUIRE_XLIB_DISPLAY_EXTENSION_NAME "VK_EXT_acquire_xlib_display"
|
|
23
|
-
typedef VkResult(VKAPI_PTR*
|
|
24
|
-
|
|
25
|
-
VkDisplayKHR display);
|
|
26
|
-
typedef VkResult(VKAPI_PTR* PFN_vkGetRandROutputDisplayEXT)(VkPhysicalDevice physicalDevice,
|
|
27
|
-
Display* dpy,
|
|
28
|
-
RROutput rrOutput,
|
|
29
|
-
VkDisplayKHR* pDisplay);
|
|
26
|
+
typedef VkResult (VKAPI_PTR *PFN_vkAcquireXlibDisplayEXT)(VkPhysicalDevice physicalDevice, Display* dpy, VkDisplayKHR display);
|
|
27
|
+
typedef VkResult (VKAPI_PTR *PFN_vkGetRandROutputDisplayEXT)(VkPhysicalDevice physicalDevice, Display* dpy, RROutput rrOutput, VkDisplayKHR* pDisplay);
|
|
30
28
|
|
|
31
29
|
#ifndef VK_NO_PROTOTYPES
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
30
|
+
#ifndef VK_ONLY_EXPORTED_PROTOTYPES
|
|
31
|
+
VKAPI_ATTR VkResult VKAPI_CALL vkAcquireXlibDisplayEXT(
|
|
32
|
+
VkPhysicalDevice physicalDevice,
|
|
33
|
+
Display* dpy,
|
|
34
|
+
VkDisplayKHR display);
|
|
35
|
+
#endif
|
|
36
|
+
|
|
37
|
+
#ifndef VK_ONLY_EXPORTED_PROTOTYPES
|
|
38
|
+
VKAPI_ATTR VkResult VKAPI_CALL vkGetRandROutputDisplayEXT(
|
|
39
|
+
VkPhysicalDevice physicalDevice,
|
|
40
|
+
Display* dpy,
|
|
41
|
+
RROutput rrOutput,
|
|
42
|
+
VkDisplayKHR* pDisplay);
|
|
43
|
+
#endif
|
|
40
44
|
#endif
|
|
41
45
|
|
|
42
46
|
#ifdef __cplusplus
|
|
@@ -32,7 +32,8 @@ public:
|
|
|
32
32
|
*
|
|
33
33
|
* On failure, the tracer is deleted; on success the tracer will be held until process exit, and
|
|
34
34
|
* will not have its destructor run. This avoids race conditions when using Skia from multiple
|
|
35
|
-
* threads in the midst of application teardown.
|
|
35
|
+
* threads in the midst of application teardown. However, subclasses can override `onExit()` to
|
|
36
|
+
* perform operations at exit, such as flushing to disk.
|
|
36
37
|
*/
|
|
37
38
|
static bool SetInstance(SkEventTracer*);
|
|
38
39
|
|
|
@@ -83,6 +84,10 @@ protected:
|
|
|
83
84
|
SkEventTracer() = default;
|
|
84
85
|
SkEventTracer(const SkEventTracer&) = delete;
|
|
85
86
|
SkEventTracer& operator=(const SkEventTracer&) = delete;
|
|
87
|
+
|
|
88
|
+
// Called inside an atexit() callback. Must be threadsafe as other threads could still be
|
|
89
|
+
// attempting to add trace events.
|
|
90
|
+
virtual void onExit() {}
|
|
86
91
|
};
|
|
87
92
|
|
|
88
93
|
#endif // SkEventTracer_DEFINED
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Copyright 2018 Google
|
|
2
|
+
* Copyright 2018 Google LLC
|
|
3
3
|
*
|
|
4
4
|
* Use of this source code is governed by a BSD-style license that can be
|
|
5
5
|
* found in the LICENSE file.
|
|
@@ -16,8 +16,10 @@
|
|
|
16
16
|
#include "include/private/base/SkTo.h"
|
|
17
17
|
#include "include/utils/SkParse.h"
|
|
18
18
|
#include "src/base/SkArenaAlloc.h"
|
|
19
|
+
#include "src/base/SkAutoLocaleSetter.h"
|
|
19
20
|
#include "src/base/SkUTF.h"
|
|
20
21
|
|
|
22
|
+
#include <charconv>
|
|
21
23
|
#include <cmath>
|
|
22
24
|
#include <cstdint>
|
|
23
25
|
#include <cstdlib>
|
|
@@ -334,6 +336,11 @@ public:
|
|
|
334
336
|
return this->error(NullValue(), p, "invalid empty input");
|
|
335
337
|
}
|
|
336
338
|
|
|
339
|
+
#if !defined(__cpp_lib_to_chars)
|
|
340
|
+
// Setting locale with dot decimal separator
|
|
341
|
+
SkAutoLocaleSetter locale("C");
|
|
342
|
+
#endif // !defined(__cpp_lib_to_chars)
|
|
343
|
+
|
|
337
344
|
const char* p_stop = p + size - 1;
|
|
338
345
|
|
|
339
346
|
// We're only checking for end-of-stream on object/array close('}',']'),
|
|
@@ -406,7 +413,7 @@ public:
|
|
|
406
413
|
case '{':
|
|
407
414
|
goto match_object;
|
|
408
415
|
default:
|
|
409
|
-
p = this->matchNumber(p);
|
|
416
|
+
p = this->matchNumber(p, p_stop);
|
|
410
417
|
break;
|
|
411
418
|
}
|
|
412
419
|
|
|
@@ -861,16 +868,25 @@ private:
|
|
|
861
868
|
return this->matchFastFloatPart(p, sign, n32);
|
|
862
869
|
}
|
|
863
870
|
|
|
864
|
-
const char* matchNumber(const char* p) {
|
|
871
|
+
const char* matchNumber(const char* p, const char* p_stop) {
|
|
865
872
|
if (const auto* fast = this->matchFast32OrFloat(p)) return fast;
|
|
866
873
|
|
|
867
874
|
// slow fallback
|
|
875
|
+
float f;
|
|
876
|
+
#if defined(__cpp_lib_to_chars)
|
|
877
|
+
auto result = std::from_chars(p, p_stop + 1, f);
|
|
878
|
+
if (result.ec == std::errc{}) {
|
|
879
|
+
this->pushFloat(f);
|
|
880
|
+
return result.ptr;
|
|
881
|
+
}
|
|
882
|
+
#else
|
|
868
883
|
char* matched;
|
|
869
|
-
|
|
884
|
+
f = strtof(p, &matched);
|
|
870
885
|
if (matched > p) {
|
|
871
886
|
this->pushFloat(f);
|
|
872
887
|
return matched;
|
|
873
888
|
}
|
|
889
|
+
#endif // defined(__cpp_lib_to_chars)
|
|
874
890
|
return this->error(nullptr, p, "invalid numeric token");
|
|
875
891
|
}
|
|
876
892
|
};
|
|
@@ -493,16 +493,12 @@ SI U32 gather_32(const uint8_t* p, I32 ix) {
|
|
|
493
493
|
}
|
|
494
494
|
|
|
495
495
|
SI U32 gather_24(const uint8_t* p, I32 ix) {
|
|
496
|
-
// First, back up a byte. Any place we're gathering from has a safe junk byte to read
|
|
497
|
-
// in front of it, either a previous table value, or some tag metadata.
|
|
498
|
-
p -= 1;
|
|
499
|
-
|
|
500
496
|
// Load the i'th 24-bit value from p, and 1 extra byte.
|
|
501
497
|
auto load_24_32 = [p](int i) {
|
|
502
498
|
return load<uint32_t>(p + 3*i);
|
|
503
499
|
};
|
|
504
500
|
|
|
505
|
-
// Now load multiples of 4 bytes (a junk byte
|
|
501
|
+
// Now load multiples of 4 bytes (r,g,b, then a junk byte).
|
|
506
502
|
#if N == 1
|
|
507
503
|
U32 v = load_24_32(ix);
|
|
508
504
|
#elif N == 4
|
|
@@ -530,15 +526,12 @@ SI U32 gather_24(const uint8_t* p, I32 ix) {
|
|
|
530
526
|
U32 v = (U32)_mm512_i32gather_epi32((__m512i)(3*ix), p4, 1);
|
|
531
527
|
#endif
|
|
532
528
|
|
|
533
|
-
//
|
|
534
|
-
return v
|
|
529
|
+
// Mask off the junk byte, leaving r,g,b in low 24 bits.
|
|
530
|
+
return v & 0x00FFFFFF;
|
|
535
531
|
}
|
|
536
532
|
|
|
537
533
|
#if !defined(__arm__)
|
|
538
534
|
SI void gather_48(const uint8_t* p, I32 ix, U64* v) {
|
|
539
|
-
// As in gather_24(), with everything doubled.
|
|
540
|
-
p -= 2;
|
|
541
|
-
|
|
542
535
|
// Load the i'th 48-bit value from p, and 2 extra bytes.
|
|
543
536
|
auto load_48_64 = [p](int i) {
|
|
544
537
|
return load<uint64_t>(p + 6*i);
|
|
@@ -589,7 +582,7 @@ SI U32 gather_24(const uint8_t* p, I32 ix) {
|
|
|
589
582
|
store((char*)v + 64, hi);
|
|
590
583
|
#endif
|
|
591
584
|
|
|
592
|
-
*v
|
|
585
|
+
*v &= 0x0000FFFFFFFFFFFFULL;
|
|
593
586
|
}
|
|
594
587
|
#endif
|
|
595
588
|
|
|
@@ -687,19 +680,22 @@ static void clut(uint32_t input_channels, uint32_t output_channels,
|
|
|
687
680
|
F* r, F* g, F* b, F* a) {
|
|
688
681
|
|
|
689
682
|
const int dim = (int)input_channels;
|
|
690
|
-
|
|
683
|
+
if (dim <= 0 || dim > 4) {
|
|
684
|
+
return;
|
|
685
|
+
}
|
|
691
686
|
assert (output_channels == 3 ||
|
|
692
687
|
output_channels == 4);
|
|
693
688
|
|
|
694
689
|
// For each of these arrays, think foo[2*dim], but we use foo[8] since we know dim <= 4.
|
|
695
|
-
I32 index [8]; // Index contribution by dimension, first low from 0, then high from 4.
|
|
696
|
-
F weight[8]; // Weight for each contribution, again first low, then high.
|
|
690
|
+
I32 index [8] = {0,0,0,0, 0,0,0,0}; // Index contribution by dimension, first low from 0, then high from 4.
|
|
691
|
+
F weight[8] = {F0,F0,F0,F0, F0,F0,F0,F0}; // Weight for each contribution, again first low, then high.
|
|
697
692
|
|
|
698
693
|
// O(dim) work first: calculate index,weight from r,g,b,a.
|
|
699
694
|
const F inputs[] = { *r,*g,*b,*a };
|
|
700
695
|
for (int i = dim-1, stride = 1; i >= 0; i--) {
|
|
701
696
|
// x is where we logically want to sample the grid in the i-th dimension.
|
|
702
|
-
|
|
697
|
+
// We MUST clamp to [0,1] here to avoid negative indices.
|
|
698
|
+
F x = max_(F0, min_(inputs[i], F1)) * (float)(grid_points[i] - 1);
|
|
703
699
|
|
|
704
700
|
// But we can't index at floats. lo and hi are the two integer grid points surrounding x.
|
|
705
701
|
I32 lo = cast<I32>( x ), // i.e. trunc(x) == floor(x) here.
|
|
@@ -296,6 +296,8 @@ SKCMS_API bool skcms_TRCs_AreApproximateInverse(const skcms_ICCProfile* profile,
|
|
|
296
296
|
// Parse an ICC profile and return true if possible, otherwise return false.
|
|
297
297
|
// Selects an A2B profile (if present) according to priority list (each entry 0-2).
|
|
298
298
|
// The buffer is not copied; it must remain valid as long as the skcms_ICCProfile will be used.
|
|
299
|
+
// The parse will fail if there is not enough padding (typically 1-2 bytes) past the end of the
|
|
300
|
+
// profile for internally optimized read calls.
|
|
299
301
|
SKCMS_API bool skcms_ParseWithA2BPriority(const void*, size_t,
|
|
300
302
|
const int priority[], int priorities,
|
|
301
303
|
skcms_ICCProfile*);
|