@shopify/react-native-skia 0.1.234 → 0.1.237
Sign up to get free protection for your applications and to get access to all the features.
- package/cpp/api/JsiSkApi.h +2 -0
- package/cpp/api/JsiSkCanvas.h +36 -0
- package/cpp/api/JsiSkRSXform.h +35 -7
- package/cpp/api/JsiSkTypefaceFactory.h +2 -1
- package/cpp/rnskia/dom/JsiDomApi.h +2 -0
- package/cpp/rnskia/dom/nodes/JsiAtlasNode.h +60 -0
- package/cpp/rnskia/dom/props/RSXformProp.h +52 -0
- package/cpp/rnskia/dom/props/RectProp.h +31 -0
- package/cpp/skia/include/android/AHardwareBufferUtils.h +23 -0
- package/cpp/skia/include/android/GrAHardwareBufferUtils.h +2 -0
- package/cpp/skia/include/android/graphite/SurfaceAndroid.h +59 -0
- package/cpp/skia/include/codec/SkAvifDecoder.h +1 -1
- package/cpp/skia/include/codec/SkBmpDecoder.h +1 -1
- package/cpp/skia/include/codec/SkCodec.h +21 -3
- package/cpp/skia/include/codec/SkGifDecoder.h +1 -1
- package/cpp/skia/include/codec/SkIcoDecoder.h +1 -1
- package/cpp/skia/include/codec/SkJpegDecoder.h +1 -1
- package/cpp/skia/include/codec/SkJpegxlDecoder.h +1 -1
- package/cpp/skia/include/codec/SkPngDecoder.h +1 -1
- package/cpp/skia/include/codec/SkRawDecoder.h +1 -1
- package/cpp/skia/include/codec/SkWbmpDecoder.h +1 -1
- package/cpp/skia/include/codec/SkWebpDecoder.h +1 -1
- package/cpp/skia/include/config/SkUserConfig.h +3 -1
- package/cpp/skia/include/core/SkCanvas.h +66 -37
- package/cpp/skia/include/core/SkColorFilter.h +5 -2
- package/cpp/skia/include/core/SkContourMeasure.h +1 -0
- package/cpp/skia/include/core/SkDocument.h +1 -0
- package/cpp/skia/include/core/SkFont.h +14 -24
- package/cpp/skia/include/core/SkFontArguments.h +1 -1
- package/cpp/skia/include/core/SkFontMetrics.h +1 -1
- package/cpp/skia/include/core/SkFontMgr.h +0 -7
- package/cpp/skia/include/core/SkGraphics.h +13 -0
- package/cpp/skia/include/core/SkMesh.h +9 -13
- package/cpp/skia/include/core/SkMilestone.h +1 -1
- package/cpp/skia/include/core/SkPathMeasure.h +2 -0
- package/cpp/skia/include/core/SkSerialProcs.h +29 -11
- package/cpp/skia/include/core/SkSize.h +3 -3
- package/cpp/skia/include/core/SkStream.h +3 -13
- package/cpp/skia/include/core/SkSurface.h +6 -3
- package/cpp/skia/include/core/SkSurfaceProps.h +2 -4
- package/cpp/skia/include/core/SkTraceMemoryDump.h +15 -0
- package/cpp/skia/include/core/SkTypeface.h +8 -56
- package/cpp/skia/include/core/SkTypes.h +8 -0
- package/cpp/skia/include/core/SkVertices.h +1 -1
- package/cpp/skia/include/docs/SkMultiPictureDocument.h +53 -0
- package/cpp/skia/include/docs/SkPDFDocument.h +11 -0
- package/cpp/skia/include/effects/SkGradientShader.h +9 -0
- package/cpp/skia/include/effects/SkRuntimeEffect.h +3 -7
- package/cpp/skia/include/gpu/GrBackendSemaphore.h +33 -47
- package/cpp/skia/include/gpu/GrBackendSurface.h +2 -3
- package/cpp/skia/include/gpu/GrContextOptions.h +0 -6
- package/cpp/skia/include/gpu/GrContextThreadSafeProxy.h +44 -28
- package/cpp/skia/include/gpu/GrDirectContext.h +12 -31
- package/cpp/skia/include/gpu/GrTypes.h +1 -16
- package/cpp/skia/include/gpu/MutableTextureState.h +35 -80
- package/cpp/skia/include/gpu/ShaderErrorHandler.h +11 -1
- package/cpp/skia/include/gpu/ganesh/SkImageGanesh.h +2 -2
- package/cpp/skia/include/gpu/ganesh/SkSurfaceGanesh.h +1 -1
- package/cpp/skia/include/gpu/ganesh/gl/GrGLDirectContext.h +3 -2
- package/cpp/skia/include/gpu/ganesh/vk/GrVkBackendSemaphore.h +20 -0
- package/cpp/skia/include/gpu/ganesh/vk/GrVkDirectContext.h +30 -0
- package/cpp/skia/include/gpu/gl/GrGLFunctions.h +1 -1
- package/cpp/skia/include/gpu/gl/GrGLInterface.h +2 -0
- package/cpp/skia/include/gpu/gl/glx/GrGLMakeGLXInterface.h +6 -0
- package/cpp/skia/include/gpu/graphite/BackendSemaphore.h +3 -3
- package/cpp/skia/include/gpu/graphite/BackendTexture.h +39 -27
- package/cpp/skia/include/gpu/graphite/Context.h +39 -13
- package/cpp/skia/include/gpu/graphite/ContextOptions.h +2 -0
- package/cpp/skia/include/gpu/graphite/GraphiteTypes.h +2 -1
- package/cpp/skia/include/gpu/graphite/Image.h +106 -87
- package/cpp/skia/include/gpu/graphite/Recorder.h +24 -3
- package/cpp/skia/include/gpu/graphite/Surface.h +7 -2
- package/cpp/skia/include/gpu/graphite/dawn/DawnBackendContext.h +41 -2
- package/cpp/skia/include/gpu/graphite/dawn/DawnTypes.h +11 -6
- package/cpp/skia/include/gpu/graphite/mtl/MtlGraphiteTypes.h +1 -2
- package/cpp/skia/include/gpu/graphite/vk/VulkanGraphiteTypes.h +6 -6
- package/cpp/skia/include/gpu/mock/GrMockTypes.h +1 -0
- package/cpp/skia/include/gpu/vk/GrVkBackendContext.h +1 -1
- package/cpp/skia/include/gpu/vk/GrVkTypes.h +1 -44
- package/cpp/skia/include/gpu/vk/VulkanExtensions.h +1 -1
- package/cpp/skia/include/gpu/vk/VulkanMutableTextureState.h +25 -0
- package/cpp/skia/include/gpu/vk/VulkanTypes.h +44 -0
- package/cpp/skia/include/ports/SkFontConfigInterface.h +3 -6
- package/cpp/skia/include/private/SkEncodedInfo.h +5 -0
- package/cpp/skia/include/private/SkExif.h +102 -0
- package/cpp/skia/include/private/SkGainmapInfo.h +11 -1
- package/cpp/skia/include/private/base/SkAssert.h +16 -0
- package/cpp/skia/include/private/base/SkDeque.h +2 -7
- package/cpp/skia/include/private/base/SkLoadUserConfig.h +1 -1
- package/cpp/skia/include/private/base/SkTArray.h +69 -28
- package/cpp/skia/include/private/base/SkThreadAnnotations.h +18 -5
- package/cpp/skia/include/private/chromium/GrSurfaceCharacterization.h +26 -30
- package/cpp/skia/include/private/chromium/GrVkSecondaryCBDrawContext.h +4 -3
- package/cpp/skia/include/private/chromium/SkImageChromium.h +1 -1
- package/cpp/skia/include/private/gpu/ganesh/GrTypesPriv.h +8 -6
- package/cpp/skia/include/private/gpu/graphite/ContextOptionsPriv.h +29 -0
- package/cpp/skia/include/private/gpu/graphite/DawnTypesPriv.h +12 -9
- package/cpp/skia/include/private/gpu/graphite/VulkanGraphiteTypesPriv.h +16 -11
- package/cpp/skia/include/third_party/vulkan/vulkan/vk_platform.h +2 -2
- package/cpp/skia/include/third_party/vulkan/vulkan/vk_video/vulkan_video_codec_h264std.h +312 -0
- package/cpp/skia/include/third_party/vulkan/vulkan/vk_video/vulkan_video_codec_h264std_decode.h +77 -0
- package/cpp/skia/include/third_party/vulkan/vulkan/vk_video/vulkan_video_codec_h265std.h +446 -0
- package/cpp/skia/include/third_party/vulkan/vulkan/vk_video/vulkan_video_codec_h265std_decode.h +67 -0
- package/cpp/skia/include/third_party/vulkan/vulkan/vk_video/vulkan_video_codecs_common.h +36 -0
- package/cpp/skia/include/third_party/vulkan/vulkan/vulkan.h +9 -2
- package/cpp/skia/include/third_party/vulkan/vulkan/vulkan_android.h +31 -3
- package/cpp/skia/include/third_party/vulkan/vulkan/vulkan_core.h +10624 -5716
- package/cpp/skia/include/third_party/vulkan/vulkan/vulkan_ios.h +2 -1
- package/cpp/skia/include/third_party/vulkan/vulkan/vulkan_macos.h +2 -1
- package/cpp/skia/include/third_party/vulkan/vulkan/vulkan_win32.h +28 -1
- package/cpp/skia/include/third_party/vulkan/vulkan/vulkan_xcb.h +2 -1
- package/cpp/skia/include/utils/mac/SkCGUtils.h +23 -11
- package/cpp/skia/modules/skcms/skcms.h +2 -410
- package/cpp/skia/modules/skcms/src/Transform_inl.h +831 -704
- package/cpp/skia/modules/skcms/src/skcms_Transform.h +161 -0
- package/cpp/skia/modules/skcms/src/skcms_internals.h +136 -0
- package/cpp/skia/modules/skcms/src/skcms_public.h +404 -0
- package/cpp/skia/modules/skparagraph/include/FontArguments.h +1 -1
- package/cpp/skia/modules/skparagraph/include/FontCollection.h +2 -0
- package/cpp/skia/modules/skparagraph/include/Paragraph.h +2 -2
- package/cpp/skia/modules/skparagraph/include/TextStyle.h +4 -3
- package/cpp/skia/modules/skparagraph/include/TypefaceFontProvider.h +1 -3
- package/cpp/skia/modules/skresources/include/SkResources.h +28 -17
- package/cpp/skia/modules/skunicode/include/SkUnicode.h +12 -0
- package/cpp/skia/modules/svg/include/SkSVGDOM.h +4 -1
- package/cpp/skia/modules/svg/include/SkSVGRenderContext.h +4 -1
- package/cpp/skia/src/base/SkUTF.h +7 -0
- package/cpp/skia/src/core/SkTHash.h +20 -8
- package/lib/commonjs/dom/nodes/JsiSkDOM.d.ts +5 -3
- package/lib/commonjs/dom/nodes/JsiSkDOM.js +60 -57
- package/lib/commonjs/dom/nodes/JsiSkDOM.js.map +1 -1
- package/lib/commonjs/dom/nodes/drawings/AtlasNode.d.ts +8 -0
- package/lib/commonjs/dom/nodes/drawings/AtlasNode.js +47 -0
- package/lib/commonjs/dom/nodes/drawings/AtlasNode.js.map +1 -0
- package/lib/commonjs/dom/nodes/drawings/index.d.ts +1 -0
- package/lib/commonjs/dom/nodes/drawings/index.js +13 -0
- package/lib/commonjs/dom/nodes/drawings/index.js.map +1 -1
- package/lib/commonjs/dom/types/Drawings.d.ts +7 -1
- package/lib/commonjs/dom/types/Drawings.js.map +1 -1
- package/lib/commonjs/dom/types/NodeType.d.ts +1 -0
- package/lib/commonjs/dom/types/NodeType.js +1 -0
- package/lib/commonjs/dom/types/NodeType.js.map +1 -1
- package/lib/commonjs/dom/types/SkDOM.d.ts +2 -1
- package/lib/commonjs/dom/types/SkDOM.js.map +1 -1
- package/lib/commonjs/external/reanimated/buffers.d.ts +5 -0
- package/lib/commonjs/external/reanimated/buffers.js +48 -0
- package/lib/commonjs/external/reanimated/buffers.js.map +1 -0
- package/lib/commonjs/external/reanimated/index.d.ts +2 -0
- package/lib/commonjs/external/reanimated/index.js +26 -0
- package/lib/commonjs/external/reanimated/index.js.map +1 -1
- package/lib/commonjs/external/reanimated/interpolators.js +13 -1
- package/lib/commonjs/external/reanimated/interpolators.js.map +1 -1
- package/lib/commonjs/external/reanimated/moduleWrapper.d.ts +1 -0
- package/lib/commonjs/external/reanimated/moduleWrapper.js +5 -3
- package/lib/commonjs/external/reanimated/moduleWrapper.js.map +1 -1
- package/lib/commonjs/external/reanimated/textures.d.ts +5 -0
- package/lib/commonjs/external/reanimated/textures.js +38 -0
- package/lib/commonjs/external/reanimated/textures.js.map +1 -0
- package/lib/commonjs/external/reanimated/useAnimatedImageValue.js +8 -1
- package/lib/commonjs/external/reanimated/useAnimatedImageValue.js.map +1 -1
- package/lib/commonjs/headless/index.js +1 -1
- package/lib/commonjs/headless/index.js.map +1 -1
- package/lib/commonjs/mock/index.js +8 -0
- package/lib/commonjs/mock/index.js.map +1 -1
- package/lib/commonjs/renderer/Canvas.js +1 -1
- package/lib/commonjs/renderer/Canvas.js.map +1 -1
- package/lib/commonjs/renderer/Container.d.ts +1 -1
- package/lib/commonjs/renderer/Container.js +2 -1
- package/lib/commonjs/renderer/Container.js.map +1 -1
- package/lib/commonjs/renderer/HostComponents.d.ts +3 -1
- package/lib/commonjs/renderer/HostComponents.js +3 -0
- package/lib/commonjs/renderer/HostComponents.js.map +1 -1
- package/lib/commonjs/renderer/Offscreen.d.ts +4 -1
- package/lib/commonjs/renderer/Offscreen.js +28 -10
- package/lib/commonjs/renderer/Offscreen.js.map +1 -1
- package/lib/commonjs/renderer/Reconciler.d.ts +1 -1
- package/lib/commonjs/renderer/Reconciler.js +7 -4
- package/lib/commonjs/renderer/Reconciler.js.map +1 -1
- package/lib/commonjs/renderer/components/shapes/Atlas.d.ts +4 -0
- package/lib/commonjs/renderer/components/shapes/Atlas.js +17 -0
- package/lib/commonjs/renderer/components/shapes/Atlas.js.map +1 -0
- package/lib/commonjs/renderer/components/shapes/index.d.ts +1 -0
- package/lib/commonjs/renderer/components/shapes/index.js +13 -0
- package/lib/commonjs/renderer/components/shapes/index.js.map +1 -1
- package/lib/commonjs/skia/core/AnimatedImage.d.ts +1 -1
- package/lib/commonjs/skia/core/AnimatedImage.js +4 -1
- package/lib/commonjs/skia/core/AnimatedImage.js.map +1 -1
- package/lib/commonjs/skia/core/Data.d.ts +1 -1
- package/lib/commonjs/skia/core/Data.js +11 -4
- package/lib/commonjs/skia/core/Data.js.map +1 -1
- package/lib/commonjs/skia/core/Rect.d.ts +2 -2
- package/lib/commonjs/skia/types/Canvas.d.ts +16 -1
- package/lib/commonjs/skia/types/Canvas.js.map +1 -1
- package/lib/commonjs/skia/types/Image/Image.d.ts +8 -0
- package/lib/commonjs/skia/types/Image/Image.js.map +1 -1
- package/lib/commonjs/skia/types/Matrix4.d.ts +2 -2
- package/lib/commonjs/skia/types/Matrix4.js.map +1 -1
- package/lib/commonjs/skia/types/RSXform.d.ts +7 -1
- package/lib/commonjs/skia/types/RSXform.js.map +1 -1
- package/lib/commonjs/skia/types/Rect.d.ts +4 -0
- package/lib/commonjs/skia/types/Rect.js.map +1 -1
- package/lib/commonjs/skia/types/Shader/Shader.d.ts +1 -1
- package/lib/commonjs/skia/types/Shader/Shader.js.map +1 -1
- package/lib/commonjs/skia/types/Skia.d.ts +3 -2
- package/lib/commonjs/skia/types/Skia.js.map +1 -1
- package/lib/commonjs/skia/web/JsiSkCanvas.d.ts +2 -1
- package/lib/commonjs/skia/web/JsiSkCanvas.js +19 -0
- package/lib/commonjs/skia/web/JsiSkCanvas.js.map +1 -1
- package/lib/commonjs/skia/web/JsiSkRSXform.d.ts +8 -2
- package/lib/commonjs/skia/web/JsiSkRSXform.js +33 -2
- package/lib/commonjs/skia/web/JsiSkRSXform.js.map +1 -1
- package/lib/commonjs/skia/web/JsiSkRect.d.ts +3 -2
- package/lib/commonjs/skia/web/JsiSkRect.js +7 -0
- package/lib/commonjs/skia/web/JsiSkRect.js.map +1 -1
- package/lib/commonjs/skia/web/JsiSkTextBlobFactory.js +2 -1
- package/lib/commonjs/skia/web/JsiSkTextBlobFactory.js.map +1 -1
- package/lib/commonjs/skia/web/JsiSkia.js +5 -0
- package/lib/commonjs/skia/web/JsiSkia.js.map +1 -1
- package/lib/module/dom/nodes/JsiSkDOM.d.ts +5 -3
- package/lib/module/dom/nodes/JsiSkDOM.js +61 -57
- package/lib/module/dom/nodes/JsiSkDOM.js.map +1 -1
- package/lib/module/dom/nodes/drawings/AtlasNode.d.ts +8 -0
- package/lib/module/dom/nodes/drawings/AtlasNode.js +34 -0
- package/lib/module/dom/nodes/drawings/AtlasNode.js.map +1 -0
- package/lib/module/dom/nodes/drawings/index.d.ts +1 -0
- package/lib/module/dom/nodes/drawings/index.js +1 -0
- package/lib/module/dom/nodes/drawings/index.js.map +1 -1
- package/lib/module/dom/types/Drawings.d.ts +7 -1
- package/lib/module/dom/types/Drawings.js.map +1 -1
- package/lib/module/dom/types/NodeType.d.ts +1 -0
- package/lib/module/dom/types/NodeType.js +1 -0
- package/lib/module/dom/types/NodeType.js.map +1 -1
- package/lib/module/dom/types/SkDOM.d.ts +2 -1
- package/lib/module/dom/types/SkDOM.js.map +1 -1
- package/lib/module/external/reanimated/buffers.d.ts +5 -0
- package/lib/module/external/reanimated/buffers.js +27 -0
- package/lib/module/external/reanimated/buffers.js.map +1 -0
- package/lib/module/external/reanimated/index.d.ts +2 -0
- package/lib/module/external/reanimated/index.js +2 -0
- package/lib/module/external/reanimated/index.js.map +1 -1
- package/lib/module/external/reanimated/interpolators.js +13 -1
- package/lib/module/external/reanimated/interpolators.js.map +1 -1
- package/lib/module/external/reanimated/moduleWrapper.d.ts +1 -0
- package/lib/module/external/reanimated/moduleWrapper.js +3 -2
- package/lib/module/external/reanimated/moduleWrapper.js.map +1 -1
- package/lib/module/external/reanimated/textures.d.ts +5 -0
- package/lib/module/external/reanimated/textures.js +24 -0
- package/lib/module/external/reanimated/textures.js.map +1 -0
- package/lib/module/external/reanimated/useAnimatedImageValue.js +7 -1
- package/lib/module/external/reanimated/useAnimatedImageValue.js.map +1 -1
- package/lib/module/headless/index.js +1 -1
- package/lib/module/headless/index.js.map +1 -1
- package/lib/module/mock/index.js +8 -0
- package/lib/module/mock/index.js.map +1 -1
- package/lib/module/renderer/Canvas.js +1 -1
- package/lib/module/renderer/Canvas.js.map +1 -1
- package/lib/module/renderer/Container.d.ts +1 -1
- package/lib/module/renderer/Container.js +2 -1
- package/lib/module/renderer/Container.js.map +1 -1
- package/lib/module/renderer/HostComponents.d.ts +3 -1
- package/lib/module/renderer/HostComponents.js +3 -0
- package/lib/module/renderer/HostComponents.js.map +1 -1
- package/lib/module/renderer/Offscreen.d.ts +4 -1
- package/lib/module/renderer/Offscreen.js +19 -9
- package/lib/module/renderer/Offscreen.js.map +1 -1
- package/lib/module/renderer/Reconciler.d.ts +1 -1
- package/lib/module/renderer/Reconciler.js +7 -4
- package/lib/module/renderer/Reconciler.js.map +1 -1
- package/lib/module/renderer/components/shapes/Atlas.d.ts +4 -0
- package/lib/module/renderer/components/shapes/Atlas.js +5 -0
- package/lib/module/renderer/components/shapes/Atlas.js.map +1 -0
- package/lib/module/renderer/components/shapes/index.d.ts +1 -0
- package/lib/module/renderer/components/shapes/index.js +1 -0
- package/lib/module/renderer/components/shapes/index.js.map +1 -1
- package/lib/module/skia/core/AnimatedImage.d.ts +1 -1
- package/lib/module/skia/core/AnimatedImage.js +4 -1
- package/lib/module/skia/core/AnimatedImage.js.map +1 -1
- package/lib/module/skia/core/Data.d.ts +1 -1
- package/lib/module/skia/core/Data.js +11 -4
- package/lib/module/skia/core/Data.js.map +1 -1
- package/lib/module/skia/core/Rect.d.ts +2 -2
- package/lib/module/skia/types/Canvas.d.ts +16 -1
- package/lib/module/skia/types/Canvas.js.map +1 -1
- package/lib/module/skia/types/Image/Image.d.ts +8 -0
- package/lib/module/skia/types/Image/Image.js.map +1 -1
- package/lib/module/skia/types/Matrix4.d.ts +2 -2
- package/lib/module/skia/types/Matrix4.js.map +1 -1
- package/lib/module/skia/types/RSXform.d.ts +7 -1
- package/lib/module/skia/types/RSXform.js.map +1 -1
- package/lib/module/skia/types/Rect.d.ts +4 -0
- package/lib/module/skia/types/Rect.js.map +1 -1
- package/lib/module/skia/types/Shader/Shader.d.ts +1 -1
- package/lib/module/skia/types/Shader/Shader.js.map +1 -1
- package/lib/module/skia/types/Skia.d.ts +3 -2
- package/lib/module/skia/types/Skia.js.map +1 -1
- package/lib/module/skia/web/JsiSkCanvas.d.ts +2 -1
- package/lib/module/skia/web/JsiSkCanvas.js +18 -0
- package/lib/module/skia/web/JsiSkCanvas.js.map +1 -1
- package/lib/module/skia/web/JsiSkRSXform.d.ts +8 -2
- package/lib/module/skia/web/JsiSkRSXform.js +34 -3
- package/lib/module/skia/web/JsiSkRSXform.js.map +1 -1
- package/lib/module/skia/web/JsiSkRect.d.ts +3 -2
- package/lib/module/skia/web/JsiSkRect.js +7 -0
- package/lib/module/skia/web/JsiSkRect.js.map +1 -1
- package/lib/module/skia/web/JsiSkTextBlobFactory.js +2 -1
- package/lib/module/skia/web/JsiSkTextBlobFactory.js.map +1 -1
- package/lib/module/skia/web/JsiSkia.js +5 -0
- package/lib/module/skia/web/JsiSkia.js.map +1 -1
- package/lib/typescript/src/dom/nodes/JsiSkDOM.d.ts +5 -3
- package/lib/typescript/src/dom/nodes/drawings/AtlasNode.d.ts +8 -0
- package/lib/typescript/src/dom/nodes/drawings/index.d.ts +1 -0
- package/lib/typescript/src/dom/types/Drawings.d.ts +7 -1
- package/lib/typescript/src/dom/types/NodeType.d.ts +1 -0
- package/lib/typescript/src/dom/types/SkDOM.d.ts +2 -1
- package/lib/typescript/src/external/reanimated/buffers.d.ts +5 -0
- package/lib/typescript/src/external/reanimated/index.d.ts +2 -0
- package/lib/typescript/src/external/reanimated/moduleWrapper.d.ts +1 -0
- package/lib/typescript/src/external/reanimated/textures.d.ts +5 -0
- package/lib/typescript/src/renderer/Container.d.ts +1 -1
- package/lib/typescript/src/renderer/HostComponents.d.ts +3 -1
- package/lib/typescript/src/renderer/Offscreen.d.ts +4 -1
- package/lib/typescript/src/renderer/Reconciler.d.ts +1 -1
- package/lib/typescript/src/renderer/components/shapes/Atlas.d.ts +4 -0
- package/lib/typescript/src/renderer/components/shapes/index.d.ts +1 -0
- package/lib/typescript/src/skia/core/AnimatedImage.d.ts +1 -1
- package/lib/typescript/src/skia/core/Data.d.ts +1 -1
- package/lib/typescript/src/skia/core/Rect.d.ts +2 -2
- package/lib/typescript/src/skia/types/Canvas.d.ts +16 -1
- package/lib/typescript/src/skia/types/Image/Image.d.ts +8 -0
- package/lib/typescript/src/skia/types/Matrix4.d.ts +2 -2
- package/lib/typescript/src/skia/types/RSXform.d.ts +7 -1
- package/lib/typescript/src/skia/types/Rect.d.ts +4 -0
- package/lib/typescript/src/skia/types/Shader/Shader.d.ts +1 -1
- package/lib/typescript/src/skia/types/Skia.d.ts +3 -2
- package/lib/typescript/src/skia/web/JsiSkCanvas.d.ts +2 -1
- package/lib/typescript/src/skia/web/JsiSkRSXform.d.ts +8 -2
- package/lib/typescript/src/skia/web/JsiSkRect.d.ts +3 -2
- package/libs/android/arm64-v8a/libskia.a +0 -0
- package/libs/android/arm64-v8a/libskottie.a +0 -0
- package/libs/android/arm64-v8a/libskparagraph.a +0 -0
- package/libs/android/arm64-v8a/libsksg.a +0 -0
- package/libs/android/arm64-v8a/libskshaper.a +0 -0
- package/libs/android/arm64-v8a/libskunicode.a +0 -0
- package/libs/android/arm64-v8a/libsvg.a +0 -0
- package/libs/android/armeabi-v7a/libskia.a +0 -0
- package/libs/android/armeabi-v7a/libskottie.a +0 -0
- package/libs/android/armeabi-v7a/libskparagraph.a +0 -0
- package/libs/android/armeabi-v7a/libsksg.a +0 -0
- package/libs/android/armeabi-v7a/libskshaper.a +0 -0
- package/libs/android/armeabi-v7a/libskunicode.a +0 -0
- package/libs/android/armeabi-v7a/libsvg.a +0 -0
- package/libs/android/x86/libskia.a +0 -0
- package/libs/android/x86/libskottie.a +0 -0
- package/libs/android/x86/libskparagraph.a +0 -0
- package/libs/android/x86/libsksg.a +0 -0
- package/libs/android/x86/libskshaper.a +0 -0
- package/libs/android/x86/libskunicode.a +0 -0
- package/libs/android/x86/libsvg.a +0 -0
- package/libs/android/x86_64/libskia.a +0 -0
- package/libs/android/x86_64/libskottie.a +0 -0
- package/libs/android/x86_64/libskparagraph.a +0 -0
- package/libs/android/x86_64/libsksg.a +0 -0
- package/libs/android/x86_64/libskshaper.a +0 -0
- package/libs/android/x86_64/libskunicode.a +0 -0
- package/libs/android/x86_64/libsvg.a +0 -0
- package/libs/ios/libskia.xcframework/ios-arm64_arm64e/libskia.a +0 -0
- package/libs/ios/libskia.xcframework/ios-arm64_arm64e_x86_64-simulator/libskia.a +0 -0
- package/libs/ios/libskottie.xcframework/ios-arm64_arm64e/libskottie.a +0 -0
- package/libs/ios/libskottie.xcframework/ios-arm64_arm64e_x86_64-simulator/libskottie.a +0 -0
- package/libs/ios/libskparagraph.xcframework/ios-arm64_arm64e/libskparagraph.a +0 -0
- package/libs/ios/libskparagraph.xcframework/ios-arm64_arm64e_x86_64-simulator/libskparagraph.a +0 -0
- package/libs/ios/libsksg.xcframework/ios-arm64_arm64e/libsksg.a +0 -0
- package/libs/ios/libsksg.xcframework/ios-arm64_arm64e_x86_64-simulator/libsksg.a +0 -0
- package/libs/ios/libskshaper.xcframework/Info.plist +5 -5
- package/libs/ios/libskshaper.xcframework/ios-arm64_arm64e/libskshaper.a +0 -0
- package/libs/ios/libskshaper.xcframework/ios-arm64_arm64e_x86_64-simulator/libskshaper.a +0 -0
- package/libs/ios/libskunicode.xcframework/ios-arm64_arm64e/libskunicode.a +0 -0
- package/libs/ios/libskunicode.xcframework/ios-arm64_arm64e_x86_64-simulator/libskunicode.a +0 -0
- package/libs/ios/libsvg.xcframework/Info.plist +5 -5
- package/libs/ios/libsvg.xcframework/ios-arm64_arm64e/libsvg.a +0 -0
- package/libs/ios/libsvg.xcframework/ios-arm64_arm64e_x86_64-simulator/libsvg.a +0 -0
- package/package.json +1 -1
- package/src/dom/nodes/JsiSkDOM.ts +63 -56
- package/src/dom/nodes/drawings/AtlasNode.ts +24 -0
- package/src/dom/nodes/drawings/index.ts +1 -0
- package/src/dom/types/Drawings.ts +9 -0
- package/src/dom/types/NodeType.ts +1 -0
- package/src/dom/types/SkDOM.ts +2 -0
- package/src/external/reanimated/buffers.ts +53 -0
- package/src/external/reanimated/index.ts +2 -0
- package/src/external/reanimated/interpolators.ts +15 -2
- package/src/external/reanimated/moduleWrapper.ts +1 -0
- package/src/external/reanimated/textures.tsx +38 -0
- package/src/external/reanimated/useAnimatedImageValue.ts +15 -4
- package/src/headless/index.ts +1 -1
- package/src/mock/index.ts +8 -0
- package/src/renderer/Canvas.tsx +1 -1
- package/src/renderer/Container.tsx +3 -2
- package/src/renderer/HostComponents.ts +6 -1
- package/src/renderer/Offscreen.tsx +24 -11
- package/src/renderer/Reconciler.tsx +5 -2
- package/src/renderer/components/shapes/Atlas.tsx +8 -0
- package/src/renderer/components/shapes/index.ts +1 -0
- package/src/skia/core/AnimatedImage.ts +3 -2
- package/src/skia/core/Data.ts +8 -4
- package/src/skia/types/Canvas.ts +32 -1
- package/src/skia/types/Image/Image.ts +10 -0
- package/src/skia/types/Matrix4.ts +2 -2
- package/src/skia/types/RSXform.ts +7 -1
- package/src/skia/types/Rect.ts +6 -0
- package/src/skia/types/Shader/Shader.ts +6 -1
- package/src/skia/types/Skia.ts +10 -2
- package/src/skia/web/JsiSkCanvas.ts +60 -23
- package/src/skia/web/JsiSkRSXform.ts +28 -4
- package/src/skia/web/JsiSkRect.ts +12 -2
- package/src/skia/web/JsiSkTextBlobFactory.ts +5 -5
- package/src/skia/web/JsiSkia.ts +15 -0
- package/cpp/skia/include/gpu/GrSurfaceInfo.h +0 -142
- package/cpp/skia/include/private/gpu/ganesh/GrGLTypesPriv.h +0 -107
- package/cpp/skia/include/private/gpu/ganesh/GrMockTypesPriv.h +0 -32
- package/cpp/skia/include/private/gpu/ganesh/GrMtlTypesPriv.h +0 -83
- package/cpp/skia/include/private/gpu/ganesh/GrVkTypesPriv.h +0 -47
- package/cpp/skia/include/private/gpu/vk/VulkanTypesPriv.h +0 -57
- package/cpp/skia/include/utils/SkBase64.h +0 -53
- package/cpp/skia/modules/skcms/skcms_internal.h +0 -56
@@ -16,7 +16,6 @@
|
|
16
16
|
class GrBackendSemaphore;
|
17
17
|
|
18
18
|
namespace skgpu {
|
19
|
-
enum class Mipmapped : bool;
|
20
19
|
enum class Protected : bool;
|
21
20
|
enum class Renderable : bool;
|
22
21
|
}
|
@@ -129,14 +128,6 @@ static constexpr GrBackendApi kMock_GrBackend = GrBackendApi::kMock;
|
|
129
128
|
|
130
129
|
///////////////////////////////////////////////////////////////////////////////
|
131
130
|
|
132
|
-
/**
|
133
|
-
* Used to say whether a texture has mip levels allocated or not.
|
134
|
-
*/
|
135
|
-
/** Deprecated legacy alias of skgpu::Mipmapped. */
|
136
|
-
using GrMipmapped = skgpu::Mipmapped;
|
137
|
-
/** Deprecated legacy alias of skgpu::Mipmapped. */
|
138
|
-
using GrMipMapped = skgpu::Mipmapped;
|
139
|
-
|
140
131
|
/*
|
141
132
|
* Can a GrBackendObject be rendered to?
|
142
133
|
*/
|
@@ -220,13 +211,7 @@ typedef void (*GrDirectContextDestroyedProc)(GrDirectContextDestroyedContext des
|
|
220
211
|
* The submittedProc is useful to the client to know when semaphores that were sent with the flush
|
221
212
|
* have actually been submitted to the GPU so that they can be waited on (or deleted if the submit
|
222
213
|
* fails).
|
223
|
-
*
|
224
|
-
* really know when the driver sends the work to the GPU. Therefore, we treat the submitted proc as
|
225
|
-
* we do in other backends. It will be called when the next GrContext::submit is called after the
|
226
|
-
* flush (or possibly during the flush if there is no work to be done for the flush). The main use
|
227
|
-
* case for the submittedProc is to know when semaphores have been sent to the GPU and even in GL
|
228
|
-
* it is required to call GrContext::submit to flush them. So a client should be able to treat all
|
229
|
-
* backend APIs the same in terms of how the submitted procs are treated.
|
214
|
+
* GrBackendSemaphores are not supported for the GL backend and will be ignored if set.
|
230
215
|
*/
|
231
216
|
struct GrFlushInfo {
|
232
217
|
size_t fNumSemaphores = 0;
|
@@ -8,21 +8,21 @@
|
|
8
8
|
#ifndef skgpu_MutableTextureState_DEFINED
|
9
9
|
#define skgpu_MutableTextureState_DEFINED
|
10
10
|
|
11
|
+
#include "include/core/SkRefCnt.h"
|
11
12
|
#include "include/core/SkTypes.h"
|
12
|
-
#include "include/
|
13
|
+
#include "include/private/base/SkAnySubclass.h"
|
13
14
|
|
14
|
-
#
|
15
|
+
#if defined(SK_VULKAN) && !defined(SK_DISABLE_LEGACY_VULKAN_MUTABLE_TEXTURE_STATE)
|
15
16
|
#include "include/private/gpu/vk/SkiaVulkan.h"
|
16
|
-
#include "include/private/gpu/vk/VulkanTypesPriv.h"
|
17
17
|
|
18
18
|
#include <cstdint>
|
19
19
|
#endif
|
20
20
|
|
21
|
-
#include <
|
22
|
-
|
23
|
-
class GrVkGpu;
|
21
|
+
#include <cstddef>
|
24
22
|
|
25
23
|
namespace skgpu {
|
24
|
+
enum class BackendApi : unsigned int;
|
25
|
+
class MutableTextureStateData;
|
26
26
|
|
27
27
|
/**
|
28
28
|
* Since Skia and clients can both modify gpu textures and their connected state, Skia needs a way
|
@@ -30,95 +30,50 @@ namespace skgpu {
|
|
30
30
|
* for every single API and state, we use this class to be a generic wrapper around all the mutable
|
31
31
|
* state. This class is used for calls that inform Skia of these texture/image state changes by the
|
32
32
|
* client as well as for requesting state changes to be done by Skia. The backend specific state
|
33
|
-
* that is wrapped by this class are:
|
34
|
-
*
|
35
|
-
* Vulkan: VkImageLayout and QueueFamilyIndex
|
33
|
+
* that is wrapped by this class are located in files like:
|
34
|
+
* - include/gpu/vk/VulkanMutableTextureState.h
|
36
35
|
*/
|
37
|
-
class SK_API MutableTextureState {
|
36
|
+
class SK_API MutableTextureState : public SkRefCnt {
|
38
37
|
public:
|
39
|
-
MutableTextureState()
|
40
|
-
|
41
|
-
#ifdef SK_VULKAN
|
42
|
-
MutableTextureState(VkImageLayout layout, uint32_t queueFamilyIndex)
|
43
|
-
: fVkState(layout, queueFamilyIndex)
|
44
|
-
, fBackend(BackendApi::kVulkan)
|
45
|
-
, fIsValid(true) {}
|
46
|
-
#endif
|
38
|
+
MutableTextureState();
|
39
|
+
~MutableTextureState() override;
|
47
40
|
|
48
|
-
MutableTextureState(const MutableTextureState& that)
|
49
|
-
: fBackend(that.fBackend), fIsValid(that.fIsValid) {
|
50
|
-
if (!fIsValid) {
|
51
|
-
return;
|
52
|
-
}
|
53
|
-
switch (fBackend) {
|
54
|
-
case BackendApi::kVulkan:
|
55
|
-
#ifdef SK_VULKAN
|
56
|
-
SkASSERT(that.fBackend == BackendApi::kVulkan);
|
57
|
-
fVkState = that.fVkState;
|
58
|
-
#endif
|
59
|
-
break;
|
60
|
-
default:
|
61
|
-
(void)that;
|
62
|
-
SkUNREACHABLE;
|
63
|
-
}
|
64
|
-
}
|
41
|
+
MutableTextureState(const MutableTextureState& that);
|
65
42
|
|
66
|
-
MutableTextureState& operator=(const MutableTextureState& that)
|
67
|
-
if (this != &that) {
|
68
|
-
this->~MutableTextureState();
|
69
|
-
new (this) MutableTextureState(that);
|
70
|
-
}
|
71
|
-
return *this;
|
72
|
-
}
|
43
|
+
MutableTextureState& operator=(const MutableTextureState& that);
|
73
44
|
|
74
|
-
|
75
|
-
// If this class is not Vulkan backed it will return value of VK_IMAGE_LAYOUT_UNDEFINED.
|
76
|
-
// Otherwise it will return the VkImageLayout.
|
77
|
-
VkImageLayout getVkImageLayout() const {
|
78
|
-
if (this->isValid() && fBackend != BackendApi::kVulkan) {
|
79
|
-
return VK_IMAGE_LAYOUT_UNDEFINED;
|
80
|
-
}
|
81
|
-
return fVkState.getImageLayout();
|
82
|
-
}
|
83
|
-
|
84
|
-
// If this class is not Vulkan backed it will return value of VK_QUEUE_FAMILY_IGNORED.
|
85
|
-
// Otherwise it will return the VkImageLayout.
|
86
|
-
uint32_t getQueueFamilyIndex() const {
|
87
|
-
if (this->isValid() && fBackend != BackendApi::kVulkan) {
|
88
|
-
return VK_QUEUE_FAMILY_IGNORED;
|
89
|
-
}
|
90
|
-
return fVkState.getQueueFamilyIndex();
|
91
|
-
}
|
92
|
-
#endif
|
45
|
+
void set(const MutableTextureState& that);
|
93
46
|
|
94
47
|
BackendApi backend() const { return fBackend; }
|
95
48
|
|
96
49
|
// Returns true if the backend mutable state has been initialized.
|
97
50
|
bool isValid() const { return fIsValid; }
|
98
51
|
|
52
|
+
#if defined(SK_VULKAN) && !defined(SK_DISABLE_LEGACY_VULKAN_MUTABLE_TEXTURE_STATE)
|
53
|
+
MutableTextureState(VkImageLayout layout, uint32_t queueFamilyIndex);
|
54
|
+
|
55
|
+
VkImageLayout getVkImageLayout() const;
|
56
|
+
uint32_t getQueueFamilyIndex() const;
|
57
|
+
#endif
|
58
|
+
|
99
59
|
private:
|
100
|
-
friend class
|
101
|
-
friend class
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
60
|
+
friend class MutableTextureStateData;
|
61
|
+
friend class MutableTextureStatePriv;
|
62
|
+
// Size determined by looking at the MutableTextureStateData subclasses, then
|
63
|
+
// guessing-and-checking. Compiler will complain if this is too small - in that case,
|
64
|
+
// just increase the number.
|
65
|
+
inline constexpr static size_t kMaxSubclassSize = 16;
|
66
|
+
using AnyStateData = SkAnySubclass<MutableTextureStateData, kMaxSubclassSize>;
|
67
|
+
|
68
|
+
template <typename StateData>
|
69
|
+
MutableTextureState(BackendApi api, const StateData& data) : fBackend(api), fIsValid(true) {
|
70
|
+
fStateData.emplace<StateData>(data);
|
110
71
|
}
|
111
|
-
#endif
|
112
72
|
|
113
|
-
|
114
|
-
char fPlaceholder;
|
115
|
-
#ifdef SK_VULKAN
|
116
|
-
VulkanMutableTextureState fVkState;
|
117
|
-
#endif
|
118
|
-
};
|
73
|
+
AnyStateData fStateData;
|
119
74
|
|
120
|
-
BackendApi fBackend
|
121
|
-
bool fIsValid
|
75
|
+
BackendApi fBackend;
|
76
|
+
bool fIsValid;
|
122
77
|
};
|
123
78
|
|
124
79
|
} // namespace skgpu
|
@@ -18,7 +18,17 @@ class SK_API ShaderErrorHandler {
|
|
18
18
|
public:
|
19
19
|
virtual ~ShaderErrorHandler() = default;
|
20
20
|
|
21
|
-
|
21
|
+
/**
|
22
|
+
* compileError(shader, errors) is kept for backward compatibility with older clients.
|
23
|
+
*/
|
24
|
+
virtual void compileError([[maybe_unused]] const char* shader,
|
25
|
+
[[maybe_unused]] const char* errors) {}
|
26
|
+
virtual void compileError(const char* shader,
|
27
|
+
const char* errors,
|
28
|
+
[[maybe_unused]] bool shaderWasCached) {
|
29
|
+
// Default implementation. Ignore shaderWasCached.
|
30
|
+
this->compileError(shader, errors);
|
31
|
+
}
|
22
32
|
|
23
33
|
protected:
|
24
34
|
ShaderErrorHandler() = default;
|
@@ -206,7 +206,7 @@ SK_API sk_sp<SkImage> TextureFromImage(GrDirectContext*,
|
|
206
206
|
skgpu::Mipmapped = skgpu::Mipmapped::kNo,
|
207
207
|
skgpu::Budgeted = skgpu::Budgeted::kYes);
|
208
208
|
inline sk_sp<SkImage> TextureFromImage(GrDirectContext* ctx,
|
209
|
-
sk_sp<const SkImage
|
209
|
+
const sk_sp<const SkImage>& img,
|
210
210
|
skgpu::Mipmapped m = skgpu::Mipmapped::kNo,
|
211
211
|
skgpu::Budgeted b = skgpu::Budgeted::kYes) {
|
212
212
|
return TextureFromImage(ctx, img.get(), m, b);
|
@@ -276,7 +276,7 @@ SK_API bool GetBackendTextureFromImage(const SkImage* img,
|
|
276
276
|
GrBackendTexture* outTexture,
|
277
277
|
bool flushPendingGrContextIO,
|
278
278
|
GrSurfaceOrigin* origin = nullptr);
|
279
|
-
inline bool GetBackendTextureFromImage(sk_sp<const SkImage
|
279
|
+
inline bool GetBackendTextureFromImage(const sk_sp<const SkImage>& img,
|
280
280
|
GrBackendTexture* outTexture,
|
281
281
|
bool flushPendingGrContextIO,
|
282
282
|
GrSurfaceOrigin* origin = nullptr) {
|
@@ -199,7 +199,7 @@ SK_API GrBackendRenderTarget GetBackendRenderTarget(SkSurface*, BackendHandleAcc
|
|
199
199
|
GrDirectContext::flush.
|
200
200
|
*/
|
201
201
|
SK_API void ResolveMSAA(SkSurface* surface);
|
202
|
-
inline void ResolveMSAA(sk_sp<SkSurface
|
202
|
+
inline void ResolveMSAA(const sk_sp<SkSurface>& surface) {
|
203
203
|
return ResolveMSAA(surface.get());
|
204
204
|
}
|
205
205
|
|
@@ -17,13 +17,14 @@ struct GrGLInterface;
|
|
17
17
|
|
18
18
|
namespace GrDirectContexts {
|
19
19
|
/**
|
20
|
-
* Creates a GrDirectContext for a backend context.
|
21
|
-
* result of GrGLMakeNativeInterface() is used if it succeeds.
|
20
|
+
* Creates a GrDirectContext for a backend context. GrGLInterface must be non-null.
|
22
21
|
*/
|
23
22
|
SK_API sk_sp<GrDirectContext> MakeGL(sk_sp<const GrGLInterface>, const GrContextOptions&);
|
24
23
|
SK_API sk_sp<GrDirectContext> MakeGL(sk_sp<const GrGLInterface>);
|
24
|
+
#if !defined(SK_DISABLE_LEGACY_GL_MAKE_NATIVE_INTERFACE)
|
25
25
|
SK_API sk_sp<GrDirectContext> MakeGL(const GrContextOptions&);
|
26
26
|
SK_API sk_sp<GrDirectContext> MakeGL();
|
27
|
+
#endif
|
27
28
|
}
|
28
29
|
|
29
30
|
#endif
|
@@ -0,0 +1,20 @@
|
|
1
|
+
/*
|
2
|
+
* Copyright 2023 Google LLC
|
3
|
+
*
|
4
|
+
* Use of this source code is governed by a BSD-style license that can be
|
5
|
+
* found in the LICENSE file.
|
6
|
+
*
|
7
|
+
*/
|
8
|
+
#ifndef GrVkBackendSemaphore_DEFINED
|
9
|
+
#define GrVkBackendSemaphore_DEFINED
|
10
|
+
|
11
|
+
#include "include/gpu/GrBackendSemaphore.h"
|
12
|
+
#include "include/private/base/SkAPI.h"
|
13
|
+
#include "include/private/gpu/vk/SkiaVulkan.h"
|
14
|
+
|
15
|
+
namespace GrBackendSemaphores {
|
16
|
+
SK_API GrBackendSemaphore MakeVk(VkSemaphore semaphore);
|
17
|
+
SK_API VkSemaphore GetVkSemaphore(const GrBackendSemaphore&);
|
18
|
+
} // namespace GrBackendSemaphores
|
19
|
+
|
20
|
+
#endif
|
@@ -0,0 +1,30 @@
|
|
1
|
+
/*
|
2
|
+
* Copyright 2023 Google LLC
|
3
|
+
*
|
4
|
+
* Use of this source code is governed by a BSD-style license that can be
|
5
|
+
* found in the LICENSE file.
|
6
|
+
*/
|
7
|
+
|
8
|
+
#ifndef GrVkDirectContext_DEFINED
|
9
|
+
#define GrVkDirectContext_DEFINED
|
10
|
+
|
11
|
+
#include "include/core/SkRefCnt.h"
|
12
|
+
#include "include/private/base/SkAPI.h"
|
13
|
+
|
14
|
+
class GrDirectContext;
|
15
|
+
struct GrContextOptions;
|
16
|
+
struct GrVkBackendContext;
|
17
|
+
|
18
|
+
namespace GrDirectContexts {
|
19
|
+
/**
|
20
|
+
* The Vulkan context (VkQueue, VkDevice, VkInstance) must be kept alive until the returned
|
21
|
+
* GrDirectContext is destroyed. This also means that any objects created with this
|
22
|
+
* GrDirectContext (e.g. SkSurfaces, SkImages, etc.) must also be released as they may hold
|
23
|
+
* refs on the GrDirectContext. Once all these objects and the GrDirectContext are released,
|
24
|
+
* then it is safe to delete the vulkan objects.
|
25
|
+
*/
|
26
|
+
SK_API sk_sp<GrDirectContext> MakeVulkan(const GrVkBackendContext&, const GrContextOptions&);
|
27
|
+
SK_API sk_sp<GrDirectContext> MakeVulkan(const GrVkBackendContext&);
|
28
|
+
}
|
29
|
+
|
30
|
+
#endif
|
@@ -18,6 +18,7 @@ typedef void(*GrGLFuncPtr)();
|
|
18
18
|
struct GrGLInterface;
|
19
19
|
|
20
20
|
|
21
|
+
#if !defined(SK_DISABLE_LEGACY_GL_MAKE_NATIVE_INTERFACE)
|
21
22
|
/**
|
22
23
|
* Rather than depend on platform-specific GL headers and libraries, we require
|
23
24
|
* the client to provide a struct of GL function pointers. This struct can be
|
@@ -31,6 +32,7 @@ struct GrGLInterface;
|
|
31
32
|
* appropriate one to build.
|
32
33
|
*/
|
33
34
|
SK_API sk_sp<const GrGLInterface> GrGLMakeNativeInterface();
|
35
|
+
#endif
|
34
36
|
|
35
37
|
/**
|
36
38
|
* GrContext uses the following interface to make all calls into OpenGL. When a
|
@@ -26,7 +26,7 @@ public:
|
|
26
26
|
BackendSemaphore();
|
27
27
|
#ifdef SK_METAL
|
28
28
|
// TODO: Determine creator's responsibility for setting refcnt.
|
29
|
-
BackendSemaphore(
|
29
|
+
BackendSemaphore(CFTypeRef mtlEvent, uint64_t value);
|
30
30
|
#endif
|
31
31
|
|
32
32
|
#ifdef SK_VULKAN
|
@@ -43,7 +43,7 @@ public:
|
|
43
43
|
BackendApi backend() const { return fBackend; }
|
44
44
|
|
45
45
|
#ifdef SK_METAL
|
46
|
-
|
46
|
+
CFTypeRef getMtlEvent() const;
|
47
47
|
uint64_t getMtlValue() const;
|
48
48
|
#endif
|
49
49
|
|
@@ -59,7 +59,7 @@ private:
|
|
59
59
|
#endif
|
60
60
|
#ifdef SK_METAL
|
61
61
|
struct {
|
62
|
-
|
62
|
+
CFTypeRef fMtlEvent; // Expected to be an id<MTLEvent>
|
63
63
|
uint64_t fMtlValue;
|
64
64
|
};
|
65
65
|
#endif
|
@@ -28,7 +28,6 @@
|
|
28
28
|
|
29
29
|
namespace skgpu {
|
30
30
|
class MutableTextureState;
|
31
|
-
class MutableTextureStateRef;
|
32
31
|
}
|
33
32
|
|
34
33
|
namespace skgpu::graphite {
|
@@ -37,33 +36,46 @@ class SK_API BackendTexture {
|
|
37
36
|
public:
|
38
37
|
BackendTexture();
|
39
38
|
#ifdef SK_DAWN
|
40
|
-
// Create a BackendTexture from a WGPUTexture. Texture info will be
|
41
|
-
//
|
42
|
-
//
|
43
|
-
//
|
44
|
-
//
|
45
|
-
//
|
46
|
-
//
|
47
|
-
//
|
48
|
-
//
|
49
|
-
// WGPUTexture. Thus the client must keep the WGPUTexture valid until
|
50
|
-
// they are no longer using the BackendTexture.
|
39
|
+
// Create a BackendTexture from a WGPUTexture. Texture info will be queried from the texture.
|
40
|
+
//
|
41
|
+
// This is the recommended way of specifying a BackendTexture for Dawn. See the note below on
|
42
|
+
// the constructor that takes a WGPUTextureView for a fuller explanation.
|
43
|
+
//
|
44
|
+
// The BackendTexture will not call retain or release on the passed in WGPUTexture. Thus, the
|
45
|
+
// client must keep the WGPUTexture valid until they are no longer using the BackendTexture.
|
46
|
+
// However, any SkImage or SkSurface that wraps the BackendTexture *will* retain and release
|
47
|
+
// the WGPUTexture.
|
51
48
|
BackendTexture(WGPUTexture texture);
|
49
|
+
|
50
|
+
// Create a BackendTexture from a WGPUTexture. Texture planeDimensions, plane aspect and
|
51
|
+
// info have to be provided. This is intended to be used only when accessing a plane
|
52
|
+
// of a WGPUTexture.
|
53
|
+
//
|
54
|
+
// The BackendTexture will not call retain or release on the passed in WGPUTexture. Thus, the
|
55
|
+
// client must keep the WGPUTexture valid until they are no longer using the BackendTexture.
|
56
|
+
// However, any SkImage or SkSurface that wraps the BackendTexture *will* retain and release
|
57
|
+
// the WGPUTexture.
|
58
|
+
BackendTexture(SkISize planeDimensions, const DawnTextureInfo& info, WGPUTexture texture);
|
59
|
+
|
52
60
|
// Create a BackendTexture from a WGPUTextureView. Texture dimensions and
|
53
61
|
// info have to be provided.
|
54
|
-
//
|
55
|
-
//
|
56
|
-
//
|
57
|
-
//
|
58
|
-
//
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
+
//
|
63
|
+
// Using a WGPUTextureView rather than a WGPUTexture is less effecient for operations that
|
64
|
+
// require buffer transfers to or from the texture (e.g. methods on graphite::Context that read
|
65
|
+
// pixels or SkSurface::writePixels). In such cases an intermediate copy to or from a
|
66
|
+
// WGPUTexture is required. Thus, it is recommended to use this functionality only for cases
|
67
|
+
// where a WGPUTexture is unavailable, in particular when using wgpu::SwapChain.
|
68
|
+
//
|
69
|
+
// The BackendTexture will not call retain or release on the passed in WGPUTextureView. Thus,
|
70
|
+
// the client must keep the WGPUTextureView valid until they are no longer using the
|
71
|
+
// BackendTexture. However, any SkImage or SkSurface that wraps the BackendTexture *will* retain
|
72
|
+
// and release the WGPUTextureView.
|
73
|
+
BackendTexture(SkISize dimensions, const DawnTextureInfo& info, WGPUTextureView textureView);
|
62
74
|
#endif
|
63
75
|
#ifdef SK_METAL
|
64
|
-
// The BackendTexture will not call retain or release on the passed in
|
65
|
-
// client must keep the
|
66
|
-
BackendTexture(SkISize dimensions,
|
76
|
+
// The BackendTexture will not call retain or release on the passed in CFTypeRef. Thus the
|
77
|
+
// client must keep the CFTypeRef valid until they are no longer using the BackendTexture.
|
78
|
+
BackendTexture(SkISize dimensions, CFTypeRef mtlTexture);
|
67
79
|
#endif
|
68
80
|
|
69
81
|
#ifdef SK_VULKAN
|
@@ -103,7 +115,7 @@ public:
|
|
103
115
|
WGPUTextureView getDawnTextureViewPtr() const;
|
104
116
|
#endif
|
105
117
|
#ifdef SK_METAL
|
106
|
-
|
118
|
+
CFTypeRef getMtlTexture() const;
|
107
119
|
#endif
|
108
120
|
|
109
121
|
#ifdef SK_VULKAN
|
@@ -115,12 +127,12 @@ public:
|
|
115
127
|
|
116
128
|
private:
|
117
129
|
friend class VulkanResourceProvider; // for getMutableState
|
118
|
-
sk_sp<
|
130
|
+
sk_sp<MutableTextureState> getMutableState() const;
|
119
131
|
|
120
132
|
SkISize fDimensions;
|
121
133
|
TextureInfo fInfo;
|
122
134
|
|
123
|
-
sk_sp<
|
135
|
+
sk_sp<MutableTextureState> fMutableState;
|
124
136
|
|
125
137
|
#ifdef SK_VULKAN
|
126
138
|
// fMemoryAlloc == VulkanAlloc() if the client has already created their own VkImage and
|
@@ -137,7 +149,7 @@ private:
|
|
137
149
|
};
|
138
150
|
#endif
|
139
151
|
#ifdef SK_METAL
|
140
|
-
|
152
|
+
CFTypeRef fMtlTexture;
|
141
153
|
#endif
|
142
154
|
#ifdef SK_VULKAN
|
143
155
|
VkImage fVkImage = VK_NULL_HANDLE;
|
@@ -22,6 +22,7 @@
|
|
22
22
|
|
23
23
|
class SkColorSpace;
|
24
24
|
class SkRuntimeEffect;
|
25
|
+
class SkTraceMemoryDump;
|
25
26
|
|
26
27
|
namespace skgpu::graphite {
|
27
28
|
|
@@ -55,6 +56,9 @@ public:
|
|
55
56
|
bool insertRecording(const InsertRecordingInfo&);
|
56
57
|
bool submit(SyncToCpu = SyncToCpu::kNo);
|
57
58
|
|
59
|
+
/** Returns true if there is work that was submitted to the GPU that has not finished. */
|
60
|
+
bool hasUnfinishedGpuWork() const;
|
61
|
+
|
58
62
|
void asyncRescaleAndReadPixels(const SkImage* image,
|
59
63
|
const SkImageInfo& dstImageInfo,
|
60
64
|
const SkIRect& srcRect,
|
@@ -142,6 +146,22 @@ public:
|
|
142
146
|
*/
|
143
147
|
void performDeferredCleanup(std::chrono::milliseconds msNotUsed);
|
144
148
|
|
149
|
+
/**
|
150
|
+
* Returns the number of bytes of gpu memory currently budgeted in the Context's cache.
|
151
|
+
*/
|
152
|
+
size_t currentBudgetedBytes() const;
|
153
|
+
|
154
|
+
/**
|
155
|
+
* Enumerates all cached GPU resources owned by the Context and dumps their memory to
|
156
|
+
* traceMemoryDump.
|
157
|
+
*/
|
158
|
+
void dumpMemoryStatistics(SkTraceMemoryDump* traceMemoryDump) const;
|
159
|
+
|
160
|
+
/*
|
161
|
+
* Does this context support protected content?
|
162
|
+
*/
|
163
|
+
bool supportsProtectedContent() const;
|
164
|
+
|
145
165
|
// Provides access to functions that aren't part of the public API.
|
146
166
|
ContextPriv priv();
|
147
167
|
const ContextPriv priv() const; // NOLINT(readability-const-return-type)
|
@@ -172,6 +192,21 @@ private:
|
|
172
192
|
friend class ContextPriv;
|
173
193
|
friend class ContextCtorAccessor;
|
174
194
|
|
195
|
+
struct PixelTransferResult {
|
196
|
+
using ConversionFn = void(void* dst, const void* mappedBuffer);
|
197
|
+
// If null then the transfer could not be performed. Otherwise this buffer will contain
|
198
|
+
// the pixel data when the transfer is complete.
|
199
|
+
sk_sp<Buffer> fTransferBuffer;
|
200
|
+
// Size of the read.
|
201
|
+
SkISize fSize;
|
202
|
+
// RowBytes for transfer buffer data
|
203
|
+
size_t fRowBytes;
|
204
|
+
// If this is null then the transfer buffer will contain the data in the requested
|
205
|
+
// color type. Otherwise, when the transfer is done this must be called to convert
|
206
|
+
// from the transfer buffer's color type to the requested color type.
|
207
|
+
std::function<ConversionFn> fPixelConverter;
|
208
|
+
};
|
209
|
+
|
175
210
|
SingleOwner* singleOwner() const { return &fSingleOwner; }
|
176
211
|
|
177
212
|
// Must be called in Make() to handle one-time GPU setup operations that can possibly fail and
|
@@ -204,19 +239,11 @@ private:
|
|
204
239
|
SkImage::ReadPixelsCallback callback,
|
205
240
|
SkImage::ReadPixelsContext context);
|
206
241
|
|
242
|
+
void finalizeAsyncReadPixels(SkSpan<PixelTransferResult>,
|
243
|
+
SkImage::ReadPixelsCallback callback,
|
244
|
+
SkImage::ReadPixelsContext callbackContext);
|
245
|
+
|
207
246
|
// Inserts a texture to buffer transfer task, used by asyncReadPixels methods
|
208
|
-
struct PixelTransferResult {
|
209
|
-
using ConversionFn = void(void* dst, const void* mappedBuffer);
|
210
|
-
// If null then the transfer could not be performed. Otherwise this buffer will contain
|
211
|
-
// the pixel data when the transfer is complete.
|
212
|
-
sk_sp<Buffer> fTransferBuffer;
|
213
|
-
// RowBytes for transfer buffer data
|
214
|
-
size_t fRowBytes;
|
215
|
-
// If this is null then the transfer buffer will contain the data in the requested
|
216
|
-
// color type. Otherwise, when the transfer is done this must be called to convert
|
217
|
-
// from the transfer buffer's color type to the requested color type.
|
218
|
-
std::function<ConversionFn> fPixelConverter;
|
219
|
-
};
|
220
247
|
PixelTransferResult transferPixels(const TextureProxy*,
|
221
248
|
const SkImageInfo& srcImageInfo,
|
222
249
|
const SkColorInfo& dstColorInfo,
|
@@ -226,7 +253,6 @@ private:
|
|
226
253
|
std::unique_ptr<ResourceProvider> fResourceProvider;
|
227
254
|
std::unique_ptr<QueueManager> fQueueManager;
|
228
255
|
std::unique_ptr<ClientMappedBufferManager> fMappedBufferManager;
|
229
|
-
std::unique_ptr<PlotUploadTracker> fPlotUploadTracker;
|
230
256
|
|
231
257
|
// In debug builds we guard against improper thread handling. This guard is passed to the
|
232
258
|
// ResourceCache for the Context.
|
@@ -80,6 +80,8 @@ struct SK_API ContextOptions {
|
|
80
80
|
/**
|
81
81
|
* Disable caching of glyph uploads at the start of each Recording. These can add additional
|
82
82
|
* overhead and are only necessary if Recordings are replayed or played out of order.
|
83
|
+
*
|
84
|
+
* Deprecated, now only used to set requireOrderedRecordings Caps.
|
83
85
|
*/
|
84
86
|
bool fDisableCachedGlyphUploads = false;
|
85
87
|
|
@@ -46,7 +46,8 @@ using GpuFinishedProc = void (*)(GpuFinishedContext finishedContext, CallbackRes
|
|
46
46
|
*
|
47
47
|
* The client may pass in two arrays of initialized BackendSemaphores to be included in the
|
48
48
|
* command stream. At some time before issuing commands in the Recording, the fWaitSemaphores will
|
49
|
-
* be waited on by the gpu.
|
49
|
+
* be waited on by the gpu. We only guarantee these wait semaphores block transfer and fragment
|
50
|
+
* shader work. Similarly, at some time after issuing the Recording's commands, the
|
50
51
|
* fSignalSemaphores will be signaled by the gpu. Depending on the platform, the timing of the wait
|
51
52
|
* and signal operations will either be immediately before or after the given Recording's command
|
52
53
|
* stream, respectively, or before and after the entire CommandBuffer's command stream. The
|