@shopify/react-native-skia 0.1.191 → 0.1.193
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/android/CMakeLists.txt +1 -1
- package/android/build.gradle +1 -0
- package/android/cpp/jni/JniPlatformContext.cpp +1 -1
- package/cpp/api/JsiSkColorFilter.h +2 -17
- package/cpp/api/JsiSkContourMeasure.h +3 -17
- package/cpp/api/JsiSkContourMeasureIter.h +3 -18
- package/cpp/api/JsiSkData.h +1 -18
- package/cpp/api/JsiSkFont.h +4 -14
- package/cpp/api/JsiSkHostObjects.h +85 -10
- package/cpp/api/JsiSkImage.h +26 -16
- package/cpp/api/JsiSkImageFactory.h +2 -2
- package/cpp/api/JsiSkImageFilter.h +1 -17
- package/cpp/api/JsiSkMaskFilter.h +1 -17
- package/cpp/api/JsiSkMatrix.h +3 -6
- package/cpp/api/JsiSkPaint.h +3 -15
- package/cpp/api/JsiSkPath.h +10 -21
- package/cpp/api/JsiSkPathEffect.h +2 -17
- package/cpp/api/JsiSkPicture.h +4 -18
- package/cpp/api/JsiSkPictureRecorder.h +4 -1
- package/cpp/api/JsiSkPoint.h +6 -1
- package/cpp/api/JsiSkRRect.h +6 -1
- package/cpp/api/JsiSkRSXform.h +4 -6
- package/cpp/api/JsiSkRect.h +6 -2
- package/cpp/api/JsiSkRuntimeEffect.h +4 -7
- package/cpp/api/JsiSkRuntimeShaderBuilder.h +2 -10
- package/cpp/api/JsiSkSVG.h +1 -10
- package/cpp/api/JsiSkShader.h +2 -16
- package/cpp/api/JsiSkSurface.h +3 -16
- package/cpp/api/JsiSkTextBlob.h +2 -18
- package/cpp/api/JsiSkTypeface.h +1 -22
- package/cpp/api/JsiSkVertices.h +3 -17
- package/cpp/rnskia/dom/base/Declaration.h +5 -7
- package/cpp/rnskia/dom/nodes/JsiBlurMaskNode.h +1 -0
- package/cpp/rnskia/dom/nodes/JsiPathNode.h +2 -2
- package/cpp/rnskia/dom/props/BoxShadowProps.h +2 -0
- package/cpp/rnskia/values/RNSkReadonlyValue.h +2 -2
- package/cpp/rnskia/values/RNSkValue.h +1 -1
- package/cpp/skia/include/android/SkAndroidFrameworkUtils.h +2 -8
- package/cpp/skia/include/android/SkImageAndroid.h +101 -0
- package/cpp/skia/include/codec/SkAndroidCodec.h +26 -8
- package/cpp/skia/include/codec/SkCodec.h +31 -17
- package/cpp/skia/include/codec/SkEncodedImageFormat.h +36 -0
- package/cpp/skia/include/codec/SkPixmapUtils.h +31 -0
- package/cpp/skia/include/config/SkUserConfig.h +61 -29
- package/cpp/skia/include/core/SkBitmap.h +25 -25
- package/cpp/skia/include/core/SkBlurTypes.h +0 -2
- package/cpp/skia/include/core/SkCanvas.h +32 -15
- package/cpp/skia/include/core/SkCapabilities.h +2 -2
- package/cpp/skia/include/core/SkColor.h +2 -0
- package/cpp/skia/include/core/SkColorPriv.h +19 -4
- package/cpp/skia/include/core/SkColorSpace.h +14 -17
- package/cpp/skia/include/core/SkColorType.h +1 -0
- package/cpp/skia/include/core/SkContourMeasure.h +1 -1
- package/cpp/skia/include/core/SkCoverageMode.h +0 -2
- package/cpp/skia/include/core/SkCubicMap.h +2 -0
- package/cpp/skia/include/core/SkData.h +5 -2
- package/cpp/skia/include/core/SkDataTable.h +6 -2
- package/cpp/skia/include/core/SkDeferredDisplayList.h +11 -10
- package/cpp/skia/include/core/SkDeferredDisplayListRecorder.h +9 -8
- package/cpp/skia/include/core/SkDrawable.h +10 -2
- package/cpp/skia/include/core/SkEncodedImageFormat.h +3 -30
- package/cpp/skia/include/core/SkFlattenable.h +4 -2
- package/cpp/skia/include/core/SkFont.h +1 -0
- package/cpp/skia/include/core/SkFontMetrics.h +1 -0
- package/cpp/skia/include/core/SkFontMgr.h +20 -29
- package/cpp/skia/include/core/SkFontStyle.h +4 -1
- package/cpp/skia/include/core/SkGraphics.h +21 -18
- package/cpp/skia/include/core/SkICC.h +3 -13
- package/cpp/skia/include/core/SkImage.h +395 -717
- package/cpp/skia/include/core/SkImageGenerator.h +19 -74
- package/cpp/skia/include/core/SkImageInfo.h +7 -5
- package/cpp/skia/include/core/SkM44.h +11 -0
- package/cpp/skia/include/core/SkMaskFilter.h +6 -3
- package/cpp/skia/include/core/SkMatrix.h +14 -4
- package/cpp/skia/include/core/SkMesh.h +52 -18
- package/cpp/skia/include/core/SkMilestone.h +1 -1
- package/cpp/skia/include/core/SkPaint.h +11 -34
- package/cpp/skia/include/core/SkPath.h +23 -4
- package/cpp/skia/include/core/SkPathBuilder.h +13 -5
- package/cpp/skia/include/core/SkPathMeasure.h +1 -1
- package/cpp/skia/include/core/SkPathTypes.h +0 -2
- package/cpp/skia/include/core/SkPathUtils.h +42 -0
- package/cpp/skia/include/core/SkPicture.h +3 -2
- package/cpp/skia/include/core/SkPictureRecorder.h +2 -0
- package/cpp/skia/include/core/SkPixelRef.h +4 -8
- package/cpp/skia/include/core/SkPixmap.h +12 -20
- package/cpp/skia/include/core/SkPoint.h +4 -2
- package/cpp/skia/include/core/SkPromiseImageTexture.h +2 -2
- package/cpp/skia/include/core/SkRRect.h +5 -1
- package/cpp/skia/include/core/SkRect.h +6 -3
- package/cpp/skia/include/core/SkRefCnt.h +9 -14
- package/cpp/skia/include/core/SkRegion.h +1 -1
- package/cpp/skia/include/core/SkScalar.h +2 -4
- package/cpp/skia/include/core/SkSerialProcs.h +18 -10
- package/cpp/skia/include/core/SkShader.h +1 -64
- package/cpp/skia/include/core/SkSize.h +2 -0
- package/cpp/skia/include/core/SkSpan.h +4 -112
- package/cpp/skia/include/core/SkStream.h +11 -12
- package/cpp/skia/include/core/SkString.h +9 -25
- package/cpp/skia/include/core/SkStrokeRec.h +1 -1
- package/cpp/skia/include/core/SkSurface.h +83 -61
- package/cpp/skia/include/core/SkSurfaceCharacterization.h +3 -3
- package/cpp/skia/include/core/SkSurfaceProps.h +9 -1
- package/cpp/skia/include/core/SkTextBlob.h +2 -2
- package/cpp/skia/include/core/SkTextureCompressionType.h +30 -0
- package/cpp/skia/include/core/SkTime.h +1 -1
- package/cpp/skia/include/core/SkTypeface.h +9 -2
- package/cpp/skia/include/core/SkTypes.h +37 -466
- package/cpp/skia/include/core/SkVertices.h +2 -0
- package/cpp/skia/include/core/SkYUVAInfo.h +4 -0
- package/cpp/skia/include/core/SkYUVAPixmaps.h +7 -1
- package/cpp/skia/include/docs/SkPDFDocument.h +12 -1
- package/cpp/skia/include/effects/SkColorMatrix.h +2 -1
- package/cpp/skia/include/effects/SkGradientShader.h +65 -14
- package/cpp/skia/include/effects/SkImageFilters.h +0 -11
- package/cpp/skia/include/effects/SkRuntimeEffect.h +41 -11
- package/cpp/skia/include/encode/SkEncoder.h +7 -3
- package/cpp/skia/include/encode/SkICC.h +36 -0
- package/cpp/skia/include/encode/SkJpegEncoder.h +102 -71
- package/cpp/skia/include/encode/SkPngEncoder.h +89 -71
- package/cpp/skia/include/encode/SkWebpEncoder.h +65 -38
- package/cpp/skia/include/gpu/GpuTypes.h +23 -1
- package/cpp/skia/include/gpu/GrBackendSurface.h +9 -7
- package/cpp/skia/include/gpu/GrContextOptions.h +28 -9
- package/cpp/skia/include/gpu/GrContextThreadSafeProxy.h +6 -4
- package/cpp/skia/include/gpu/GrDirectContext.h +84 -63
- package/cpp/skia/include/gpu/GrDriverBugWorkarounds.h +2 -1
- package/cpp/skia/include/gpu/GrRecordingContext.h +9 -5
- package/cpp/skia/include/gpu/GrTypes.h +18 -18
- package/cpp/skia/include/gpu/d3d/GrD3DTypes.h +4 -4
- package/cpp/skia/include/gpu/dawn/GrDawnTypes.h +3 -3
- package/cpp/skia/include/gpu/ganesh/GrTextureGenerator.h +77 -0
- package/cpp/skia/include/gpu/ganesh/SkImageGanesh.h +385 -0
- package/cpp/skia/include/gpu/gl/GrGLExtensions.h +3 -3
- package/cpp/skia/include/gpu/gl/GrGLFunctions.h +1 -1
- package/cpp/skia/include/gpu/gl/GrGLInterface.h +0 -3
- package/cpp/skia/include/gpu/gl/GrGLTypes.h +2 -1
- package/cpp/skia/include/gpu/graphite/BackendTexture.h +72 -3
- package/cpp/skia/include/gpu/graphite/Context.h +85 -32
- package/cpp/skia/include/gpu/graphite/ContextOptions.h +15 -11
- package/cpp/skia/include/gpu/graphite/GraphiteTypes.h +55 -5
- package/cpp/skia/include/gpu/graphite/ImageProvider.h +6 -4
- package/cpp/skia/include/gpu/graphite/Recorder.h +41 -11
- package/cpp/skia/include/gpu/graphite/Recording.h +50 -3
- package/cpp/skia/include/gpu/graphite/TextureInfo.h +47 -8
- package/cpp/skia/include/gpu/graphite/YUVABackendTextures.h +139 -0
- package/cpp/skia/include/gpu/graphite/dawn/DawnTypes.h +40 -0
- package/cpp/skia/include/gpu/graphite/dawn/DawnUtils.h +28 -0
- package/cpp/skia/include/gpu/graphite/mtl/MtlBackendContext.h +1 -1
- package/cpp/skia/include/gpu/graphite/mtl/{MtlTypes.h → MtlGraphiteTypes.h} +7 -6
- package/cpp/skia/include/gpu/graphite/mtl/MtlGraphiteUtils.h +27 -0
- package/cpp/skia/include/gpu/graphite/vk/VulkanGraphiteTypes.h +4 -9
- package/cpp/skia/include/gpu/graphite/vk/VulkanGraphiteUtils.h +28 -0
- package/cpp/skia/include/gpu/mock/GrMockTypes.h +17 -13
- package/cpp/skia/include/gpu/mtl/GrMtlTypes.h +2 -2
- package/cpp/skia/include/gpu/vk/GrVkBackendContext.h +1 -1
- package/cpp/skia/include/gpu/vk/GrVkTypes.h +3 -3
- package/cpp/skia/include/gpu/vk/VulkanExtensions.h +3 -3
- package/cpp/skia/include/gpu/vk/VulkanMemoryAllocator.h +5 -7
- package/cpp/skia/include/pathops/SkPathOps.h +3 -3
- package/cpp/skia/include/ports/SkFontMgr_data.h +22 -0
- package/cpp/skia/include/ports/SkFontMgr_indirect.h +14 -14
- package/cpp/skia/include/ports/SkRemotableFontMgr.h +2 -2
- package/cpp/skia/include/ports/SkTypeface_win.h +2 -1
- package/cpp/skia/include/private/SkChecksum.h +32 -7
- package/cpp/skia/include/private/SkColorData.h +1 -26
- package/cpp/skia/include/private/SkGainmapInfo.h +97 -0
- package/cpp/skia/include/private/SkGainmapShader.h +53 -0
- package/cpp/skia/include/private/SkIDChangeListener.h +4 -3
- package/cpp/skia/include/private/SkJpegGainmapEncoder.h +71 -0
- package/cpp/skia/include/private/SkJpegMetadataDecoder.h +61 -0
- package/cpp/skia/include/private/SkOpts_spi.h +3 -1
- package/cpp/skia/include/private/SkPathRef.h +64 -47
- package/cpp/skia/include/private/SkSLDefines.h +5 -5
- package/cpp/skia/include/private/SkSLSampleUsage.h +0 -4
- package/cpp/skia/include/private/SkSpinlock.h +1 -1
- package/cpp/skia/include/private/SkWeakRefCnt.h +3 -0
- package/cpp/skia/include/private/{SingleOwner.h → base/SingleOwner.h} +8 -5
- package/cpp/skia/include/private/base/SkAPI.h +52 -0
- package/cpp/skia/include/private/base/SkAlign.h +39 -0
- package/cpp/skia/include/private/base/SkAlignedStorage.h +32 -0
- package/cpp/skia/include/private/base/SkAssert.h +92 -0
- package/cpp/skia/include/private/base/SkAttributes.h +102 -0
- package/cpp/skia/include/private/base/SkCPUTypes.h +25 -0
- package/cpp/skia/include/private/base/SkContainers.h +46 -0
- package/cpp/skia/include/private/base/SkDebug.h +27 -0
- package/cpp/skia/include/private/{SkDeque.h → base/SkDeque.h} +3 -1
- package/cpp/skia/include/private/base/SkFeatures.h +151 -0
- package/cpp/skia/include/private/{SkFixed.h → base/SkFixed.h} +9 -7
- package/cpp/skia/include/private/{SkFloatBits.h → base/SkFloatBits.h} +2 -3
- package/cpp/skia/include/private/{SkFloatingPoint.h → base/SkFloatingPoint.h} +18 -9
- package/cpp/skia/include/private/base/SkLoadUserConfig.h +63 -0
- package/cpp/skia/include/private/{SkMacros.h → base/SkMacros.h} +17 -2
- package/cpp/skia/include/private/{SkMalloc.h → base/SkMalloc.h} +4 -7
- package/cpp/skia/include/{core → private/base}/SkMath.h +25 -2
- package/cpp/skia/include/private/{SkMutex.h → base/SkMutex.h} +5 -5
- package/cpp/skia/include/private/{SkNoncopyable.h → base/SkNoncopyable.h} +2 -2
- package/cpp/skia/include/private/{SkOnce.h → base/SkOnce.h} +3 -1
- package/cpp/skia/include/private/base/SkPathEnums.h +25 -0
- package/cpp/skia/include/private/{SkSafe32.h → base/SkSafe32.h} +16 -1
- package/cpp/skia/include/private/{SkSemaphore.h → base/SkSemaphore.h} +4 -3
- package/cpp/skia/include/private/base/SkSpan_impl.h +129 -0
- package/cpp/skia/include/private/base/SkTArray.h +694 -0
- package/cpp/skia/include/private/{SkTDArray.h → base/SkTDArray.h} +17 -54
- package/cpp/skia/include/private/{SkTFitsIn.h → base/SkTFitsIn.h} +14 -8
- package/cpp/skia/include/private/{SkTLogic.h → base/SkTLogic.h} +1 -1
- package/cpp/skia/include/private/{SkTemplates.h → base/SkTemplates.h} +63 -88
- package/cpp/skia/include/private/{SkThreadID.h → base/SkThreadID.h} +5 -2
- package/cpp/skia/include/private/{SkTo.h → base/SkTo.h} +13 -2
- package/cpp/skia/include/private/base/SkTypeTraits.h +33 -0
- package/cpp/skia/include/private/chromium/GrVkSecondaryCBDrawContext.h +130 -0
- package/cpp/skia/include/private/chromium/SkChromeRemoteGlyphCache.h +5 -9
- package/cpp/skia/include/private/chromium/SkDiscardableMemory.h +70 -0
- package/cpp/skia/include/private/chromium/Slug.h +0 -9
- package/cpp/skia/include/private/gpu/ganesh/GrContext_Base.h +2 -1
- package/cpp/skia/include/private/gpu/ganesh/GrD3DTypesMinimal.h +1 -1
- package/cpp/skia/include/private/gpu/ganesh/GrDawnTypesPriv.h +1 -1
- package/cpp/skia/include/private/gpu/ganesh/GrGLTypesPriv.h +1 -1
- package/cpp/skia/include/private/gpu/ganesh/GrImageContext.h +1 -1
- package/cpp/skia/include/private/gpu/ganesh/GrMockTypesPriv.h +3 -2
- package/cpp/skia/include/private/gpu/ganesh/GrMtlTypesPriv.h +1 -1
- package/cpp/skia/include/private/gpu/ganesh/GrTypesPriv.h +17 -23
- package/cpp/skia/include/private/gpu/ganesh/GrVkTypesPriv.h +2 -2
- package/cpp/skia/include/private/gpu/graphite/DawnTypesPriv.h +38 -0
- package/cpp/skia/include/private/gpu/graphite/{MtlTypesPriv.h → MtlGraphiteTypesPriv.h} +5 -5
- package/cpp/skia/include/private/gpu/graphite/VulkanGraphiteTypesPriv.h +1 -9
- package/cpp/skia/include/private/gpu/vk/SkiaVulkan.h +4 -0
- package/cpp/skia/include/utils/SkCamera.h +1 -1
- package/cpp/skia/include/utils/SkCustomTypeface.h +7 -1
- package/cpp/skia/include/utils/SkNWayCanvas.h +6 -6
- package/cpp/skia/include/utils/SkOrderedFontMgr.h +7 -6
- package/cpp/skia/include/utils/SkPaintFilterCanvas.h +2 -2
- package/cpp/skia/include/utils/SkParsePath.h +1 -1
- package/cpp/skia/modules/skcms/skcms.h +14 -0
- package/cpp/skia/modules/skcms/src/Transform_inl.h +19 -0
- package/cpp/skia/modules/skparagraph/include/FontCollection.h +2 -2
- package/cpp/skia/modules/skparagraph/include/Paragraph.h +72 -2
- package/cpp/skia/modules/skparagraph/include/ParagraphCache.h +1 -11
- package/cpp/skia/modules/skparagraph/include/ParagraphPainter.h +63 -0
- package/cpp/skia/modules/skparagraph/include/TextStyle.h +27 -4
- package/cpp/skia/modules/skparagraph/include/TypefaceFontProvider.h +13 -13
- package/cpp/skia/modules/skresources/include/SkResources.h +18 -4
- package/cpp/skia/modules/svg/include/SkSVGAttribute.h +1 -1
- package/cpp/skia/modules/svg/include/SkSVGAttributeParser.h +2 -2
- package/cpp/skia/modules/svg/include/SkSVGContainer.h +2 -2
- package/cpp/skia/modules/svg/include/SkSVGDOM.h +1 -1
- package/cpp/skia/modules/svg/include/SkSVGFilterContext.h +2 -2
- package/cpp/skia/modules/svg/include/SkSVGGradient.h +2 -2
- package/cpp/skia/modules/svg/include/SkSVGIDMapper.h +2 -2
- package/cpp/skia/modules/svg/include/SkSVGRenderContext.h +3 -3
- package/cpp/skia/modules/svg/include/SkSVGSVG.h +1 -1
- package/cpp/skia/modules/svg/include/SkSVGTypes.h +22 -21
- package/cpp/skia/modules/svg/include/SkSVGValue.h +1 -1
- package/cpp/skia/{include/private → src/core}/SkTHash.h +41 -37
- package/ios/RNSkia-iOS/ViewScreenshotService.mm +1 -1
- package/lib/commonjs/renderer/Canvas.js +17 -1
- package/lib/commonjs/renderer/Canvas.js.map +1 -1
- package/lib/commonjs/skia/core/Data.d.ts +2 -2
- package/lib/commonjs/skia/core/Data.js.map +1 -1
- package/lib/commonjs/skia/types/Data/Data.d.ts +2 -2
- package/lib/commonjs/skia/types/Data/Data.js.map +1 -1
- package/lib/commonjs/skia/types/Image/Image.d.ts +2 -2
- package/lib/commonjs/skia/types/Image/Image.js.map +1 -1
- package/lib/commonjs/skia/types/JsiInstance.d.ts +4 -4
- package/lib/commonjs/skia/types/JsiInstance.js.map +1 -1
- package/lib/commonjs/skia/types/SVG/SVG.d.ts +2 -2
- package/lib/commonjs/skia/types/SVG/SVG.js.map +1 -1
- package/lib/commonjs/skia/types/Typeface/Typeface.d.ts +2 -2
- package/lib/commonjs/skia/types/Typeface/Typeface.js.map +1 -1
- package/lib/commonjs/skia/web/Host.d.ts +1 -0
- package/lib/commonjs/skia/web/Host.js +2 -0
- package/lib/commonjs/skia/web/Host.js.map +1 -1
- package/lib/commonjs/skia/web/JsiSkCanvas.d.ts +1 -0
- package/lib/commonjs/skia/web/JsiSkCanvas.js +6 -0
- package/lib/commonjs/skia/web/JsiSkCanvas.js.map +1 -1
- package/lib/commonjs/skia/web/JsiSkColorFilter.d.ts +1 -0
- package/lib/commonjs/skia/web/JsiSkColorFilter.js +6 -0
- package/lib/commonjs/skia/web/JsiSkColorFilter.js.map +1 -1
- package/lib/commonjs/skia/web/JsiSkContourMeasure.d.ts +1 -0
- package/lib/commonjs/skia/web/JsiSkContourMeasure.js +6 -0
- package/lib/commonjs/skia/web/JsiSkContourMeasure.js.map +1 -1
- package/lib/commonjs/skia/web/JsiSkContourMeasureIter.d.ts +1 -0
- package/lib/commonjs/skia/web/JsiSkContourMeasureIter.js +6 -0
- package/lib/commonjs/skia/web/JsiSkContourMeasureIter.js.map +1 -1
- package/lib/commonjs/skia/web/JsiSkData.d.ts +1 -1
- package/lib/commonjs/skia/web/JsiSkData.js +4 -2
- package/lib/commonjs/skia/web/JsiSkData.js.map +1 -1
- package/lib/commonjs/skia/web/JsiSkFont.d.ts +1 -0
- package/lib/commonjs/skia/web/JsiSkFont.js +6 -0
- package/lib/commonjs/skia/web/JsiSkFont.js.map +1 -1
- package/lib/commonjs/skia/web/JsiSkImage.d.ts +1 -1
- package/lib/commonjs/skia/web/JsiSkImage.js +6 -4
- package/lib/commonjs/skia/web/JsiSkImage.js.map +1 -1
- package/lib/commonjs/skia/web/JsiSkImageFilter.d.ts +1 -0
- package/lib/commonjs/skia/web/JsiSkImageFilter.js +6 -0
- package/lib/commonjs/skia/web/JsiSkImageFilter.js.map +1 -1
- package/lib/commonjs/skia/web/JsiSkMaskFilter.d.ts +1 -0
- package/lib/commonjs/skia/web/JsiSkMaskFilter.js +6 -0
- package/lib/commonjs/skia/web/JsiSkMaskFilter.js.map +1 -1
- package/lib/commonjs/skia/web/JsiSkMatrix.d.ts +1 -0
- package/lib/commonjs/skia/web/JsiSkMatrix.js +5 -0
- package/lib/commonjs/skia/web/JsiSkMatrix.js.map +1 -1
- package/lib/commonjs/skia/web/JsiSkPaint.d.ts +1 -0
- package/lib/commonjs/skia/web/JsiSkPaint.js +6 -0
- package/lib/commonjs/skia/web/JsiSkPaint.js.map +1 -1
- package/lib/commonjs/skia/web/JsiSkPath.d.ts +1 -0
- package/lib/commonjs/skia/web/JsiSkPath.js +6 -0
- package/lib/commonjs/skia/web/JsiSkPath.js.map +1 -1
- package/lib/commonjs/skia/web/JsiSkPathEffect.d.ts +1 -0
- package/lib/commonjs/skia/web/JsiSkPathEffect.js +6 -0
- package/lib/commonjs/skia/web/JsiSkPathEffect.js.map +1 -1
- package/lib/commonjs/skia/web/JsiSkPicture.d.ts +1 -0
- package/lib/commonjs/skia/web/JsiSkPicture.js +6 -1
- package/lib/commonjs/skia/web/JsiSkPicture.js.map +1 -1
- package/lib/commonjs/skia/web/JsiSkPictureRecorder.d.ts +1 -0
- package/lib/commonjs/skia/web/JsiSkPictureRecorder.js +6 -0
- package/lib/commonjs/skia/web/JsiSkPictureRecorder.js.map +1 -1
- package/lib/commonjs/skia/web/JsiSkPoint.d.ts +1 -0
- package/lib/commonjs/skia/web/JsiSkPoint.js +5 -0
- package/lib/commonjs/skia/web/JsiSkPoint.js.map +1 -1
- package/lib/commonjs/skia/web/JsiSkRRect.d.ts +1 -0
- package/lib/commonjs/skia/web/JsiSkRRect.js +5 -0
- package/lib/commonjs/skia/web/JsiSkRRect.js.map +1 -1
- package/lib/commonjs/skia/web/JsiSkRSXform.d.ts +1 -0
- package/lib/commonjs/skia/web/JsiSkRSXform.js +5 -0
- package/lib/commonjs/skia/web/JsiSkRSXform.js.map +1 -1
- package/lib/commonjs/skia/web/JsiSkRect.d.ts +1 -0
- package/lib/commonjs/skia/web/JsiSkRect.js +5 -0
- package/lib/commonjs/skia/web/JsiSkRect.js.map +1 -1
- package/lib/commonjs/skia/web/JsiSkRuntimeEffect.d.ts +1 -0
- package/lib/commonjs/skia/web/JsiSkRuntimeEffect.js +6 -0
- package/lib/commonjs/skia/web/JsiSkRuntimeEffect.js.map +1 -1
- package/lib/commonjs/skia/web/JsiSkShader.d.ts +1 -0
- package/lib/commonjs/skia/web/JsiSkShader.js +6 -0
- package/lib/commonjs/skia/web/JsiSkShader.js.map +1 -1
- package/lib/commonjs/skia/web/JsiSkSurface.d.ts +1 -0
- package/lib/commonjs/skia/web/JsiSkSurface.js +6 -0
- package/lib/commonjs/skia/web/JsiSkSurface.js.map +1 -1
- package/lib/commonjs/skia/web/JsiSkTextBlob.d.ts +1 -0
- package/lib/commonjs/skia/web/JsiSkTextBlob.js +6 -0
- package/lib/commonjs/skia/web/JsiSkTextBlob.js.map +1 -1
- package/lib/commonjs/skia/web/JsiSkTypeface.d.ts +1 -1
- package/lib/commonjs/skia/web/JsiSkTypeface.js +6 -4
- package/lib/commonjs/skia/web/JsiSkTypeface.js.map +1 -1
- package/lib/commonjs/skia/web/JsiSkVertices.d.ts +1 -0
- package/lib/commonjs/skia/web/JsiSkVertices.js +6 -0
- package/lib/commonjs/skia/web/JsiSkVertices.js.map +1 -1
- package/lib/commonjs/values/hooks/useComputedValue.js +1 -1
- package/lib/commonjs/values/hooks/useComputedValue.js.map +1 -1
- package/lib/commonjs/values/types.d.ts +1 -1
- package/lib/commonjs/values/types.js.map +1 -1
- package/lib/commonjs/values/web/RNSkComputedValue.d.ts +1 -1
- package/lib/commonjs/values/web/RNSkComputedValue.js +1 -1
- package/lib/commonjs/values/web/RNSkComputedValue.js.map +1 -1
- package/lib/commonjs/values/web/RNSkReadonlyValue.d.ts +1 -1
- package/lib/commonjs/values/web/RNSkReadonlyValue.js +1 -1
- package/lib/commonjs/values/web/RNSkReadonlyValue.js.map +1 -1
- package/lib/commonjs/views/SkiaDomView.web.js +14 -4
- package/lib/commonjs/views/SkiaDomView.web.js.map +1 -1
- package/lib/commonjs/views/types.d.ts +2 -1
- package/lib/commonjs/views/types.js.map +1 -1
- package/lib/module/renderer/Canvas.js +15 -1
- package/lib/module/renderer/Canvas.js.map +1 -1
- package/lib/module/skia/core/Data.d.ts +2 -2
- package/lib/module/skia/core/Data.js.map +1 -1
- package/lib/module/skia/types/Data/Data.d.ts +2 -2
- package/lib/module/skia/types/Data/Data.js.map +1 -1
- package/lib/module/skia/types/Image/Image.d.ts +2 -2
- package/lib/module/skia/types/Image/Image.js.map +1 -1
- package/lib/module/skia/types/JsiInstance.d.ts +4 -4
- package/lib/module/skia/types/JsiInstance.js.map +1 -1
- package/lib/module/skia/types/SVG/SVG.d.ts +2 -2
- package/lib/module/skia/types/SVG/SVG.js.map +1 -1
- package/lib/module/skia/types/Typeface/Typeface.d.ts +2 -2
- package/lib/module/skia/types/Typeface/Typeface.js.map +1 -1
- package/lib/module/skia/web/Host.d.ts +1 -0
- package/lib/module/skia/web/Host.js +2 -0
- package/lib/module/skia/web/Host.js.map +1 -1
- package/lib/module/skia/web/JsiSkCanvas.d.ts +1 -0
- package/lib/module/skia/web/JsiSkCanvas.js +6 -0
- package/lib/module/skia/web/JsiSkCanvas.js.map +1 -1
- package/lib/module/skia/web/JsiSkColorFilter.d.ts +1 -0
- package/lib/module/skia/web/JsiSkColorFilter.js +6 -0
- package/lib/module/skia/web/JsiSkColorFilter.js.map +1 -1
- package/lib/module/skia/web/JsiSkContourMeasure.d.ts +1 -0
- package/lib/module/skia/web/JsiSkContourMeasure.js +6 -0
- package/lib/module/skia/web/JsiSkContourMeasure.js.map +1 -1
- package/lib/module/skia/web/JsiSkContourMeasureIter.d.ts +1 -0
- package/lib/module/skia/web/JsiSkContourMeasureIter.js +6 -0
- package/lib/module/skia/web/JsiSkContourMeasureIter.js.map +1 -1
- package/lib/module/skia/web/JsiSkData.d.ts +1 -1
- package/lib/module/skia/web/JsiSkData.js +4 -2
- package/lib/module/skia/web/JsiSkData.js.map +1 -1
- package/lib/module/skia/web/JsiSkFont.d.ts +1 -0
- package/lib/module/skia/web/JsiSkFont.js +6 -0
- package/lib/module/skia/web/JsiSkFont.js.map +1 -1
- package/lib/module/skia/web/JsiSkImage.d.ts +1 -1
- package/lib/module/skia/web/JsiSkImage.js +6 -4
- package/lib/module/skia/web/JsiSkImage.js.map +1 -1
- package/lib/module/skia/web/JsiSkImageFilter.d.ts +1 -0
- package/lib/module/skia/web/JsiSkImageFilter.js +6 -0
- package/lib/module/skia/web/JsiSkImageFilter.js.map +1 -1
- package/lib/module/skia/web/JsiSkMaskFilter.d.ts +1 -0
- package/lib/module/skia/web/JsiSkMaskFilter.js +6 -0
- package/lib/module/skia/web/JsiSkMaskFilter.js.map +1 -1
- package/lib/module/skia/web/JsiSkMatrix.d.ts +1 -0
- package/lib/module/skia/web/JsiSkMatrix.js +5 -0
- package/lib/module/skia/web/JsiSkMatrix.js.map +1 -1
- package/lib/module/skia/web/JsiSkPaint.d.ts +1 -0
- package/lib/module/skia/web/JsiSkPaint.js +6 -0
- package/lib/module/skia/web/JsiSkPaint.js.map +1 -1
- package/lib/module/skia/web/JsiSkPath.d.ts +1 -0
- package/lib/module/skia/web/JsiSkPath.js +6 -0
- package/lib/module/skia/web/JsiSkPath.js.map +1 -1
- package/lib/module/skia/web/JsiSkPathEffect.d.ts +1 -0
- package/lib/module/skia/web/JsiSkPathEffect.js +6 -0
- package/lib/module/skia/web/JsiSkPathEffect.js.map +1 -1
- package/lib/module/skia/web/JsiSkPicture.d.ts +1 -0
- package/lib/module/skia/web/JsiSkPicture.js +6 -0
- package/lib/module/skia/web/JsiSkPicture.js.map +1 -1
- package/lib/module/skia/web/JsiSkPictureRecorder.d.ts +1 -0
- package/lib/module/skia/web/JsiSkPictureRecorder.js +6 -0
- package/lib/module/skia/web/JsiSkPictureRecorder.js.map +1 -1
- package/lib/module/skia/web/JsiSkPoint.d.ts +1 -0
- package/lib/module/skia/web/JsiSkPoint.js +5 -0
- package/lib/module/skia/web/JsiSkPoint.js.map +1 -1
- package/lib/module/skia/web/JsiSkRRect.d.ts +1 -0
- package/lib/module/skia/web/JsiSkRRect.js +5 -0
- package/lib/module/skia/web/JsiSkRRect.js.map +1 -1
- package/lib/module/skia/web/JsiSkRSXform.d.ts +1 -0
- package/lib/module/skia/web/JsiSkRSXform.js +5 -0
- package/lib/module/skia/web/JsiSkRSXform.js.map +1 -1
- package/lib/module/skia/web/JsiSkRect.d.ts +1 -0
- package/lib/module/skia/web/JsiSkRect.js +5 -0
- package/lib/module/skia/web/JsiSkRect.js.map +1 -1
- package/lib/module/skia/web/JsiSkRuntimeEffect.d.ts +1 -0
- package/lib/module/skia/web/JsiSkRuntimeEffect.js +6 -0
- package/lib/module/skia/web/JsiSkRuntimeEffect.js.map +1 -1
- package/lib/module/skia/web/JsiSkShader.d.ts +1 -0
- package/lib/module/skia/web/JsiSkShader.js +6 -0
- package/lib/module/skia/web/JsiSkShader.js.map +1 -1
- package/lib/module/skia/web/JsiSkSurface.d.ts +1 -0
- package/lib/module/skia/web/JsiSkSurface.js +6 -0
- package/lib/module/skia/web/JsiSkSurface.js.map +1 -1
- package/lib/module/skia/web/JsiSkTextBlob.d.ts +1 -0
- package/lib/module/skia/web/JsiSkTextBlob.js +6 -0
- package/lib/module/skia/web/JsiSkTextBlob.js.map +1 -1
- package/lib/module/skia/web/JsiSkTypeface.d.ts +1 -1
- package/lib/module/skia/web/JsiSkTypeface.js +6 -4
- package/lib/module/skia/web/JsiSkTypeface.js.map +1 -1
- package/lib/module/skia/web/JsiSkVertices.d.ts +1 -0
- package/lib/module/skia/web/JsiSkVertices.js +6 -0
- package/lib/module/skia/web/JsiSkVertices.js.map +1 -1
- package/lib/module/values/hooks/useComputedValue.js +1 -1
- package/lib/module/values/hooks/useComputedValue.js.map +1 -1
- package/lib/module/values/types.d.ts +1 -1
- package/lib/module/values/types.js.map +1 -1
- package/lib/module/values/web/RNSkComputedValue.d.ts +1 -1
- package/lib/module/values/web/RNSkComputedValue.js +1 -1
- package/lib/module/values/web/RNSkComputedValue.js.map +1 -1
- package/lib/module/values/web/RNSkReadonlyValue.d.ts +1 -1
- package/lib/module/values/web/RNSkReadonlyValue.js +1 -1
- package/lib/module/values/web/RNSkReadonlyValue.js.map +1 -1
- package/lib/module/views/SkiaDomView.web.js +13 -4
- package/lib/module/views/SkiaDomView.web.js.map +1 -1
- package/lib/module/views/types.d.ts +2 -1
- package/lib/module/views/types.js.map +1 -1
- package/lib/typescript/src/skia/core/Data.d.ts +2 -2
- package/lib/typescript/src/skia/types/Data/Data.d.ts +2 -2
- package/lib/typescript/src/skia/types/Image/Image.d.ts +2 -2
- package/lib/typescript/src/skia/types/JsiInstance.d.ts +4 -4
- package/lib/typescript/src/skia/types/SVG/SVG.d.ts +2 -2
- package/lib/typescript/src/skia/types/Typeface/Typeface.d.ts +2 -2
- package/lib/typescript/src/skia/web/Host.d.ts +1 -0
- package/lib/typescript/src/skia/web/JsiSkCanvas.d.ts +1 -0
- package/lib/typescript/src/skia/web/JsiSkColorFilter.d.ts +1 -0
- package/lib/typescript/src/skia/web/JsiSkContourMeasure.d.ts +1 -0
- package/lib/typescript/src/skia/web/JsiSkContourMeasureIter.d.ts +1 -0
- package/lib/typescript/src/skia/web/JsiSkData.d.ts +1 -1
- package/lib/typescript/src/skia/web/JsiSkFont.d.ts +1 -0
- package/lib/typescript/src/skia/web/JsiSkImage.d.ts +1 -1
- package/lib/typescript/src/skia/web/JsiSkImageFilter.d.ts +1 -0
- package/lib/typescript/src/skia/web/JsiSkMaskFilter.d.ts +1 -0
- package/lib/typescript/src/skia/web/JsiSkMatrix.d.ts +1 -0
- package/lib/typescript/src/skia/web/JsiSkPaint.d.ts +1 -0
- package/lib/typescript/src/skia/web/JsiSkPath.d.ts +1 -0
- package/lib/typescript/src/skia/web/JsiSkPathEffect.d.ts +1 -0
- package/lib/typescript/src/skia/web/JsiSkPicture.d.ts +1 -0
- package/lib/typescript/src/skia/web/JsiSkPictureRecorder.d.ts +1 -0
- package/lib/typescript/src/skia/web/JsiSkPoint.d.ts +1 -0
- package/lib/typescript/src/skia/web/JsiSkRRect.d.ts +1 -0
- package/lib/typescript/src/skia/web/JsiSkRSXform.d.ts +1 -0
- package/lib/typescript/src/skia/web/JsiSkRect.d.ts +1 -0
- package/lib/typescript/src/skia/web/JsiSkRuntimeEffect.d.ts +1 -0
- package/lib/typescript/src/skia/web/JsiSkShader.d.ts +1 -0
- package/lib/typescript/src/skia/web/JsiSkSurface.d.ts +1 -0
- package/lib/typescript/src/skia/web/JsiSkTextBlob.d.ts +1 -0
- package/lib/typescript/src/skia/web/JsiSkTypeface.d.ts +1 -1
- package/lib/typescript/src/skia/web/JsiSkVertices.d.ts +1 -0
- package/lib/typescript/src/values/types.d.ts +1 -1
- package/lib/typescript/src/values/web/RNSkComputedValue.d.ts +1 -1
- package/lib/typescript/src/values/web/RNSkReadonlyValue.d.ts +1 -1
- package/lib/typescript/src/views/types.d.ts +2 -1
- package/libs/android/arm64-v8a/libskia.a +0 -0
- package/libs/android/arm64-v8a/libskottie.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/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/libsksg.a +0 -0
- package/libs/android/armeabi-v7a/libskshaper.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/libsksg.a +0 -0
- package/libs/android/x86/libskshaper.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/libsksg.a +0 -0
- package/libs/android/x86_64/libskshaper.a +0 -0
- package/libs/android/x86_64/libsvg.a +0 -0
- package/libs/ios/libskia.xcframework/Info.plist +5 -5
- 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/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/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/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/react-native-skia.podspec +1 -1
- package/scripts/install-npm.js +11 -1
- package/src/renderer/Canvas.tsx +21 -1
- package/src/skia/core/Data.ts +3 -3
- package/src/skia/types/Data/Data.ts +2 -2
- package/src/skia/types/Image/Image.ts +2 -2
- package/src/skia/types/JsiInstance.ts +4 -4
- package/src/skia/types/SVG/SVG.ts +2 -2
- package/src/skia/types/Typeface/Typeface.ts +2 -2
- package/src/skia/web/Host.ts +2 -0
- package/src/skia/web/JsiSkCanvas.ts +4 -0
- package/src/skia/web/JsiSkColorFilter.ts +4 -0
- package/src/skia/web/JsiSkContourMeasure.ts +4 -0
- package/src/skia/web/JsiSkContourMeasureIter.ts +4 -0
- package/src/skia/web/JsiSkData.ts +3 -3
- package/src/skia/web/JsiSkFont.ts +4 -0
- package/src/skia/web/JsiSkImage.ts +2 -2
- package/src/skia/web/JsiSkImageFilter.ts +4 -0
- package/src/skia/web/JsiSkMaskFilter.ts +4 -0
- package/src/skia/web/JsiSkMatrix.ts +4 -0
- package/src/skia/web/JsiSkPaint.ts +4 -0
- package/src/skia/web/JsiSkPath.ts +4 -0
- package/src/skia/web/JsiSkPathEffect.ts +4 -0
- package/src/skia/web/JsiSkPicture.ts +4 -0
- package/src/skia/web/JsiSkPictureRecorder.ts +4 -0
- package/src/skia/web/JsiSkPoint.ts +4 -0
- package/src/skia/web/JsiSkRRect.ts +4 -0
- package/src/skia/web/JsiSkRSXform.ts +4 -0
- package/src/skia/web/JsiSkRect.ts +4 -0
- package/src/skia/web/JsiSkRuntimeEffect.ts +4 -0
- package/src/skia/web/JsiSkShader.ts +4 -0
- package/src/skia/web/JsiSkSurface.ts +4 -0
- package/src/skia/web/JsiSkTextBlob.ts +4 -0
- package/src/skia/web/JsiSkTypeface.ts +2 -2
- package/src/skia/web/JsiSkVertices.ts +4 -0
- package/src/values/hooks/useComputedValue.ts +1 -1
- package/src/values/types.ts +1 -1
- package/src/values/web/RNSkComputedValue.ts +1 -1
- package/src/values/web/RNSkReadonlyValue.ts +1 -1
- package/src/views/SkiaDomView.web.tsx +6 -1
- package/src/views/types.ts +2 -1
- package/cpp/skia/include/core/SkImageEncoder.h +0 -71
- package/cpp/skia/include/gpu/GrConfig.h +0 -53
- package/cpp/skia/include/gpu/graphite/CombinationBuilder.h +0 -195
- package/cpp/skia/include/private/SkHalf.h +0 -38
- package/cpp/skia/include/private/SkImageInfoPriv.h +0 -199
- package/cpp/skia/include/private/SkSLIRNode.h +0 -64
- package/cpp/skia/include/private/SkSLLayout.h +0 -144
- package/cpp/skia/include/private/SkSLModifiers.h +0 -178
- package/cpp/skia/include/private/SkSLProgramElement.h +0 -77
- package/cpp/skia/include/private/SkSLProgramKind.h +0 -35
- package/cpp/skia/include/private/SkSLStatement.h +0 -86
- package/cpp/skia/include/private/SkSLString.h +0 -41
- package/cpp/skia/include/private/SkSLSymbol.h +0 -94
- package/cpp/skia/include/private/SkSafe_math.h +0 -52
- package/cpp/skia/include/private/SkStringView.h +0 -51
- package/cpp/skia/include/private/SkTArray.h +0 -655
- package/cpp/skia/include/private/SkUniquePaintParamsID.h +0 -35
- package/cpp/skia/include/private/SkVx.h +0 -1026
- package/cpp/skia/include/sksl/DSL.h +0 -37
- package/cpp/skia/include/sksl/DSLBlock.h +0 -58
- package/cpp/skia/include/sksl/DSLCase.h +0 -62
- package/cpp/skia/include/sksl/DSLCore.h +0 -492
- package/cpp/skia/include/sksl/DSLExpression.h +0 -241
- package/cpp/skia/include/sksl/DSLFunction.h +0 -113
- package/cpp/skia/include/sksl/DSLLayout.h +0 -92
- package/cpp/skia/include/sksl/DSLModifiers.h +0 -69
- package/cpp/skia/include/sksl/DSLStatement.h +0 -82
- package/cpp/skia/include/sksl/DSLSymbols.h +0 -61
- package/cpp/skia/include/sksl/DSLType.h +0 -271
- package/cpp/skia/include/sksl/DSLVar.h +0 -231
- package/cpp/skia/include/sksl/SkSLErrorReporter.h +0 -65
- package/cpp/skia/include/sksl/SkSLOperator.h +0 -154
- package/cpp/skia/include/sksl/SkSLPosition.h +0 -104
- package/cpp/skia/include/utils/SkRandom.h +0 -169
- package/cpp/skia/src/core/SkLRUCache.h +0 -126
- package/cpp/skia/src/core/SkTInternalLList.h +0 -302
- /package/cpp/skia/include/{core → codec}/SkPngChunkReader.h +0 -0
- /package/cpp/skia/include/private/{SkTPin.h → base/SkTPin.h} +0 -0
- /package/cpp/skia/include/private/{SkThreadAnnotations.h → base/SkThreadAnnotations.h} +0 -0
package/cpp/api/JsiSkPicture.h
CHANGED
|
@@ -23,12 +23,6 @@ public:
|
|
|
23
23
|
const sk_sp<SkPicture> picture)
|
|
24
24
|
: JsiSkWrappingSkPtrHostObject<SkPicture>(context, picture) {}
|
|
25
25
|
|
|
26
|
-
JSI_PROPERTY_GET(__typename__) {
|
|
27
|
-
return jsi::String::createFromUtf8(runtime, "Picture");
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
JSI_EXPORT_PROPERTY_GETTERS(JSI_EXPORT_PROP_GET(JsiSkPicture, __typename__))
|
|
31
|
-
|
|
32
26
|
JSI_HOST_FUNCTION(makeShader) {
|
|
33
27
|
auto tmx = (SkTileMode)arguments[0].asNumber();
|
|
34
28
|
auto tmy = (SkTileMode)arguments[1].asNumber();
|
|
@@ -66,18 +60,10 @@ public:
|
|
|
66
60
|
return array;
|
|
67
61
|
}
|
|
68
62
|
|
|
63
|
+
EXPORT_JSI_API_TYPENAME(JsiSkPicture, "Picture")
|
|
64
|
+
|
|
69
65
|
JSI_EXPORT_FUNCTIONS(JSI_EXPORT_FUNC(JsiSkPicture, makeShader),
|
|
70
|
-
JSI_EXPORT_FUNC(JsiSkPicture, serialize)
|
|
71
|
-
|
|
72
|
-
/**
|
|
73
|
-
Returns the underlying object from a host object of this type
|
|
74
|
-
*/
|
|
75
|
-
static sk_sp<SkPicture> fromValue(jsi::Runtime &runtime,
|
|
76
|
-
const jsi::Value &obj) {
|
|
77
|
-
return obj.asObject(runtime)
|
|
78
|
-
.asHostObject<JsiSkPicture>(runtime)
|
|
79
|
-
.get()
|
|
80
|
-
->getObject();
|
|
81
|
-
}
|
|
66
|
+
JSI_EXPORT_FUNC(JsiSkPicture, serialize),
|
|
67
|
+
JSI_EXPORT_FUNC(JsiSkPicture, dispose))
|
|
82
68
|
};
|
|
83
69
|
} // namespace RNSkia
|
|
@@ -40,9 +40,12 @@ public:
|
|
|
40
40
|
runtime, std::make_shared<JsiSkPicture>(getContext(), picture));
|
|
41
41
|
}
|
|
42
42
|
|
|
43
|
+
EXPORT_JSI_API_TYPENAME(JsiSkPictureRecorder, "PictureRecorder")
|
|
44
|
+
|
|
43
45
|
JSI_EXPORT_FUNCTIONS(JSI_EXPORT_FUNC(JsiSkPictureRecorder, beginRecording),
|
|
44
46
|
JSI_EXPORT_FUNC(JsiSkPictureRecorder,
|
|
45
|
-
finishRecordingAsPicture)
|
|
47
|
+
finishRecordingAsPicture),
|
|
48
|
+
JSI_EXPORT_FUNC(JsiSkPictureRecorder, dispose))
|
|
46
49
|
|
|
47
50
|
static const jsi::HostFunctionType
|
|
48
51
|
createCtor(std::shared_ptr<RNSkPlatformContext> context) {
|
package/cpp/api/JsiSkPoint.h
CHANGED
|
@@ -24,8 +24,13 @@ public:
|
|
|
24
24
|
|
|
25
25
|
JSI_PROPERTY_GET(y) { return static_cast<double>(getObject()->y()); }
|
|
26
26
|
|
|
27
|
+
JSI_API_TYPENAME("Point");
|
|
28
|
+
|
|
27
29
|
JSI_EXPORT_PROPERTY_GETTERS(JSI_EXPORT_PROP_GET(JsiSkPoint, x),
|
|
28
|
-
JSI_EXPORT_PROP_GET(JsiSkPoint, y)
|
|
30
|
+
JSI_EXPORT_PROP_GET(JsiSkPoint, y),
|
|
31
|
+
JSI_EXPORT_PROP_GET(JsiSkPoint, __typename__))
|
|
32
|
+
|
|
33
|
+
JSI_EXPORT_FUNCTIONS(JSI_EXPORT_FUNC(JsiSkPoint, dispose))
|
|
29
34
|
|
|
30
35
|
JsiSkPoint(std::shared_ptr<RNSkPlatformContext> context, const SkPoint &point)
|
|
31
36
|
: JsiSkWrappingSharedPtrHostObject<SkPoint>(
|
package/cpp/api/JsiSkRRect.h
CHANGED
|
@@ -34,9 +34,14 @@ public:
|
|
|
34
34
|
std::make_shared<JsiSkRect>(getContext(), getObject()->getBounds()));
|
|
35
35
|
}
|
|
36
36
|
|
|
37
|
+
JSI_API_TYPENAME("RRect");
|
|
38
|
+
|
|
37
39
|
JSI_EXPORT_PROPERTY_GETTERS(JSI_EXPORT_PROP_GET(JsiSkRRect, rx),
|
|
38
40
|
JSI_EXPORT_PROP_GET(JsiSkRRect, ry),
|
|
39
|
-
JSI_EXPORT_PROP_GET(JsiSkRRect, rect)
|
|
41
|
+
JSI_EXPORT_PROP_GET(JsiSkRRect, rect),
|
|
42
|
+
JSI_EXPORT_PROP_GET(JsiSkRRect, __typename__))
|
|
43
|
+
|
|
44
|
+
JSI_EXPORT_FUNCTIONS(JSI_EXPORT_FUNC(JsiSkRRect, dispose))
|
|
40
45
|
|
|
41
46
|
JsiSkRRect(std::shared_ptr<RNSkPlatformContext> context, const SkRRect &rect)
|
|
42
47
|
: JsiSkWrappingSharedPtrHostObject<SkRRect>(
|
package/cpp/api/JsiSkRSXform.h
CHANGED
|
@@ -25,11 +25,7 @@ public:
|
|
|
25
25
|
: JsiSkWrappingSharedPtrHostObject<SkRSXform>(
|
|
26
26
|
std::move(context), std::make_shared<SkRSXform>(rsxform)) {}
|
|
27
27
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
JSI_PROPERTY_GET(__typename__) {
|
|
31
|
-
return jsi::String::createFromUtf8(runtime, "RSXform");
|
|
32
|
-
}
|
|
28
|
+
JSI_API_TYPENAME("RSXform");
|
|
33
29
|
|
|
34
30
|
JSI_PROPERTY_GET(scos) {
|
|
35
31
|
return jsi::Value(SkScalarToDouble(getObject()->fSCos));
|
|
@@ -48,7 +44,9 @@ public:
|
|
|
48
44
|
JSI_EXPORT_PROP_GET(JsiSkRSXform, scos),
|
|
49
45
|
JSI_EXPORT_PROP_GET(JsiSkRSXform, ssin),
|
|
50
46
|
JSI_EXPORT_PROP_GET(JsiSkRSXform, tx),
|
|
51
|
-
JSI_EXPORT_PROP_GET(JsiSkRSXform, ty)
|
|
47
|
+
JSI_EXPORT_PROP_GET(JsiSkRSXform, ty))
|
|
48
|
+
|
|
49
|
+
JSI_EXPORT_FUNCTIONS(JSI_EXPORT_FUNC(JsiSkRSXform, dispose))
|
|
52
50
|
|
|
53
51
|
/**
|
|
54
52
|
Returns the underlying object from a host object of this type
|
package/cpp/api/JsiSkRect.h
CHANGED
|
@@ -33,10 +33,13 @@ public:
|
|
|
33
33
|
return static_cast<double>(getObject()->bottom());
|
|
34
34
|
}
|
|
35
35
|
|
|
36
|
+
JSI_API_TYPENAME("Rect");
|
|
37
|
+
|
|
36
38
|
JSI_EXPORT_PROPERTY_GETTERS(JSI_EXPORT_PROP_GET(JsiSkRect, x),
|
|
37
39
|
JSI_EXPORT_PROP_GET(JsiSkRect, y),
|
|
38
40
|
JSI_EXPORT_PROP_GET(JsiSkRect, width),
|
|
39
|
-
JSI_EXPORT_PROP_GET(JsiSkRect, height)
|
|
41
|
+
JSI_EXPORT_PROP_GET(JsiSkRect, height),
|
|
42
|
+
JSI_EXPORT_PROP_GET(JsiSkRect, __typename__))
|
|
40
43
|
|
|
41
44
|
JSI_HOST_FUNCTION(setXYWH) {
|
|
42
45
|
getObject()->setXYWH(arguments[0].asNumber(), arguments[1].asNumber(),
|
|
@@ -51,7 +54,8 @@ public:
|
|
|
51
54
|
}
|
|
52
55
|
|
|
53
56
|
JSI_EXPORT_FUNCTIONS(JSI_EXPORT_FUNC(JsiSkRect, setXYWH),
|
|
54
|
-
JSI_EXPORT_FUNC(JsiSkRect, setLTRB),
|
|
57
|
+
JSI_EXPORT_FUNC(JsiSkRect, setLTRB),
|
|
58
|
+
JSI_EXPORT_FUNC(JsiSkRect, dispose))
|
|
55
59
|
|
|
56
60
|
/**
|
|
57
61
|
Constructor
|
|
@@ -32,12 +32,6 @@ struct RuntimeEffectUniform {
|
|
|
32
32
|
class JsiSkRuntimeEffect
|
|
33
33
|
: public JsiSkWrappingSkPtrHostObject<SkRuntimeEffect> {
|
|
34
34
|
public:
|
|
35
|
-
static sk_sp<SkRuntimeEffect> fromValue(jsi::Runtime &runtime,
|
|
36
|
-
const jsi::Value &obj) {
|
|
37
|
-
const auto &object = obj.asObject(runtime);
|
|
38
|
-
return object.asHostObject<JsiSkRuntimeEffect>(runtime)->getObject();
|
|
39
|
-
}
|
|
40
|
-
|
|
41
35
|
JSI_HOST_FUNCTION(makeShader) {
|
|
42
36
|
auto uniforms = castUniforms(runtime, arguments[0]);
|
|
43
37
|
|
|
@@ -121,6 +115,8 @@ public:
|
|
|
121
115
|
return jsi::String::createFromAscii(runtime, getObject()->source());
|
|
122
116
|
}
|
|
123
117
|
|
|
118
|
+
EXPORT_JSI_API_TYPENAME(JsiSkRuntimeEffect, "RuntimeEffect")
|
|
119
|
+
|
|
124
120
|
JSI_EXPORT_FUNCTIONS(JSI_EXPORT_FUNC(JsiSkRuntimeEffect, makeShader),
|
|
125
121
|
JSI_EXPORT_FUNC(JsiSkRuntimeEffect,
|
|
126
122
|
makeShaderWithChildren),
|
|
@@ -129,7 +125,8 @@ public:
|
|
|
129
125
|
getUniformFloatCount),
|
|
130
126
|
JSI_EXPORT_FUNC(JsiSkRuntimeEffect, getUniformName),
|
|
131
127
|
JSI_EXPORT_FUNC(JsiSkRuntimeEffect, getUniform),
|
|
132
|
-
JSI_EXPORT_FUNC(JsiSkRuntimeEffect, source)
|
|
128
|
+
JSI_EXPORT_FUNC(JsiSkRuntimeEffect, source),
|
|
129
|
+
JSI_EXPORT_FUNC(JsiSkRuntimeEffect, dispose))
|
|
133
130
|
|
|
134
131
|
JsiSkRuntimeEffect(std::shared_ptr<RNSkPlatformContext> context,
|
|
135
132
|
sk_sp<SkRuntimeEffect> rt)
|
|
@@ -47,16 +47,8 @@ public:
|
|
|
47
47
|
return jsi::Value::undefined();
|
|
48
48
|
}
|
|
49
49
|
|
|
50
|
-
JSI_EXPORT_FUNCTIONS(JSI_EXPORT_FUNC(JsiSkRuntimeShaderBuilder, setUniform)
|
|
51
|
-
|
|
52
|
-
/**
|
|
53
|
-
Returns the underlying object from a host object of this type
|
|
54
|
-
*/
|
|
55
|
-
static std::shared_ptr<SkRuntimeShaderBuilder>
|
|
56
|
-
fromValue(jsi::Runtime &runtime, const jsi::Value &obj) {
|
|
57
|
-
const auto &object = obj.asObject(runtime);
|
|
58
|
-
return object.asHostObject<JsiSkRuntimeShaderBuilder>(runtime)->getObject();
|
|
59
|
-
}
|
|
50
|
+
JSI_EXPORT_FUNCTIONS(JSI_EXPORT_FUNC(JsiSkRuntimeShaderBuilder, setUniform),
|
|
51
|
+
JSI_EXPORT_FUNC(JsiSkRuntimeShaderBuilder, dispose))
|
|
60
52
|
|
|
61
53
|
/**
|
|
62
54
|
Returns the jsi object from a host object of this type
|
package/cpp/api/JsiSkSVG.h
CHANGED
|
@@ -24,9 +24,7 @@ public:
|
|
|
24
24
|
: JsiSkWrappingSkPtrHostObject<SkSVGDOM>(std::move(context),
|
|
25
25
|
std::move(svgdom)) {}
|
|
26
26
|
|
|
27
|
-
|
|
28
|
-
return jsi::String::createFromUtf8(runtime, "SVG");
|
|
29
|
-
}
|
|
27
|
+
EXPORT_JSI_API_TYPENAME(JsiSkSVG, "SVG")
|
|
30
28
|
|
|
31
29
|
JSI_HOST_FUNCTION(width) {
|
|
32
30
|
return static_cast<double>(getObject()->containerSize().width());
|
|
@@ -36,13 +34,6 @@ public:
|
|
|
36
34
|
return static_cast<double>(getObject()->containerSize().height());
|
|
37
35
|
}
|
|
38
36
|
|
|
39
|
-
JSI_EXPORT_PROPERTY_GETTERS(JSI_EXPORT_PROP_GET(JsiSkSVG, __typename__))
|
|
40
|
-
|
|
41
|
-
JSI_HOST_FUNCTION(dispose) {
|
|
42
|
-
setObject(nullptr);
|
|
43
|
-
return jsi::Value::undefined();
|
|
44
|
-
}
|
|
45
|
-
|
|
46
37
|
JSI_EXPORT_FUNCTIONS(JSI_EXPORT_FUNC(JsiSkSVG, width),
|
|
47
38
|
JSI_EXPORT_FUNC(JsiSkSVG, height),
|
|
48
39
|
JSI_EXPORT_FUNC(JsiSkSVG, dispose))
|
package/cpp/api/JsiSkShader.h
CHANGED
|
@@ -26,21 +26,7 @@ public:
|
|
|
26
26
|
: JsiSkWrappingSkPtrHostObject<SkShader>(std::move(context),
|
|
27
27
|
std::move(shader)) {}
|
|
28
28
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
return jsi::String::createFromUtf8(runtime, "Shader");
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
JSI_EXPORT_PROPERTY_GETTERS(JSI_EXPORT_PROP_GET(JsiSkShader, __typename__))
|
|
35
|
-
|
|
36
|
-
/**
|
|
37
|
-
Returns the underlying object from a host object of this type
|
|
38
|
-
*/
|
|
39
|
-
static sk_sp<SkShader> fromValue(jsi::Runtime &runtime,
|
|
40
|
-
const jsi::Value &obj) {
|
|
41
|
-
return obj.asObject(runtime)
|
|
42
|
-
.asHostObject<JsiSkShader>(runtime)
|
|
43
|
-
->getObject();
|
|
44
|
-
}
|
|
29
|
+
EXPORT_JSI_API_TYPENAME(JsiSkShader, "Shader")
|
|
30
|
+
JSI_EXPORT_FUNCTIONS(JSI_EXPORT_FUNC(JsiSkShader, dispose))
|
|
45
31
|
};
|
|
46
32
|
} // namespace RNSkia
|
package/cpp/api/JsiSkSurface.h
CHANGED
|
@@ -29,10 +29,7 @@ public:
|
|
|
29
29
|
: JsiSkWrappingSkPtrHostObject<SkSurface>(std::move(context),
|
|
30
30
|
std::move(surface)) {}
|
|
31
31
|
|
|
32
|
-
|
|
33
|
-
JSI_PROPERTY_GET(__typename__) {
|
|
34
|
-
return jsi::String::createFromUtf8(runtime, "Surface");
|
|
35
|
-
}
|
|
32
|
+
EXPORT_JSI_API_TYPENAME(JsiSkSurface, "Surface")
|
|
36
33
|
|
|
37
34
|
JSI_HOST_FUNCTION(getCanvas) {
|
|
38
35
|
return jsi::Object::createFromHostObject(
|
|
@@ -58,20 +55,10 @@ public:
|
|
|
58
55
|
runtime, std::make_shared<JsiSkImage>(getContext(), std::move(image)));
|
|
59
56
|
}
|
|
60
57
|
|
|
61
|
-
JSI_EXPORT_PROPERTY_GETTERS(JSI_EXPORT_PROP_GET(JsiSkSurface, __typename__))
|
|
62
58
|
JSI_EXPORT_FUNCTIONS(JSI_EXPORT_FUNC(JsiSkSurface, getCanvas),
|
|
63
59
|
JSI_EXPORT_FUNC(JsiSkSurface, makeImageSnapshot),
|
|
64
|
-
JSI_EXPORT_FUNC(JsiSkSurface, flush)
|
|
65
|
-
|
|
66
|
-
/**
|
|
67
|
-
Returns the underlying object from a host object of this type
|
|
68
|
-
*/
|
|
69
|
-
static sk_sp<SkSurface> fromValue(jsi::Runtime &runtime,
|
|
70
|
-
const jsi::Value &obj) {
|
|
71
|
-
return obj.asObject(runtime)
|
|
72
|
-
.asHostObject<JsiSkSurface>(runtime)
|
|
73
|
-
->getObject();
|
|
74
|
-
}
|
|
60
|
+
JSI_EXPORT_FUNC(JsiSkSurface, flush),
|
|
61
|
+
JSI_EXPORT_FUNC(JsiSkSurface, dispose))
|
|
75
62
|
};
|
|
76
63
|
|
|
77
64
|
} // namespace RNSkia
|
package/cpp/api/JsiSkTextBlob.h
CHANGED
|
@@ -25,23 +25,7 @@ public:
|
|
|
25
25
|
: JsiSkWrappingSkPtrHostObject<SkTextBlob>(std::move(context),
|
|
26
26
|
std::move(shader)) {}
|
|
27
27
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
JSI_PROPERTY_GET(__typename__) {
|
|
31
|
-
return jsi::String::createFromUtf8(runtime, "TextBlob");
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
JSI_EXPORT_PROPERTY_GETTERS(JSI_EXPORT_PROP_GET(JsiSkTextBlob,
|
|
35
|
-
__typename__), )
|
|
36
|
-
|
|
37
|
-
/**
|
|
38
|
-
Returns the underlying object from a host object of this type
|
|
39
|
-
*/
|
|
40
|
-
static sk_sp<SkTextBlob> fromValue(jsi::Runtime &runtime,
|
|
41
|
-
const jsi::Value &obj) {
|
|
42
|
-
return obj.asObject(runtime)
|
|
43
|
-
.asHostObject<JsiSkTextBlob>(runtime)
|
|
44
|
-
->getObject();
|
|
45
|
-
}
|
|
28
|
+
EXPORT_JSI_API_TYPENAME(JsiSkTextBlob, "TextBlob")
|
|
29
|
+
JSI_EXPORT_FUNCTIONS(JSI_EXPORT_FUNC(JsiSkTextBlob, dispose))
|
|
46
30
|
};
|
|
47
31
|
} // namespace RNSkia
|
package/cpp/api/JsiSkTypeface.h
CHANGED
|
@@ -22,34 +22,13 @@ namespace jsi = facebook::jsi;
|
|
|
22
22
|
|
|
23
23
|
class JsiSkTypeface : public JsiSkWrappingSkPtrHostObject<SkTypeface> {
|
|
24
24
|
public:
|
|
25
|
-
|
|
26
|
-
JSI_PROPERTY_GET(__typename__) {
|
|
27
|
-
return jsi::String::createFromUtf8(runtime, "Typeface");
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
JSI_EXPORT_PROPERTY_GETTERS(JSI_EXPORT_PROP_GET(JsiSkTypeface, __typename__))
|
|
31
|
-
|
|
32
|
-
JSI_HOST_FUNCTION(dispose) {
|
|
33
|
-
setObject(nullptr);
|
|
34
|
-
return jsi::Value::undefined();
|
|
35
|
-
}
|
|
36
|
-
|
|
25
|
+
EXPORT_JSI_API_TYPENAME(JsiSkTypeface, "Typeface")
|
|
37
26
|
JSI_EXPORT_FUNCTIONS(JSI_EXPORT_FUNC(JsiSkTypeface, dispose))
|
|
38
27
|
|
|
39
28
|
JsiSkTypeface(std::shared_ptr<RNSkPlatformContext> context,
|
|
40
29
|
sk_sp<SkTypeface> typeface)
|
|
41
30
|
: JsiSkWrappingSkPtrHostObject(std::move(context), std::move(typeface)) {}
|
|
42
31
|
|
|
43
|
-
/**
|
|
44
|
-
Returns the underlying object from a host object of this type
|
|
45
|
-
*/
|
|
46
|
-
static sk_sp<SkTypeface> fromValue(jsi::Runtime &runtime,
|
|
47
|
-
const jsi::Value &obj) {
|
|
48
|
-
return obj.asObject(runtime)
|
|
49
|
-
.asHostObject<JsiSkTypeface>(runtime)
|
|
50
|
-
->getObject();
|
|
51
|
-
}
|
|
52
|
-
|
|
53
32
|
/**
|
|
54
33
|
Returns the jsi object from a host object of this type
|
|
55
34
|
*/
|
package/cpp/api/JsiSkVertices.h
CHANGED
|
@@ -25,12 +25,7 @@ public:
|
|
|
25
25
|
: JsiSkWrappingSkPtrHostObject<SkVertices>(std::move(context),
|
|
26
26
|
std::move(vertices)) {}
|
|
27
27
|
|
|
28
|
-
|
|
29
|
-
JSI_PROPERTY_GET(__typename__) {
|
|
30
|
-
return jsi::String::createFromUtf8(runtime, "Vertices");
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
JSI_EXPORT_PROPERTY_GETTERS(JSI_EXPORT_PROP_GET(JsiSkVertices, __typename__))
|
|
28
|
+
EXPORT_JSI_API_TYPENAME(JsiSkVertices, "Vertices")
|
|
34
29
|
|
|
35
30
|
JSI_HOST_FUNCTION(bounds) {
|
|
36
31
|
const auto &result = getObject()->bounds();
|
|
@@ -43,17 +38,8 @@ public:
|
|
|
43
38
|
}
|
|
44
39
|
|
|
45
40
|
JSI_EXPORT_FUNCTIONS(JSI_EXPORT_FUNC(JsiSkVertices, bounds),
|
|
46
|
-
JSI_EXPORT_FUNC(JsiSkVertices, uniqueID),
|
|
47
|
-
|
|
48
|
-
/**
|
|
49
|
-
Returns the underlying object from a host object of this type
|
|
50
|
-
*/
|
|
51
|
-
static sk_sp<SkVertices> fromValue(jsi::Runtime &runtime,
|
|
52
|
-
const jsi::Value &obj) {
|
|
53
|
-
return obj.asObject(runtime)
|
|
54
|
-
.asHostObject<JsiSkVertices>(runtime)
|
|
55
|
-
->getObject();
|
|
56
|
-
}
|
|
41
|
+
JSI_EXPORT_FUNC(JsiSkVertices, uniqueID),
|
|
42
|
+
JSI_EXPORT_FUNC(JsiSkVertices, dispose))
|
|
57
43
|
|
|
58
44
|
/**
|
|
59
45
|
* Creates the function for construction a new instance of the SkVertices
|
|
@@ -24,17 +24,15 @@ public:
|
|
|
24
24
|
void push(T el) { _elements.push(el); }
|
|
25
25
|
|
|
26
26
|
// Clears and returns all elements
|
|
27
|
-
std::vector<T> popAll() {
|
|
28
|
-
|
|
29
|
-
// Pops the number of items up to limit
|
|
30
|
-
std::vector<T> popMultiple(size_t limit) {
|
|
31
|
-
auto size = std::min(limit, _elements.size());
|
|
27
|
+
std::vector<T> popAll() {
|
|
28
|
+
auto size = _elements.size();
|
|
32
29
|
std::vector<T> tmp;
|
|
33
30
|
tmp.reserve(size);
|
|
34
31
|
for (size_t i = 0; i < size; ++i) {
|
|
35
32
|
tmp.push_back(_elements.top());
|
|
36
33
|
_elements.pop();
|
|
37
34
|
}
|
|
35
|
+
std::reverse(std::begin(tmp), std::end(tmp));
|
|
38
36
|
return tmp;
|
|
39
37
|
}
|
|
40
38
|
|
|
@@ -50,7 +48,7 @@ public:
|
|
|
50
48
|
// Clears and returns through reducer function in reversed order
|
|
51
49
|
T popAsOne(std::function<T(T inner, T outer)> composer) {
|
|
52
50
|
auto tmp = popAll();
|
|
53
|
-
|
|
51
|
+
std::reverse(std::begin(tmp), std::end(tmp));
|
|
54
52
|
return std::accumulate(std::begin(tmp), std::end(tmp),
|
|
55
53
|
static_cast<T>(nullptr), [=](T inner, T outer) {
|
|
56
54
|
if (inner == nullptr) {
|
|
@@ -63,7 +61,7 @@ public:
|
|
|
63
61
|
// Returns the size of the elements
|
|
64
62
|
size_t size() { return _elements.size(); }
|
|
65
63
|
|
|
66
|
-
|
|
64
|
+
private:
|
|
67
65
|
std::stack<T> _elements;
|
|
68
66
|
};
|
|
69
67
|
|
|
@@ -108,8 +108,8 @@ protected:
|
|
|
108
108
|
// _path is const so we can't mutate it directly, let's replace the
|
|
109
109
|
// path like this:
|
|
110
110
|
auto p = std::make_shared<SkPath>(*_path.get());
|
|
111
|
-
if (!
|
|
112
|
-
|
|
111
|
+
if (!skpathutils::FillPathWithPaint(*_path.get(), strokePaint,
|
|
112
|
+
p.get(), nullptr, precision)) {
|
|
113
113
|
_path = nullptr;
|
|
114
114
|
} else {
|
|
115
115
|
_path = std::const_pointer_cast<const SkPath>(p);
|
|
@@ -72,13 +72,13 @@ public:
|
|
|
72
72
|
});
|
|
73
73
|
}
|
|
74
74
|
|
|
75
|
-
JSI_HOST_FUNCTION(
|
|
75
|
+
JSI_HOST_FUNCTION(dispose) {
|
|
76
76
|
invalidate();
|
|
77
77
|
return jsi::Value::undefined();
|
|
78
78
|
}
|
|
79
79
|
|
|
80
80
|
JSI_EXPORT_FUNCTIONS(JSI_EXPORT_FUNC(RNSkReadonlyValue, addListener),
|
|
81
|
-
JSI_EXPORT_FUNC(RNSkReadonlyValue,
|
|
81
|
+
JSI_EXPORT_FUNC(RNSkReadonlyValue, dispose))
|
|
82
82
|
|
|
83
83
|
/**
|
|
84
84
|
* Adds a callback that will be called whenever the value changes
|
|
@@ -70,7 +70,7 @@ public:
|
|
|
70
70
|
JSI_EXPORT_PROP_GET(RNSkValue, animation))
|
|
71
71
|
|
|
72
72
|
JSI_EXPORT_FUNCTIONS(JSI_EXPORT_FUNC(RNSkValue, addListener),
|
|
73
|
-
JSI_EXPORT_FUNC(RNSkReadonlyValue,
|
|
73
|
+
JSI_EXPORT_FUNC(RNSkReadonlyValue, dispose))
|
|
74
74
|
|
|
75
75
|
private:
|
|
76
76
|
void subscribe(std::shared_ptr<RNSkAnimation> animation) {
|
|
@@ -27,7 +27,7 @@ class SkShader;
|
|
|
27
27
|
class SkAndroidFrameworkUtils {
|
|
28
28
|
public:
|
|
29
29
|
|
|
30
|
-
#if
|
|
30
|
+
#if defined(SK_GANESH)
|
|
31
31
|
/**
|
|
32
32
|
* clipWithStencil draws the current clip into a stencil buffer with reference value and mask
|
|
33
33
|
* set to 0x1. This function works only on a GPU canvas.
|
|
@@ -37,7 +37,7 @@ public:
|
|
|
37
37
|
* @return true on success or false if clip is empty or not a GPU canvas.
|
|
38
38
|
*/
|
|
39
39
|
static bool clipWithStencil(SkCanvas* canvas);
|
|
40
|
-
#endif //
|
|
40
|
+
#endif //defined(SK_GANESH)
|
|
41
41
|
|
|
42
42
|
static void SafetyNetLog(const char*);
|
|
43
43
|
|
|
@@ -58,12 +58,6 @@ public:
|
|
|
58
58
|
*/
|
|
59
59
|
static SkCanvas* getBaseWrappedCanvas(SkCanvas* canvas);
|
|
60
60
|
|
|
61
|
-
/**
|
|
62
|
-
* Skia will change the order in which local matrices concatenate. In order to not break Android
|
|
63
|
-
* apps targeting older API levels we offer this function to use the legacy concatenation order.
|
|
64
|
-
*/
|
|
65
|
-
static void UseLegacyLocalMatrixConcatenation();
|
|
66
|
-
|
|
67
61
|
/**
|
|
68
62
|
* If the shader represents a linear gradient ShaderAsALinearGradient
|
|
69
63
|
* returns true and if info is not null, ShaderAsALinearGradient populates
|
|
@@ -0,0 +1,101 @@
|
|
|
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 SkImageAndroid_DEFINED
|
|
9
|
+
#define SkImageAndroid_DEFINED
|
|
10
|
+
|
|
11
|
+
#include "include/core/SkImage.h"
|
|
12
|
+
#include "include/core/SkRefCnt.h"
|
|
13
|
+
#include "include/gpu/GrTypes.h"
|
|
14
|
+
|
|
15
|
+
class SkColorSpace;
|
|
16
|
+
class GrDirectContext;
|
|
17
|
+
class SkPixmap;
|
|
18
|
+
struct AHardwareBuffer;
|
|
19
|
+
|
|
20
|
+
namespace SkImages {
|
|
21
|
+
|
|
22
|
+
/** (See Skia bug 7447)
|
|
23
|
+
Creates SkImage from Android hardware buffer.
|
|
24
|
+
Returned SkImage takes a reference on the buffer.
|
|
25
|
+
Only available on Android, when __ANDROID_API__ is defined to be 26 or greater.
|
|
26
|
+
@param hardwareBuffer AHardwareBuffer Android hardware buffer
|
|
27
|
+
@param colorSpace range of colors; may be nullptr
|
|
28
|
+
@return created SkImage, or nullptr
|
|
29
|
+
*/
|
|
30
|
+
SK_API sk_sp<SkImage> DeferredFromAHardwareBuffer(AHardwareBuffer* hardwareBuffer,
|
|
31
|
+
SkAlphaType alphaType = kPremul_SkAlphaType);
|
|
32
|
+
SK_API sk_sp<SkImage> DeferredFromAHardwareBuffer(
|
|
33
|
+
AHardwareBuffer* hardwareBuffer,
|
|
34
|
+
SkAlphaType alphaType,
|
|
35
|
+
sk_sp<SkColorSpace> colorSpace,
|
|
36
|
+
GrSurfaceOrigin surfaceOrigin = kTopLeft_GrSurfaceOrigin);
|
|
37
|
+
|
|
38
|
+
/** Creates SkImage from Android hardware buffer and uploads the data from the SkPixmap to it.
|
|
39
|
+
Returned SkImage takes a reference on the buffer.
|
|
40
|
+
Only available on Android, when __ANDROID_API__ is defined to be 26 or greater.
|
|
41
|
+
@param context GPU context
|
|
42
|
+
@param pixmap SkPixmap that contains data to be uploaded to the AHardwareBuffer
|
|
43
|
+
@param hardwareBuffer AHardwareBuffer Android hardware buffer
|
|
44
|
+
@param surfaceOrigin surface origin for resulting image
|
|
45
|
+
@return created SkImage, or nullptr
|
|
46
|
+
*/
|
|
47
|
+
SK_API sk_sp<SkImage> TextureFromAHardwareBufferWithData(
|
|
48
|
+
GrDirectContext* context,
|
|
49
|
+
const SkPixmap& pixmap,
|
|
50
|
+
AHardwareBuffer* hardwareBuffer,
|
|
51
|
+
GrSurfaceOrigin surfaceOrigin = kTopLeft_GrSurfaceOrigin);
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* Like SkImagePriv::SkMakeImageFromRasterBitmap, except this can be pinned using
|
|
55
|
+
* skgpu::ganesh::PinAsTexture and CopyPixelMode is never.
|
|
56
|
+
*/
|
|
57
|
+
SK_API sk_sp<SkImage> PinnableRasterFromBitmap(const SkBitmap&);
|
|
58
|
+
|
|
59
|
+
} // namespace SkImages
|
|
60
|
+
|
|
61
|
+
// TODO(kjlubick) remove this after Android has been ported.
|
|
62
|
+
namespace sk_image_factory {
|
|
63
|
+
inline sk_sp<SkImage> MakePinnableFromRasterBitmap(const SkBitmap& b) {
|
|
64
|
+
return SkImages::PinnableRasterFromBitmap(b);
|
|
65
|
+
}
|
|
66
|
+
} // namespace sk_image_factory
|
|
67
|
+
|
|
68
|
+
namespace skgpu::ganesh {
|
|
69
|
+
/**
|
|
70
|
+
* Will attempt to upload and lock the contents of the image as a texture, so that subsequent
|
|
71
|
+
* draws to a gpu-target will come from that texture (and not by looking at the original image
|
|
72
|
+
* src). In particular this is intended to use the texture even if the image's original content
|
|
73
|
+
* changes subsequent to this call (i.e. the src is mutable!).
|
|
74
|
+
*
|
|
75
|
+
* Only compatible with SkImages created from SkImages::PinnableRasterFromBitmap.
|
|
76
|
+
*
|
|
77
|
+
* All successful calls must be balanced by an equal number of calls to UnpinTexture().
|
|
78
|
+
*
|
|
79
|
+
* Once in this "pinned" state, the image has all of the same thread restrictions that exist
|
|
80
|
+
* for a natively created gpu image (e.g. SkImage::MakeFromTexture)
|
|
81
|
+
* - all drawing, pinning, unpinning must happen in the same thread as the GrContext.
|
|
82
|
+
*
|
|
83
|
+
* @return true if the image was successfully uploaded and locked into a texture
|
|
84
|
+
*/
|
|
85
|
+
bool PinAsTexture(GrRecordingContext*, SkImage*);
|
|
86
|
+
|
|
87
|
+
/**
|
|
88
|
+
* The balancing call to a successful invocation of PinAsTexture. When a balanced
|
|
89
|
+
* number of calls have been made, then the "pinned" texture is free to be purged, etc. This
|
|
90
|
+
* also means that a subsequent "pin" call will look at the original content again, and if
|
|
91
|
+
* its uniqueID/generationID has changed, then a newer texture will be uploaded/pinned.
|
|
92
|
+
*
|
|
93
|
+
* Only compatible with SkImages created from SkImages::PinnableRasterFromBitmap.
|
|
94
|
+
*
|
|
95
|
+
* The context passed to unpin must match the one passed to pin.
|
|
96
|
+
*/
|
|
97
|
+
void UnpinTexture(GrRecordingContext*, SkImage*);
|
|
98
|
+
|
|
99
|
+
} // namespace skgpu::ganesh
|
|
100
|
+
|
|
101
|
+
#endif
|
|
@@ -9,24 +9,27 @@
|
|
|
9
9
|
#define SkAndroidCodec_DEFINED
|
|
10
10
|
|
|
11
11
|
#include "include/codec/SkCodec.h"
|
|
12
|
-
#include "include/core/SkAlphaType.h"
|
|
13
12
|
#include "include/core/SkColorSpace.h"
|
|
14
|
-
#include "include/core/SkColorType.h"
|
|
15
|
-
#include "include/core/SkEncodedImageFormat.h"
|
|
16
13
|
#include "include/core/SkImageInfo.h"
|
|
17
14
|
#include "include/core/SkRefCnt.h"
|
|
18
15
|
#include "include/core/SkSize.h"
|
|
19
16
|
#include "include/core/SkTypes.h"
|
|
20
17
|
#include "include/private/SkEncodedInfo.h"
|
|
21
|
-
#include "include/private/SkNoncopyable.h"
|
|
18
|
+
#include "include/private/base/SkNoncopyable.h"
|
|
22
19
|
#include "modules/skcms/skcms.h"
|
|
23
20
|
|
|
21
|
+
// TODO(kjlubick, bungeman) Replace these includes with forward declares
|
|
22
|
+
#include "include/codec/SkEncodedImageFormat.h" // IWYU pragma: keep
|
|
23
|
+
#include "include/core/SkAlphaType.h" // IWYU pragma: keep
|
|
24
|
+
#include "include/core/SkColorType.h" // IWYU pragma: keep
|
|
25
|
+
|
|
24
26
|
#include <cstddef>
|
|
25
27
|
#include <memory>
|
|
26
28
|
|
|
27
29
|
class SkData;
|
|
28
30
|
class SkPngChunkReader;
|
|
29
31
|
class SkStream;
|
|
32
|
+
struct SkGainmapInfo;
|
|
30
33
|
struct SkIRect;
|
|
31
34
|
|
|
32
35
|
/**
|
|
@@ -118,10 +121,8 @@ public:
|
|
|
118
121
|
/**
|
|
119
122
|
* @param outputColorType Color type that the client will decode to.
|
|
120
123
|
* @param prefColorSpace Preferred color space to decode to.
|
|
121
|
-
* This may not return |prefColorSpace| for
|
|
122
|
-
*
|
|
123
|
-
* linear sRGB, transfer function must be parametric.
|
|
124
|
-
* (2) Codec Limitations: F16 requires a linear color space.
|
|
124
|
+
* This may not return |prefColorSpace| for
|
|
125
|
+
* specific color types.
|
|
125
126
|
*
|
|
126
127
|
* Returns the appropriate color space to decode to.
|
|
127
128
|
*/
|
|
@@ -262,6 +263,23 @@ public:
|
|
|
262
263
|
|
|
263
264
|
SkCodec* codec() const { return fCodec.get(); }
|
|
264
265
|
|
|
266
|
+
/**
|
|
267
|
+
* Retrieve the gainmap for an image.
|
|
268
|
+
*
|
|
269
|
+
* @param outInfo On success, this is populated with the parameters for
|
|
270
|
+
* rendering this gainmap. This parameter must be non-nullptr.
|
|
271
|
+
*
|
|
272
|
+
* @param outGainmapImageStream On success, this is populated with a stream from which the
|
|
273
|
+
* gainmap image may be decoded. This parameter is optional, and
|
|
274
|
+
* may be set to nullptr.
|
|
275
|
+
*
|
|
276
|
+
* @return If this has a gainmap image and that gainmap image was
|
|
277
|
+
* successfully extracted then return true. Otherwise return
|
|
278
|
+
* false.
|
|
279
|
+
*/
|
|
280
|
+
bool getAndroidGainmap(SkGainmapInfo* outInfo,
|
|
281
|
+
std::unique_ptr<SkStream>* outGainmapImageStream);
|
|
282
|
+
|
|
265
283
|
protected:
|
|
266
284
|
SkAndroidCodec(SkCodec*);
|
|
267
285
|
|