@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
@@ -24,11 +24,13 @@
|
|
24
24
|
#include "include/core/SkSamplingOptions.h"
|
25
25
|
#include "include/core/SkScalar.h"
|
26
26
|
#include "include/core/SkSize.h"
|
27
|
+
#include "include/core/SkSpan.h"
|
27
28
|
#include "include/core/SkString.h"
|
28
29
|
#include "include/core/SkSurfaceProps.h"
|
29
30
|
#include "include/core/SkTypes.h"
|
30
31
|
#include "include/private/base/SkCPUTypes.h"
|
31
32
|
#include "include/private/base/SkDeque.h"
|
33
|
+
#include "include/private/base/SkTArray.h"
|
32
34
|
|
33
35
|
#include <cstdint>
|
34
36
|
#include <cstring>
|
@@ -70,6 +72,9 @@ class SkVertices;
|
|
70
72
|
struct SkDrawShadowRec;
|
71
73
|
struct SkRSXform;
|
72
74
|
|
75
|
+
template<typename E>
|
76
|
+
class SkEnumBitMask;
|
77
|
+
|
73
78
|
namespace skgpu::graphite { class Recorder; }
|
74
79
|
namespace sktext::gpu { class Slug; }
|
75
80
|
namespace SkRecords { class Draw; }
|
@@ -667,7 +672,9 @@ public:
|
|
667
672
|
kF16ColorType = 1 << 4,
|
668
673
|
};
|
669
674
|
|
670
|
-
|
675
|
+
using SaveLayerFlags = uint32_t;
|
676
|
+
using FilterSpan = SkSpan<sk_sp<SkImageFilter>>;
|
677
|
+
static constexpr int kMaxFiltersPerLayer = 16;
|
671
678
|
|
672
679
|
/** \struct SkCanvas::SaveLayerRec
|
673
680
|
SaveLayerRec contains the state used to create the layer.
|
@@ -687,7 +694,7 @@ public:
|
|
687
694
|
@return SaveLayerRec with empty fBackdrop
|
688
695
|
*/
|
689
696
|
SaveLayerRec(const SkRect* bounds, const SkPaint* paint, SaveLayerFlags saveLayerFlags = 0)
|
690
|
-
: SaveLayerRec(bounds, paint, nullptr, 1.f, saveLayerFlags) {}
|
697
|
+
: SaveLayerRec(bounds, paint, nullptr, 1.f, saveLayerFlags, /*filters=*/{}) {}
|
691
698
|
|
692
699
|
/** Sets fBounds, fPaint, fBackdrop, and fSaveLayerFlags.
|
693
700
|
|
@@ -703,7 +710,7 @@ public:
|
|
703
710
|
*/
|
704
711
|
SaveLayerRec(const SkRect* bounds, const SkPaint* paint, const SkImageFilter* backdrop,
|
705
712
|
SaveLayerFlags saveLayerFlags)
|
706
|
-
: SaveLayerRec(bounds, paint, backdrop, 1.f, saveLayerFlags) {}
|
713
|
+
: SaveLayerRec(bounds, paint, backdrop, 1.f, saveLayerFlags, /*filters=*/{}) {}
|
707
714
|
|
708
715
|
/** hints at layer size limit */
|
709
716
|
const SkRect* fBounds = nullptr;
|
@@ -711,6 +718,8 @@ public:
|
|
711
718
|
/** modifies overlay */
|
712
719
|
const SkPaint* fPaint = nullptr;
|
713
720
|
|
721
|
+
FilterSpan fFilters = {};
|
722
|
+
|
714
723
|
/**
|
715
724
|
* If not null, this triggers the same initialization behavior as setting
|
716
725
|
* kInitWithPrevious_SaveLayerFlag on fSaveLayerFlags: the current layer is copied into
|
@@ -726,13 +735,23 @@ public:
|
|
726
735
|
friend class SkCanvas;
|
727
736
|
friend class SkCanvasPriv;
|
728
737
|
|
729
|
-
SaveLayerRec(const SkRect* bounds,
|
730
|
-
|
731
|
-
|
732
|
-
|
733
|
-
|
734
|
-
|
735
|
-
|
738
|
+
SaveLayerRec(const SkRect* bounds,
|
739
|
+
const SkPaint* paint,
|
740
|
+
const SkImageFilter* backdrop,
|
741
|
+
SkScalar backdropScale,
|
742
|
+
SaveLayerFlags saveLayerFlags,
|
743
|
+
FilterSpan filters)
|
744
|
+
: fBounds(bounds)
|
745
|
+
, fPaint(paint)
|
746
|
+
, fFilters(filters)
|
747
|
+
, fBackdrop(backdrop)
|
748
|
+
, fSaveLayerFlags(saveLayerFlags)
|
749
|
+
, fExperimentalBackdropScale(backdropScale) {
|
750
|
+
// We only allow the paint's image filter or the side-car list of filters -- not both.
|
751
|
+
SkASSERT(fFilters.empty() || !paint || !paint->getImageFilter());
|
752
|
+
// To keep things reasonable (during deserialization), we limit filter list size.
|
753
|
+
SkASSERT(fFilters.size() <= kMaxFiltersPerLayer);
|
754
|
+
}
|
736
755
|
|
737
756
|
// Relative scale factor that the image content used to initialize the layer when the
|
738
757
|
// kInitFromPrevious flag or a backdrop filter is used.
|
@@ -2283,30 +2302,33 @@ protected:
|
|
2283
2302
|
virtual void onDrawSlug(const sktext::gpu::Slug* slug);
|
2284
2303
|
|
2285
2304
|
private:
|
2286
|
-
|
2287
|
-
|
2288
|
-
|
2289
|
-
|
2290
|
-
|
2305
|
+
enum class PredrawFlags : unsigned {
|
2306
|
+
kNone = 0,
|
2307
|
+
kOpaqueShaderOverride = 1, // The paint's shader is overridden with an opaque image
|
2308
|
+
kNonOpaqueShaderOverride = 2, // The paint's shader is overridden but is not opaque
|
2309
|
+
kCheckForOverwrite = 4, // Check if the draw would overwrite the entire surface
|
2310
|
+
kSkipMaskFilterAutoLayer = 8, // Do not apply mask filters in the AutoLayer
|
2291
2311
|
};
|
2312
|
+
// Inlined SK_DECL_BITMASK_OPS_FRIENDS to avoid including SkEnumBitMask.h
|
2313
|
+
friend constexpr SkEnumBitMask<PredrawFlags> operator|(PredrawFlags, PredrawFlags);
|
2314
|
+
friend constexpr SkEnumBitMask<PredrawFlags> operator&(PredrawFlags, PredrawFlags);
|
2315
|
+
friend constexpr SkEnumBitMask<PredrawFlags> operator^(PredrawFlags, PredrawFlags);
|
2316
|
+
friend constexpr SkEnumBitMask<PredrawFlags> operator~(PredrawFlags);
|
2292
2317
|
|
2293
2318
|
// notify our surface (if we have one) that we are about to draw, so it
|
2294
2319
|
// can perform copy-on-write or invalidate any cached images
|
2295
2320
|
// returns false if the copy failed
|
2296
2321
|
[[nodiscard]] bool predrawNotify(bool willOverwritesEntireSurface = false);
|
2297
|
-
[[nodiscard]] bool predrawNotify(const SkRect*, const SkPaint*,
|
2322
|
+
[[nodiscard]] bool predrawNotify(const SkRect*, const SkPaint*, SkEnumBitMask<PredrawFlags>);
|
2298
2323
|
|
2299
|
-
enum class CheckForOverwrite : bool {
|
2300
|
-
kNo = false,
|
2301
|
-
kYes = true
|
2302
|
-
};
|
2303
2324
|
// call the appropriate predrawNotify and create a layer if needed.
|
2304
2325
|
std::optional<AutoLayerForImageFilter> aboutToDraw(
|
2305
|
-
|
2306
|
-
|
2307
|
-
|
2308
|
-
|
2309
|
-
|
2326
|
+
const SkPaint& paint,
|
2327
|
+
const SkRect* rawBounds,
|
2328
|
+
SkEnumBitMask<PredrawFlags> flags);
|
2329
|
+
std::optional<AutoLayerForImageFilter> aboutToDraw(
|
2330
|
+
const SkPaint& paint,
|
2331
|
+
const SkRect* rawBounds = nullptr);
|
2310
2332
|
|
2311
2333
|
// The bottom-most device in the stack, only changed by init(). Image properties and the final
|
2312
2334
|
// canvas pixels are determined by this device.
|
@@ -2323,12 +2345,16 @@ private:
|
|
2323
2345
|
// clip, and matrix commands. There is a layer per call to saveLayer() using the
|
2324
2346
|
// kFullLayer_SaveLayerStrategy.
|
2325
2347
|
struct Layer {
|
2326
|
-
sk_sp<SkDevice>
|
2327
|
-
sk_sp<SkImageFilter
|
2328
|
-
SkPaint
|
2329
|
-
bool
|
2330
|
-
|
2331
|
-
|
2348
|
+
sk_sp<SkDevice> fDevice;
|
2349
|
+
skia_private::STArray<1, sk_sp<SkImageFilter>> fImageFilters;
|
2350
|
+
SkPaint fPaint;
|
2351
|
+
bool fIsCoverage;
|
2352
|
+
bool fDiscard;
|
2353
|
+
|
2354
|
+
Layer(sk_sp<SkDevice> device,
|
2355
|
+
FilterSpan imageFilters,
|
2356
|
+
const SkPaint& paint,
|
2357
|
+
bool isCoverage);
|
2332
2358
|
};
|
2333
2359
|
|
2334
2360
|
// Encapsulate state needed to restore from saveBehind()
|
@@ -2364,8 +2390,9 @@ private:
|
|
2364
2390
|
~MCRec();
|
2365
2391
|
|
2366
2392
|
void newLayer(sk_sp<SkDevice> layerDevice,
|
2367
|
-
|
2368
|
-
const SkPaint& restorePaint
|
2393
|
+
FilterSpan filters,
|
2394
|
+
const SkPaint& restorePaint,
|
2395
|
+
bool layerIsCoverage);
|
2369
2396
|
|
2370
2397
|
void reset(SkDevice* device);
|
2371
2398
|
};
|
@@ -2470,7 +2497,7 @@ private:
|
|
2470
2497
|
const SkMatrix* matrix = nullptr);
|
2471
2498
|
|
2472
2499
|
void internalDrawPaint(const SkPaint& paint);
|
2473
|
-
void internalSaveLayer(const SaveLayerRec&, SaveLayerStrategy);
|
2500
|
+
void internalSaveLayer(const SaveLayerRec&, SaveLayerStrategy, bool coverageOnly=false);
|
2474
2501
|
void internalSaveBehind(const SkRect*);
|
2475
2502
|
|
2476
2503
|
void internalConcat44(const SkM44&);
|
@@ -2499,16 +2526,18 @@ private:
|
|
2499
2526
|
* relative transforms between the devices).
|
2500
2527
|
*/
|
2501
2528
|
void internalDrawDeviceWithFilter(SkDevice* src, SkDevice* dst,
|
2502
|
-
|
2529
|
+
FilterSpan filters, const SkPaint& paint,
|
2503
2530
|
DeviceCompatibleWithFilter compat,
|
2504
|
-
SkScalar scaleFactor = 1.f
|
2531
|
+
SkScalar scaleFactor = 1.f,
|
2532
|
+
bool srcIsCoverageLayer = false);
|
2505
2533
|
|
2506
2534
|
/*
|
2507
2535
|
* Returns true if drawing the specified rect (or all if it is null) with the specified
|
2508
2536
|
* paint (or default if null) would overwrite the entire root device of the canvas
|
2509
2537
|
* (i.e. the canvas' surface if it had one).
|
2510
2538
|
*/
|
2511
|
-
bool wouldOverwriteEntireSurface(const SkRect*, const SkPaint*,
|
2539
|
+
bool wouldOverwriteEntireSurface(const SkRect*, const SkPaint*,
|
2540
|
+
SkEnumBitMask<PredrawFlags>) const;
|
2512
2541
|
|
2513
2542
|
/**
|
2514
2543
|
* Returns true if the paint's imagefilter can be invoked directly, without needed a layer.
|
@@ -15,6 +15,7 @@
|
|
15
15
|
|
16
16
|
#include <cstddef>
|
17
17
|
#include <cstdint>
|
18
|
+
#include <utility>
|
18
19
|
|
19
20
|
class SkColorMatrix;
|
20
21
|
class SkColorSpace;
|
@@ -82,8 +83,10 @@ private:
|
|
82
83
|
|
83
84
|
class SK_API SkColorFilters {
|
84
85
|
public:
|
85
|
-
static sk_sp<SkColorFilter> Compose(sk_sp<SkColorFilter
|
86
|
-
|
86
|
+
static sk_sp<SkColorFilter> Compose(const sk_sp<SkColorFilter>& outer,
|
87
|
+
sk_sp<SkColorFilter> inner) {
|
88
|
+
return outer ? outer->makeComposed(std::move(inner))
|
89
|
+
: std::move(inner);
|
87
90
|
}
|
88
91
|
|
89
92
|
// Blends between the constant color (src) and input color (dst) based on the SkBlendMode.
|
@@ -36,6 +36,7 @@ public:
|
|
36
36
|
* Begin a new page for the document, returning the canvas that will draw
|
37
37
|
* into the page. The document owns this canvas, and it will go out of
|
38
38
|
* scope when endPage() or close() is called, or the document is deleted.
|
39
|
+
* This will call endPage() if there is a currently active page.
|
39
40
|
*/
|
40
41
|
SkCanvas* beginPage(SkScalar width, SkScalar height, const SkRect* content = nullptr);
|
41
42
|
|
@@ -201,20 +201,14 @@ public:
|
|
201
201
|
*/
|
202
202
|
SkFont makeWithSize(SkScalar size) const;
|
203
203
|
|
204
|
-
/**
|
205
|
-
Does not alter SkTypeface SkRefCnt.
|
204
|
+
/** Does not alter SkTypeface SkRefCnt.
|
206
205
|
|
207
|
-
@return SkTypeface
|
206
|
+
@return non-null SkTypeface
|
208
207
|
*/
|
209
|
-
SkTypeface* getTypeface() const {
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
@return SkTypeface if previously set or, a pointer to the default typeface if not
|
215
|
-
previously set.
|
216
|
-
*/
|
217
|
-
SkTypeface* getTypefaceOrDefault() const;
|
208
|
+
SkTypeface* getTypeface() const {
|
209
|
+
SkASSERT(fTypeface);
|
210
|
+
return fTypeface.get();
|
211
|
+
}
|
218
212
|
|
219
213
|
/** Returns text size in points.
|
220
214
|
|
@@ -238,24 +232,20 @@ public:
|
|
238
232
|
|
239
233
|
/** Increases SkTypeface SkRefCnt by one.
|
240
234
|
|
241
|
-
@return
|
235
|
+
@return A non-null SkTypeface.
|
242
236
|
*/
|
243
|
-
sk_sp<SkTypeface> refTypeface() const {
|
244
|
-
|
245
|
-
|
246
|
-
|
247
|
-
@return SkTypeface if previously set or, a pointer to the default typeface if not
|
248
|
-
previously set.
|
249
|
-
*/
|
250
|
-
sk_sp<SkTypeface> refTypefaceOrDefault() const;
|
237
|
+
sk_sp<SkTypeface> refTypeface() const {
|
238
|
+
SkASSERT(fTypeface);
|
239
|
+
return fTypeface;
|
240
|
+
}
|
251
241
|
|
252
242
|
/** Sets SkTypeface to typeface, decreasing SkRefCnt of the previous SkTypeface.
|
253
|
-
Pass nullptr to clear SkTypeface and use
|
254
|
-
tf SkRefCnt by one.
|
243
|
+
Pass nullptr to clear SkTypeface and use an empty typeface (which draws nothing).
|
244
|
+
Increments tf SkRefCnt by one.
|
255
245
|
|
256
246
|
@param tf font and style used to draw text
|
257
247
|
*/
|
258
|
-
void setTypeface(sk_sp<SkTypeface> tf)
|
248
|
+
void setTypeface(sk_sp<SkTypeface> tf);
|
259
249
|
|
260
250
|
/** Sets text size in points.
|
261
251
|
Has no effect if textSize is not greater than or equal to zero.
|
@@ -16,7 +16,7 @@
|
|
16
16
|
The metric values are consistent with the Skia y-down coordinate system.
|
17
17
|
*/
|
18
18
|
struct SK_API SkFontMetrics {
|
19
|
-
bool operator==(const SkFontMetrics& that) {
|
19
|
+
bool operator==(const SkFontMetrics& that) const {
|
20
20
|
return
|
21
21
|
this->fFlags == that.fFlags &&
|
22
22
|
this->fTop == that.fTop &&
|
@@ -112,9 +112,6 @@ public:
|
|
112
112
|
|
113
113
|
sk_sp<SkTypeface> legacyMakeTypeface(const char familyName[], SkFontStyle style) const;
|
114
114
|
|
115
|
-
/** Return the default fontmgr. */
|
116
|
-
static sk_sp<SkFontMgr> RefDefault();
|
117
|
-
|
118
115
|
/* Returns an empty font manager without any typeface dependencies */
|
119
116
|
static sk_sp<SkFontMgr> RefEmpty();
|
120
117
|
|
@@ -141,10 +138,6 @@ protected:
|
|
141
138
|
virtual sk_sp<SkTypeface> onMakeFromFile(const char path[], int ttcIndex) const = 0;
|
142
139
|
|
143
140
|
virtual sk_sp<SkTypeface> onLegacyMakeTypeface(const char familyName[], SkFontStyle) const = 0;
|
144
|
-
|
145
|
-
private:
|
146
|
-
/** Implemented by porting layer to return the default factory. */
|
147
|
-
static sk_sp<SkFontMgr> Factory();
|
148
141
|
};
|
149
142
|
|
150
143
|
#endif
|
@@ -69,6 +69,19 @@ public:
|
|
69
69
|
*/
|
70
70
|
static int SetFontCacheCountLimit(int count);
|
71
71
|
|
72
|
+
/**
|
73
|
+
* Return the current limit to the number of entries in the typeface cache.
|
74
|
+
* A cache "entry" is associated with each typeface.
|
75
|
+
*/
|
76
|
+
static int GetTypefaceCacheCountLimit();
|
77
|
+
|
78
|
+
/**
|
79
|
+
* Set the limit to the number of entries in the typeface cache, and return
|
80
|
+
* the previous value. Changes to this only take effect the next time
|
81
|
+
* each cache object is modified.
|
82
|
+
*/
|
83
|
+
static int SetTypefaceCacheCountLimit(int count);
|
84
|
+
|
72
85
|
/**
|
73
86
|
* For debugging purposes, this will attempt to purge the font cache. It
|
74
87
|
* does not change the limit, but will cause subsequent font measures and
|
@@ -15,6 +15,7 @@
|
|
15
15
|
#include "include/core/SkString.h"
|
16
16
|
#include "include/effects/SkRuntimeEffect.h"
|
17
17
|
#include "include/private/base/SkAPI.h"
|
18
|
+
#include "include/private/base/SkTArray.h"
|
18
19
|
|
19
20
|
#include <cstddef>
|
20
21
|
#include <cstdint>
|
@@ -168,10 +169,7 @@ public:
|
|
168
169
|
*/
|
169
170
|
SkSpan<const Uniform> uniforms() const { return SkSpan(fUniforms); }
|
170
171
|
|
171
|
-
/**
|
172
|
-
* Provides basic info about individual children: names, indices and runtime effect type.
|
173
|
-
* TODO(b/40045302): SkMesh will currently reject mesh specifications that include child effects
|
174
|
-
*/
|
172
|
+
/** Provides basic info about individual children: names, indices and runtime effect type. */
|
175
173
|
SkSpan<const Child> children() const { return SkSpan(fChildren); }
|
176
174
|
|
177
175
|
/** Returns a pointer to the named child's description, or nullptr if not found. */
|
@@ -188,6 +186,8 @@ public:
|
|
188
186
|
|
189
187
|
size_t stride() const { return fStride; }
|
190
188
|
|
189
|
+
SkColorSpace* colorSpace() const { return fColorSpace.get(); }
|
190
|
+
|
191
191
|
private:
|
192
192
|
friend struct SkMeshSpecificationPriv;
|
193
193
|
|
@@ -317,8 +317,6 @@ public:
|
|
317
317
|
* If the mesh is invalid the returned string give contain the reason for the failure (e.g. the
|
318
318
|
* vertex buffer was null or uniform data too small).
|
319
319
|
*/
|
320
|
-
|
321
|
-
// TODO(b/40045302): support for `children` is a work-in-progress
|
322
320
|
static Result Make(sk_sp<SkMeshSpecification>,
|
323
321
|
Mode,
|
324
322
|
sk_sp<VertexBuffer>,
|
@@ -334,8 +332,6 @@ public:
|
|
334
332
|
* If the mesh is invalid the returned string give contain the reason for the failure (e.g. the
|
335
333
|
* index buffer was null or uniform data too small).
|
336
334
|
*/
|
337
|
-
|
338
|
-
// TODO(b/40045302): support for `children` is a work-in-progress
|
339
335
|
static Result MakeIndexed(sk_sp<SkMeshSpecification>,
|
340
336
|
Mode,
|
341
337
|
sk_sp<VertexBuffer>,
|
@@ -383,7 +379,7 @@ private:
|
|
383
379
|
sk_sp<IndexBuffer> fIB;
|
384
380
|
|
385
381
|
sk_sp<const SkData> fUniforms;
|
386
|
-
|
382
|
+
skia_private::STArray<2, ChildPtr> fChildren;
|
387
383
|
|
388
384
|
size_t fVOffset = 0; // Must be a multiple of spec->stride()
|
389
385
|
size_t fVCount = 0;
|
@@ -405,14 +401,14 @@ namespace SkMeshes {
|
|
405
401
|
* @param data The data used to populate the buffer, or nullptr to create a zero-
|
406
402
|
* initialized buffer.
|
407
403
|
* @param size Both the size of the data in 'data' and the size of the resulting
|
408
|
-
* buffer.
|
404
|
+
* buffer, in bytes.
|
409
405
|
*/
|
410
406
|
SK_API sk_sp<SkMesh::IndexBuffer> MakeIndexBuffer(const void* data, size_t size);
|
411
407
|
|
412
408
|
/**
|
413
409
|
* Makes a copy of an index buffer. The copy will be CPU-backed.
|
414
410
|
*/
|
415
|
-
SK_API sk_sp<SkMesh::IndexBuffer> CopyIndexBuffer(sk_sp<SkMesh::IndexBuffer
|
411
|
+
SK_API sk_sp<SkMesh::IndexBuffer> CopyIndexBuffer(const sk_sp<SkMesh::IndexBuffer>&);
|
416
412
|
|
417
413
|
/**
|
418
414
|
* Makes a CPU-backed vertex buffer to be used with SkMeshes.
|
@@ -420,14 +416,14 @@ SK_API sk_sp<SkMesh::IndexBuffer> CopyIndexBuffer(sk_sp<SkMesh::IndexBuffer>);
|
|
420
416
|
* @param data The data used to populate the buffer, or nullptr to create a zero-
|
421
417
|
* initialized buffer.
|
422
418
|
* @param size Both the size of the data in 'data' and the size of the resulting
|
423
|
-
* buffer.
|
419
|
+
* buffer, in bytes.
|
424
420
|
*/
|
425
421
|
SK_API sk_sp<SkMesh::VertexBuffer> MakeVertexBuffer(const void*, size_t size);
|
426
422
|
|
427
423
|
/**
|
428
424
|
* Makes a copy of a vertex buffer. The copy will be CPU-backed.
|
429
425
|
*/
|
430
|
-
SK_API sk_sp<SkMesh::VertexBuffer> CopyVertexBuffer(sk_sp<SkMesh::VertexBuffer
|
426
|
+
SK_API sk_sp<SkMesh::VertexBuffer> CopyVertexBuffer(const sk_sp<SkMesh::VertexBuffer>&);
|
431
427
|
} // namespace SkMeshes
|
432
428
|
|
433
429
|
#endif
|
@@ -12,12 +12,14 @@
|
|
12
12
|
#include "include/private/base/SkAPI.h"
|
13
13
|
|
14
14
|
#include <cstddef>
|
15
|
+
#include <optional>
|
15
16
|
|
16
17
|
class SkData;
|
17
18
|
class SkImage;
|
18
19
|
class SkPicture;
|
19
20
|
class SkTypeface;
|
20
21
|
class SkReadBuffer;
|
22
|
+
enum SkAlphaType : int;
|
21
23
|
namespace sktext::gpu {
|
22
24
|
class Slug;
|
23
25
|
}
|
@@ -48,10 +50,25 @@ using SkDeserialPictureProc = sk_sp<SkPicture> (*)(const void* data, size_t leng
|
|
48
50
|
*
|
49
51
|
* This will also be used to decode the internal mipmap layers that are saved on some images.
|
50
52
|
*
|
51
|
-
*
|
52
|
-
*
|
53
|
+
* An explicit SkAlphaType may have been encoded in the bytestream; if not, then the passed in
|
54
|
+
* optional will be not present.
|
55
|
+
*
|
56
|
+
* Clients should set at least SkDeserialImageProc; SkDeserialImageFromDataProc may be called
|
57
|
+
* if the internal implementation has a SkData copy already. Implementations of SkDeserialImageProc
|
58
|
+
* must make a copy of any data they needed after the proc finishes, since the data will go away
|
59
|
+
* after serialization ends.
|
53
60
|
*/
|
61
|
+
#if !defined(SK_LEGACY_DESERIAL_IMAGE_PROC)
|
54
62
|
using SkDeserialImageProc = sk_sp<SkImage> (*)(const void* data, size_t length, void* ctx);
|
63
|
+
#else
|
64
|
+
using SkDeserialImageProc = sk_sp<SkImage> (*)(const void* data,
|
65
|
+
size_t length,
|
66
|
+
std::optional<SkAlphaType>,
|
67
|
+
void* ctx);
|
68
|
+
#endif
|
69
|
+
using SkDeserialImageFromDataProc = sk_sp<SkImage> (*)(sk_sp<SkData>,
|
70
|
+
std::optional<SkAlphaType>,
|
71
|
+
void* ctx);
|
55
72
|
|
56
73
|
/**
|
57
74
|
* Slugs are currently only deserializable with a GPU backend. Clients will not be able to
|
@@ -78,22 +95,23 @@ struct SK_API SkSerialProcs {
|
|
78
95
|
};
|
79
96
|
|
80
97
|
struct SK_API SkDeserialProcs {
|
81
|
-
SkDeserialPictureProc
|
82
|
-
void*
|
98
|
+
SkDeserialPictureProc fPictureProc = nullptr;
|
99
|
+
void* fPictureCtx = nullptr;
|
83
100
|
|
84
|
-
SkDeserialImageProc
|
85
|
-
|
101
|
+
SkDeserialImageProc fImageProc = nullptr;
|
102
|
+
SkDeserialImageFromDataProc fImageDataProc = nullptr;
|
103
|
+
void* fImageCtx = nullptr;
|
86
104
|
|
87
|
-
SkSlugProc
|
88
|
-
void*
|
105
|
+
SkSlugProc fSlugProc = nullptr;
|
106
|
+
void* fSlugCtx = nullptr;
|
89
107
|
|
90
|
-
SkDeserialTypefaceProc
|
91
|
-
void*
|
108
|
+
SkDeserialTypefaceProc fTypefaceProc = nullptr;
|
109
|
+
void* fTypefaceCtx = nullptr;
|
92
110
|
|
93
111
|
// This looks like a flag, but it could be considered a proc as well (one that takes no
|
94
112
|
// parameters and returns a bool). Given that there are only two valid implementations of that
|
95
113
|
// proc, we just insert the bool directly.
|
96
|
-
bool
|
114
|
+
bool fAllowSkSL = true;
|
97
115
|
};
|
98
116
|
|
99
117
|
#endif
|
@@ -52,13 +52,13 @@ struct SkSize {
|
|
52
52
|
SkScalar fWidth;
|
53
53
|
SkScalar fHeight;
|
54
54
|
|
55
|
-
static SkSize Make(SkScalar w, SkScalar h) { return {w, h}; }
|
55
|
+
static constexpr SkSize Make(SkScalar w, SkScalar h) { return {w, h}; }
|
56
56
|
|
57
|
-
static SkSize Make(const SkISize& src) {
|
57
|
+
static constexpr SkSize Make(const SkISize& src) {
|
58
58
|
return {SkIntToScalar(src.width()), SkIntToScalar(src.height())};
|
59
59
|
}
|
60
60
|
|
61
|
-
static SkSize MakeEmpty() { return {0, 0}; }
|
61
|
+
static constexpr SkSize MakeEmpty() { return {0, 0}; }
|
62
62
|
|
63
63
|
void set(SkScalar w, SkScalar h) { *this = SkSize{w, h}; }
|
64
64
|
|
@@ -25,19 +25,6 @@ class SkStreamAsset;
|
|
25
25
|
/**
|
26
26
|
* SkStream -- abstraction for a source of bytes. Subclasses can be backed by
|
27
27
|
* memory, or a file, or something else.
|
28
|
-
*
|
29
|
-
* NOTE:
|
30
|
-
*
|
31
|
-
* Classic "streams" APIs are sort of async, in that on a request for N
|
32
|
-
* bytes, they may return fewer than N bytes on a given call, in which case
|
33
|
-
* the caller can "try again" to get more bytes, eventually (modulo an error)
|
34
|
-
* receiving their total N bytes.
|
35
|
-
*
|
36
|
-
* Skia streams behave differently. They are effectively synchronous, and will
|
37
|
-
* always return all N bytes of the request if possible. If they return fewer
|
38
|
-
* (the read() call returns the number of bytes read) then that means there is
|
39
|
-
* no more data (at EOF or hit an error). The caller should *not* call again
|
40
|
-
* in hopes of fulfilling more of the request.
|
41
28
|
*/
|
42
29
|
class SK_API SkStream {
|
43
30
|
public:
|
@@ -81,6 +68,9 @@ public:
|
|
81
68
|
virtual size_t peek(void* /*buffer*/, size_t /*size*/) const { return 0; }
|
82
69
|
|
83
70
|
/** Returns true when all the bytes in the stream have been read.
|
71
|
+
* As SkStream represents synchronous I/O, isAtEnd returns false when the
|
72
|
+
* final stream length isn't known yet, even when all the bytes available
|
73
|
+
* so far have been read.
|
84
74
|
* This may return true early (when there are no more bytes to be read)
|
85
75
|
* or late (after the first unsuccessful read).
|
86
76
|
*/
|
@@ -604,9 +604,12 @@ public:
|
|
604
604
|
const SkSurfaceProps& props() const { return fProps; }
|
605
605
|
|
606
606
|
/** Inserts a list of GPU semaphores that the current GPU-backed API must wait on before
|
607
|
-
executing any more commands on the GPU for this surface.
|
608
|
-
|
609
|
-
|
607
|
+
executing any more commands on the GPU for this surface. We only guarantee blocking
|
608
|
+
transfer and fragment shader work, but may block earlier stages as well depending on the
|
609
|
+
backend.
|
610
|
+
If this call returns false, then the GPU back-end will not wait on any passed in
|
611
|
+
semaphores, and the client will still own the semaphores, regardless of the value of
|
612
|
+
deleteSemaphoresAfterWait.
|
610
613
|
|
611
614
|
If deleteSemaphoresAfterWait is false then Skia will not delete the semaphores. In this case
|
612
615
|
it is the client's responsibility to not destroy or attempt to reuse the semaphores until it
|
@@ -59,15 +59,13 @@ public:
|
|
59
59
|
// Currently this only impacts GPU backends
|
60
60
|
kAlwaysDither_Flag = 1 << 2,
|
61
61
|
};
|
62
|
-
/** Deprecated alias used by Chromium. Will be removed. */
|
63
|
-
static const Flags kUseDistanceFieldFonts_Flag = kUseDeviceIndependentFonts_Flag;
|
64
62
|
|
65
63
|
/** No flags, unknown pixel geometry. */
|
66
64
|
SkSurfaceProps();
|
67
65
|
SkSurfaceProps(uint32_t flags, SkPixelGeometry);
|
68
66
|
|
69
|
-
SkSurfaceProps(const SkSurfaceProps&);
|
70
|
-
SkSurfaceProps& operator=(const SkSurfaceProps&);
|
67
|
+
SkSurfaceProps(const SkSurfaceProps&) = default;
|
68
|
+
SkSurfaceProps& operator=(const SkSurfaceProps&) = default;
|
71
69
|
|
72
70
|
SkSurfaceProps cloneWithPixelGeometry(SkPixelGeometry newPixelGeometry) const {
|
73
71
|
return SkSurfaceProps(fFlags, newPixelGeometry);
|
@@ -89,6 +89,21 @@ public:
|
|
89
89
|
*/
|
90
90
|
virtual void dumpWrappedState(const char* /*dumpName*/, bool /*isWrappedObject*/) {}
|
91
91
|
|
92
|
+
/**
|
93
|
+
* Returns true if we should dump unbudgeted objects. Unbudgeted objects can either come from
|
94
|
+
* wrapped objects passed into Skia from the client or from Skia created objects currently held
|
95
|
+
* by the client in a public Skia object (e.g. SkSurface or SkImage). This call is only used
|
96
|
+
* when dumping Graphite memory statistics.
|
97
|
+
*/
|
98
|
+
virtual bool shouldDumpUnbudgetedObjects() const { return true; }
|
99
|
+
|
100
|
+
/**
|
101
|
+
* If shouldDumpUnbudgetedObjects() returns true then this function will be called to populate
|
102
|
+
* the output with information on whether the item being dumped is budgeted. This call is only
|
103
|
+
* used when dumping Graphite memory statistics.
|
104
|
+
*/
|
105
|
+
virtual void dumpBudgetedState(const char* /*dumpName*/, bool /*isBudgeted*/) {}
|
106
|
+
|
92
107
|
protected:
|
93
108
|
virtual ~SkTraceMemoryDump() = default;
|
94
109
|
SkTraceMemoryDump() = default;
|