@shopify/react-native-skia 0.1.115
Sign up to get free protection for your applications and to get access to all the features.
- package/LICENSE.md +7 -0
- package/README.md +7 -0
- package/android/CMakeLists.txt +132 -0
- package/android/README.md +14 -0
- package/android/build.gradle +196 -0
- package/android/cpp/jni/JniLoad.cpp +13 -0
- package/android/cpp/jni/JniPlatformContext.cpp +142 -0
- package/android/cpp/jni/JniSkiaDrawView.cpp +169 -0
- package/android/cpp/jni/JniSkiaManager.cpp +57 -0
- package/android/cpp/jni/SkiaOpenGLRenderer.cpp +340 -0
- package/android/cpp/jni/include/JniPlatformContext.h +75 -0
- package/android/cpp/jni/include/JniPlatformContextWrapper.h +54 -0
- package/android/cpp/jni/include/JniSkiaDrawView.h +82 -0
- package/android/cpp/jni/include/JniSkiaManager.h +81 -0
- package/android/cpp/jni/include/SkiaOpenGLRenderer.h +159 -0
- package/android/src/main/AndroidManifest.xml +6 -0
- package/android/src/main/java/com/shopify/reactnative/skia/PlatformContext.java +181 -0
- package/android/src/main/java/com/shopify/reactnative/skia/RNSkiaModule.java +88 -0
- package/android/src/main/java/com/shopify/reactnative/skia/RNSkiaPackage.java +24 -0
- package/android/src/main/java/com/shopify/reactnative/skia/RNSkiaViewManager.java +72 -0
- package/android/src/main/java/com/shopify/reactnative/skia/SkiaDrawView.java +137 -0
- package/android/src/main/java/com/shopify/reactnative/skia/SkiaManager.java +66 -0
- package/cpp/api/JsiSkApi.h +97 -0
- package/cpp/api/JsiSkCanvas.h +532 -0
- package/cpp/api/JsiSkColorFilter.h +43 -0
- package/cpp/api/JsiSkColorFilterFactory.h +98 -0
- package/cpp/api/JsiSkContourMeasure.h +102 -0
- package/cpp/api/JsiSkContourMeasureIter.h +90 -0
- package/cpp/api/JsiSkData.h +46 -0
- package/cpp/api/JsiSkDataFactory.h +92 -0
- package/cpp/api/JsiSkFont.h +326 -0
- package/cpp/api/JsiSkFontMgr.h +84 -0
- package/cpp/api/JsiSkFontMgrFactory.h +48 -0
- package/cpp/api/JsiSkHostObjects.h +83 -0
- package/cpp/api/JsiSkImage.h +141 -0
- package/cpp/api/JsiSkImageFactory.h +50 -0
- package/cpp/api/JsiSkImageFilter.h +47 -0
- package/cpp/api/JsiSkImageFilterFactory.h +217 -0
- package/cpp/api/JsiSkImageInfo.h +57 -0
- package/cpp/api/JsiSkMaskFilter.h +45 -0
- package/cpp/api/JsiSkMaskFilterFactory.h +42 -0
- package/cpp/api/JsiSkMatrix.h +64 -0
- package/cpp/api/JsiSkPaint.h +227 -0
- package/cpp/api/JsiSkPath.h +557 -0
- package/cpp/api/JsiSkPathEffect.h +45 -0
- package/cpp/api/JsiSkPathEffectFactory.h +123 -0
- package/cpp/api/JsiSkPathFactory.h +64 -0
- package/cpp/api/JsiSkPoint.h +81 -0
- package/cpp/api/JsiSkRRect.h +93 -0
- package/cpp/api/JsiSkRSXform.h +105 -0
- package/cpp/api/JsiSkRect.h +119 -0
- package/cpp/api/JsiSkRuntimeEffect.h +217 -0
- package/cpp/api/JsiSkRuntimeEffectFactory.h +41 -0
- package/cpp/api/JsiSkSVG.h +43 -0
- package/cpp/api/JsiSkSVGFactory.h +48 -0
- package/cpp/api/JsiSkShader.h +45 -0
- package/cpp/api/JsiSkShaderFactory.h +214 -0
- package/cpp/api/JsiSkSurface.h +67 -0
- package/cpp/api/JsiSkSurfaceFactory.h +44 -0
- package/cpp/api/JsiSkTextBlob.h +50 -0
- package/cpp/api/JsiSkTextBlobFactory.h +109 -0
- package/cpp/api/JsiSkTypeface.h +76 -0
- package/cpp/api/JsiSkTypefaceFactory.h +30 -0
- package/cpp/api/JsiSkVertices.h +147 -0
- package/cpp/jsi/JsiHostObject.cpp +154 -0
- package/cpp/jsi/JsiHostObject.h +241 -0
- package/cpp/rnskia/RNSkAnimation.h +73 -0
- package/cpp/rnskia/RNSkDispatchQueue.cpp +84 -0
- package/cpp/rnskia/RNSkDispatchQueue.h +47 -0
- package/cpp/rnskia/RNSkDrawView.cpp +333 -0
- package/cpp/rnskia/RNSkDrawView.h +242 -0
- package/cpp/rnskia/RNSkInfoParameter.h +100 -0
- package/cpp/rnskia/RNSkJsiViewApi.h +305 -0
- package/cpp/rnskia/RNSkManager.cpp +81 -0
- package/cpp/rnskia/RNSkManager.h +81 -0
- package/cpp/rnskia/RNSkPlatformContext.h +196 -0
- package/cpp/rnskia/RNSkValueApi.h +69 -0
- package/cpp/rnskia/values/RNSkClockValue.h +133 -0
- package/cpp/rnskia/values/RNSkDerivedValue.h +92 -0
- package/cpp/rnskia/values/RNSkReadonlyValue.h +140 -0
- package/cpp/rnskia/values/RNSkValue.h +112 -0
- package/cpp/skia/include/android/SkAndroidFrameworkUtils.h +61 -0
- package/cpp/skia/include/android/SkAnimatedImage.h +179 -0
- package/cpp/skia/include/c/sk_canvas.h +159 -0
- package/cpp/skia/include/c/sk_colorspace.h +25 -0
- package/cpp/skia/include/c/sk_data.h +65 -0
- package/cpp/skia/include/c/sk_image.h +71 -0
- package/cpp/skia/include/c/sk_imageinfo.h +62 -0
- package/cpp/skia/include/c/sk_maskfilter.h +47 -0
- package/cpp/skia/include/c/sk_matrix.h +49 -0
- package/cpp/skia/include/c/sk_paint.h +145 -0
- package/cpp/skia/include/c/sk_path.h +102 -0
- package/cpp/skia/include/c/sk_picture.h +70 -0
- package/cpp/skia/include/c/sk_shader.h +143 -0
- package/cpp/skia/include/c/sk_surface.h +73 -0
- package/cpp/skia/include/c/sk_types.h +278 -0
- package/cpp/skia/include/codec/SkAndroidCodec.h +263 -0
- package/cpp/skia/include/codec/SkCodec.h +992 -0
- package/cpp/skia/include/codec/SkCodecAnimation.h +61 -0
- package/cpp/skia/include/codec/SkEncodedOrigin.h +54 -0
- package/cpp/skia/include/config/SkUserConfig.h +89 -0
- package/cpp/skia/include/core/SkAnnotation.h +50 -0
- package/cpp/skia/include/core/SkBBHFactory.h +63 -0
- package/cpp/skia/include/core/SkBitmap.h +1212 -0
- package/cpp/skia/include/core/SkBlendMode.h +110 -0
- package/cpp/skia/include/core/SkBlender.h +33 -0
- package/cpp/skia/include/core/SkBlurTypes.h +22 -0
- package/cpp/skia/include/core/SkCanvas.h +2583 -0
- package/cpp/skia/include/core/SkCanvasVirtualEnforcer.h +61 -0
- package/cpp/skia/include/core/SkClipOp.h +19 -0
- package/cpp/skia/include/core/SkColor.h +438 -0
- package/cpp/skia/include/core/SkColorFilter.h +90 -0
- package/cpp/skia/include/core/SkColorPriv.h +152 -0
- package/cpp/skia/include/core/SkColorSpace.h +245 -0
- package/cpp/skia/include/core/SkContourMeasure.h +131 -0
- package/cpp/skia/include/core/SkCoverageMode.h +30 -0
- package/cpp/skia/include/core/SkCubicMap.h +45 -0
- package/cpp/skia/include/core/SkCustomMesh.h +202 -0
- package/cpp/skia/include/core/SkData.h +188 -0
- package/cpp/skia/include/core/SkDataTable.h +118 -0
- package/cpp/skia/include/core/SkDeferredDisplayList.h +110 -0
- package/cpp/skia/include/core/SkDeferredDisplayListRecorder.h +97 -0
- package/cpp/skia/include/core/SkDocument.h +91 -0
- package/cpp/skia/include/core/SkDrawLooper.h +135 -0
- package/cpp/skia/include/core/SkDrawable.h +160 -0
- package/cpp/skia/include/core/SkEncodedImageFormat.h +35 -0
- package/cpp/skia/include/core/SkExecutor.h +41 -0
- package/cpp/skia/include/core/SkFlattenable.h +113 -0
- package/cpp/skia/include/core/SkFont.h +534 -0
- package/cpp/skia/include/core/SkFontArguments.h +62 -0
- package/cpp/skia/include/core/SkFontMetrics.h +138 -0
- package/cpp/skia/include/core/SkFontMgr.h +157 -0
- package/cpp/skia/include/core/SkFontParameters.h +42 -0
- package/cpp/skia/include/core/SkFontStyle.h +81 -0
- package/cpp/skia/include/core/SkFontTypes.h +25 -0
- package/cpp/skia/include/core/SkGraphics.h +153 -0
- package/cpp/skia/include/core/SkICC.h +19 -0
- package/cpp/skia/include/core/SkImage.h +1302 -0
- package/cpp/skia/include/core/SkImageEncoder.h +72 -0
- package/cpp/skia/include/core/SkImageFilter.h +114 -0
- package/cpp/skia/include/core/SkImageGenerator.h +215 -0
- package/cpp/skia/include/core/SkImageInfo.h +721 -0
- package/cpp/skia/include/core/SkM44.h +426 -0
- package/cpp/skia/include/core/SkMallocPixelRef.h +42 -0
- package/cpp/skia/include/core/SkMaskFilter.h +50 -0
- package/cpp/skia/include/core/SkMath.h +54 -0
- package/cpp/skia/include/core/SkMatrix.h +1986 -0
- package/cpp/skia/include/core/SkMilestone.h +9 -0
- package/cpp/skia/include/core/SkOverdrawCanvas.h +68 -0
- package/cpp/skia/include/core/SkPaint.h +720 -0
- package/cpp/skia/include/core/SkPath.h +1891 -0
- package/cpp/skia/include/core/SkPathBuilder.h +268 -0
- package/cpp/skia/include/core/SkPathEffect.h +106 -0
- package/cpp/skia/include/core/SkPathMeasure.h +88 -0
- package/cpp/skia/include/core/SkPathTypes.h +59 -0
- package/cpp/skia/include/core/SkPicture.h +280 -0
- package/cpp/skia/include/core/SkPictureRecorder.h +115 -0
- package/cpp/skia/include/core/SkPixelRef.h +123 -0
- package/cpp/skia/include/core/SkPixmap.h +720 -0
- package/cpp/skia/include/core/SkPngChunkReader.h +45 -0
- package/cpp/skia/include/core/SkPoint.h +566 -0
- package/cpp/skia/include/core/SkPoint3.h +157 -0
- package/cpp/skia/include/core/SkPromiseImageTexture.h +46 -0
- package/cpp/skia/include/core/SkRRect.h +512 -0
- package/cpp/skia/include/core/SkRSXform.h +69 -0
- package/cpp/skia/include/core/SkRasterHandleAllocator.h +92 -0
- package/cpp/skia/include/core/SkRect.h +1378 -0
- package/cpp/skia/include/core/SkRefCnt.h +382 -0
- package/cpp/skia/include/core/SkRegion.h +672 -0
- package/cpp/skia/include/core/SkSamplingOptions.h +92 -0
- package/cpp/skia/include/core/SkScalar.h +194 -0
- package/cpp/skia/include/core/SkSerialProcs.h +73 -0
- package/cpp/skia/include/core/SkShader.h +148 -0
- package/cpp/skia/include/core/SkSize.h +90 -0
- package/cpp/skia/include/core/SkSpan.h +89 -0
- package/cpp/skia/include/core/SkStream.h +524 -0
- package/cpp/skia/include/core/SkString.h +302 -0
- package/cpp/skia/include/core/SkStringView.h +185 -0
- package/cpp/skia/include/core/SkStrokeRec.h +154 -0
- package/cpp/skia/include/core/SkSurface.h +1079 -0
- package/cpp/skia/include/core/SkSurfaceCharacterization.h +263 -0
- package/cpp/skia/include/core/SkSurfaceProps.h +92 -0
- package/cpp/skia/include/core/SkSwizzle.h +19 -0
- package/cpp/skia/include/core/SkTextBlob.h +503 -0
- package/cpp/skia/include/core/SkTileMode.h +41 -0
- package/cpp/skia/include/core/SkTime.h +63 -0
- package/cpp/skia/include/core/SkTraceMemoryDump.h +99 -0
- package/cpp/skia/include/core/SkTypeface.h +454 -0
- package/cpp/skia/include/core/SkTypes.h +621 -0
- package/cpp/skia/include/core/SkUnPreMultiply.h +56 -0
- package/cpp/skia/include/core/SkVertices.h +132 -0
- package/cpp/skia/include/core/SkYUVAInfo.h +304 -0
- package/cpp/skia/include/core/SkYUVAPixmaps.h +336 -0
- package/cpp/skia/include/docs/SkPDFDocument.h +196 -0
- package/cpp/skia/include/docs/SkXPSDocument.h +27 -0
- package/cpp/skia/include/effects/Sk1DPathEffect.h +35 -0
- package/cpp/skia/include/effects/Sk2DPathEffect.h +30 -0
- package/cpp/skia/include/effects/SkBlenders.h +27 -0
- package/cpp/skia/include/effects/SkBlurDrawLooper.h +26 -0
- package/cpp/skia/include/effects/SkBlurMaskFilter.h +35 -0
- package/cpp/skia/include/effects/SkColorMatrix.h +55 -0
- package/cpp/skia/include/effects/SkColorMatrixFilter.h +25 -0
- package/cpp/skia/include/effects/SkCornerPathEffect.h +28 -0
- package/cpp/skia/include/effects/SkDashPathEffect.h +39 -0
- package/cpp/skia/include/effects/SkDiscretePathEffect.h +37 -0
- package/cpp/skia/include/effects/SkGradientShader.h +264 -0
- package/cpp/skia/include/effects/SkHighContrastFilter.h +80 -0
- package/cpp/skia/include/effects/SkImageFilters.h +551 -0
- package/cpp/skia/include/effects/SkLayerDrawLooper.h +161 -0
- package/cpp/skia/include/effects/SkLumaColorFilter.h +34 -0
- package/cpp/skia/include/effects/SkOpPathEffect.h +39 -0
- package/cpp/skia/include/effects/SkOverdrawColorFilter.h +29 -0
- package/cpp/skia/include/effects/SkPerlinNoiseShader.h +54 -0
- package/cpp/skia/include/effects/SkRuntimeEffect.h +518 -0
- package/cpp/skia/include/effects/SkShaderMaskFilter.h +24 -0
- package/cpp/skia/include/effects/SkStrokeAndFillPathEffect.h +28 -0
- package/cpp/skia/include/effects/SkTableColorFilter.h +42 -0
- package/cpp/skia/include/effects/SkTableMaskFilter.h +37 -0
- package/cpp/skia/include/effects/SkTrimPathEffect.h +41 -0
- package/cpp/skia/include/encode/SkEncoder.h +42 -0
- package/cpp/skia/include/encode/SkJpegEncoder.h +97 -0
- package/cpp/skia/include/encode/SkPngEncoder.h +99 -0
- package/cpp/skia/include/encode/SkWebpEncoder.h +48 -0
- package/cpp/skia/include/gpu/GrBackendDrawableInfo.h +44 -0
- package/cpp/skia/include/gpu/GrBackendSemaphore.h +140 -0
- package/cpp/skia/include/gpu/GrBackendSurface.h +643 -0
- package/cpp/skia/include/gpu/GrBackendSurfaceMutableState.h +91 -0
- package/cpp/skia/include/gpu/GrConfig.h +53 -0
- package/cpp/skia/include/gpu/GrContextOptions.h +364 -0
- package/cpp/skia/include/gpu/GrContextThreadSafeProxy.h +159 -0
- package/cpp/skia/include/gpu/GrDirectContext.h +880 -0
- package/cpp/skia/include/gpu/GrDriverBugWorkarounds.h +52 -0
- package/cpp/skia/include/gpu/GrDriverBugWorkaroundsAutogen.h +45 -0
- package/cpp/skia/include/gpu/GrRecordingContext.h +275 -0
- package/cpp/skia/include/gpu/GrSurfaceInfo.h +166 -0
- package/cpp/skia/include/gpu/GrTypes.h +244 -0
- package/cpp/skia/include/gpu/GrYUVABackendTextures.h +124 -0
- package/cpp/skia/include/gpu/ShaderErrorHandler.h +36 -0
- package/cpp/skia/include/gpu/d3d/GrD3DBackendContext.h +35 -0
- package/cpp/skia/include/gpu/d3d/GrD3DTypes.h +248 -0
- package/cpp/skia/include/gpu/dawn/GrDawnTypes.h +95 -0
- package/cpp/skia/include/gpu/gl/GrGLAssembleHelpers.h +11 -0
- package/cpp/skia/include/gpu/gl/GrGLAssembleInterface.h +39 -0
- package/cpp/skia/include/gpu/gl/GrGLConfig.h +79 -0
- package/cpp/skia/include/gpu/gl/GrGLConfig_chrome.h +14 -0
- package/cpp/skia/include/gpu/gl/GrGLExtensions.h +78 -0
- package/cpp/skia/include/gpu/gl/GrGLFunctions.h +304 -0
- package/cpp/skia/include/gpu/gl/GrGLInterface.h +342 -0
- package/cpp/skia/include/gpu/gl/GrGLTypes.h +207 -0
- package/cpp/skia/include/gpu/gl/egl/GrGLMakeEGLInterface.h +14 -0
- package/cpp/skia/include/gpu/gl/glx/GrGLMakeGLXInterface.h +14 -0
- package/cpp/skia/include/gpu/mock/GrMockTypes.h +144 -0
- package/cpp/skia/include/gpu/mtl/GrMtlBackendContext.h +21 -0
- package/cpp/skia/include/gpu/mtl/GrMtlTypes.h +63 -0
- package/cpp/skia/include/gpu/vk/GrVkBackendContext.h +76 -0
- package/cpp/skia/include/gpu/vk/GrVkExtensions.h +63 -0
- package/cpp/skia/include/gpu/vk/GrVkMemoryAllocator.h +140 -0
- package/cpp/skia/include/gpu/vk/GrVkTypes.h +187 -0
- package/cpp/skia/include/gpu/vk/GrVkVulkan.h +32 -0
- package/cpp/skia/include/pathops/SkPathOps.h +113 -0
- package/cpp/skia/include/ports/SkCFObject.h +184 -0
- package/cpp/skia/include/ports/SkFontConfigInterface.h +115 -0
- package/cpp/skia/include/ports/SkFontMgr_FontConfigInterface.h +20 -0
- package/cpp/skia/include/ports/SkFontMgr_android.h +45 -0
- package/cpp/skia/include/ports/SkFontMgr_directory.h +21 -0
- package/cpp/skia/include/ports/SkFontMgr_empty.h +21 -0
- package/cpp/skia/include/ports/SkFontMgr_fontconfig.h +22 -0
- package/cpp/skia/include/ports/SkFontMgr_fuchsia.h +19 -0
- package/cpp/skia/include/ports/SkFontMgr_indirect.h +102 -0
- package/cpp/skia/include/ports/SkFontMgr_mac_ct.h +27 -0
- package/cpp/skia/include/ports/SkImageGeneratorCG.h +20 -0
- package/cpp/skia/include/ports/SkImageGeneratorNDK.h +40 -0
- package/cpp/skia/include/ports/SkImageGeneratorWIC.h +35 -0
- package/cpp/skia/include/ports/SkRemotableFontMgr.h +139 -0
- package/cpp/skia/include/ports/SkTypeface_mac.h +44 -0
- package/cpp/skia/include/ports/SkTypeface_win.h +79 -0
- package/cpp/skia/include/private/GrContext_Base.h +92 -0
- package/cpp/skia/include/private/GrD3DTypesMinimal.h +74 -0
- package/cpp/skia/include/private/GrDawnTypesPriv.h +26 -0
- package/cpp/skia/include/private/GrGLTypesPriv.h +107 -0
- package/cpp/skia/include/private/GrImageContext.h +55 -0
- package/cpp/skia/include/private/GrMockTypesPriv.h +31 -0
- package/cpp/skia/include/private/GrMtlTypesPriv.h +75 -0
- package/cpp/skia/include/private/GrSingleOwner.h +65 -0
- package/cpp/skia/include/private/GrTypesPriv.h +1354 -0
- package/cpp/skia/include/private/GrVkTypesPriv.h +107 -0
- package/cpp/skia/include/private/SkBitmaskEnum.h +59 -0
- package/cpp/skia/include/private/SkChecksum.h +66 -0
- package/cpp/skia/include/private/SkColorData.h +441 -0
- package/cpp/skia/include/private/SkDeque.h +141 -0
- package/cpp/skia/include/private/SkEncodedInfo.h +249 -0
- package/cpp/skia/include/private/SkFixed.h +141 -0
- package/cpp/skia/include/private/SkFloatBits.h +91 -0
- package/cpp/skia/include/private/SkFloatingPoint.h +272 -0
- package/cpp/skia/include/private/SkHalf.h +85 -0
- package/cpp/skia/include/private/SkIDChangeListener.h +75 -0
- package/cpp/skia/include/private/SkImageInfoPriv.h +193 -0
- package/cpp/skia/include/private/SkMacros.h +84 -0
- package/cpp/skia/include/private/SkMalloc.h +143 -0
- package/cpp/skia/include/private/SkMutex.h +56 -0
- package/cpp/skia/include/private/SkNoncopyable.h +30 -0
- package/cpp/skia/include/private/SkNx.h +430 -0
- package/cpp/skia/include/private/SkNx_neon.h +713 -0
- package/cpp/skia/include/private/SkNx_sse.h +823 -0
- package/cpp/skia/include/private/SkOnce.h +53 -0
- package/cpp/skia/include/private/SkOpts_spi.h +21 -0
- package/cpp/skia/include/private/SkPaintParamsKey.h +110 -0
- package/cpp/skia/include/private/SkPathRef.h +536 -0
- package/cpp/skia/include/private/SkSLDefines.h +56 -0
- package/cpp/skia/include/private/SkSLIRNode.h +63 -0
- package/cpp/skia/include/private/SkSLLayout.h +143 -0
- package/cpp/skia/include/private/SkSLModifiers.h +141 -0
- package/cpp/skia/include/private/SkSLProgramElement.h +77 -0
- package/cpp/skia/include/private/SkSLProgramKind.h +31 -0
- package/cpp/skia/include/private/SkSLSampleUsage.h +89 -0
- package/cpp/skia/include/private/SkSLStatement.h +87 -0
- package/cpp/skia/include/private/SkSLString.h +80 -0
- package/cpp/skia/include/private/SkSLSymbol.h +90 -0
- package/cpp/skia/include/private/SkSafe32.h +34 -0
- package/cpp/skia/include/private/SkSafe_math.h +52 -0
- package/cpp/skia/include/private/SkSemaphore.h +83 -0
- package/cpp/skia/include/private/SkShaderCodeDictionary.h +63 -0
- package/cpp/skia/include/private/SkShadowFlags.h +25 -0
- package/cpp/skia/include/private/SkSpinlock.h +57 -0
- package/cpp/skia/include/private/SkTArray.h +640 -0
- package/cpp/skia/include/private/SkTDArray.h +385 -0
- package/cpp/skia/include/private/SkTFitsIn.h +99 -0
- package/cpp/skia/include/private/SkTHash.h +548 -0
- package/cpp/skia/include/private/SkTLogic.h +86 -0
- package/cpp/skia/include/private/SkTOptional.h +362 -0
- package/cpp/skia/include/private/SkTPin.h +23 -0
- package/cpp/skia/include/private/SkTemplates.h +453 -0
- package/cpp/skia/include/private/SkThreadAnnotations.h +91 -0
- package/cpp/skia/include/private/SkThreadID.h +20 -0
- package/cpp/skia/include/private/SkTo.h +28 -0
- package/cpp/skia/include/private/SkUniquePaintParamsID.h +35 -0
- package/cpp/skia/include/private/SkVx.h +943 -0
- package/cpp/skia/include/private/SkWeakRefCnt.h +170 -0
- package/cpp/skia/include/private/chromium/GrSlug.h +41 -0
- package/cpp/skia/include/private/chromium/SkChromeRemoteGlyphCache.h +143 -0
- package/cpp/skia/include/sksl/DSL.h +34 -0
- package/cpp/skia/include/sksl/DSLBlock.h +67 -0
- package/cpp/skia/include/sksl/DSLCase.h +68 -0
- package/cpp/skia/include/sksl/DSLCore.h +488 -0
- package/cpp/skia/include/sksl/DSLExpression.h +299 -0
- package/cpp/skia/include/sksl/DSLFunction.h +116 -0
- package/cpp/skia/include/sksl/DSLLayout.h +94 -0
- package/cpp/skia/include/sksl/DSLModifiers.h +64 -0
- package/cpp/skia/include/sksl/DSLRuntimeEffects.h +32 -0
- package/cpp/skia/include/sksl/DSLStatement.h +111 -0
- package/cpp/skia/include/sksl/DSLSymbols.h +71 -0
- package/cpp/skia/include/sksl/DSLType.h +259 -0
- package/cpp/skia/include/sksl/DSLVar.h +310 -0
- package/cpp/skia/include/sksl/DSLWrapper.h +77 -0
- package/cpp/skia/include/sksl/SkSLDebugTrace.h +28 -0
- package/cpp/skia/include/sksl/SkSLErrorReporter.h +115 -0
- package/cpp/skia/include/svg/SkSVGCanvas.h +37 -0
- package/cpp/skia/include/third_party/skcms/LICENSE +29 -0
- package/cpp/skia/include/third_party/skcms/skcms.h +394 -0
- package/cpp/skia/include/third_party/vulkan/LICENSE +29 -0
- package/cpp/skia/include/third_party/vulkan/vulkan/vk_platform.h +84 -0
- package/cpp/skia/include/third_party/vulkan/vulkan/vulkan.h +93 -0
- package/cpp/skia/include/third_party/vulkan/vulkan/vulkan_android.h +112 -0
- package/cpp/skia/include/third_party/vulkan/vulkan/vulkan_core.h +12620 -0
- package/cpp/skia/include/third_party/vulkan/vulkan/vulkan_ios.h +47 -0
- package/cpp/skia/include/third_party/vulkan/vulkan/vulkan_macos.h +47 -0
- package/cpp/skia/include/third_party/vulkan/vulkan/vulkan_win32.h +315 -0
- package/cpp/skia/include/third_party/vulkan/vulkan/vulkan_xcb.h +55 -0
- package/cpp/skia/include/utils/SkAnimCodecPlayer.h +60 -0
- package/cpp/skia/include/utils/SkBase64.h +51 -0
- package/cpp/skia/include/utils/SkCamera.h +107 -0
- package/cpp/skia/include/utils/SkCanvasStateUtils.h +78 -0
- package/cpp/skia/include/utils/SkCustomTypeface.h +48 -0
- package/cpp/skia/include/utils/SkEventTracer.h +79 -0
- package/cpp/skia/include/utils/SkNWayCanvas.h +92 -0
- package/cpp/skia/include/utils/SkNoDrawCanvas.h +80 -0
- package/cpp/skia/include/utils/SkNullCanvas.h +18 -0
- package/cpp/skia/include/utils/SkOrderedFontMgr.h +53 -0
- package/cpp/skia/include/utils/SkPaintFilterCanvas.h +107 -0
- package/cpp/skia/include/utils/SkParse.h +32 -0
- package/cpp/skia/include/utils/SkParsePath.h +25 -0
- package/cpp/skia/include/utils/SkRandom.h +169 -0
- package/cpp/skia/include/utils/SkShadowUtils.h +85 -0
- package/cpp/skia/include/utils/SkTextUtils.h +38 -0
- package/cpp/skia/include/utils/SkTraceEventPhase.h +19 -0
- package/cpp/skia/include/utils/mac/SkCGUtils.h +78 -0
- package/cpp/skia/modules/skresources/include/SkResources.h +254 -0
- package/cpp/skia/modules/svg/include/SkSVGAttribute.h +113 -0
- package/cpp/skia/modules/svg/include/SkSVGAttributeParser.h +134 -0
- package/cpp/skia/modules/svg/include/SkSVGCircle.h +43 -0
- package/cpp/skia/modules/svg/include/SkSVGClipPath.h +35 -0
- package/cpp/skia/modules/svg/include/SkSVGContainer.h +36 -0
- package/cpp/skia/modules/svg/include/SkSVGDOM.h +96 -0
- package/cpp/skia/modules/svg/include/SkSVGDefs.h +23 -0
- package/cpp/skia/modules/svg/include/SkSVGEllipse.h +41 -0
- package/cpp/skia/modules/svg/include/SkSVGFe.h +85 -0
- package/cpp/skia/modules/svg/include/SkSVGFeBlend.h +45 -0
- package/cpp/skia/modules/svg/include/SkSVGFeColorMatrix.h +46 -0
- package/cpp/skia/modules/svg/include/SkSVGFeComposite.h +46 -0
- package/cpp/skia/modules/svg/include/SkSVGFeDisplacementMap.h +46 -0
- package/cpp/skia/modules/svg/include/SkSVGFeFlood.h +32 -0
- package/cpp/skia/modules/svg/include/SkSVGFeGaussianBlur.h +41 -0
- package/cpp/skia/modules/svg/include/SkSVGFeImage.h +35 -0
- package/cpp/skia/modules/svg/include/SkSVGFeLightSource.h +89 -0
- package/cpp/skia/modules/svg/include/SkSVGFeLighting.h +121 -0
- package/cpp/skia/modules/svg/include/SkSVGFeMorphology.h +47 -0
- package/cpp/skia/modules/svg/include/SkSVGFeOffset.h +35 -0
- package/cpp/skia/modules/svg/include/SkSVGFeTurbulence.h +40 -0
- package/cpp/skia/modules/svg/include/SkSVGFilter.h +39 -0
- package/cpp/skia/modules/svg/include/SkSVGFilterContext.h +69 -0
- package/cpp/skia/modules/svg/include/SkSVGG.h +23 -0
- package/cpp/skia/modules/svg/include/SkSVGGradient.h +48 -0
- package/cpp/skia/modules/svg/include/SkSVGHiddenContainer.h +23 -0
- package/cpp/skia/modules/svg/include/SkSVGIDMapper.h +19 -0
- package/cpp/skia/modules/svg/include/SkSVGImage.h +58 -0
- package/cpp/skia/modules/svg/include/SkSVGLine.h +42 -0
- package/cpp/skia/modules/svg/include/SkSVGLinearGradient.h +37 -0
- package/cpp/skia/modules/svg/include/SkSVGMask.h +43 -0
- package/cpp/skia/modules/svg/include/SkSVGNode.h +223 -0
- package/cpp/skia/modules/svg/include/SkSVGPath.h +36 -0
- package/cpp/skia/modules/svg/include/SkSVGPattern.h +55 -0
- package/cpp/skia/modules/svg/include/SkSVGPoly.h +45 -0
- package/cpp/skia/modules/svg/include/SkSVGRadialGradient.h +38 -0
- package/cpp/skia/modules/svg/include/SkSVGRect.h +46 -0
- package/cpp/skia/modules/svg/include/SkSVGRenderContext.h +188 -0
- package/cpp/skia/modules/svg/include/SkSVGSVG.h +52 -0
- package/cpp/skia/modules/svg/include/SkSVGShape.h +33 -0
- package/cpp/skia/modules/svg/include/SkSVGStop.h +34 -0
- package/cpp/skia/modules/svg/include/SkSVGText.h +122 -0
- package/cpp/skia/modules/svg/include/SkSVGTransformableNode.h +36 -0
- package/cpp/skia/modules/svg/include/SkSVGTypes.h +691 -0
- package/cpp/skia/modules/svg/include/SkSVGUse.h +42 -0
- package/cpp/skia/modules/svg/include/SkSVGValue.h +85 -0
- package/cpp/skia/readme.txt +1 -0
- package/cpp/utils/RNSkLog.h +53 -0
- package/cpp/utils/RNSkMeasureTime.h +32 -0
- package/cpp/utils/RNSkTimingInfo.h +91 -0
- package/ios/RNSkia-iOS/DisplayLink.h +17 -0
- package/ios/RNSkia-iOS/DisplayLink.mm +36 -0
- package/ios/RNSkia-iOS/PlatformContext.h +50 -0
- package/ios/RNSkia-iOS/PlatformContext.mm +52 -0
- package/ios/RNSkia-iOS/RNSkDrawViewImpl.h +57 -0
- package/ios/RNSkia-iOS/RNSkDrawViewImpl.mm +98 -0
- package/ios/RNSkia-iOS/SkiaDrawView.h +23 -0
- package/ios/RNSkia-iOS/SkiaDrawView.mm +165 -0
- package/ios/RNSkia-iOS/SkiaDrawViewManager.h +7 -0
- package/ios/RNSkia-iOS/SkiaDrawViewManager.mm +42 -0
- package/ios/RNSkia-iOS/SkiaManager.h +17 -0
- package/ios/RNSkia-iOS/SkiaManager.mm +50 -0
- package/ios/RNSkiaModule.h +11 -0
- package/ios/RNSkiaModule.mm +42 -0
- package/ios/Rnskia.xcodeproj/project.pbxproj +281 -0
- package/ios/Rnskia.xcworkspace/contents.xcworkspacedata +7 -0
- package/lib/commonjs/external/index.js +19 -0
- package/lib/commonjs/external/index.js.map +1 -0
- package/lib/commonjs/external/reanimated/index.js +19 -0
- package/lib/commonjs/external/reanimated/index.js.map +1 -0
- package/lib/commonjs/external/reanimated/useSharedValueEffect.js +86 -0
- package/lib/commonjs/external/reanimated/useSharedValueEffect.js.map +1 -0
- package/lib/commonjs/index.js +73 -0
- package/lib/commonjs/index.js.map +1 -0
- package/lib/commonjs/renderer/Canvas.js +186 -0
- package/lib/commonjs/renderer/Canvas.js.map +1 -0
- package/lib/commonjs/renderer/DependencyManager.js +70 -0
- package/lib/commonjs/renderer/DependencyManager.js.map +1 -0
- package/lib/commonjs/renderer/DrawingContext.js +6 -0
- package/lib/commonjs/renderer/DrawingContext.js.map +1 -0
- package/lib/commonjs/renderer/HostConfig.js +272 -0
- package/lib/commonjs/renderer/HostConfig.js.map +1 -0
- package/lib/commonjs/renderer/components/Blend.js +46 -0
- package/lib/commonjs/renderer/components/Blend.js.map +1 -0
- package/lib/commonjs/renderer/components/Compose.js +41 -0
- package/lib/commonjs/renderer/components/Compose.js.map +1 -0
- package/lib/commonjs/renderer/components/Defs.js +30 -0
- package/lib/commonjs/renderer/components/Defs.js.map +1 -0
- package/lib/commonjs/renderer/components/Group.js +73 -0
- package/lib/commonjs/renderer/components/Group.js.map +1 -0
- package/lib/commonjs/renderer/components/Mask.js +58 -0
- package/lib/commonjs/renderer/components/Mask.js.map +1 -0
- package/lib/commonjs/renderer/components/Paint.js +54 -0
- package/lib/commonjs/renderer/components/Paint.js.map +1 -0
- package/lib/commonjs/renderer/components/backdrop/BackdropBlur.js +33 -0
- package/lib/commonjs/renderer/components/backdrop/BackdropBlur.js.map +1 -0
- package/lib/commonjs/renderer/components/backdrop/BackdropFilter.js +54 -0
- package/lib/commonjs/renderer/components/backdrop/BackdropFilter.js.map +1 -0
- package/lib/commonjs/renderer/components/backdrop/index.js +32 -0
- package/lib/commonjs/renderer/components/backdrop/index.js.map +1 -0
- package/lib/commonjs/renderer/components/colorFilters/BlendColor.js +40 -0
- package/lib/commonjs/renderer/components/colorFilters/BlendColor.js.map +1 -0
- package/lib/commonjs/renderer/components/colorFilters/Compose.js +24 -0
- package/lib/commonjs/renderer/components/colorFilters/Compose.js.map +1 -0
- package/lib/commonjs/renderer/components/colorFilters/Lerp.js +40 -0
- package/lib/commonjs/renderer/components/colorFilters/Lerp.js.map +1 -0
- package/lib/commonjs/renderer/components/colorFilters/LinearToSRGBGamma.js +33 -0
- package/lib/commonjs/renderer/components/colorFilters/LinearToSRGBGamma.js.map +1 -0
- package/lib/commonjs/renderer/components/colorFilters/LumaColorFilter.js +33 -0
- package/lib/commonjs/renderer/components/colorFilters/LumaColorFilter.js.map +1 -0
- package/lib/commonjs/renderer/components/colorFilters/Matrix.js +41 -0
- package/lib/commonjs/renderer/components/colorFilters/Matrix.js.map +1 -0
- package/lib/commonjs/renderer/components/colorFilters/SRGBToLinearGamma.js +33 -0
- package/lib/commonjs/renderer/components/colorFilters/SRGBToLinearGamma.js.map +1 -0
- package/lib/commonjs/renderer/components/colorFilters/index.js +84 -0
- package/lib/commonjs/renderer/components/colorFilters/index.js.map +1 -0
- package/lib/commonjs/renderer/components/image/BoxFit.js +162 -0
- package/lib/commonjs/renderer/components/image/BoxFit.js.map +1 -0
- package/lib/commonjs/renderer/components/image/Image.js +55 -0
- package/lib/commonjs/renderer/components/image/Image.js.map +1 -0
- package/lib/commonjs/renderer/components/image/ImageSVG.js +45 -0
- package/lib/commonjs/renderer/components/image/ImageSVG.js.map +1 -0
- package/lib/commonjs/renderer/components/image/ImageShader.js +82 -0
- package/lib/commonjs/renderer/components/image/ImageShader.js.map +1 -0
- package/lib/commonjs/renderer/components/image/index.js +58 -0
- package/lib/commonjs/renderer/components/image/index.js.map +1 -0
- package/lib/commonjs/renderer/components/imageFilters/Blur.js +43 -0
- package/lib/commonjs/renderer/components/imageFilters/Blur.js.map +1 -0
- package/lib/commonjs/renderer/components/imageFilters/DisplacementMap.js +53 -0
- package/lib/commonjs/renderer/components/imageFilters/DisplacementMap.js.map +1 -0
- package/lib/commonjs/renderer/components/imageFilters/DropShadow.js +45 -0
- package/lib/commonjs/renderer/components/imageFilters/DropShadow.js.map +1 -0
- package/lib/commonjs/renderer/components/imageFilters/InnerShadow.js +60 -0
- package/lib/commonjs/renderer/components/imageFilters/InnerShadow.js.map +1 -0
- package/lib/commonjs/renderer/components/imageFilters/Morphology.js +43 -0
- package/lib/commonjs/renderer/components/imageFilters/Morphology.js.map +1 -0
- package/lib/commonjs/renderer/components/imageFilters/Offset.js +39 -0
- package/lib/commonjs/renderer/components/imageFilters/Offset.js.map +1 -0
- package/lib/commonjs/renderer/components/imageFilters/getInput.js +33 -0
- package/lib/commonjs/renderer/components/imageFilters/getInput.js.map +1 -0
- package/lib/commonjs/renderer/components/imageFilters/index.js +84 -0
- package/lib/commonjs/renderer/components/imageFilters/index.js.map +1 -0
- package/lib/commonjs/renderer/components/index.js +214 -0
- package/lib/commonjs/renderer/components/index.js.map +1 -0
- package/lib/commonjs/renderer/components/maskFilters/Blur.js +42 -0
- package/lib/commonjs/renderer/components/maskFilters/Blur.js.map +1 -0
- package/lib/commonjs/renderer/components/maskFilters/index.js +19 -0
- package/lib/commonjs/renderer/components/maskFilters/index.js.map +1 -0
- package/lib/commonjs/renderer/components/pathEffects/Corner.js +46 -0
- package/lib/commonjs/renderer/components/pathEffects/Corner.js.map +1 -0
- package/lib/commonjs/renderer/components/pathEffects/Dash.js +43 -0
- package/lib/commonjs/renderer/components/pathEffects/Dash.js.map +1 -0
- package/lib/commonjs/renderer/components/pathEffects/Discrete.js +47 -0
- package/lib/commonjs/renderer/components/pathEffects/Discrete.js.map +1 -0
- package/lib/commonjs/renderer/components/pathEffects/Line2D.js +47 -0
- package/lib/commonjs/renderer/components/pathEffects/Line2D.js.map +1 -0
- package/lib/commonjs/renderer/components/pathEffects/Path1D.js +53 -0
- package/lib/commonjs/renderer/components/pathEffects/Path1D.js.map +1 -0
- package/lib/commonjs/renderer/components/pathEffects/Path2D.js +49 -0
- package/lib/commonjs/renderer/components/pathEffects/Path2D.js.map +1 -0
- package/lib/commonjs/renderer/components/pathEffects/Sum.js +32 -0
- package/lib/commonjs/renderer/components/pathEffects/Sum.js.map +1 -0
- package/lib/commonjs/renderer/components/pathEffects/index.js +97 -0
- package/lib/commonjs/renderer/components/pathEffects/index.js.map +1 -0
- package/lib/commonjs/renderer/components/shaders/Color.js +32 -0
- package/lib/commonjs/renderer/components/shaders/Color.js.map +1 -0
- package/lib/commonjs/renderer/components/shaders/FractalNoise.js +42 -0
- package/lib/commonjs/renderer/components/shaders/FractalNoise.js.map +1 -0
- package/lib/commonjs/renderer/components/shaders/Gradient.js +32 -0
- package/lib/commonjs/renderer/components/shaders/Gradient.js.map +1 -0
- package/lib/commonjs/renderer/components/shaders/LinearGradient.js +43 -0
- package/lib/commonjs/renderer/components/shaders/LinearGradient.js.map +1 -0
- package/lib/commonjs/renderer/components/shaders/RadialGradient.js +43 -0
- package/lib/commonjs/renderer/components/shaders/RadialGradient.js.map +1 -0
- package/lib/commonjs/renderer/components/shaders/Shader.js +80 -0
- package/lib/commonjs/renderer/components/shaders/Shader.js.map +1 -0
- package/lib/commonjs/renderer/components/shaders/ShaderLib.js +52 -0
- package/lib/commonjs/renderer/components/shaders/ShaderLib.js.map +1 -0
- package/lib/commonjs/renderer/components/shaders/SweepGradient.js +44 -0
- package/lib/commonjs/renderer/components/shaders/SweepGradient.js.map +1 -0
- package/lib/commonjs/renderer/components/shaders/Turbulence.js +42 -0
- package/lib/commonjs/renderer/components/shaders/Turbulence.js.map +1 -0
- package/lib/commonjs/renderer/components/shaders/TwoPointConicalGradient.js +45 -0
- package/lib/commonjs/renderer/components/shaders/TwoPointConicalGradient.js.map +1 -0
- package/lib/commonjs/renderer/components/shaders/index.js +123 -0
- package/lib/commonjs/renderer/components/shaders/index.js.map +1 -0
- package/lib/commonjs/renderer/components/shapes/Circle.js +42 -0
- package/lib/commonjs/renderer/components/shapes/Circle.js.map +1 -0
- package/lib/commonjs/renderer/components/shapes/DiffRect.js +35 -0
- package/lib/commonjs/renderer/components/shapes/DiffRect.js.map +1 -0
- package/lib/commonjs/renderer/components/shapes/Fill.js +31 -0
- package/lib/commonjs/renderer/components/shapes/Fill.js.map +1 -0
- package/lib/commonjs/renderer/components/shapes/FitBox.js +38 -0
- package/lib/commonjs/renderer/components/shapes/FitBox.js.map +1 -0
- package/lib/commonjs/renderer/components/shapes/Line.js +35 -0
- package/lib/commonjs/renderer/components/shapes/Line.js.map +1 -0
- package/lib/commonjs/renderer/components/shapes/Oval.js +38 -0
- package/lib/commonjs/renderer/components/shapes/Oval.js.map +1 -0
- package/lib/commonjs/renderer/components/shapes/Patch.js +52 -0
- package/lib/commonjs/renderer/components/shapes/Patch.js.map +1 -0
- package/lib/commonjs/renderer/components/shapes/Path.js +58 -0
- package/lib/commonjs/renderer/components/shapes/Path.js.map +1 -0
- package/lib/commonjs/renderer/components/shapes/Points.js +45 -0
- package/lib/commonjs/renderer/components/shapes/Points.js.map +1 -0
- package/lib/commonjs/renderer/components/shapes/Rect.js +34 -0
- package/lib/commonjs/renderer/components/shapes/Rect.js.map +1 -0
- package/lib/commonjs/renderer/components/shapes/RoundedRect.js +37 -0
- package/lib/commonjs/renderer/components/shapes/RoundedRect.js.map +1 -0
- package/lib/commonjs/renderer/components/shapes/Vertices.js +54 -0
- package/lib/commonjs/renderer/components/shapes/Vertices.js.map +1 -0
- package/lib/commonjs/renderer/components/shapes/index.js +162 -0
- package/lib/commonjs/renderer/components/shapes/index.js.map +1 -0
- package/lib/commonjs/renderer/components/text/Glyphs.js +60 -0
- package/lib/commonjs/renderer/components/text/Glyphs.js.map +1 -0
- package/lib/commonjs/renderer/components/text/Text.js +45 -0
- package/lib/commonjs/renderer/components/text/Text.js.map +1 -0
- package/lib/commonjs/renderer/components/text/TextBlob.js +40 -0
- package/lib/commonjs/renderer/components/text/TextBlob.js.map +1 -0
- package/lib/commonjs/renderer/components/text/TextPath.js +95 -0
- package/lib/commonjs/renderer/components/text/TextPath.js.map +1 -0
- package/lib/commonjs/renderer/components/text/index.js +58 -0
- package/lib/commonjs/renderer/components/text/index.js.map +1 -0
- package/lib/commonjs/renderer/index.js +45 -0
- package/lib/commonjs/renderer/index.js.map +1 -0
- package/lib/commonjs/renderer/nodes/Container.js +28 -0
- package/lib/commonjs/renderer/nodes/Container.js.map +1 -0
- package/lib/commonjs/renderer/nodes/Declaration.js +47 -0
- package/lib/commonjs/renderer/nodes/Declaration.js.map +1 -0
- package/lib/commonjs/renderer/nodes/Drawing.js +75 -0
- package/lib/commonjs/renderer/nodes/Drawing.js.map +1 -0
- package/lib/commonjs/renderer/nodes/Node.js +78 -0
- package/lib/commonjs/renderer/nodes/Node.js.map +1 -0
- package/lib/commonjs/renderer/nodes/index.js +58 -0
- package/lib/commonjs/renderer/nodes/index.js.map +1 -0
- package/lib/commonjs/renderer/processors/Animations/Animations.js +52 -0
- package/lib/commonjs/renderer/processors/Animations/Animations.js.map +1 -0
- package/lib/commonjs/renderer/processors/Animations/index.js +19 -0
- package/lib/commonjs/renderer/processors/Animations/index.js.map +1 -0
- package/lib/commonjs/renderer/processors/Circles.js +25 -0
- package/lib/commonjs/renderer/processors/Circles.js.map +1 -0
- package/lib/commonjs/renderer/processors/Clips.js +24 -0
- package/lib/commonjs/renderer/processors/Clips.js.map +1 -0
- package/lib/commonjs/renderer/processors/Font.js +39 -0
- package/lib/commonjs/renderer/processors/Font.js.map +1 -0
- package/lib/commonjs/renderer/processors/Paint.js +91 -0
- package/lib/commonjs/renderer/processors/Paint.js.map +1 -0
- package/lib/commonjs/renderer/processors/Paths.js +26 -0
- package/lib/commonjs/renderer/processors/Paths.js.map +1 -0
- package/lib/commonjs/renderer/processors/Radius.js +19 -0
- package/lib/commonjs/renderer/processors/Radius.js.map +1 -0
- package/lib/commonjs/renderer/processors/Rects.js +98 -0
- package/lib/commonjs/renderer/processors/Rects.js.map +1 -0
- package/lib/commonjs/renderer/processors/Transform.js +56 -0
- package/lib/commonjs/renderer/processors/Transform.js.map +1 -0
- package/lib/commonjs/renderer/processors/index.js +136 -0
- package/lib/commonjs/renderer/processors/index.js.map +1 -0
- package/lib/commonjs/renderer/processors/math/Coordinates.js +43 -0
- package/lib/commonjs/renderer/processors/math/Coordinates.js.map +1 -0
- package/lib/commonjs/renderer/processors/math/Math.js +11 -0
- package/lib/commonjs/renderer/processors/math/Math.js.map +1 -0
- package/lib/commonjs/renderer/processors/math/Matrix3.js +81 -0
- package/lib/commonjs/renderer/processors/math/Matrix3.js.map +1 -0
- package/lib/commonjs/renderer/processors/math/Transforms.js +22 -0
- package/lib/commonjs/renderer/processors/math/Transforms.js.map +1 -0
- package/lib/commonjs/renderer/processors/math/Vector.js +61 -0
- package/lib/commonjs/renderer/processors/math/Vector.js.map +1 -0
- package/lib/commonjs/renderer/processors/math/index.js +71 -0
- package/lib/commonjs/renderer/processors/math/index.js.map +1 -0
- package/lib/commonjs/renderer/typeddash.js +17 -0
- package/lib/commonjs/renderer/typeddash.js.map +1 -0
- package/lib/commonjs/skia/Canvas.js +22 -0
- package/lib/commonjs/skia/Canvas.js.map +1 -0
- package/lib/commonjs/skia/Color.js +77 -0
- package/lib/commonjs/skia/Color.js.map +1 -0
- package/lib/commonjs/skia/ColorFilter/ColorFilter.js +11 -0
- package/lib/commonjs/skia/ColorFilter/ColorFilter.js.map +1 -0
- package/lib/commonjs/skia/ColorFilter/ColorFilterFactory.js +6 -0
- package/lib/commonjs/skia/ColorFilter/ColorFilterFactory.js.map +1 -0
- package/lib/commonjs/skia/ColorFilter/index.js +32 -0
- package/lib/commonjs/skia/ColorFilter/index.js.map +1 -0
- package/lib/commonjs/skia/ContourMeasure.js +6 -0
- package/lib/commonjs/skia/ContourMeasure.js.map +1 -0
- package/lib/commonjs/skia/Data/Data.js +53 -0
- package/lib/commonjs/skia/Data/Data.js.map +1 -0
- package/lib/commonjs/skia/Data/DataFactory.js +6 -0
- package/lib/commonjs/skia/Data/DataFactory.js.map +1 -0
- package/lib/commonjs/skia/Data/index.js +32 -0
- package/lib/commonjs/skia/Data/index.js.map +1 -0
- package/lib/commonjs/skia/Font/Font.js +81 -0
- package/lib/commonjs/skia/Font/Font.js.map +1 -0
- package/lib/commonjs/skia/Font/index.js +32 -0
- package/lib/commonjs/skia/Font/index.js.map +1 -0
- package/lib/commonjs/skia/Font/useFont.js +36 -0
- package/lib/commonjs/skia/Font/useFont.js.map +1 -0
- package/lib/commonjs/skia/FontMgr/FontMgr.js +6 -0
- package/lib/commonjs/skia/FontMgr/FontMgr.js.map +1 -0
- package/lib/commonjs/skia/FontMgr/FontMgrFactory.js +6 -0
- package/lib/commonjs/skia/FontMgr/FontMgrFactory.js.map +1 -0
- package/lib/commonjs/skia/FontMgr/index.js +19 -0
- package/lib/commonjs/skia/FontMgr/index.js.map +1 -0
- package/lib/commonjs/skia/Image/Image.js +32 -0
- package/lib/commonjs/skia/Image/Image.js.map +1 -0
- package/lib/commonjs/skia/Image/ImageFactory.js +46 -0
- package/lib/commonjs/skia/Image/ImageFactory.js.map +1 -0
- package/lib/commonjs/skia/Image/index.js +45 -0
- package/lib/commonjs/skia/Image/index.js.map +1 -0
- package/lib/commonjs/skia/Image/useImage.js +18 -0
- package/lib/commonjs/skia/Image/useImage.js.map +1 -0
- package/lib/commonjs/skia/ImageFilter/ImageFilter.js +20 -0
- package/lib/commonjs/skia/ImageFilter/ImageFilter.js.map +1 -0
- package/lib/commonjs/skia/ImageFilter/ImageFilterFactory.js +16 -0
- package/lib/commonjs/skia/ImageFilter/ImageFilterFactory.js.map +1 -0
- package/lib/commonjs/skia/ImageFilter/index.js +32 -0
- package/lib/commonjs/skia/ImageFilter/index.js.map +1 -0
- package/lib/commonjs/skia/JsiInstance.js +2 -0
- package/lib/commonjs/skia/JsiInstance.js.map +1 -0
- package/lib/commonjs/skia/MaskFilter.js +20 -0
- package/lib/commonjs/skia/MaskFilter.js.map +1 -0
- package/lib/commonjs/skia/Matrix.js +21 -0
- package/lib/commonjs/skia/Matrix.js.map +1 -0
- package/lib/commonjs/skia/NativeSetup.js +19 -0
- package/lib/commonjs/skia/NativeSetup.js.map +1 -0
- package/lib/commonjs/skia/Paint/BlendMode.js +69 -0
- package/lib/commonjs/skia/Paint/BlendMode.js.map +1 -0
- package/lib/commonjs/skia/Paint/Paint.js +36 -0
- package/lib/commonjs/skia/Paint/Paint.js.map +1 -0
- package/lib/commonjs/skia/Paint/index.js +45 -0
- package/lib/commonjs/skia/Paint/index.js.map +1 -0
- package/lib/commonjs/skia/Paint/usePaint.js +28 -0
- package/lib/commonjs/skia/Paint/usePaint.js.map +1 -0
- package/lib/commonjs/skia/Path/Path.js +35 -0
- package/lib/commonjs/skia/Path/Path.js.map +1 -0
- package/lib/commonjs/skia/Path/PathFactory.js +6 -0
- package/lib/commonjs/skia/Path/PathFactory.js.map +1 -0
- package/lib/commonjs/skia/Path/index.js +45 -0
- package/lib/commonjs/skia/Path/index.js.map +1 -0
- package/lib/commonjs/skia/Path/usePath.js +60 -0
- package/lib/commonjs/skia/Path/usePath.js.map +1 -0
- package/lib/commonjs/skia/PathEffect.js +19 -0
- package/lib/commonjs/skia/PathEffect.js.map +1 -0
- package/lib/commonjs/skia/Point.js +15 -0
- package/lib/commonjs/skia/Point.js.map +1 -0
- package/lib/commonjs/skia/RRect.js +6 -0
- package/lib/commonjs/skia/RRect.js.map +1 -0
- package/lib/commonjs/skia/RSXform.js +6 -0
- package/lib/commonjs/skia/RSXform.js.map +1 -0
- package/lib/commonjs/skia/Rect.js +2 -0
- package/lib/commonjs/skia/Rect.js.map +1 -0
- package/lib/commonjs/skia/RuntimeEffect/RuntimeEffect.js +6 -0
- package/lib/commonjs/skia/RuntimeEffect/RuntimeEffect.js.map +1 -0
- package/lib/commonjs/skia/RuntimeEffect/RuntimeEffectFactory.js +6 -0
- package/lib/commonjs/skia/RuntimeEffect/RuntimeEffectFactory.js.map +1 -0
- package/lib/commonjs/skia/RuntimeEffect/index.js +32 -0
- package/lib/commonjs/skia/RuntimeEffect/index.js.map +1 -0
- package/lib/commonjs/skia/SVG/SVG.js +6 -0
- package/lib/commonjs/skia/SVG/SVG.js.map +1 -0
- package/lib/commonjs/skia/SVG/SVGFactory.js +6 -0
- package/lib/commonjs/skia/SVG/SVGFactory.js.map +1 -0
- package/lib/commonjs/skia/SVG/index.js +45 -0
- package/lib/commonjs/skia/SVG/index.js.map +1 -0
- package/lib/commonjs/skia/SVG/useSvg.js +15 -0
- package/lib/commonjs/skia/SVG/useSvg.js.map +1 -0
- package/lib/commonjs/skia/Shader/Shader.js +11 -0
- package/lib/commonjs/skia/Shader/Shader.js.map +1 -0
- package/lib/commonjs/skia/Shader/ShaderFactory.js +6 -0
- package/lib/commonjs/skia/Shader/ShaderFactory.js.map +1 -0
- package/lib/commonjs/skia/Shader/index.js +45 -0
- package/lib/commonjs/skia/Shader/index.js.map +1 -0
- package/lib/commonjs/skia/Shader/useShader.js +15 -0
- package/lib/commonjs/skia/Shader/useShader.js.map +1 -0
- package/lib/commonjs/skia/Skia.js +49 -0
- package/lib/commonjs/skia/Skia.js.map +1 -0
- package/lib/commonjs/skia/Surface/Surface.js +6 -0
- package/lib/commonjs/skia/Surface/Surface.js.map +1 -0
- package/lib/commonjs/skia/Surface/SurfaceFactory.js +6 -0
- package/lib/commonjs/skia/Surface/SurfaceFactory.js.map +1 -0
- package/lib/commonjs/skia/Surface/index.js +32 -0
- package/lib/commonjs/skia/Surface/index.js.map +1 -0
- package/lib/commonjs/skia/TextBlob.js +6 -0
- package/lib/commonjs/skia/TextBlob.js.map +1 -0
- package/lib/commonjs/skia/Typeface/Typeface.js +6 -0
- package/lib/commonjs/skia/Typeface/Typeface.js.map +1 -0
- package/lib/commonjs/skia/Typeface/TypefaceFactory.js +6 -0
- package/lib/commonjs/skia/Typeface/TypefaceFactory.js.map +1 -0
- package/lib/commonjs/skia/Typeface/index.js +45 -0
- package/lib/commonjs/skia/Typeface/index.js.map +1 -0
- package/lib/commonjs/skia/Typeface/useTypeface.js +18 -0
- package/lib/commonjs/skia/Typeface/useTypeface.js.map +1 -0
- package/lib/commonjs/skia/Vertices/Vertices.js +15 -0
- package/lib/commonjs/skia/Vertices/Vertices.js.map +1 -0
- package/lib/commonjs/skia/Vertices/index.js +19 -0
- package/lib/commonjs/skia/Vertices/index.js.map +1 -0
- package/lib/commonjs/skia/index.js +311 -0
- package/lib/commonjs/skia/index.js.map +1 -0
- package/lib/commonjs/values/animation/decay/decay.js +42 -0
- package/lib/commonjs/values/animation/decay/decay.js.map +1 -0
- package/lib/commonjs/values/animation/decay/index.js +14 -0
- package/lib/commonjs/values/animation/decay/index.js.map +1 -0
- package/lib/commonjs/values/animation/decay/runDecay.js +48 -0
- package/lib/commonjs/values/animation/decay/runDecay.js.map +1 -0
- package/lib/commonjs/values/animation/decay/types.js +6 -0
- package/lib/commonjs/values/animation/decay/types.js.map +1 -0
- package/lib/commonjs/values/animation/functions/index.js +28 -0
- package/lib/commonjs/values/animation/functions/index.js.map +1 -0
- package/lib/commonjs/values/animation/functions/interpolate.js +139 -0
- package/lib/commonjs/values/animation/functions/interpolate.js.map +1 -0
- package/lib/commonjs/values/animation/functions/interpolateColors.js +47 -0
- package/lib/commonjs/values/animation/functions/interpolateColors.js.map +1 -0
- package/lib/commonjs/values/animation/index.js +58 -0
- package/lib/commonjs/values/animation/index.js.map +1 -0
- package/lib/commonjs/values/animation/spring/Spring.js +77 -0
- package/lib/commonjs/values/animation/spring/Spring.js.map +1 -0
- package/lib/commonjs/values/animation/spring/functions/index.js +14 -0
- package/lib/commonjs/values/animation/spring/functions/index.js.map +1 -0
- package/lib/commonjs/values/animation/spring/functions/spring.js +94 -0
- package/lib/commonjs/values/animation/spring/functions/spring.js.map +1 -0
- package/lib/commonjs/values/animation/spring/index.js +30 -0
- package/lib/commonjs/values/animation/spring/index.js.map +1 -0
- package/lib/commonjs/values/animation/spring/runSpring.js +32 -0
- package/lib/commonjs/values/animation/spring/runSpring.js.map +1 -0
- package/lib/commonjs/values/animation/spring/types.js +2 -0
- package/lib/commonjs/values/animation/spring/types.js.map +1 -0
- package/lib/commonjs/values/animation/spring/useSpring.js +24 -0
- package/lib/commonjs/values/animation/spring/useSpring.js.map +1 -0
- package/lib/commonjs/values/animation/timing/Easing.js +108 -0
- package/lib/commonjs/values/animation/timing/Easing.js.map +1 -0
- package/lib/commonjs/values/animation/timing/createTiming.js +59 -0
- package/lib/commonjs/values/animation/timing/createTiming.js.map +1 -0
- package/lib/commonjs/values/animation/timing/functions/bezier.js +147 -0
- package/lib/commonjs/values/animation/timing/functions/bezier.js.map +1 -0
- package/lib/commonjs/values/animation/timing/functions/getResolvedParams.js +56 -0
- package/lib/commonjs/values/animation/timing/functions/getResolvedParams.js.map +1 -0
- package/lib/commonjs/values/animation/timing/functions/index.js +54 -0
- package/lib/commonjs/values/animation/timing/functions/index.js.map +1 -0
- package/lib/commonjs/values/animation/timing/functions/timing.js +50 -0
- package/lib/commonjs/values/animation/timing/functions/timing.js.map +1 -0
- package/lib/commonjs/values/animation/timing/functions/types.js +2 -0
- package/lib/commonjs/values/animation/timing/functions/types.js.map +1 -0
- package/lib/commonjs/values/animation/timing/index.js +38 -0
- package/lib/commonjs/values/animation/timing/index.js.map +1 -0
- package/lib/commonjs/values/animation/timing/runTiming.js +33 -0
- package/lib/commonjs/values/animation/timing/runTiming.js.map +1 -0
- package/lib/commonjs/values/animation/timing/useLoop.js +22 -0
- package/lib/commonjs/values/animation/timing/useLoop.js.map +1 -0
- package/lib/commonjs/values/animation/timing/useTiming.js +66 -0
- package/lib/commonjs/values/animation/timing/useTiming.js.map +1 -0
- package/lib/commonjs/values/animation/types.js +2 -0
- package/lib/commonjs/values/animation/types.js.map +1 -0
- package/lib/commonjs/values/api.js +20 -0
- package/lib/commonjs/values/api.js.map +1 -0
- package/lib/commonjs/values/hooks/index.js +58 -0
- package/lib/commonjs/values/hooks/index.js.map +1 -0
- package/lib/commonjs/values/hooks/useClockValue.js +27 -0
- package/lib/commonjs/values/hooks/useClockValue.js.map +1 -0
- package/lib/commonjs/values/hooks/useDerivedValue.js +25 -0
- package/lib/commonjs/values/hooks/useDerivedValue.js.map +1 -0
- package/lib/commonjs/values/hooks/useValue.js +23 -0
- package/lib/commonjs/values/hooks/useValue.js.map +1 -0
- package/lib/commonjs/values/hooks/useValueEffect.js +22 -0
- package/lib/commonjs/values/hooks/useValueEffect.js.map +1 -0
- package/lib/commonjs/values/index.js +58 -0
- package/lib/commonjs/values/index.js.map +1 -0
- package/lib/commonjs/values/types.js +2 -0
- package/lib/commonjs/values/types.js.map +1 -0
- package/lib/commonjs/views/SkiaView.js +163 -0
- package/lib/commonjs/views/SkiaView.js.map +1 -0
- package/lib/commonjs/views/index.js +58 -0
- package/lib/commonjs/views/index.js.map +1 -0
- package/lib/commonjs/views/types.js +16 -0
- package/lib/commonjs/views/types.js.map +1 -0
- package/lib/commonjs/views/useDrawCallback.js +23 -0
- package/lib/commonjs/views/useDrawCallback.js.map +1 -0
- package/lib/commonjs/views/useTouchHandler.js +75 -0
- package/lib/commonjs/views/useTouchHandler.js.map +1 -0
- package/lib/module/external/index.js +2 -0
- package/lib/module/external/index.js.map +1 -0
- package/lib/module/external/reanimated/index.js +2 -0
- package/lib/module/external/reanimated/index.js.map +1 -0
- package/lib/module/external/reanimated/useSharedValueEffect.js +81 -0
- package/lib/module/external/reanimated/useSharedValueEffect.js.map +1 -0
- package/lib/module/index.js +7 -0
- package/lib/module/index.js.map +1 -0
- package/lib/module/renderer/Canvas.js +149 -0
- package/lib/module/renderer/Canvas.js.map +1 -0
- package/lib/module/renderer/DependencyManager.js +60 -0
- package/lib/module/renderer/DependencyManager.js.map +1 -0
- package/lib/module/renderer/DrawingContext.js +2 -0
- package/lib/module/renderer/DrawingContext.js.map +1 -0
- package/lib/module/renderer/HostConfig.js +259 -0
- package/lib/module/renderer/HostConfig.js.map +1 -0
- package/lib/module/renderer/components/Blend.js +28 -0
- package/lib/module/renderer/components/Blend.js.map +1 -0
- package/lib/module/renderer/components/Compose.js +24 -0
- package/lib/module/renderer/components/Compose.js.map +1 -0
- package/lib/module/renderer/components/Defs.js +16 -0
- package/lib/module/renderer/components/Defs.js.map +1 -0
- package/lib/module/renderer/components/Group.js +58 -0
- package/lib/module/renderer/components/Group.js.map +1 -0
- package/lib/module/renderer/components/Mask.js +40 -0
- package/lib/module/renderer/components/Mask.js.map +1 -0
- package/lib/module/renderer/components/Paint.js +36 -0
- package/lib/module/renderer/components/Paint.js.map +1 -0
- package/lib/module/renderer/components/backdrop/BackdropBlur.js +19 -0
- package/lib/module/renderer/components/backdrop/BackdropBlur.js.map +1 -0
- package/lib/module/renderer/components/backdrop/BackdropFilter.js +39 -0
- package/lib/module/renderer/components/backdrop/BackdropFilter.js.map +1 -0
- package/lib/module/renderer/components/backdrop/index.js +3 -0
- package/lib/module/renderer/components/backdrop/index.js.map +1 -0
- package/lib/module/renderer/components/colorFilters/BlendColor.js +21 -0
- package/lib/module/renderer/components/colorFilters/BlendColor.js.map +1 -0
- package/lib/module/renderer/components/colorFilters/Compose.js +14 -0
- package/lib/module/renderer/components/colorFilters/Compose.js.map +1 -0
- package/lib/module/renderer/components/colorFilters/Lerp.js +21 -0
- package/lib/module/renderer/components/colorFilters/Lerp.js.map +1 -0
- package/lib/module/renderer/components/colorFilters/LinearToSRGBGamma.js +17 -0
- package/lib/module/renderer/components/colorFilters/LinearToSRGBGamma.js.map +1 -0
- package/lib/module/renderer/components/colorFilters/LumaColorFilter.js +17 -0
- package/lib/module/renderer/components/colorFilters/LumaColorFilter.js.map +1 -0
- package/lib/module/renderer/components/colorFilters/Matrix.js +20 -0
- package/lib/module/renderer/components/colorFilters/Matrix.js.map +1 -0
- package/lib/module/renderer/components/colorFilters/SRGBToLinearGamma.js +17 -0
- package/lib/module/renderer/components/colorFilters/SRGBToLinearGamma.js.map +1 -0
- package/lib/module/renderer/components/colorFilters/index.js +7 -0
- package/lib/module/renderer/components/colorFilters/index.js.map +1 -0
- package/lib/module/renderer/components/image/BoxFit.js +145 -0
- package/lib/module/renderer/components/image/BoxFit.js.map +1 -0
- package/lib/module/renderer/components/image/Image.js +39 -0
- package/lib/module/renderer/components/image/Image.js.map +1 -0
- package/lib/module/renderer/components/image/ImageSVG.js +30 -0
- package/lib/module/renderer/components/image/ImageSVG.js.map +1 -0
- package/lib/module/renderer/components/image/ImageShader.js +66 -0
- package/lib/module/renderer/components/image/ImageShader.js.map +1 -0
- package/lib/module/renderer/components/image/index.js +5 -0
- package/lib/module/renderer/components/image/index.js.map +1 -0
- package/lib/module/renderer/components/imageFilters/Blur.js +25 -0
- package/lib/module/renderer/components/imageFilters/Blur.js.map +1 -0
- package/lib/module/renderer/components/imageFilters/DisplacementMap.js +32 -0
- package/lib/module/renderer/components/imageFilters/DisplacementMap.js.map +1 -0
- package/lib/module/renderer/components/imageFilters/DropShadow.js +28 -0
- package/lib/module/renderer/components/imageFilters/DropShadow.js.map +1 -0
- package/lib/module/renderer/components/imageFilters/InnerShadow.js +38 -0
- package/lib/module/renderer/components/imageFilters/InnerShadow.js.map +1 -0
- package/lib/module/renderer/components/imageFilters/Morphology.js +26 -0
- package/lib/module/renderer/components/imageFilters/Morphology.js.map +1 -0
- package/lib/module/renderer/components/imageFilters/Offset.js +23 -0
- package/lib/module/renderer/components/imageFilters/Offset.js.map +1 -0
- package/lib/module/renderer/components/imageFilters/getInput.js +23 -0
- package/lib/module/renderer/components/imageFilters/getInput.js.map +1 -0
- package/lib/module/renderer/components/imageFilters/index.js +7 -0
- package/lib/module/renderer/components/imageFilters/index.js.map +1 -0
- package/lib/module/renderer/components/index.js +17 -0
- package/lib/module/renderer/components/index.js.map +1 -0
- package/lib/module/renderer/components/maskFilters/Blur.js +25 -0
- package/lib/module/renderer/components/maskFilters/Blur.js.map +1 -0
- package/lib/module/renderer/components/maskFilters/index.js +2 -0
- package/lib/module/renderer/components/maskFilters/index.js.map +1 -0
- package/lib/module/renderer/components/pathEffects/Corner.js +29 -0
- package/lib/module/renderer/components/pathEffects/Corner.js.map +1 -0
- package/lib/module/renderer/components/pathEffects/Dash.js +26 -0
- package/lib/module/renderer/components/pathEffects/Dash.js.map +1 -0
- package/lib/module/renderer/components/pathEffects/Discrete.js +30 -0
- package/lib/module/renderer/components/pathEffects/Discrete.js.map +1 -0
- package/lib/module/renderer/components/pathEffects/Line2D.js +30 -0
- package/lib/module/renderer/components/pathEffects/Line2D.js.map +1 -0
- package/lib/module/renderer/components/pathEffects/Path1D.js +34 -0
- package/lib/module/renderer/components/pathEffects/Path1D.js.map +1 -0
- package/lib/module/renderer/components/pathEffects/Path2D.js +31 -0
- package/lib/module/renderer/components/pathEffects/Path2D.js.map +1 -0
- package/lib/module/renderer/components/pathEffects/Sum.js +16 -0
- package/lib/module/renderer/components/pathEffects/Sum.js.map +1 -0
- package/lib/module/renderer/components/pathEffects/index.js +8 -0
- package/lib/module/renderer/components/pathEffects/index.js.map +1 -0
- package/lib/module/renderer/components/shaders/Color.js +17 -0
- package/lib/module/renderer/components/shaders/Color.js.map +1 -0
- package/lib/module/renderer/components/shaders/FractalNoise.js +27 -0
- package/lib/module/renderer/components/shaders/FractalNoise.js.map +1 -0
- package/lib/module/renderer/components/shaders/Gradient.js +20 -0
- package/lib/module/renderer/components/shaders/Gradient.js.map +1 -0
- package/lib/module/renderer/components/shaders/LinearGradient.js +27 -0
- package/lib/module/renderer/components/shaders/LinearGradient.js.map +1 -0
- package/lib/module/renderer/components/shaders/RadialGradient.js +27 -0
- package/lib/module/renderer/components/shaders/RadialGradient.js.map +1 -0
- package/lib/module/renderer/components/shaders/Shader.js +64 -0
- package/lib/module/renderer/components/shaders/Shader.js.map +1 -0
- package/lib/module/renderer/components/shaders/ShaderLib.js +45 -0
- package/lib/module/renderer/components/shaders/ShaderLib.js.map +1 -0
- package/lib/module/renderer/components/shaders/SweepGradient.js +28 -0
- package/lib/module/renderer/components/shaders/SweepGradient.js.map +1 -0
- package/lib/module/renderer/components/shaders/Turbulence.js +27 -0
- package/lib/module/renderer/components/shaders/Turbulence.js.map +1 -0
- package/lib/module/renderer/components/shaders/TwoPointConicalGradient.js +29 -0
- package/lib/module/renderer/components/shaders/TwoPointConicalGradient.js.map +1 -0
- package/lib/module/renderer/components/shaders/index.js +10 -0
- package/lib/module/renderer/components/shaders/index.js.map +1 -0
- package/lib/module/renderer/components/shapes/Circle.js +26 -0
- package/lib/module/renderer/components/shapes/Circle.js.map +1 -0
- package/lib/module/renderer/components/shapes/DiffRect.js +21 -0
- package/lib/module/renderer/components/shapes/DiffRect.js.map +1 -0
- package/lib/module/renderer/components/shapes/Fill.js +17 -0
- package/lib/module/renderer/components/shapes/Fill.js.map +1 -0
- package/lib/module/renderer/components/shapes/FitBox.js +22 -0
- package/lib/module/renderer/components/shapes/FitBox.js.map +1 -0
- package/lib/module/renderer/components/shapes/Line.js +21 -0
- package/lib/module/renderer/components/shapes/Line.js.map +1 -0
- package/lib/module/renderer/components/shapes/Oval.js +23 -0
- package/lib/module/renderer/components/shapes/Oval.js.map +1 -0
- package/lib/module/renderer/components/shapes/Patch.js +35 -0
- package/lib/module/renderer/components/shapes/Patch.js.map +1 -0
- package/lib/module/renderer/components/shapes/Path.js +43 -0
- package/lib/module/renderer/components/shapes/Path.js.map +1 -0
- package/lib/module/renderer/components/shapes/Points.js +27 -0
- package/lib/module/renderer/components/shapes/Points.js.map +1 -0
- package/lib/module/renderer/components/shapes/Rect.js +19 -0
- package/lib/module/renderer/components/shapes/Rect.js.map +1 -0
- package/lib/module/renderer/components/shapes/RoundedRect.js +22 -0
- package/lib/module/renderer/components/shapes/RoundedRect.js.map +1 -0
- package/lib/module/renderer/components/shapes/Vertices.js +36 -0
- package/lib/module/renderer/components/shapes/Vertices.js.map +1 -0
- package/lib/module/renderer/components/shapes/index.js +13 -0
- package/lib/module/renderer/components/shapes/index.js.map +1 -0
- package/lib/module/renderer/components/text/Glyphs.js +45 -0
- package/lib/module/renderer/components/text/Glyphs.js.map +1 -0
- package/lib/module/renderer/components/text/Text.js +30 -0
- package/lib/module/renderer/components/text/Text.js.map +1 -0
- package/lib/module/renderer/components/text/TextBlob.js +26 -0
- package/lib/module/renderer/components/text/TextBlob.js.map +1 -0
- package/lib/module/renderer/components/text/TextPath.js +76 -0
- package/lib/module/renderer/components/text/TextPath.js.map +1 -0
- package/lib/module/renderer/components/text/index.js +5 -0
- package/lib/module/renderer/components/text/index.js.map +1 -0
- package/lib/module/renderer/index.js +4 -0
- package/lib/module/renderer/index.js.map +1 -0
- package/lib/module/renderer/nodes/Container.js +18 -0
- package/lib/module/renderer/nodes/Container.js.map +1 -0
- package/lib/module/renderer/nodes/Declaration.js +33 -0
- package/lib/module/renderer/nodes/Declaration.js.map +1 -0
- package/lib/module/renderer/nodes/Drawing.js +53 -0
- package/lib/module/renderer/nodes/Drawing.js.map +1 -0
- package/lib/module/renderer/nodes/Node.js +67 -0
- package/lib/module/renderer/nodes/Node.js.map +1 -0
- package/lib/module/renderer/nodes/index.js +5 -0
- package/lib/module/renderer/nodes/index.js.map +1 -0
- package/lib/module/renderer/processors/Animations/Animations.js +36 -0
- package/lib/module/renderer/processors/Animations/Animations.js.map +1 -0
- package/lib/module/renderer/processors/Animations/index.js +2 -0
- package/lib/module/renderer/processors/Animations/index.js.map +1 -0
- package/lib/module/renderer/processors/Circles.js +16 -0
- package/lib/module/renderer/processors/Circles.js.map +1 -0
- package/lib/module/renderer/processors/Clips.js +13 -0
- package/lib/module/renderer/processors/Clips.js.map +1 -0
- package/lib/module/renderer/processors/Font.js +26 -0
- package/lib/module/renderer/processors/Font.js.map +1 -0
- package/lib/module/renderer/processors/Paint.js +75 -0
- package/lib/module/renderer/processors/Paint.js.map +1 -0
- package/lib/module/renderer/processors/Paths.js +13 -0
- package/lib/module/renderer/processors/Paths.js.map +1 -0
- package/lib/module/renderer/processors/Radius.js +9 -0
- package/lib/module/renderer/processors/Radius.js.map +1 -0
- package/lib/module/renderer/processors/Rects.js +55 -0
- package/lib/module/renderer/processors/Rects.js.map +1 -0
- package/lib/module/renderer/processors/Transform.js +41 -0
- package/lib/module/renderer/processors/Transform.js.map +1 -0
- package/lib/module/renderer/processors/index.js +11 -0
- package/lib/module/renderer/processors/index.js.map +1 -0
- package/lib/module/renderer/processors/math/Coordinates.js +19 -0
- package/lib/module/renderer/processors/math/Coordinates.js.map +1 -0
- package/lib/module/renderer/processors/math/Math.js +2 -0
- package/lib/module/renderer/processors/math/Math.js.map +1 -0
- package/lib/module/renderer/processors/math/Matrix3.js +71 -0
- package/lib/module/renderer/processors/math/Matrix3.js.map +1 -0
- package/lib/module/renderer/processors/math/Transforms.js +12 -0
- package/lib/module/renderer/processors/math/Transforms.js.map +1 -0
- package/lib/module/renderer/processors/math/Vector.js +30 -0
- package/lib/module/renderer/processors/math/Vector.js.map +1 -0
- package/lib/module/renderer/processors/math/index.js +6 -0
- package/lib/module/renderer/processors/math/index.js.map +1 -0
- package/lib/module/renderer/typeddash.js +5 -0
- package/lib/module/renderer/typeddash.js.map +1 -0
- package/lib/module/skia/Canvas.js +14 -0
- package/lib/module/skia/Canvas.js.map +1 -0
- package/lib/module/skia/Color.js +48 -0
- package/lib/module/skia/Color.js.map +1 -0
- package/lib/module/skia/ColorFilter/ColorFilter.js +2 -0
- package/lib/module/skia/ColorFilter/ColorFilter.js.map +1 -0
- package/lib/module/skia/ColorFilter/ColorFilterFactory.js +2 -0
- package/lib/module/skia/ColorFilter/ColorFilterFactory.js.map +1 -0
- package/lib/module/skia/ColorFilter/index.js +3 -0
- package/lib/module/skia/ColorFilter/index.js.map +1 -0
- package/lib/module/skia/ContourMeasure.js +2 -0
- package/lib/module/skia/ContourMeasure.js.map +1 -0
- package/lib/module/skia/Data/Data.js +35 -0
- package/lib/module/skia/Data/Data.js.map +1 -0
- package/lib/module/skia/Data/DataFactory.js +2 -0
- package/lib/module/skia/Data/DataFactory.js.map +1 -0
- package/lib/module/skia/Data/index.js +3 -0
- package/lib/module/skia/Data/index.js.map +1 -0
- package/lib/module/skia/Font/Font.js +68 -0
- package/lib/module/skia/Font/Font.js.map +1 -0
- package/lib/module/skia/Font/index.js +3 -0
- package/lib/module/skia/Font/index.js.map +1 -0
- package/lib/module/skia/Font/useFont.js +24 -0
- package/lib/module/skia/Font/useFont.js.map +1 -0
- package/lib/module/skia/FontMgr/FontMgr.js +2 -0
- package/lib/module/skia/FontMgr/FontMgr.js.map +1 -0
- package/lib/module/skia/FontMgr/FontMgrFactory.js +2 -0
- package/lib/module/skia/FontMgr/FontMgrFactory.js.map +1 -0
- package/lib/module/skia/FontMgr/index.js +2 -0
- package/lib/module/skia/FontMgr/index.js.map +1 -0
- package/lib/module/skia/Image/Image.js +23 -0
- package/lib/module/skia/Image/Image.js.map +1 -0
- package/lib/module/skia/Image/ImageFactory.js +37 -0
- package/lib/module/skia/Image/ImageFactory.js.map +1 -0
- package/lib/module/skia/Image/index.js +4 -0
- package/lib/module/skia/Image/index.js.map +1 -0
- package/lib/module/skia/Image/useImage.js +8 -0
- package/lib/module/skia/Image/useImage.js.map +1 -0
- package/lib/module/skia/ImageFilter/ImageFilter.js +11 -0
- package/lib/module/skia/ImageFilter/ImageFilter.js.map +1 -0
- package/lib/module/skia/ImageFilter/ImageFilterFactory.js +9 -0
- package/lib/module/skia/ImageFilter/ImageFilterFactory.js.map +1 -0
- package/lib/module/skia/ImageFilter/index.js +3 -0
- package/lib/module/skia/ImageFilter/index.js.map +1 -0
- package/lib/module/skia/JsiInstance.js +2 -0
- package/lib/module/skia/JsiInstance.js.map +1 -0
- package/lib/module/skia/MaskFilter.js +11 -0
- package/lib/module/skia/MaskFilter.js.map +1 -0
- package/lib/module/skia/Matrix.js +14 -0
- package/lib/module/skia/Matrix.js.map +1 -0
- package/lib/module/skia/NativeSetup.js +17 -0
- package/lib/module/skia/NativeSetup.js.map +1 -0
- package/lib/module/skia/Paint/BlendMode.js +61 -0
- package/lib/module/skia/Paint/BlendMode.js.map +1 -0
- package/lib/module/skia/Paint/Paint.js +25 -0
- package/lib/module/skia/Paint/Paint.js.map +1 -0
- package/lib/module/skia/Paint/index.js +4 -0
- package/lib/module/skia/Paint/index.js.map +1 -0
- package/lib/module/skia/Paint/usePaint.js +17 -0
- package/lib/module/skia/Paint/usePaint.js.map +1 -0
- package/lib/module/skia/Path/Path.js +24 -0
- package/lib/module/skia/Path/Path.js.map +1 -0
- package/lib/module/skia/Path/PathFactory.js +2 -0
- package/lib/module/skia/Path/PathFactory.js.map +1 -0
- package/lib/module/skia/Path/index.js +4 -0
- package/lib/module/skia/Path/index.js.map +1 -0
- package/lib/module/skia/Path/usePath.js +44 -0
- package/lib/module/skia/Path/usePath.js.map +1 -0
- package/lib/module/skia/PathEffect.js +9 -0
- package/lib/module/skia/PathEffect.js.map +1 -0
- package/lib/module/skia/Point.js +8 -0
- package/lib/module/skia/Point.js.map +1 -0
- package/lib/module/skia/RRect.js +2 -0
- package/lib/module/skia/RRect.js.map +1 -0
- package/lib/module/skia/RSXform.js +2 -0
- package/lib/module/skia/RSXform.js.map +1 -0
- package/lib/module/skia/Rect.js +2 -0
- package/lib/module/skia/Rect.js.map +1 -0
- package/lib/module/skia/RuntimeEffect/RuntimeEffect.js +2 -0
- package/lib/module/skia/RuntimeEffect/RuntimeEffect.js.map +1 -0
- package/lib/module/skia/RuntimeEffect/RuntimeEffectFactory.js +2 -0
- package/lib/module/skia/RuntimeEffect/RuntimeEffectFactory.js.map +1 -0
- package/lib/module/skia/RuntimeEffect/index.js +3 -0
- package/lib/module/skia/RuntimeEffect/index.js.map +1 -0
- package/lib/module/skia/SVG/SVG.js +2 -0
- package/lib/module/skia/SVG/SVG.js.map +1 -0
- package/lib/module/skia/SVG/SVGFactory.js +2 -0
- package/lib/module/skia/SVG/SVGFactory.js.map +1 -0
- package/lib/module/skia/SVG/index.js +4 -0
- package/lib/module/skia/SVG/index.js.map +1 -0
- package/lib/module/skia/SVG/useSvg.js +4 -0
- package/lib/module/skia/SVG/useSvg.js.map +1 -0
- package/lib/module/skia/Shader/Shader.js +2 -0
- package/lib/module/skia/Shader/Shader.js.map +1 -0
- package/lib/module/skia/Shader/ShaderFactory.js +2 -0
- package/lib/module/skia/Shader/ShaderFactory.js.map +1 -0
- package/lib/module/skia/Shader/index.js +4 -0
- package/lib/module/skia/Shader/index.js.map +1 -0
- package/lib/module/skia/Shader/useShader.js +4 -0
- package/lib/module/skia/Shader/useShader.js.map +1 -0
- package/lib/module/skia/Skia.js +39 -0
- package/lib/module/skia/Skia.js.map +1 -0
- package/lib/module/skia/Surface/Surface.js +2 -0
- package/lib/module/skia/Surface/Surface.js.map +1 -0
- package/lib/module/skia/Surface/SurfaceFactory.js +2 -0
- package/lib/module/skia/Surface/SurfaceFactory.js.map +1 -0
- package/lib/module/skia/Surface/index.js +3 -0
- package/lib/module/skia/Surface/index.js.map +1 -0
- package/lib/module/skia/TextBlob.js +2 -0
- package/lib/module/skia/TextBlob.js.map +1 -0
- package/lib/module/skia/Typeface/Typeface.js +2 -0
- package/lib/module/skia/Typeface/Typeface.js.map +1 -0
- package/lib/module/skia/Typeface/TypefaceFactory.js +2 -0
- package/lib/module/skia/Typeface/TypefaceFactory.js.map +1 -0
- package/lib/module/skia/Typeface/index.js +4 -0
- package/lib/module/skia/Typeface/index.js.map +1 -0
- package/lib/module/skia/Typeface/useTypeface.js +8 -0
- package/lib/module/skia/Typeface/useTypeface.js.map +1 -0
- package/lib/module/skia/Vertices/Vertices.js +8 -0
- package/lib/module/skia/Vertices/Vertices.js.map +1 -0
- package/lib/module/skia/Vertices/index.js +2 -0
- package/lib/module/skia/Vertices/index.js.map +1 -0
- package/lib/module/skia/index.js +23 -0
- package/lib/module/skia/index.js.map +1 -0
- package/lib/module/values/animation/decay/decay.js +33 -0
- package/lib/module/values/animation/decay/decay.js.map +1 -0
- package/lib/module/values/animation/decay/index.js +2 -0
- package/lib/module/values/animation/decay/index.js.map +1 -0
- package/lib/module/values/animation/decay/runDecay.js +38 -0
- package/lib/module/values/animation/decay/runDecay.js.map +1 -0
- package/lib/module/values/animation/decay/types.js +2 -0
- package/lib/module/values/animation/decay/types.js.map +1 -0
- package/lib/module/values/animation/functions/index.js +3 -0
- package/lib/module/values/animation/functions/index.js.map +1 -0
- package/lib/module/values/animation/functions/interpolate.js +132 -0
- package/lib/module/values/animation/functions/interpolate.js.map +1 -0
- package/lib/module/values/animation/functions/interpolateColors.js +32 -0
- package/lib/module/values/animation/functions/interpolateColors.js.map +1 -0
- package/lib/module/values/animation/index.js +5 -0
- package/lib/module/values/animation/index.js.map +1 -0
- package/lib/module/values/animation/spring/Spring.js +69 -0
- package/lib/module/values/animation/spring/Spring.js.map +1 -0
- package/lib/module/values/animation/spring/functions/index.js +2 -0
- package/lib/module/values/animation/spring/functions/index.js.map +1 -0
- package/lib/module/values/animation/spring/functions/spring.js +85 -0
- package/lib/module/values/animation/spring/functions/spring.js.map +1 -0
- package/lib/module/values/animation/spring/index.js +4 -0
- package/lib/module/values/animation/spring/index.js.map +1 -0
- package/lib/module/values/animation/spring/runSpring.js +21 -0
- package/lib/module/values/animation/spring/runSpring.js.map +1 -0
- package/lib/module/values/animation/spring/types.js +2 -0
- package/lib/module/values/animation/spring/types.js.map +1 -0
- package/lib/module/values/animation/spring/useSpring.js +13 -0
- package/lib/module/values/animation/spring/useSpring.js.map +1 -0
- package/lib/module/values/animation/timing/Easing.js +98 -0
- package/lib/module/values/animation/timing/Easing.js.map +1 -0
- package/lib/module/values/animation/timing/createTiming.js +49 -0
- package/lib/module/values/animation/timing/createTiming.js.map +1 -0
- package/lib/module/values/animation/timing/functions/bezier.js +141 -0
- package/lib/module/values/animation/timing/functions/bezier.js.map +1 -0
- package/lib/module/values/animation/timing/functions/getResolvedParams.js +48 -0
- package/lib/module/values/animation/timing/functions/getResolvedParams.js.map +1 -0
- package/lib/module/values/animation/timing/functions/index.js +5 -0
- package/lib/module/values/animation/timing/functions/index.js.map +1 -0
- package/lib/module/values/animation/timing/functions/timing.js +41 -0
- package/lib/module/values/animation/timing/functions/timing.js.map +1 -0
- package/lib/module/values/animation/timing/functions/types.js +2 -0
- package/lib/module/values/animation/timing/functions/types.js.map +1 -0
- package/lib/module/values/animation/timing/index.js +5 -0
- package/lib/module/values/animation/timing/index.js.map +1 -0
- package/lib/module/values/animation/timing/runTiming.js +23 -0
- package/lib/module/values/animation/timing/runTiming.js.map +1 -0
- package/lib/module/values/animation/timing/useLoop.js +13 -0
- package/lib/module/values/animation/timing/useLoop.js.map +1 -0
- package/lib/module/values/animation/timing/useTiming.js +54 -0
- package/lib/module/values/animation/timing/useTiming.js.map +1 -0
- package/lib/module/values/animation/types.js +2 -0
- package/lib/module/values/animation/types.js.map +1 -0
- package/lib/module/values/api.js +11 -0
- package/lib/module/values/api.js.map +1 -0
- package/lib/module/values/hooks/index.js +5 -0
- package/lib/module/values/hooks/index.js.map +1 -0
- package/lib/module/values/hooks/useClockValue.js +17 -0
- package/lib/module/values/hooks/useClockValue.js.map +1 -0
- package/lib/module/values/hooks/useDerivedValue.js +14 -0
- package/lib/module/values/hooks/useDerivedValue.js.map +1 -0
- package/lib/module/values/hooks/useValue.js +13 -0
- package/lib/module/values/hooks/useValue.js.map +1 -0
- package/lib/module/values/hooks/useValueEffect.js +13 -0
- package/lib/module/values/hooks/useValueEffect.js.map +1 -0
- package/lib/module/values/index.js +5 -0
- package/lib/module/values/index.js.map +1 -0
- package/lib/module/values/types.js +2 -0
- package/lib/module/values/types.js.map +1 -0
- package/lib/module/views/SkiaView.js +149 -0
- package/lib/module/views/SkiaView.js.map +1 -0
- package/lib/module/views/index.js +5 -0
- package/lib/module/views/index.js.map +1 -0
- package/lib/module/views/types.js +9 -0
- package/lib/module/views/types.js.map +1 -0
- package/lib/module/views/useDrawCallback.js +14 -0
- package/lib/module/views/useDrawCallback.js.map +1 -0
- package/lib/module/views/useTouchHandler.js +64 -0
- package/lib/module/views/useTouchHandler.js.map +1 -0
- package/lib/typescript/index.d.ts +1 -0
- package/lib/typescript/scripts/install-npm.d.ts +1 -0
- package/lib/typescript/src/external/index.d.ts +1 -0
- package/lib/typescript/src/external/reanimated/index.d.ts +1 -0
- package/lib/typescript/src/external/reanimated/useSharedValueEffect.d.ts +11 -0
- package/lib/typescript/src/index.d.ts +6 -0
- package/lib/typescript/src/renderer/Canvas.d.ts +26 -0
- package/lib/typescript/src/renderer/DependencyManager.d.ts +21 -0
- package/lib/typescript/src/renderer/DrawingContext.d.ts +13 -0
- package/lib/typescript/src/renderer/HostConfig.d.ts +27 -0
- package/lib/typescript/src/renderer/components/Blend.d.ts +9 -0
- package/lib/typescript/src/renderer/components/Compose.d.ts +6 -0
- package/lib/typescript/src/renderer/components/Defs.d.ts +5 -0
- package/lib/typescript/src/renderer/components/Group.d.ts +9 -0
- package/lib/typescript/src/renderer/components/Mask.d.ts +15 -0
- package/lib/typescript/src/renderer/components/Paint.d.ts +9 -0
- package/lib/typescript/src/renderer/components/backdrop/BackdropBlur.d.ts +8 -0
- package/lib/typescript/src/renderer/components/backdrop/BackdropFilter.d.ts +7 -0
- package/lib/typescript/src/renderer/components/backdrop/index.d.ts +2 -0
- package/lib/typescript/src/renderer/components/colorFilters/BlendColor.d.ts +10 -0
- package/lib/typescript/src/renderer/components/colorFilters/Compose.d.ts +3 -0
- package/lib/typescript/src/renderer/components/colorFilters/Lerp.d.ts +7 -0
- package/lib/typescript/src/renderer/components/colorFilters/LinearToSRGBGamma.d.ts +5 -0
- package/lib/typescript/src/renderer/components/colorFilters/LumaColorFilter.d.ts +5 -0
- package/lib/typescript/src/renderer/components/colorFilters/Matrix.d.ts +9 -0
- package/lib/typescript/src/renderer/components/colorFilters/SRGBToLinearGamma.d.ts +5 -0
- package/lib/typescript/src/renderer/components/colorFilters/index.d.ts +6 -0
- package/lib/typescript/src/renderer/components/image/BoxFit.d.ts +23 -0
- package/lib/typescript/src/renderer/components/image/Image.d.ts +19 -0
- package/lib/typescript/src/renderer/components/image/ImageSVG.d.ts +7 -0
- package/lib/typescript/src/renderer/components/image/ImageShader.d.ts +26 -0
- package/lib/typescript/src/renderer/components/image/index.d.ts +4 -0
- package/lib/typescript/src/renderer/components/imageFilters/Blur.d.ts +15 -0
- package/lib/typescript/src/renderer/components/imageFilters/DisplacementMap.d.ts +10 -0
- package/lib/typescript/src/renderer/components/imageFilters/DropShadow.d.ts +11 -0
- package/lib/typescript/src/renderer/components/imageFilters/InnerShadow.d.ts +12 -0
- package/lib/typescript/src/renderer/components/imageFilters/Morphology.d.ts +13 -0
- package/lib/typescript/src/renderer/components/imageFilters/Offset.d.ts +14 -0
- package/lib/typescript/src/renderer/components/imageFilters/getInput.d.ts +2 -0
- package/lib/typescript/src/renderer/components/imageFilters/index.d.ts +6 -0
- package/lib/typescript/src/renderer/components/index.d.ts +16 -0
- package/lib/typescript/src/renderer/components/maskFilters/Blur.d.ts +16 -0
- package/lib/typescript/src/renderer/components/maskFilters/index.d.ts +1 -0
- package/lib/typescript/src/renderer/components/pathEffects/Corner.d.ts +7 -0
- package/lib/typescript/src/renderer/components/pathEffects/Dash.d.ts +8 -0
- package/lib/typescript/src/renderer/components/pathEffects/Discrete.d.ts +14 -0
- package/lib/typescript/src/renderer/components/pathEffects/Line2D.d.ts +9 -0
- package/lib/typescript/src/renderer/components/pathEffects/Path1D.d.ts +13 -0
- package/lib/typescript/src/renderer/components/pathEffects/Path2D.d.ts +10 -0
- package/lib/typescript/src/renderer/components/pathEffects/Sum.d.ts +6 -0
- package/lib/typescript/src/renderer/components/pathEffects/index.d.ts +7 -0
- package/lib/typescript/src/renderer/components/shaders/Color.d.ts +7 -0
- package/lib/typescript/src/renderer/components/shaders/FractalNoise.d.ts +18 -0
- package/lib/typescript/src/renderer/components/shaders/Gradient.d.ts +17 -0
- package/lib/typescript/src/renderer/components/shaders/LinearGradient.d.ts +8 -0
- package/lib/typescript/src/renderer/components/shaders/RadialGradient.d.ts +8 -0
- package/lib/typescript/src/renderer/components/shaders/Shader.d.ts +21 -0
- package/lib/typescript/src/renderer/components/shaders/ShaderLib.d.ts +4 -0
- package/lib/typescript/src/renderer/components/shaders/SweepGradient.d.ts +9 -0
- package/lib/typescript/src/renderer/components/shaders/Turbulence.d.ts +18 -0
- package/lib/typescript/src/renderer/components/shaders/TwoPointConicalGradient.d.ts +10 -0
- package/lib/typescript/src/renderer/components/shaders/index.d.ts +9 -0
- package/lib/typescript/src/renderer/components/shapes/Circle.d.ts +12 -0
- package/lib/typescript/src/renderer/components/shapes/DiffRect.d.ts +9 -0
- package/lib/typescript/src/renderer/components/shapes/Fill.d.ts +5 -0
- package/lib/typescript/src/renderer/components/shapes/FitBox.d.ts +16 -0
- package/lib/typescript/src/renderer/components/shapes/Line.d.ts +7 -0
- package/lib/typescript/src/renderer/components/shapes/Oval.d.ts +10 -0
- package/lib/typescript/src/renderer/components/shapes/Patch.d.ts +21 -0
- package/lib/typescript/src/renderer/components/shapes/Path.d.ts +21 -0
- package/lib/typescript/src/renderer/components/shapes/Points.d.ts +15 -0
- package/lib/typescript/src/renderer/components/shapes/Rect.d.ts +4 -0
- package/lib/typescript/src/renderer/components/shapes/RoundedRect.d.ts +9 -0
- package/lib/typescript/src/renderer/components/shapes/Vertices.d.ts +18 -0
- package/lib/typescript/src/renderer/components/shapes/index.d.ts +12 -0
- package/lib/typescript/src/renderer/components/text/Glyphs.d.ts +20 -0
- package/lib/typescript/src/renderer/components/text/Text.d.ts +15 -0
- package/lib/typescript/src/renderer/components/text/TextBlob.d.ts +15 -0
- package/lib/typescript/src/renderer/components/text/TextPath.d.ts +15 -0
- package/lib/typescript/src/renderer/components/text/index.d.ts +4 -0
- package/lib/typescript/src/renderer/index.d.ts +3 -0
- package/lib/typescript/src/renderer/nodes/Container.d.ts +8 -0
- package/lib/typescript/src/renderer/nodes/Declaration.d.ts +19 -0
- package/lib/typescript/src/renderer/nodes/Drawing.d.ts +21 -0
- package/lib/typescript/src/renderer/nodes/Node.d.ts +23 -0
- package/lib/typescript/src/renderer/nodes/index.d.ts +4 -0
- package/lib/typescript/src/renderer/processors/Animations/Animations.d.ts +9 -0
- package/lib/typescript/src/renderer/processors/Animations/index.d.ts +1 -0
- package/lib/typescript/src/renderer/processors/Circles.d.ts +13 -0
- package/lib/typescript/src/renderer/processors/Clips.d.ts +5 -0
- package/lib/typescript/src/renderer/processors/Font.d.ts +12 -0
- package/lib/typescript/src/renderer/processors/Paint.d.ts +21 -0
- package/lib/typescript/src/renderer/processors/Paths.d.ts +4 -0
- package/lib/typescript/src/renderer/processors/Radius.d.ts +3 -0
- package/lib/typescript/src/renderer/processors/Rects.d.ts +61 -0
- package/lib/typescript/src/renderer/processors/Transform.d.ts +91 -0
- package/lib/typescript/src/renderer/processors/index.d.ts +10 -0
- package/lib/typescript/src/renderer/processors/math/Coordinates.d.ts +29 -0
- package/lib/typescript/src/renderer/processors/math/Math.d.ts +1 -0
- package/lib/typescript/src/renderer/processors/math/Matrix3.d.ts +13 -0
- package/lib/typescript/src/renderer/processors/math/Transforms.d.ts +5 -0
- package/lib/typescript/src/renderer/processors/math/Vector.d.ts +35 -0
- package/lib/typescript/src/renderer/processors/math/index.d.ts +5 -0
- package/lib/typescript/src/renderer/typeddash.d.ts +2 -0
- package/lib/typescript/src/skia/Canvas.d.ts +375 -0
- package/lib/typescript/src/skia/Color.d.ts +10 -0
- package/lib/typescript/src/skia/ColorFilter/ColorFilter.d.ts +3 -0
- package/lib/typescript/src/skia/ColorFilter/ColorFilterFactory.d.ts +43 -0
- package/lib/typescript/src/skia/ColorFilter/index.d.ts +2 -0
- package/lib/typescript/src/skia/ContourMeasure.d.ts +42 -0
- package/lib/typescript/src/skia/Data/Data.d.ts +9 -0
- package/lib/typescript/src/skia/Data/DataFactory.d.ts +18 -0
- package/lib/typescript/src/skia/Data/index.d.ts +2 -0
- package/lib/typescript/src/skia/Font/Font.d.ts +187 -0
- package/lib/typescript/src/skia/Font/index.d.ts +2 -0
- package/lib/typescript/src/skia/Font/useFont.d.ts +6 -0
- package/lib/typescript/src/skia/FontMgr/FontMgr.d.ts +18 -0
- package/lib/typescript/src/skia/FontMgr/FontMgrFactory.d.ts +4 -0
- package/lib/typescript/src/skia/FontMgr/index.d.ts +1 -0
- package/lib/typescript/src/skia/Image/Image.d.ts +75 -0
- package/lib/typescript/src/skia/Image/ImageFactory.d.ts +62 -0
- package/lib/typescript/src/skia/Image/index.d.ts +3 -0
- package/lib/typescript/src/skia/Image/useImage.d.ts +5 -0
- package/lib/typescript/src/skia/ImageFilter/ImageFilter.d.ts +23 -0
- package/lib/typescript/src/skia/ImageFilter/ImageFilterFactory.d.ts +114 -0
- package/lib/typescript/src/skia/ImageFilter/index.d.ts +2 -0
- package/lib/typescript/src/skia/JsiInstance.d.ts +3 -0
- package/lib/typescript/src/skia/MaskFilter.d.ts +21 -0
- package/lib/typescript/src/skia/Matrix.d.ts +22 -0
- package/lib/typescript/src/skia/NativeSetup.d.ts +1 -0
- package/lib/typescript/src/skia/Paint/BlendMode.d.ts +58 -0
- package/lib/typescript/src/skia/Paint/Paint.d.ts +127 -0
- package/lib/typescript/src/skia/Paint/index.d.ts +3 -0
- package/lib/typescript/src/skia/Paint/usePaint.d.ts +6 -0
- package/lib/typescript/src/skia/Path/Path.d.ts +443 -0
- package/lib/typescript/src/skia/Path/PathFactory.d.ts +18 -0
- package/lib/typescript/src/skia/Path/index.d.ts +3 -0
- package/lib/typescript/src/skia/Path/usePath.d.ts +22 -0
- package/lib/typescript/src/skia/PathEffect.d.ts +75 -0
- package/lib/typescript/src/skia/Point.d.ts +9 -0
- package/lib/typescript/src/skia/RRect.d.ts +6 -0
- package/lib/typescript/src/skia/RSXform.d.ts +2 -0
- package/lib/typescript/src/skia/Rect.d.ts +6 -0
- package/lib/typescript/src/skia/RuntimeEffect/RuntimeEffect.d.ts +47 -0
- package/lib/typescript/src/skia/RuntimeEffect/RuntimeEffectFactory.d.ts +10 -0
- package/lib/typescript/src/skia/RuntimeEffect/index.d.ts +2 -0
- package/lib/typescript/src/skia/SVG/SVG.d.ts +2 -0
- package/lib/typescript/src/skia/SVG/SVGFactory.d.ts +6 -0
- package/lib/typescript/src/skia/SVG/index.d.ts +3 -0
- package/lib/typescript/src/skia/SVG/useSvg.d.ts +2 -0
- package/lib/typescript/src/skia/Shader/Shader.d.ts +3 -0
- package/lib/typescript/src/skia/Shader/ShaderFactory.d.ts +104 -0
- package/lib/typescript/src/skia/Shader/index.d.ts +3 -0
- package/lib/typescript/src/skia/Shader/useShader.d.ts +1 -0
- package/lib/typescript/src/skia/Skia.d.ts +101 -0
- package/lib/typescript/src/skia/Surface/Surface.d.ts +25 -0
- package/lib/typescript/src/skia/Surface/SurfaceFactory.d.ts +11 -0
- package/lib/typescript/src/skia/Surface/index.d.ts +2 -0
- package/lib/typescript/src/skia/TextBlob.d.ts +44 -0
- package/lib/typescript/src/skia/Typeface/Typeface.d.ts +5 -0
- package/lib/typescript/src/skia/Typeface/TypefaceFactory.d.ts +5 -0
- package/lib/typescript/src/skia/Typeface/index.d.ts +3 -0
- package/lib/typescript/src/skia/Typeface/useTypeface.d.ts +5 -0
- package/lib/typescript/src/skia/Vertices/Vertices.d.ts +17 -0
- package/lib/typescript/src/skia/Vertices/index.d.ts +1 -0
- package/lib/typescript/src/skia/index.d.ts +22 -0
- package/lib/typescript/src/values/animation/decay/decay.d.ts +2 -0
- package/lib/typescript/src/values/animation/decay/index.d.ts +1 -0
- package/lib/typescript/src/values/animation/decay/runDecay.d.ts +10 -0
- package/lib/typescript/src/values/animation/decay/types.d.ts +21 -0
- package/lib/typescript/src/values/animation/functions/index.d.ts +2 -0
- package/lib/typescript/src/values/animation/functions/interpolate.d.ts +7 -0
- package/lib/typescript/src/values/animation/functions/interpolateColors.d.ts +3 -0
- package/lib/typescript/src/values/animation/index.d.ts +4 -0
- package/lib/typescript/src/values/animation/spring/Spring.d.ts +65 -0
- package/lib/typescript/src/values/animation/spring/functions/index.d.ts +1 -0
- package/lib/typescript/src/values/animation/spring/functions/spring.d.ts +10 -0
- package/lib/typescript/src/values/animation/spring/index.d.ts +3 -0
- package/lib/typescript/src/values/animation/spring/runSpring.d.ts +16 -0
- package/lib/typescript/src/values/animation/spring/types.d.ts +6 -0
- package/lib/typescript/src/values/animation/spring/useSpring.d.ts +10 -0
- package/lib/typescript/src/values/animation/timing/Easing.d.ts +19 -0
- package/lib/typescript/src/values/animation/timing/createTiming.d.ts +17 -0
- package/lib/typescript/src/values/animation/timing/functions/bezier.d.ts +1 -0
- package/lib/typescript/src/values/animation/timing/functions/getResolvedParams.d.ts +7 -0
- package/lib/typescript/src/values/animation/timing/functions/index.d.ts +4 -0
- package/lib/typescript/src/values/animation/timing/functions/timing.d.ts +17 -0
- package/lib/typescript/src/values/animation/timing/functions/types.d.ts +7 -0
- package/lib/typescript/src/values/animation/timing/index.d.ts +4 -0
- package/lib/typescript/src/values/animation/timing/runTiming.d.ts +16 -0
- package/lib/typescript/src/values/animation/timing/useLoop.d.ts +8 -0
- package/lib/typescript/src/values/animation/timing/useTiming.d.ts +10 -0
- package/lib/typescript/src/values/animation/types.d.ts +18 -0
- package/lib/typescript/src/values/api.d.ts +29 -0
- package/lib/typescript/src/values/hooks/index.d.ts +4 -0
- package/lib/typescript/src/values/hooks/useClockValue.d.ts +6 -0
- package/lib/typescript/src/values/hooks/useDerivedValue.d.ts +8 -0
- package/lib/typescript/src/values/hooks/useValue.d.ts +7 -0
- package/lib/typescript/src/values/hooks/useValueEffect.d.ts +7 -0
- package/lib/typescript/src/values/index.d.ts +4 -0
- package/lib/typescript/src/values/types.d.ts +36 -0
- package/lib/typescript/src/views/SkiaView.d.ts +55 -0
- package/lib/typescript/src/views/index.d.ts +4 -0
- package/lib/typescript/src/views/types.d.ts +67 -0
- package/lib/typescript/src/views/useDrawCallback.d.ts +8 -0
- package/lib/typescript/src/views/useTouchHandler.d.ts +12 -0
- package/libs/android/arm64-v8a/libskia.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/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/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/libskshaper.a +0 -0
- package/libs/android/x86_64/libsvg.a +0 -0
- package/libs/ios/libskia.xcframework/Info.plist +42 -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/libskshaper.xcframework/Info.plist +42 -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/Info.plist +42 -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 +100 -0
- package/react-native-skia.podspec +71 -0
- package/scripts/install-npm.js +23 -0
- package/src/external/index.ts +1 -0
- package/src/external/reanimated/index.ts +1 -0
- package/src/external/reanimated/useSharedValueEffect.ts +81 -0
- package/src/index.ts +7 -0
- package/src/renderer/Canvas.tsx +190 -0
- package/src/renderer/DependencyManager.tsx +59 -0
- package/src/renderer/DrawingContext.ts +16 -0
- package/src/renderer/HostConfig.ts +321 -0
- package/src/renderer/components/Blend.tsx +28 -0
- package/src/renderer/components/Compose.tsx +28 -0
- package/src/renderer/components/Defs.tsx +19 -0
- package/src/renderer/components/Group.tsx +61 -0
- package/src/renderer/components/Mask.tsx +43 -0
- package/src/renderer/components/Paint.tsx +59 -0
- package/src/renderer/components/backdrop/BackdropBlur.tsx +23 -0
- package/src/renderer/components/backdrop/BackdropFilter.tsx +47 -0
- package/src/renderer/components/backdrop/index.ts +2 -0
- package/src/renderer/components/colorFilters/BlendColor.tsx +30 -0
- package/src/renderer/components/colorFilters/Compose.ts +17 -0
- package/src/renderer/components/colorFilters/Lerp.tsx +27 -0
- package/src/renderer/components/colorFilters/LinearToSRGBGamma.tsx +21 -0
- package/src/renderer/components/colorFilters/LumaColorFilter.tsx +19 -0
- package/src/renderer/components/colorFilters/Matrix.tsx +47 -0
- package/src/renderer/components/colorFilters/SRGBToLinearGamma.tsx +21 -0
- package/src/renderer/components/colorFilters/index.ts +6 -0
- package/src/renderer/components/image/BoxFit.ts +131 -0
- package/src/renderer/components/image/Image.tsx +50 -0
- package/src/renderer/components/image/ImageSVG.tsx +24 -0
- package/src/renderer/components/image/ImageShader.tsx +81 -0
- package/src/renderer/components/image/index.ts +4 -0
- package/src/renderer/components/imageFilters/Blur.tsx +35 -0
- package/src/renderer/components/imageFilters/DisplacementMap.tsx +35 -0
- package/src/renderer/components/imageFilters/DropShadow.tsx +31 -0
- package/src/renderer/components/imageFilters/InnerShadow.tsx +50 -0
- package/src/renderer/components/imageFilters/Morphology.tsx +34 -0
- package/src/renderer/components/imageFilters/Offset.tsx +27 -0
- package/src/renderer/components/imageFilters/getInput.ts +19 -0
- package/src/renderer/components/imageFilters/index.ts +6 -0
- package/src/renderer/components/index.ts +17 -0
- package/src/renderer/components/maskFilters/Blur.tsx +33 -0
- package/src/renderer/components/maskFilters/index.ts +1 -0
- package/src/renderer/components/pathEffects/Corner.tsx +32 -0
- package/src/renderer/components/pathEffects/Dash.tsx +28 -0
- package/src/renderer/components/pathEffects/Discrete.tsx +35 -0
- package/src/renderer/components/pathEffects/Line2D.tsx +34 -0
- package/src/renderer/components/pathEffects/Path1D.tsx +44 -0
- package/src/renderer/components/pathEffects/Path2D.tsx +36 -0
- package/src/renderer/components/pathEffects/Sum.tsx +20 -0
- package/src/renderer/components/pathEffects/index.ts +7 -0
- package/src/renderer/components/shaders/Color.tsx +18 -0
- package/src/renderer/components/shaders/FractalNoise.tsx +37 -0
- package/src/renderer/components/shaders/Gradient.ts +29 -0
- package/src/renderer/components/shaders/LinearGradient.tsx +33 -0
- package/src/renderer/components/shaders/RadialGradient.tsx +33 -0
- package/src/renderer/components/shaders/Shader.tsx +84 -0
- package/src/renderer/components/shaders/ShaderLib.ts +46 -0
- package/src/renderer/components/shaders/SweepGradient.tsx +36 -0
- package/src/renderer/components/shaders/Turbulence.tsx +37 -0
- package/src/renderer/components/shaders/TwoPointConicalGradient.tsx +39 -0
- package/src/renderer/components/shaders/index.ts +9 -0
- package/src/renderer/components/shapes/Circle.tsx +25 -0
- package/src/renderer/components/shapes/DiffRect.tsx +21 -0
- package/src/renderer/components/shapes/Fill.tsx +15 -0
- package/src/renderer/components/shapes/FitBox.tsx +26 -0
- package/src/renderer/components/shapes/Line.tsx +16 -0
- package/src/renderer/components/shapes/Oval.tsx +25 -0
- package/src/renderer/components/shapes/Patch.tsx +68 -0
- package/src/renderer/components/shapes/Path.tsx +49 -0
- package/src/renderer/components/shapes/Points.tsx +28 -0
- package/src/renderer/components/shapes/Rect.tsx +20 -0
- package/src/renderer/components/shapes/RoundedRect.tsx +25 -0
- package/src/renderer/components/shapes/Vertices.tsx +44 -0
- package/src/renderer/components/shapes/index.ts +12 -0
- package/src/renderer/components/text/Glyphs.tsx +49 -0
- package/src/renderer/components/text/Text.tsx +32 -0
- package/src/renderer/components/text/TextBlob.tsx +26 -0
- package/src/renderer/components/text/TextPath.tsx +70 -0
- package/src/renderer/components/text/index.ts +4 -0
- package/src/renderer/index.ts +3 -0
- package/src/renderer/nodes/Container.tsx +17 -0
- package/src/renderer/nodes/Declaration.tsx +53 -0
- package/src/renderer/nodes/Drawing.tsx +76 -0
- package/src/renderer/nodes/Node.ts +60 -0
- package/src/renderer/nodes/index.ts +4 -0
- package/src/renderer/processors/Animations/Animations.ts +48 -0
- package/src/renderer/processors/Animations/index.ts +1 -0
- package/src/renderer/processors/Circles.ts +25 -0
- package/src/renderer/processors/Clips.ts +19 -0
- package/src/renderer/processors/Font.ts +25 -0
- package/src/renderer/processors/Paint.ts +105 -0
- package/src/renderer/processors/Paths.ts +19 -0
- package/src/renderer/processors/Radius.ts +11 -0
- package/src/renderer/processors/Rects.ts +86 -0
- package/src/renderer/processors/Transform.ts +44 -0
- package/src/renderer/processors/index.ts +10 -0
- package/src/renderer/processors/math/Coordinates.ts +32 -0
- package/src/renderer/processors/math/Math.ts +2 -0
- package/src/renderer/processors/math/Matrix3.ts +150 -0
- package/src/renderer/processors/math/Transforms.ts +7 -0
- package/src/renderer/processors/math/Vector.ts +37 -0
- package/src/renderer/processors/math/index.ts +5 -0
- package/src/renderer/typeddash.ts +5 -0
- package/src/skia/Canvas.ts +488 -0
- package/src/skia/Color.ts +51 -0
- package/src/skia/ColorFilter/ColorFilter.ts +7 -0
- package/src/skia/ColorFilter/ColorFilterFactory.ts +52 -0
- package/src/skia/ColorFilter/index.ts +2 -0
- package/src/skia/ContourMeasure.tsx +49 -0
- package/src/skia/Data/Data.ts +61 -0
- package/src/skia/Data/DataFactory.ts +19 -0
- package/src/skia/Data/index.ts +2 -0
- package/src/skia/Font/Font.ts +230 -0
- package/src/skia/Font/index.ts +2 -0
- package/src/skia/Font/useFont.ts +27 -0
- package/src/skia/FontMgr/FontMgr.ts +24 -0
- package/src/skia/FontMgr/FontMgrFactory.ts +17 -0
- package/src/skia/FontMgr/index.ts +1 -0
- package/src/skia/Image/Image.ts +96 -0
- package/src/skia/Image/ImageFactory.ts +78 -0
- package/src/skia/Image/index.ts +3 -0
- package/src/skia/Image/useImage.ts +9 -0
- package/src/skia/ImageFilter/ImageFilter.ts +31 -0
- package/src/skia/ImageFilter/ImageFilterFactory.ts +172 -0
- package/src/skia/ImageFilter/index.ts +2 -0
- package/src/skia/JsiInstance.ts +3 -0
- package/src/skia/MaskFilter.ts +27 -0
- package/src/skia/Matrix.ts +23 -0
- package/src/skia/NativeSetup.ts +18 -0
- package/src/skia/Paint/BlendMode.ts +61 -0
- package/src/skia/Paint/Paint.ts +153 -0
- package/src/skia/Paint/index.ts +3 -0
- package/src/skia/Paint/usePaint.ts +23 -0
- package/src/skia/Path/Path.ts +538 -0
- package/src/skia/Path/PathFactory.ts +20 -0
- package/src/skia/Path/index.ts +3 -0
- package/src/skia/Path/usePath.ts +54 -0
- package/src/skia/PathEffect.ts +93 -0
- package/src/skia/Point.ts +10 -0
- package/src/skia/RRect.ts +7 -0
- package/src/skia/RSXform.ts +3 -0
- package/src/skia/Rect.ts +6 -0
- package/src/skia/RuntimeEffect/RuntimeEffect.ts +63 -0
- package/src/skia/RuntimeEffect/RuntimeEffectFactory.ts +12 -0
- package/src/skia/RuntimeEffect/index.ts +2 -0
- package/src/skia/SVG/SVG.ts +3 -0
- package/src/skia/SVG/SVGFactory.ts +8 -0
- package/src/skia/SVG/index.ts +3 -0
- package/src/skia/SVG/useSvg.ts +6 -0
- package/src/skia/Shader/Shader.ts +6 -0
- package/src/skia/Shader/ShaderFactory.ts +169 -0
- package/src/skia/Shader/index.ts +3 -0
- package/src/skia/Shader/useShader.ts +6 -0
- package/src/skia/Skia.ts +120 -0
- package/src/skia/Surface/Surface.ts +27 -0
- package/src/skia/Surface/SurfaceFactory.ts +12 -0
- package/src/skia/Surface/index.ts +2 -0
- package/src/skia/TextBlob.ts +52 -0
- package/src/skia/Typeface/Typeface.ts +6 -0
- package/src/skia/Typeface/TypefaceFactory.ts +7 -0
- package/src/skia/Typeface/index.ts +3 -0
- package/src/skia/Typeface/useTypeface.ts +9 -0
- package/src/skia/Vertices/Vertices.tsx +20 -0
- package/src/skia/Vertices/index.ts +1 -0
- package/src/skia/index.ts +22 -0
- package/src/values/animation/decay/decay.ts +35 -0
- package/src/values/animation/decay/index.ts +1 -0
- package/src/values/animation/decay/runDecay.ts +37 -0
- package/src/values/animation/decay/types.ts +24 -0
- package/src/values/animation/functions/index.ts +2 -0
- package/src/values/animation/functions/interpolate.ts +169 -0
- package/src/values/animation/functions/interpolateColors.ts +62 -0
- package/src/values/animation/index.ts +4 -0
- package/src/values/animation/spring/Spring.ts +61 -0
- package/src/values/animation/spring/functions/index.ts +1 -0
- package/src/values/animation/spring/functions/spring.ts +86 -0
- package/src/values/animation/spring/index.ts +3 -0
- package/src/values/animation/spring/runSpring.ts +37 -0
- package/src/values/animation/spring/types.ts +6 -0
- package/src/values/animation/spring/useSpring.ts +28 -0
- package/src/values/animation/timing/Easing.ts +102 -0
- package/src/values/animation/timing/createTiming.ts +62 -0
- package/src/values/animation/timing/functions/__tests__/timing.spec.ts +29 -0
- package/src/values/animation/timing/functions/bezier.ts +165 -0
- package/src/values/animation/timing/functions/getResolvedParams.ts +50 -0
- package/src/values/animation/timing/functions/index.ts +4 -0
- package/src/values/animation/timing/functions/timing.ts +44 -0
- package/src/values/animation/timing/functions/types.ts +8 -0
- package/src/values/animation/timing/index.ts +4 -0
- package/src/values/animation/timing/runTiming.ts +33 -0
- package/src/values/animation/timing/useLoop.ts +18 -0
- package/src/values/animation/timing/useTiming.ts +68 -0
- package/src/values/animation/types.ts +23 -0
- package/src/values/api.ts +49 -0
- package/src/values/hooks/index.ts +4 -0
- package/src/values/hooks/useClockValue.ts +18 -0
- package/src/values/hooks/useDerivedValue.ts +18 -0
- package/src/values/hooks/useValue.ts +14 -0
- package/src/values/hooks/useValueEffect.ts +18 -0
- package/src/values/index.ts +4 -0
- package/src/values/types.ts +40 -0
- package/src/views/SkiaView.tsx +161 -0
- package/src/views/index.ts +4 -0
- package/src/views/types.ts +80 -0
- package/src/views/useDrawCallback.ts +19 -0
- package/src/views/useTouchHandler.ts +80 -0
@@ -0,0 +1,943 @@
|
|
1
|
+
/*
|
2
|
+
* Copyright 2019 Google Inc.
|
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 SKVX_DEFINED
|
9
|
+
#define SKVX_DEFINED
|
10
|
+
|
11
|
+
// skvx::Vec<N,T> are SIMD vectors of N T's, a v1.5 successor to SkNx<N,T>.
|
12
|
+
//
|
13
|
+
// This time we're leaning a bit less on platform-specific intrinsics and a bit
|
14
|
+
// more on Clang/GCC vector extensions, but still keeping the option open to
|
15
|
+
// drop in platform-specific intrinsics, actually more easily than before.
|
16
|
+
//
|
17
|
+
// We've also fixed a few of the caveats that used to make SkNx awkward to work
|
18
|
+
// with across translation units. skvx::Vec<N,T> always has N*sizeof(T) size
|
19
|
+
// and alignment and is safe to use across translation units freely.
|
20
|
+
// (Ideally we'd only align to T, but that tanks ARMv7 NEON codegen.)
|
21
|
+
|
22
|
+
// Please try to keep this file independent of Skia headers.
|
23
|
+
#include <algorithm> // std::min, std::max
|
24
|
+
#include <cassert> // assert()
|
25
|
+
#include <cmath> // ceilf, floorf, truncf, roundf, sqrtf, etc.
|
26
|
+
#include <cstdint> // intXX_t
|
27
|
+
#include <cstring> // memcpy()
|
28
|
+
#include <initializer_list> // std::initializer_list
|
29
|
+
#include <utility> // std::index_sequence
|
30
|
+
|
31
|
+
// Users may disable SIMD with SKNX_NO_SIMD, which may be set via compiler flags.
|
32
|
+
// The gn build has no option which sets SKNX_NO_SIMD.
|
33
|
+
// Use SKVX_USE_SIMD internally to avoid confusing double negation.
|
34
|
+
// Do not use 'defined' in a macro expansion.
|
35
|
+
#if !defined(SKNX_NO_SIMD)
|
36
|
+
#define SKVX_USE_SIMD 1
|
37
|
+
#else
|
38
|
+
#define SKVX_USE_SIMD 0
|
39
|
+
#endif
|
40
|
+
|
41
|
+
#if SKVX_USE_SIMD
|
42
|
+
#if defined(__SSE__) || defined(__AVX__) || defined(__AVX2__)
|
43
|
+
#include <immintrin.h>
|
44
|
+
#elif defined(__ARM_NEON)
|
45
|
+
#include <arm_neon.h>
|
46
|
+
#elif defined(__wasm_simd128__)
|
47
|
+
#include <wasm_simd128.h>
|
48
|
+
#endif
|
49
|
+
#endif
|
50
|
+
|
51
|
+
// To avoid ODR violations, all methods must be force-inlined...
|
52
|
+
#if defined(_MSC_VER)
|
53
|
+
#define SKVX_ALWAYS_INLINE __forceinline
|
54
|
+
#else
|
55
|
+
#define SKVX_ALWAYS_INLINE __attribute__((always_inline))
|
56
|
+
#endif
|
57
|
+
|
58
|
+
// ... and all standalone functions must be static. Please use these helpers:
|
59
|
+
#define SI static inline
|
60
|
+
#define SIT template < typename T> SI
|
61
|
+
#define SIN template <int N > SI
|
62
|
+
#define SINT template <int N, typename T> SI
|
63
|
+
#define SINTU template <int N, typename T, typename U, \
|
64
|
+
typename=std::enable_if_t<std::is_convertible<U,T>::value>> SI
|
65
|
+
|
66
|
+
namespace skvx {
|
67
|
+
|
68
|
+
template <int N, typename T>
|
69
|
+
struct alignas(N*sizeof(T)) Vec;
|
70
|
+
|
71
|
+
template <int... Ix, int N, typename T>
|
72
|
+
SI Vec<sizeof...(Ix),T> shuffle(const Vec<N,T>&);
|
73
|
+
|
74
|
+
template <typename D, typename S>
|
75
|
+
SI D bit_pun(const S&);
|
76
|
+
|
77
|
+
// All Vec have the same simple memory layout, the same as `T vec[N]`.
|
78
|
+
template <int N, typename T>
|
79
|
+
struct alignas(N*sizeof(T)) VecStorage {
|
80
|
+
SKVX_ALWAYS_INLINE VecStorage() = default;
|
81
|
+
SKVX_ALWAYS_INLINE VecStorage(T s) : lo(s), hi(s) {}
|
82
|
+
|
83
|
+
Vec<N/2,T> lo, hi;
|
84
|
+
};
|
85
|
+
|
86
|
+
template <typename T>
|
87
|
+
struct VecStorage<4,T> {
|
88
|
+
SKVX_ALWAYS_INLINE VecStorage() = default;
|
89
|
+
SKVX_ALWAYS_INLINE VecStorage(T s) : lo(s), hi(s) {}
|
90
|
+
SKVX_ALWAYS_INLINE VecStorage(T x, T y, T z, T w) : lo(x,y), hi(z, w) {}
|
91
|
+
SKVX_ALWAYS_INLINE VecStorage(Vec<2,T> xy, T z, T w) : lo(xy), hi(z,w) {}
|
92
|
+
SKVX_ALWAYS_INLINE VecStorage(T x, T y, Vec<2,T> zw) : lo(x,y), hi(zw) {}
|
93
|
+
SKVX_ALWAYS_INLINE VecStorage(Vec<2,T> xy, Vec<2,T> zw) : lo(xy), hi(zw) {}
|
94
|
+
|
95
|
+
SKVX_ALWAYS_INLINE Vec<2,T>& xy() { return lo; }
|
96
|
+
SKVX_ALWAYS_INLINE Vec<2,T>& zw() { return hi; }
|
97
|
+
SKVX_ALWAYS_INLINE T& x() { return lo.lo.val; }
|
98
|
+
SKVX_ALWAYS_INLINE T& y() { return lo.hi.val; }
|
99
|
+
SKVX_ALWAYS_INLINE T& z() { return hi.lo.val; }
|
100
|
+
SKVX_ALWAYS_INLINE T& w() { return hi.hi.val; }
|
101
|
+
|
102
|
+
SKVX_ALWAYS_INLINE Vec<2,T> xy() const { return lo; }
|
103
|
+
SKVX_ALWAYS_INLINE Vec<2,T> zw() const { return hi; }
|
104
|
+
SKVX_ALWAYS_INLINE T x() const { return lo.lo.val; }
|
105
|
+
SKVX_ALWAYS_INLINE T y() const { return lo.hi.val; }
|
106
|
+
SKVX_ALWAYS_INLINE T z() const { return hi.lo.val; }
|
107
|
+
SKVX_ALWAYS_INLINE T w() const { return hi.hi.val; }
|
108
|
+
|
109
|
+
// Exchange-based swizzles. These should take 1 cycle on NEON and 3 (pipelined) cycles on SSE.
|
110
|
+
SKVX_ALWAYS_INLINE Vec<4,T> yxwz() const { return shuffle<1,0,3,2>(bit_pun<Vec<4,T>>(*this)); }
|
111
|
+
SKVX_ALWAYS_INLINE Vec<4,T> zwxy() const { return shuffle<2,3,0,1>(bit_pun<Vec<4,T>>(*this)); }
|
112
|
+
|
113
|
+
Vec<2,T> lo, hi;
|
114
|
+
};
|
115
|
+
|
116
|
+
template <typename T>
|
117
|
+
struct VecStorage<2,T> {
|
118
|
+
SKVX_ALWAYS_INLINE VecStorage() = default;
|
119
|
+
SKVX_ALWAYS_INLINE VecStorage(T s) : lo(s), hi(s) {}
|
120
|
+
SKVX_ALWAYS_INLINE VecStorage(T x, T y) : lo(x), hi(y) {}
|
121
|
+
|
122
|
+
SKVX_ALWAYS_INLINE T& x() { return lo.val; }
|
123
|
+
SKVX_ALWAYS_INLINE T& y() { return hi.val; }
|
124
|
+
|
125
|
+
SKVX_ALWAYS_INLINE T x() const { return lo.val; }
|
126
|
+
SKVX_ALWAYS_INLINE T y() const { return hi.val; }
|
127
|
+
|
128
|
+
// This exchange-based swizzle should take 1 cycle on NEON and 3 (pipelined) cycles on SSE.
|
129
|
+
SKVX_ALWAYS_INLINE Vec<2,T> yx() const { return shuffle<1,0>(bit_pun<Vec<2,T>>(*this)); }
|
130
|
+
|
131
|
+
SKVX_ALWAYS_INLINE Vec<4,T> xyxy() const {
|
132
|
+
return Vec<4,T>(bit_pun<Vec<2,T>>(*this), bit_pun<Vec<2,T>>(*this));
|
133
|
+
}
|
134
|
+
|
135
|
+
Vec<1,T> lo, hi;
|
136
|
+
};
|
137
|
+
|
138
|
+
template <int N, typename T>
|
139
|
+
struct alignas(N*sizeof(T)) Vec : public VecStorage<N,T> {
|
140
|
+
static_assert((N & (N-1)) == 0, "N must be a power of 2.");
|
141
|
+
static_assert(sizeof(T) >= alignof(T), "What kind of unusual T is this?");
|
142
|
+
|
143
|
+
// Methods belong here in the class declaration of Vec only if:
|
144
|
+
// - they must be here, like constructors or operator[];
|
145
|
+
// - they'll definitely never want a specialized implementation.
|
146
|
+
// Other operations on Vec should be defined outside the type.
|
147
|
+
|
148
|
+
SKVX_ALWAYS_INLINE Vec() = default;
|
149
|
+
|
150
|
+
using VecStorage<N,T>::VecStorage;
|
151
|
+
|
152
|
+
SKVX_ALWAYS_INLINE Vec(std::initializer_list<T> xs) {
|
153
|
+
T vals[N] = {0};
|
154
|
+
memcpy(vals, xs.begin(), std::min(xs.size(), (size_t)N)*sizeof(T));
|
155
|
+
|
156
|
+
this->lo = Vec<N/2,T>::Load(vals + 0);
|
157
|
+
this->hi = Vec<N/2,T>::Load(vals + N/2);
|
158
|
+
}
|
159
|
+
|
160
|
+
SKVX_ALWAYS_INLINE T operator[](int i) const { return i<N/2 ? this->lo[i] : this->hi[i-N/2]; }
|
161
|
+
SKVX_ALWAYS_INLINE T& operator[](int i) { return i<N/2 ? this->lo[i] : this->hi[i-N/2]; }
|
162
|
+
|
163
|
+
SKVX_ALWAYS_INLINE static Vec Load(const void* ptr) {
|
164
|
+
Vec v;
|
165
|
+
memcpy(&v, ptr, sizeof(Vec));
|
166
|
+
return v;
|
167
|
+
}
|
168
|
+
SKVX_ALWAYS_INLINE void store(void* ptr) const {
|
169
|
+
memcpy(ptr, this, sizeof(Vec));
|
170
|
+
}
|
171
|
+
};
|
172
|
+
|
173
|
+
template <typename T>
|
174
|
+
struct Vec<1,T> {
|
175
|
+
T val;
|
176
|
+
|
177
|
+
SKVX_ALWAYS_INLINE Vec() = default;
|
178
|
+
|
179
|
+
Vec(T s) : val(s) {}
|
180
|
+
|
181
|
+
SKVX_ALWAYS_INLINE Vec(std::initializer_list<T> xs) : val(xs.size() ? *xs.begin() : 0) {}
|
182
|
+
|
183
|
+
SKVX_ALWAYS_INLINE T operator[](int) const { return val; }
|
184
|
+
SKVX_ALWAYS_INLINE T& operator[](int) { return val; }
|
185
|
+
|
186
|
+
SKVX_ALWAYS_INLINE static Vec Load(const void* ptr) {
|
187
|
+
Vec v;
|
188
|
+
memcpy(&v, ptr, sizeof(Vec));
|
189
|
+
return v;
|
190
|
+
}
|
191
|
+
SKVX_ALWAYS_INLINE void store(void* ptr) const {
|
192
|
+
memcpy(ptr, this, sizeof(Vec));
|
193
|
+
}
|
194
|
+
};
|
195
|
+
|
196
|
+
// Ideally we'd only use bit_pun(), but until this file is always built as C++17 with constexpr if,
|
197
|
+
// we'll sometimes find need to use unchecked_bit_pun(). Please do check the call sites yourself!
|
198
|
+
template <typename D, typename S>
|
199
|
+
SI D unchecked_bit_pun(const S& s) {
|
200
|
+
D d;
|
201
|
+
memcpy(&d, &s, sizeof(D));
|
202
|
+
return d;
|
203
|
+
}
|
204
|
+
|
205
|
+
template <typename D, typename S>
|
206
|
+
SI D bit_pun(const S& s) {
|
207
|
+
static_assert(sizeof(D) == sizeof(S), "");
|
208
|
+
return unchecked_bit_pun<D>(s);
|
209
|
+
}
|
210
|
+
|
211
|
+
// Translate from a value type T to its corresponding Mask, the result of a comparison.
|
212
|
+
template <typename T> struct Mask { using type = T; };
|
213
|
+
template <> struct Mask<float > { using type = int32_t; };
|
214
|
+
template <> struct Mask<double> { using type = int64_t; };
|
215
|
+
template <typename T> using M = typename Mask<T>::type;
|
216
|
+
|
217
|
+
// Join two Vec<N,T> into one Vec<2N,T>.
|
218
|
+
SINT Vec<2*N,T> join(const Vec<N,T>& lo, const Vec<N,T>& hi) {
|
219
|
+
Vec<2*N,T> v;
|
220
|
+
v.lo = lo;
|
221
|
+
v.hi = hi;
|
222
|
+
return v;
|
223
|
+
}
|
224
|
+
|
225
|
+
// We have three strategies for implementing Vec operations:
|
226
|
+
// 1) lean on Clang/GCC vector extensions when available;
|
227
|
+
// 2) use map() to apply a scalar function lane-wise;
|
228
|
+
// 3) recurse on lo/hi to scalar portable implementations.
|
229
|
+
// We can slot in platform-specific implementations as overloads for particular Vec<N,T>,
|
230
|
+
// or often integrate them directly into the recursion of style 3), allowing fine control.
|
231
|
+
|
232
|
+
#if SKVX_USE_SIMD && (defined(__clang__) || defined(__GNUC__))
|
233
|
+
|
234
|
+
// VExt<N,T> types have the same size as Vec<N,T> and support most operations directly.
|
235
|
+
#if defined(__clang__)
|
236
|
+
template <int N, typename T>
|
237
|
+
using VExt = T __attribute__((ext_vector_type(N)));
|
238
|
+
|
239
|
+
#elif defined(__GNUC__)
|
240
|
+
template <int N, typename T>
|
241
|
+
struct VExtHelper {
|
242
|
+
typedef T __attribute__((vector_size(N*sizeof(T)))) type;
|
243
|
+
};
|
244
|
+
|
245
|
+
template <int N, typename T>
|
246
|
+
using VExt = typename VExtHelper<N,T>::type;
|
247
|
+
|
248
|
+
// For some reason some (new!) versions of GCC cannot seem to deduce N in the generic
|
249
|
+
// to_vec<N,T>() below for N=4 and T=float. This workaround seems to help...
|
250
|
+
SI Vec<4,float> to_vec(VExt<4,float> v) { return bit_pun<Vec<4,float>>(v); }
|
251
|
+
#endif
|
252
|
+
|
253
|
+
SINT VExt<N,T> to_vext(const Vec<N,T>& v) { return bit_pun<VExt<N,T>>(v); }
|
254
|
+
SINT Vec <N,T> to_vec(const VExt<N,T>& v) { return bit_pun<Vec <N,T>>(v); }
|
255
|
+
|
256
|
+
SINT Vec<N,T> operator+(const Vec<N,T>& x, const Vec<N,T>& y) {
|
257
|
+
return to_vec<N,T>(to_vext(x) + to_vext(y));
|
258
|
+
}
|
259
|
+
SINT Vec<N,T> operator-(const Vec<N,T>& x, const Vec<N,T>& y) {
|
260
|
+
return to_vec<N,T>(to_vext(x) - to_vext(y));
|
261
|
+
}
|
262
|
+
SINT Vec<N,T> operator*(const Vec<N,T>& x, const Vec<N,T>& y) {
|
263
|
+
return to_vec<N,T>(to_vext(x) * to_vext(y));
|
264
|
+
}
|
265
|
+
SINT Vec<N,T> operator/(const Vec<N,T>& x, const Vec<N,T>& y) {
|
266
|
+
return to_vec<N,T>(to_vext(x) / to_vext(y));
|
267
|
+
}
|
268
|
+
|
269
|
+
SINT Vec<N,T> operator^(const Vec<N,T>& x, const Vec<N,T>& y) {
|
270
|
+
return to_vec<N,T>(to_vext(x) ^ to_vext(y));
|
271
|
+
}
|
272
|
+
SINT Vec<N,T> operator&(const Vec<N,T>& x, const Vec<N,T>& y) {
|
273
|
+
return to_vec<N,T>(to_vext(x) & to_vext(y));
|
274
|
+
}
|
275
|
+
SINT Vec<N,T> operator|(const Vec<N,T>& x, const Vec<N,T>& y) {
|
276
|
+
return to_vec<N,T>(to_vext(x) | to_vext(y));
|
277
|
+
}
|
278
|
+
|
279
|
+
SINT Vec<N,T> operator!(const Vec<N,T>& x) { return to_vec<N,T>(!to_vext(x)); }
|
280
|
+
SINT Vec<N,T> operator-(const Vec<N,T>& x) { return to_vec<N,T>(-to_vext(x)); }
|
281
|
+
SINT Vec<N,T> operator~(const Vec<N,T>& x) { return to_vec<N,T>(~to_vext(x)); }
|
282
|
+
|
283
|
+
SINT Vec<N,T> operator<<(const Vec<N,T>& x, int k) { return to_vec<N,T>(to_vext(x) << k); }
|
284
|
+
SINT Vec<N,T> operator>>(const Vec<N,T>& x, int k) { return to_vec<N,T>(to_vext(x) >> k); }
|
285
|
+
|
286
|
+
SINT Vec<N,M<T>> operator==(const Vec<N,T>& x, const Vec<N,T>& y) {
|
287
|
+
return bit_pun<Vec<N,M<T>>>(to_vext(x) == to_vext(y));
|
288
|
+
}
|
289
|
+
SINT Vec<N,M<T>> operator!=(const Vec<N,T>& x, const Vec<N,T>& y) {
|
290
|
+
return bit_pun<Vec<N,M<T>>>(to_vext(x) != to_vext(y));
|
291
|
+
}
|
292
|
+
SINT Vec<N,M<T>> operator<=(const Vec<N,T>& x, const Vec<N,T>& y) {
|
293
|
+
return bit_pun<Vec<N,M<T>>>(to_vext(x) <= to_vext(y));
|
294
|
+
}
|
295
|
+
SINT Vec<N,M<T>> operator>=(const Vec<N,T>& x, const Vec<N,T>& y) {
|
296
|
+
return bit_pun<Vec<N,M<T>>>(to_vext(x) >= to_vext(y));
|
297
|
+
}
|
298
|
+
SINT Vec<N,M<T>> operator< (const Vec<N,T>& x, const Vec<N,T>& y) {
|
299
|
+
return bit_pun<Vec<N,M<T>>>(to_vext(x) < to_vext(y));
|
300
|
+
}
|
301
|
+
SINT Vec<N,M<T>> operator> (const Vec<N,T>& x, const Vec<N,T>& y) {
|
302
|
+
return bit_pun<Vec<N,M<T>>>(to_vext(x) > to_vext(y));
|
303
|
+
}
|
304
|
+
|
305
|
+
#else
|
306
|
+
|
307
|
+
// Either SKNX_NO_SIMD is defined, or Clang/GCC vector extensions are not available.
|
308
|
+
// We'll implement things portably with N==1 scalar implementations and recursion onto them.
|
309
|
+
|
310
|
+
// N == 1 scalar implementations.
|
311
|
+
SIT Vec<1,T> operator+(const Vec<1,T>& x, const Vec<1,T>& y) { return x.val + y.val; }
|
312
|
+
SIT Vec<1,T> operator-(const Vec<1,T>& x, const Vec<1,T>& y) { return x.val - y.val; }
|
313
|
+
SIT Vec<1,T> operator*(const Vec<1,T>& x, const Vec<1,T>& y) { return x.val * y.val; }
|
314
|
+
SIT Vec<1,T> operator/(const Vec<1,T>& x, const Vec<1,T>& y) { return x.val / y.val; }
|
315
|
+
|
316
|
+
SIT Vec<1,T> operator^(const Vec<1,T>& x, const Vec<1,T>& y) { return x.val ^ y.val; }
|
317
|
+
SIT Vec<1,T> operator&(const Vec<1,T>& x, const Vec<1,T>& y) { return x.val & y.val; }
|
318
|
+
SIT Vec<1,T> operator|(const Vec<1,T>& x, const Vec<1,T>& y) { return x.val | y.val; }
|
319
|
+
|
320
|
+
SIT Vec<1,T> operator!(const Vec<1,T>& x) { return !x.val; }
|
321
|
+
SIT Vec<1,T> operator-(const Vec<1,T>& x) { return -x.val; }
|
322
|
+
SIT Vec<1,T> operator~(const Vec<1,T>& x) { return ~x.val; }
|
323
|
+
|
324
|
+
SIT Vec<1,T> operator<<(const Vec<1,T>& x, int k) { return x.val << k; }
|
325
|
+
SIT Vec<1,T> operator>>(const Vec<1,T>& x, int k) { return x.val >> k; }
|
326
|
+
|
327
|
+
SIT Vec<1,M<T>> operator==(const Vec<1,T>& x, const Vec<1,T>& y) {
|
328
|
+
return x.val == y.val ? ~0 : 0;
|
329
|
+
}
|
330
|
+
SIT Vec<1,M<T>> operator!=(const Vec<1,T>& x, const Vec<1,T>& y) {
|
331
|
+
return x.val != y.val ? ~0 : 0;
|
332
|
+
}
|
333
|
+
SIT Vec<1,M<T>> operator<=(const Vec<1,T>& x, const Vec<1,T>& y) {
|
334
|
+
return x.val <= y.val ? ~0 : 0;
|
335
|
+
}
|
336
|
+
SIT Vec<1,M<T>> operator>=(const Vec<1,T>& x, const Vec<1,T>& y) {
|
337
|
+
return x.val >= y.val ? ~0 : 0;
|
338
|
+
}
|
339
|
+
SIT Vec<1,M<T>> operator< (const Vec<1,T>& x, const Vec<1,T>& y) {
|
340
|
+
return x.val < y.val ? ~0 : 0;
|
341
|
+
}
|
342
|
+
SIT Vec<1,M<T>> operator> (const Vec<1,T>& x, const Vec<1,T>& y) {
|
343
|
+
return x.val > y.val ? ~0 : 0;
|
344
|
+
}
|
345
|
+
|
346
|
+
// Recurse on lo/hi down to N==1 scalar implementations.
|
347
|
+
SINT Vec<N,T> operator+(const Vec<N,T>& x, const Vec<N,T>& y) {
|
348
|
+
return join(x.lo + y.lo, x.hi + y.hi);
|
349
|
+
}
|
350
|
+
SINT Vec<N,T> operator-(const Vec<N,T>& x, const Vec<N,T>& y) {
|
351
|
+
return join(x.lo - y.lo, x.hi - y.hi);
|
352
|
+
}
|
353
|
+
SINT Vec<N,T> operator*(const Vec<N,T>& x, const Vec<N,T>& y) {
|
354
|
+
return join(x.lo * y.lo, x.hi * y.hi);
|
355
|
+
}
|
356
|
+
SINT Vec<N,T> operator/(const Vec<N,T>& x, const Vec<N,T>& y) {
|
357
|
+
return join(x.lo / y.lo, x.hi / y.hi);
|
358
|
+
}
|
359
|
+
|
360
|
+
SINT Vec<N,T> operator^(const Vec<N,T>& x, const Vec<N,T>& y) {
|
361
|
+
return join(x.lo ^ y.lo, x.hi ^ y.hi);
|
362
|
+
}
|
363
|
+
SINT Vec<N,T> operator&(const Vec<N,T>& x, const Vec<N,T>& y) {
|
364
|
+
return join(x.lo & y.lo, x.hi & y.hi);
|
365
|
+
}
|
366
|
+
SINT Vec<N,T> operator|(const Vec<N,T>& x, const Vec<N,T>& y) {
|
367
|
+
return join(x.lo | y.lo, x.hi | y.hi);
|
368
|
+
}
|
369
|
+
|
370
|
+
SINT Vec<N,T> operator!(const Vec<N,T>& x) { return join(!x.lo, !x.hi); }
|
371
|
+
SINT Vec<N,T> operator-(const Vec<N,T>& x) { return join(-x.lo, -x.hi); }
|
372
|
+
SINT Vec<N,T> operator~(const Vec<N,T>& x) { return join(~x.lo, ~x.hi); }
|
373
|
+
|
374
|
+
SINT Vec<N,T> operator<<(const Vec<N,T>& x, int k) { return join(x.lo << k, x.hi << k); }
|
375
|
+
SINT Vec<N,T> operator>>(const Vec<N,T>& x, int k) { return join(x.lo >> k, x.hi >> k); }
|
376
|
+
|
377
|
+
SINT Vec<N,M<T>> operator==(const Vec<N,T>& x, const Vec<N,T>& y) {
|
378
|
+
return join(x.lo == y.lo, x.hi == y.hi);
|
379
|
+
}
|
380
|
+
SINT Vec<N,M<T>> operator!=(const Vec<N,T>& x, const Vec<N,T>& y) {
|
381
|
+
return join(x.lo != y.lo, x.hi != y.hi);
|
382
|
+
}
|
383
|
+
SINT Vec<N,M<T>> operator<=(const Vec<N,T>& x, const Vec<N,T>& y) {
|
384
|
+
return join(x.lo <= y.lo, x.hi <= y.hi);
|
385
|
+
}
|
386
|
+
SINT Vec<N,M<T>> operator>=(const Vec<N,T>& x, const Vec<N,T>& y) {
|
387
|
+
return join(x.lo >= y.lo, x.hi >= y.hi);
|
388
|
+
}
|
389
|
+
SINT Vec<N,M<T>> operator< (const Vec<N,T>& x, const Vec<N,T>& y) {
|
390
|
+
return join(x.lo < y.lo, x.hi < y.hi);
|
391
|
+
}
|
392
|
+
SINT Vec<N,M<T>> operator> (const Vec<N,T>& x, const Vec<N,T>& y) {
|
393
|
+
return join(x.lo > y.lo, x.hi > y.hi);
|
394
|
+
}
|
395
|
+
#endif
|
396
|
+
|
397
|
+
// Scalar/vector operations splat the scalar to a vector.
|
398
|
+
SINTU Vec<N,T> operator+ (U x, const Vec<N,T>& y) { return Vec<N,T>(x) + y; }
|
399
|
+
SINTU Vec<N,T> operator- (U x, const Vec<N,T>& y) { return Vec<N,T>(x) - y; }
|
400
|
+
SINTU Vec<N,T> operator* (U x, const Vec<N,T>& y) { return Vec<N,T>(x) * y; }
|
401
|
+
SINTU Vec<N,T> operator/ (U x, const Vec<N,T>& y) { return Vec<N,T>(x) / y; }
|
402
|
+
SINTU Vec<N,T> operator^ (U x, const Vec<N,T>& y) { return Vec<N,T>(x) ^ y; }
|
403
|
+
SINTU Vec<N,T> operator& (U x, const Vec<N,T>& y) { return Vec<N,T>(x) & y; }
|
404
|
+
SINTU Vec<N,T> operator| (U x, const Vec<N,T>& y) { return Vec<N,T>(x) | y; }
|
405
|
+
SINTU Vec<N,M<T>> operator==(U x, const Vec<N,T>& y) { return Vec<N,T>(x) == y; }
|
406
|
+
SINTU Vec<N,M<T>> operator!=(U x, const Vec<N,T>& y) { return Vec<N,T>(x) != y; }
|
407
|
+
SINTU Vec<N,M<T>> operator<=(U x, const Vec<N,T>& y) { return Vec<N,T>(x) <= y; }
|
408
|
+
SINTU Vec<N,M<T>> operator>=(U x, const Vec<N,T>& y) { return Vec<N,T>(x) >= y; }
|
409
|
+
SINTU Vec<N,M<T>> operator< (U x, const Vec<N,T>& y) { return Vec<N,T>(x) < y; }
|
410
|
+
SINTU Vec<N,M<T>> operator> (U x, const Vec<N,T>& y) { return Vec<N,T>(x) > y; }
|
411
|
+
|
412
|
+
SINTU Vec<N,T> operator+ (const Vec<N,T>& x, U y) { return x + Vec<N,T>(y); }
|
413
|
+
SINTU Vec<N,T> operator- (const Vec<N,T>& x, U y) { return x - Vec<N,T>(y); }
|
414
|
+
SINTU Vec<N,T> operator* (const Vec<N,T>& x, U y) { return x * Vec<N,T>(y); }
|
415
|
+
SINTU Vec<N,T> operator/ (const Vec<N,T>& x, U y) { return x / Vec<N,T>(y); }
|
416
|
+
SINTU Vec<N,T> operator^ (const Vec<N,T>& x, U y) { return x ^ Vec<N,T>(y); }
|
417
|
+
SINTU Vec<N,T> operator& (const Vec<N,T>& x, U y) { return x & Vec<N,T>(y); }
|
418
|
+
SINTU Vec<N,T> operator| (const Vec<N,T>& x, U y) { return x | Vec<N,T>(y); }
|
419
|
+
SINTU Vec<N,M<T>> operator==(const Vec<N,T>& x, U y) { return x == Vec<N,T>(y); }
|
420
|
+
SINTU Vec<N,M<T>> operator!=(const Vec<N,T>& x, U y) { return x != Vec<N,T>(y); }
|
421
|
+
SINTU Vec<N,M<T>> operator<=(const Vec<N,T>& x, U y) { return x <= Vec<N,T>(y); }
|
422
|
+
SINTU Vec<N,M<T>> operator>=(const Vec<N,T>& x, U y) { return x >= Vec<N,T>(y); }
|
423
|
+
SINTU Vec<N,M<T>> operator< (const Vec<N,T>& x, U y) { return x < Vec<N,T>(y); }
|
424
|
+
SINTU Vec<N,M<T>> operator> (const Vec<N,T>& x, U y) { return x > Vec<N,T>(y); }
|
425
|
+
|
426
|
+
SINT Vec<N,T>& operator+=(Vec<N,T>& x, const Vec<N,T>& y) { return (x = x + y); }
|
427
|
+
SINT Vec<N,T>& operator-=(Vec<N,T>& x, const Vec<N,T>& y) { return (x = x - y); }
|
428
|
+
SINT Vec<N,T>& operator*=(Vec<N,T>& x, const Vec<N,T>& y) { return (x = x * y); }
|
429
|
+
SINT Vec<N,T>& operator/=(Vec<N,T>& x, const Vec<N,T>& y) { return (x = x / y); }
|
430
|
+
SINT Vec<N,T>& operator^=(Vec<N,T>& x, const Vec<N,T>& y) { return (x = x ^ y); }
|
431
|
+
SINT Vec<N,T>& operator&=(Vec<N,T>& x, const Vec<N,T>& y) { return (x = x & y); }
|
432
|
+
SINT Vec<N,T>& operator|=(Vec<N,T>& x, const Vec<N,T>& y) { return (x = x | y); }
|
433
|
+
|
434
|
+
SINTU Vec<N,T>& operator+=(Vec<N,T>& x, U y) { return (x = x + Vec<N,T>(y)); }
|
435
|
+
SINTU Vec<N,T>& operator-=(Vec<N,T>& x, U y) { return (x = x - Vec<N,T>(y)); }
|
436
|
+
SINTU Vec<N,T>& operator*=(Vec<N,T>& x, U y) { return (x = x * Vec<N,T>(y)); }
|
437
|
+
SINTU Vec<N,T>& operator/=(Vec<N,T>& x, U y) { return (x = x / Vec<N,T>(y)); }
|
438
|
+
SINTU Vec<N,T>& operator^=(Vec<N,T>& x, U y) { return (x = x ^ Vec<N,T>(y)); }
|
439
|
+
SINTU Vec<N,T>& operator&=(Vec<N,T>& x, U y) { return (x = x & Vec<N,T>(y)); }
|
440
|
+
SINTU Vec<N,T>& operator|=(Vec<N,T>& x, U y) { return (x = x | Vec<N,T>(y)); }
|
441
|
+
|
442
|
+
SINT Vec<N,T>& operator<<=(Vec<N,T>& x, int bits) { return (x = x << bits); }
|
443
|
+
SINT Vec<N,T>& operator>>=(Vec<N,T>& x, int bits) { return (x = x >> bits); }
|
444
|
+
|
445
|
+
// Some operations we want are not expressible with Clang/GCC vector extensions.
|
446
|
+
|
447
|
+
// Clang can reason about naive_if_then_else() and optimize through it better
|
448
|
+
// than if_then_else(), so it's sometimes useful to call it directly when we
|
449
|
+
// think an entire expression should optimize away, e.g. min()/max().
|
450
|
+
SINT Vec<N,T> naive_if_then_else(const Vec<N,M<T>>& cond, const Vec<N,T>& t, const Vec<N,T>& e) {
|
451
|
+
return bit_pun<Vec<N,T>>(( cond & bit_pun<Vec<N, M<T>>>(t)) |
|
452
|
+
(~cond & bit_pun<Vec<N, M<T>>>(e)) );
|
453
|
+
}
|
454
|
+
|
455
|
+
SIT Vec<1,T> if_then_else(const Vec<1,M<T>>& cond, const Vec<1,T>& t, const Vec<1,T>& e) {
|
456
|
+
// In practice this scalar implementation is unlikely to be used. See next if_then_else().
|
457
|
+
return bit_pun<Vec<1,T>>(( cond & bit_pun<Vec<1, M<T>>>(t)) |
|
458
|
+
(~cond & bit_pun<Vec<1, M<T>>>(e)) );
|
459
|
+
}
|
460
|
+
SINT Vec<N,T> if_then_else(const Vec<N,M<T>>& cond, const Vec<N,T>& t, const Vec<N,T>& e) {
|
461
|
+
// Specializations inline here so they can generalize what types the apply to.
|
462
|
+
// (This header is used in C++14 contexts, so we have to kind of fake constexpr if.)
|
463
|
+
#if SKVX_USE_SIMD && defined(__AVX2__)
|
464
|
+
if /*constexpr*/ (N*sizeof(T) == 32) {
|
465
|
+
return unchecked_bit_pun<Vec<N,T>>(_mm256_blendv_epi8(unchecked_bit_pun<__m256i>(e),
|
466
|
+
unchecked_bit_pun<__m256i>(t),
|
467
|
+
unchecked_bit_pun<__m256i>(cond)));
|
468
|
+
}
|
469
|
+
#endif
|
470
|
+
#if SKVX_USE_SIMD && defined(__SSE4_1__)
|
471
|
+
if /*constexpr*/ (N*sizeof(T) == 16) {
|
472
|
+
return unchecked_bit_pun<Vec<N,T>>(_mm_blendv_epi8(unchecked_bit_pun<__m128i>(e),
|
473
|
+
unchecked_bit_pun<__m128i>(t),
|
474
|
+
unchecked_bit_pun<__m128i>(cond)));
|
475
|
+
}
|
476
|
+
#endif
|
477
|
+
#if SKVX_USE_SIMD && defined(__ARM_NEON)
|
478
|
+
if /*constexpr*/ (N*sizeof(T) == 16) {
|
479
|
+
return unchecked_bit_pun<Vec<N,T>>(vbslq_u8(unchecked_bit_pun<uint8x16_t>(cond),
|
480
|
+
unchecked_bit_pun<uint8x16_t>(t),
|
481
|
+
unchecked_bit_pun<uint8x16_t>(e)));
|
482
|
+
}
|
483
|
+
#endif
|
484
|
+
// Recurse for large vectors to try to hit the specializations above.
|
485
|
+
if /*constexpr*/ (N*sizeof(T) > 16) {
|
486
|
+
return join(if_then_else(cond.lo, t.lo, e.lo),
|
487
|
+
if_then_else(cond.hi, t.hi, e.hi));
|
488
|
+
}
|
489
|
+
// This default can lead to better code than the recursing onto scalars.
|
490
|
+
return naive_if_then_else(cond, t, e);
|
491
|
+
}
|
492
|
+
|
493
|
+
SIT bool any(const Vec<1,T>& x) { return x.val != 0; }
|
494
|
+
SINT bool any(const Vec<N,T>& x) {
|
495
|
+
#if SKVX_USE_SIMD && defined(__wasm_simd128__)
|
496
|
+
if constexpr (N == 4 && sizeof(T) == 4) {
|
497
|
+
return wasm_i32x4_any_true(unchecked_bit_pun<VExt<4,int>>(x));
|
498
|
+
}
|
499
|
+
#endif
|
500
|
+
return any(x.lo)
|
501
|
+
|| any(x.hi);
|
502
|
+
}
|
503
|
+
|
504
|
+
SIT bool all(const Vec<1,T>& x) { return x.val != 0; }
|
505
|
+
SINT bool all(const Vec<N,T>& x) {
|
506
|
+
#if SKVX_USE_SIMD && defined(__AVX2__)
|
507
|
+
if /*constexpr*/ (N*sizeof(T) == 32) {
|
508
|
+
return _mm256_testc_si256(unchecked_bit_pun<__m256i>(x),
|
509
|
+
_mm256_set1_epi32(-1));
|
510
|
+
}
|
511
|
+
#endif
|
512
|
+
#if SKVX_USE_SIMD && defined(__SSE4_1__)
|
513
|
+
if /*constexpr*/ (N*sizeof(T) == 16) {
|
514
|
+
return _mm_testc_si128(unchecked_bit_pun<__m128i>(x),
|
515
|
+
_mm_set1_epi32(-1));
|
516
|
+
}
|
517
|
+
#endif
|
518
|
+
#if SKVX_USE_SIMD && defined(__wasm_simd128__)
|
519
|
+
if /*constexpr*/ (N == 4 && sizeof(T) == 4) {
|
520
|
+
return wasm_i32x4_all_true(unchecked_bit_pun<VExt<4,int>>(x));
|
521
|
+
}
|
522
|
+
#endif
|
523
|
+
return all(x.lo)
|
524
|
+
&& all(x.hi);
|
525
|
+
}
|
526
|
+
|
527
|
+
// cast() Vec<N,S> to Vec<N,D>, as if applying a C-cast to each lane.
|
528
|
+
// TODO: implement with map()?
|
529
|
+
template <typename D, typename S>
|
530
|
+
SI Vec<1,D> cast(const Vec<1,S>& src) { return (D)src.val; }
|
531
|
+
|
532
|
+
template <typename D, int N, typename S>
|
533
|
+
SI Vec<N,D> cast(const Vec<N,S>& src) {
|
534
|
+
#if SKVX_USE_SIMD && defined(__clang__)
|
535
|
+
return to_vec(__builtin_convertvector(to_vext(src), VExt<N,D>));
|
536
|
+
#else
|
537
|
+
return join(cast<D>(src.lo), cast<D>(src.hi));
|
538
|
+
#endif
|
539
|
+
}
|
540
|
+
|
541
|
+
// min/max match logic of std::min/std::max, which is important when NaN is involved.
|
542
|
+
SIT T min(const Vec<1,T>& x) { return x.val; }
|
543
|
+
SIT T max(const Vec<1,T>& x) { return x.val; }
|
544
|
+
SINT T min(const Vec<N,T>& x) { return std::min(min(x.lo), min(x.hi)); }
|
545
|
+
SINT T max(const Vec<N,T>& x) { return std::max(max(x.lo), max(x.hi)); }
|
546
|
+
|
547
|
+
SINT Vec<N,T> min(const Vec<N,T>& x, const Vec<N,T>& y) { return naive_if_then_else(y < x, y, x); }
|
548
|
+
SINT Vec<N,T> max(const Vec<N,T>& x, const Vec<N,T>& y) { return naive_if_then_else(x < y, y, x); }
|
549
|
+
|
550
|
+
SINTU Vec<N,T> min(const Vec<N,T>& x, U y) { return min(x, Vec<N,T>(y)); }
|
551
|
+
SINTU Vec<N,T> max(const Vec<N,T>& x, U y) { return max(x, Vec<N,T>(y)); }
|
552
|
+
SINTU Vec<N,T> min(U x, const Vec<N,T>& y) { return min(Vec<N,T>(x), y); }
|
553
|
+
SINTU Vec<N,T> max(U x, const Vec<N,T>& y) { return max(Vec<N,T>(x), y); }
|
554
|
+
|
555
|
+
// pin matches the logic of SkTPin, which is important when NaN is involved. It always returns
|
556
|
+
// values in the range lo..hi, and if x is NaN, it returns lo.
|
557
|
+
SINT Vec<N,T> pin(const Vec<N,T>& x, const Vec<N,T>& lo, const Vec<N,T>& hi) {
|
558
|
+
return max(lo, min(x, hi));
|
559
|
+
}
|
560
|
+
|
561
|
+
// Shuffle values from a vector pretty arbitrarily:
|
562
|
+
// skvx::Vec<4,float> rgba = {R,G,B,A};
|
563
|
+
// shuffle<2,1,0,3> (rgba) ~> {B,G,R,A}
|
564
|
+
// shuffle<2,1> (rgba) ~> {B,G}
|
565
|
+
// shuffle<2,1,2,1,2,1,2,1>(rgba) ~> {B,G,B,G,B,G,B,G}
|
566
|
+
// shuffle<3,3,3,3> (rgba) ~> {A,A,A,A}
|
567
|
+
// The only real restriction is that the output also be a legal N=power-of-two sknx::Vec.
|
568
|
+
template <int... Ix, int N, typename T>
|
569
|
+
SI Vec<sizeof...(Ix),T> shuffle(const Vec<N,T>& x) {
|
570
|
+
#if SKVX_USE_SIMD && defined(__clang__)
|
571
|
+
// TODO: can we just always use { x[Ix]... }?
|
572
|
+
return to_vec<sizeof...(Ix),T>(__builtin_shufflevector(to_vext(x), to_vext(x), Ix...));
|
573
|
+
#else
|
574
|
+
return { x[Ix]... };
|
575
|
+
#endif
|
576
|
+
}
|
577
|
+
|
578
|
+
// Call map(fn, x) for a vector with fn() applied to each lane of x, { fn(x[0]), fn(x[1]), ... },
|
579
|
+
// or map(fn, x,y) for a vector of fn(x[i], y[i]), etc.
|
580
|
+
|
581
|
+
template <typename Fn, typename... Args, size_t... I>
|
582
|
+
SI auto map(std::index_sequence<I...>,
|
583
|
+
Fn&& fn, const Args&... args) -> skvx::Vec<sizeof...(I), decltype(fn(args[0]...))> {
|
584
|
+
auto lane = [&](size_t i)
|
585
|
+
#if defined(__clang__)
|
586
|
+
// CFI, specifically -fsanitize=cfi-icall, seems to give a false positive here,
|
587
|
+
// with errors like "control flow integrity check for type 'float (float)
|
588
|
+
// noexcept' failed during indirect function call... note: sqrtf.cfi_jt defined
|
589
|
+
// here". But we can be quite sure fn is the right type: it's all inferred!
|
590
|
+
// So, stifle CFI in this function.
|
591
|
+
__attribute__((no_sanitize("cfi")))
|
592
|
+
#endif
|
593
|
+
{ return fn(args[i]...); };
|
594
|
+
|
595
|
+
return { lane(I)... };
|
596
|
+
}
|
597
|
+
|
598
|
+
template <typename Fn, int N, typename T, typename... Rest>
|
599
|
+
auto map(Fn&& fn, const Vec<N,T>& first, const Rest&... rest) {
|
600
|
+
// Derive an {0...N-1} index_sequence from the size of the first arg: N lanes in, N lanes out.
|
601
|
+
return map(std::make_index_sequence<N>{}, fn, first,rest...);
|
602
|
+
}
|
603
|
+
|
604
|
+
SIN Vec<N,float> ceil(const Vec<N,float>& x) { return map( ceilf, x); }
|
605
|
+
SIN Vec<N,float> floor(const Vec<N,float>& x) { return map(floorf, x); }
|
606
|
+
SIN Vec<N,float> trunc(const Vec<N,float>& x) { return map(truncf, x); }
|
607
|
+
SIN Vec<N,float> round(const Vec<N,float>& x) { return map(roundf, x); }
|
608
|
+
SIN Vec<N,float> sqrt(const Vec<N,float>& x) { return map( sqrtf, x); }
|
609
|
+
SIN Vec<N,float> abs(const Vec<N,float>& x) { return map( fabsf, x); }
|
610
|
+
SIN Vec<N,float> fma(const Vec<N,float>& x,
|
611
|
+
const Vec<N,float>& y,
|
612
|
+
const Vec<N,float>& z) {
|
613
|
+
// I don't understand why Clang's codegen is terrible if we write map(fmaf, x,y,z) directly.
|
614
|
+
auto fn = [](float x, float y, float z) { return fmaf(x,y,z); };
|
615
|
+
return map(fn, x,y,z);
|
616
|
+
}
|
617
|
+
|
618
|
+
SI Vec<1,int> lrint(const Vec<1,float>& x) {
|
619
|
+
return (int)lrintf(x.val);
|
620
|
+
}
|
621
|
+
SIN Vec<N,int> lrint(const Vec<N,float>& x) {
|
622
|
+
#if SKVX_USE_SIMD && defined(__AVX__)
|
623
|
+
if /*constexpr*/ (N == 8) {
|
624
|
+
return unchecked_bit_pun<Vec<N,int>>(_mm256_cvtps_epi32(unchecked_bit_pun<__m256>(x)));
|
625
|
+
}
|
626
|
+
#endif
|
627
|
+
#if SKVX_USE_SIMD && defined(__SSE__)
|
628
|
+
if /*constexpr*/ (N == 4) {
|
629
|
+
return unchecked_bit_pun<Vec<N,int>>(_mm_cvtps_epi32(unchecked_bit_pun<__m128>(x)));
|
630
|
+
}
|
631
|
+
#endif
|
632
|
+
return join(lrint(x.lo),
|
633
|
+
lrint(x.hi));
|
634
|
+
}
|
635
|
+
|
636
|
+
SIN Vec<N,float> fract(const Vec<N,float>& x) { return x - floor(x); }
|
637
|
+
|
638
|
+
// The default logic for to_half/from_half is borrowed from skcms,
|
639
|
+
// and assumes inputs are finite and treat/flush denorm half floats as/to zero.
|
640
|
+
// Key constants to watch for:
|
641
|
+
// - a float is 32-bit, 1-8-23 sign-exponent-mantissa, with 127 exponent bias;
|
642
|
+
// - a half is 16-bit, 1-5-10 sign-exponent-mantissa, with 15 exponent bias.
|
643
|
+
SIN Vec<N,uint16_t> to_half_finite_ftz(const Vec<N,float>& x) {
|
644
|
+
Vec<N,uint32_t> sem = bit_pun<Vec<N,uint32_t>>(x),
|
645
|
+
s = sem & 0x8000'0000,
|
646
|
+
em = sem ^ s,
|
647
|
+
is_denorm = em < 0x3880'0000;
|
648
|
+
return cast<uint16_t>(if_then_else(is_denorm, Vec<N,uint32_t>(0)
|
649
|
+
, (s>>16) + (em>>13) - ((127-15)<<10)));
|
650
|
+
}
|
651
|
+
SIN Vec<N,float> from_half_finite_ftz(const Vec<N,uint16_t>& x) {
|
652
|
+
Vec<N,uint32_t> wide = cast<uint32_t>(x),
|
653
|
+
s = wide & 0x8000,
|
654
|
+
em = wide ^ s;
|
655
|
+
auto is_denorm = bit_pun<Vec<N,int32_t>>(em < 0x0400);
|
656
|
+
return if_then_else(is_denorm, Vec<N,float>(0)
|
657
|
+
, bit_pun<Vec<N,float>>( (s<<16) + (em<<13) + ((127-15)<<23) ));
|
658
|
+
}
|
659
|
+
|
660
|
+
// Like if_then_else(), these N=1 base cases won't actually be used unless explicitly called.
|
661
|
+
SI Vec<1,uint16_t> to_half(const Vec<1,float>& x) { return to_half_finite_ftz(x); }
|
662
|
+
SI Vec<1,float> from_half(const Vec<1,uint16_t>& x) { return from_half_finite_ftz(x); }
|
663
|
+
|
664
|
+
SIN Vec<N,uint16_t> to_half(const Vec<N,float>& x) {
|
665
|
+
#if SKVX_USE_SIMD && defined(__F16C__)
|
666
|
+
if /*constexpr*/ (N == 8) {
|
667
|
+
return unchecked_bit_pun<Vec<N,uint16_t>>(_mm256_cvtps_ph(unchecked_bit_pun<__m256>(x),
|
668
|
+
_MM_FROUND_CUR_DIRECTION));
|
669
|
+
}
|
670
|
+
#endif
|
671
|
+
#if SKVX_USE_SIMD && defined(__aarch64__)
|
672
|
+
if /*constexpr*/ (N == 4) {
|
673
|
+
return unchecked_bit_pun<Vec<N,uint16_t>>(vcvt_f16_f32(unchecked_bit_pun<float32x4_t>(x)));
|
674
|
+
|
675
|
+
}
|
676
|
+
#endif
|
677
|
+
if /*constexpr*/ (N > 4) {
|
678
|
+
return join(to_half(x.lo),
|
679
|
+
to_half(x.hi));
|
680
|
+
}
|
681
|
+
return to_half_finite_ftz(x);
|
682
|
+
}
|
683
|
+
|
684
|
+
SIN Vec<N,float> from_half(const Vec<N,uint16_t>& x) {
|
685
|
+
#if SKVX_USE_SIMD && defined(__F16C__)
|
686
|
+
if /*constexpr*/ (N == 8) {
|
687
|
+
return unchecked_bit_pun<Vec<N,float>>(_mm256_cvtph_ps(unchecked_bit_pun<__m128i>(x)));
|
688
|
+
}
|
689
|
+
#endif
|
690
|
+
#if SKVX_USE_SIMD && defined(__aarch64__)
|
691
|
+
if /*constexpr*/ (N == 4) {
|
692
|
+
return unchecked_bit_pun<Vec<N,float>>(vcvt_f32_f16(unchecked_bit_pun<float16x4_t>(x)));
|
693
|
+
}
|
694
|
+
#endif
|
695
|
+
if /*constexpr*/ (N > 4) {
|
696
|
+
return join(from_half(x.lo),
|
697
|
+
from_half(x.hi));
|
698
|
+
}
|
699
|
+
return from_half_finite_ftz(x);
|
700
|
+
}
|
701
|
+
|
702
|
+
// div255(x) = (x + 127) / 255 is a bit-exact rounding divide-by-255, packing down to 8-bit.
|
703
|
+
SIN Vec<N,uint8_t> div255(const Vec<N,uint16_t>& x) {
|
704
|
+
return cast<uint8_t>( (x+127)/255 );
|
705
|
+
}
|
706
|
+
|
707
|
+
// approx_scale(x,y) approximates div255(cast<uint16_t>(x)*cast<uint16_t>(y)) within a bit,
|
708
|
+
// and is always perfect when x or y is 0 or 255.
|
709
|
+
SIN Vec<N,uint8_t> approx_scale(const Vec<N,uint8_t>& x, const Vec<N,uint8_t>& y) {
|
710
|
+
// All of (x*y+x)/256, (x*y+y)/256, and (x*y+255)/256 meet the criteria above.
|
711
|
+
// We happen to have historically picked (x*y+x)/256.
|
712
|
+
auto X = cast<uint16_t>(x),
|
713
|
+
Y = cast<uint16_t>(y);
|
714
|
+
return cast<uint8_t>( (X*Y+X)/256 );
|
715
|
+
}
|
716
|
+
|
717
|
+
// The ScaledDividerU32 takes a divisor > 1, and creates a function divide(numerator) that
|
718
|
+
// calculates a numerator / denominator. For this to be rounded properly, numerator should have
|
719
|
+
// half added in:
|
720
|
+
// divide(numerator + half) == floor(numerator/denominator + 1/2).
|
721
|
+
//
|
722
|
+
// This gives an answer within +/- 1 from the true value.
|
723
|
+
//
|
724
|
+
// Derivation of half:
|
725
|
+
// numerator/denominator + 1/2 = (numerator + half) / d
|
726
|
+
// numerator + denominator / 2 = numerator + half
|
727
|
+
// half = denominator / 2.
|
728
|
+
//
|
729
|
+
// Because half is divided by 2, that division must also be rounded.
|
730
|
+
// half == denominator / 2 = (denominator + 1) / 2.
|
731
|
+
//
|
732
|
+
// The divisorFactor is just a scaled value:
|
733
|
+
// divisorFactor = (1 / divisor) * 2 ^ 32.
|
734
|
+
// The maximum that can be divided and rounded is UINT_MAX - half.
|
735
|
+
class ScaledDividerU32 {
|
736
|
+
public:
|
737
|
+
explicit ScaledDividerU32(uint32_t divisor)
|
738
|
+
: fDivisorFactor{(uint32_t)(std::round((1.0 / divisor) * (1ull << 32)))}
|
739
|
+
, fHalf{(divisor + 1) >> 1} {
|
740
|
+
assert(divisor > 1);
|
741
|
+
}
|
742
|
+
|
743
|
+
Vec<4, uint32_t> divide(const Vec<4, uint32_t>& numerator) const {
|
744
|
+
#if SKVX_USE_SIMD && defined(__ARM_NEON)
|
745
|
+
uint64x2_t hi = vmull_n_u32(vget_high_u32(to_vext(numerator)), fDivisorFactor);
|
746
|
+
uint64x2_t lo = vmull_n_u32(vget_low_u32(to_vext(numerator)), fDivisorFactor);
|
747
|
+
|
748
|
+
return to_vec<4, uint32_t>(vcombine_u32(vshrn_n_u64(lo,32), vshrn_n_u64(hi,32)));
|
749
|
+
#else
|
750
|
+
return cast<uint32_t>((cast<uint64_t>(numerator) * fDivisorFactor) >> 32);
|
751
|
+
#endif
|
752
|
+
}
|
753
|
+
|
754
|
+
uint32_t half() const { return fHalf; }
|
755
|
+
|
756
|
+
private:
|
757
|
+
const uint32_t fDivisorFactor;
|
758
|
+
const uint32_t fHalf;
|
759
|
+
};
|
760
|
+
|
761
|
+
#if SKVX_USE_SIMD && defined(__ARM_NEON)
|
762
|
+
// With NEON we can do eight u8*u8 -> u16 in one instruction, vmull_u8 (read, mul-long).
|
763
|
+
SI Vec<8,uint16_t> mull(const Vec<8,uint8_t>& x,
|
764
|
+
const Vec<8,uint8_t>& y) {
|
765
|
+
return to_vec<8,uint16_t>(vmull_u8(to_vext(x),
|
766
|
+
to_vext(y)));
|
767
|
+
}
|
768
|
+
|
769
|
+
SIN std::enable_if_t<(N < 8), Vec<N,uint16_t>> mull(const Vec<N,uint8_t>& x,
|
770
|
+
const Vec<N,uint8_t>& y) {
|
771
|
+
// N < 8 --> double up data until N == 8, returning the part we need.
|
772
|
+
return mull(join(x,x),
|
773
|
+
join(y,y)).lo;
|
774
|
+
}
|
775
|
+
|
776
|
+
SIN std::enable_if_t<(N > 8), Vec<N,uint16_t>> mull(const Vec<N,uint8_t>& x,
|
777
|
+
const Vec<N,uint8_t>& y) {
|
778
|
+
// N > 8 --> usual join(lo,hi) strategy to recurse down to N == 8.
|
779
|
+
return join(mull(x.lo, y.lo),
|
780
|
+
mull(x.hi, y.hi));
|
781
|
+
}
|
782
|
+
|
783
|
+
#else
|
784
|
+
|
785
|
+
// Nothing special when we don't have NEON... just cast up to 16-bit and multiply.
|
786
|
+
SIN Vec<N,uint16_t> mull(const Vec<N,uint8_t>& x,
|
787
|
+
const Vec<N,uint8_t>& y) {
|
788
|
+
return cast<uint16_t>(x)
|
789
|
+
* cast<uint16_t>(y);
|
790
|
+
}
|
791
|
+
#endif
|
792
|
+
|
793
|
+
// Allow floating point contraction. e.g., allow a*x + y to be compiled to a single FMA even though
|
794
|
+
// it introduces LSB differences on platforms that don't have an FMA instruction.
|
795
|
+
#if defined(__clang__)
|
796
|
+
#pragma STDC FP_CONTRACT ON
|
797
|
+
#endif
|
798
|
+
|
799
|
+
// Approximates the inverse cosine of x within 0.96 degrees using the rational polynomial:
|
800
|
+
//
|
801
|
+
// acos(x) ~= (bx^3 + ax) / (dx^4 + cx^2 + 1) + pi/2
|
802
|
+
//
|
803
|
+
// See: https://stackoverflow.com/a/36387954
|
804
|
+
//
|
805
|
+
// For a proof of max error, see the "SkVx_approx_acos" unit test.
|
806
|
+
//
|
807
|
+
// NOTE: This function deviates immediately from pi and 0 outside -1 and 1. (The derivatives are
|
808
|
+
// infinite at -1 and 1). So the input must still be clamped between -1 and 1.
|
809
|
+
#define SKVX_APPROX_ACOS_MAX_ERROR SkDegreesToRadians(.96f)
|
810
|
+
SIN Vec<N,float> approx_acos(Vec<N,float> x) {
|
811
|
+
constexpr static float a = -0.939115566365855f;
|
812
|
+
constexpr static float b = 0.9217841528914573f;
|
813
|
+
constexpr static float c = -1.2845906244690837f;
|
814
|
+
constexpr static float d = 0.295624144969963174f;
|
815
|
+
constexpr static float pi_over_2 = 1.5707963267948966f;
|
816
|
+
auto xx = x*x;
|
817
|
+
auto numer = b*xx + a;
|
818
|
+
auto denom = xx*(d*xx + c) + 1;
|
819
|
+
return x * (numer/denom) + pi_over_2;
|
820
|
+
}
|
821
|
+
|
822
|
+
#if defined(__clang__)
|
823
|
+
#pragma STDC FP_CONTRACT DEFAULT
|
824
|
+
#endif
|
825
|
+
|
826
|
+
// De-interleaving load of 4 vectors.
|
827
|
+
//
|
828
|
+
// WARNING: These are really only supported well on NEON. Consider restructuring your data before
|
829
|
+
// resorting to these methods.
|
830
|
+
SIT void strided_load4(const T* v,
|
831
|
+
skvx::Vec<1,T>& a,
|
832
|
+
skvx::Vec<1,T>& b,
|
833
|
+
skvx::Vec<1,T>& c,
|
834
|
+
skvx::Vec<1,T>& d) {
|
835
|
+
a.val = v[0];
|
836
|
+
b.val = v[1];
|
837
|
+
c.val = v[2];
|
838
|
+
d.val = v[3];
|
839
|
+
}
|
840
|
+
SINT void strided_load4(const T* v,
|
841
|
+
skvx::Vec<N,T>& a,
|
842
|
+
skvx::Vec<N,T>& b,
|
843
|
+
skvx::Vec<N,T>& c,
|
844
|
+
skvx::Vec<N,T>& d) {
|
845
|
+
strided_load4(v, a.lo, b.lo, c.lo, d.lo);
|
846
|
+
strided_load4(v + 4*(N/2), a.hi, b.hi, c.hi, d.hi);
|
847
|
+
}
|
848
|
+
#if SKVX_USE_SIMD && defined(__ARM_NEON)
|
849
|
+
#define IMPL_LOAD4_TRANSPOSED(N, T, VLD) \
|
850
|
+
SI void strided_load4(const T* v, \
|
851
|
+
skvx::Vec<N,T>& a, \
|
852
|
+
skvx::Vec<N,T>& b, \
|
853
|
+
skvx::Vec<N,T>& c, \
|
854
|
+
skvx::Vec<N,T>& d) { \
|
855
|
+
auto mat = VLD(v); \
|
856
|
+
a = skvx::bit_pun<skvx::Vec<N,T>>(mat.val[0]); \
|
857
|
+
b = skvx::bit_pun<skvx::Vec<N,T>>(mat.val[1]); \
|
858
|
+
c = skvx::bit_pun<skvx::Vec<N,T>>(mat.val[2]); \
|
859
|
+
d = skvx::bit_pun<skvx::Vec<N,T>>(mat.val[3]); \
|
860
|
+
}
|
861
|
+
IMPL_LOAD4_TRANSPOSED(2, uint32_t, vld4_u32);
|
862
|
+
IMPL_LOAD4_TRANSPOSED(4, uint16_t, vld4_u16);
|
863
|
+
IMPL_LOAD4_TRANSPOSED(8, uint8_t, vld4_u8);
|
864
|
+
IMPL_LOAD4_TRANSPOSED(2, int32_t, vld4_s32);
|
865
|
+
IMPL_LOAD4_TRANSPOSED(4, int16_t, vld4_s16);
|
866
|
+
IMPL_LOAD4_TRANSPOSED(8, int8_t, vld4_s8);
|
867
|
+
IMPL_LOAD4_TRANSPOSED(2, float, vld4_f32);
|
868
|
+
IMPL_LOAD4_TRANSPOSED(4, uint32_t, vld4q_u32);
|
869
|
+
IMPL_LOAD4_TRANSPOSED(8, uint16_t, vld4q_u16);
|
870
|
+
IMPL_LOAD4_TRANSPOSED(16, uint8_t, vld4q_u8);
|
871
|
+
IMPL_LOAD4_TRANSPOSED(4, int32_t, vld4q_s32);
|
872
|
+
IMPL_LOAD4_TRANSPOSED(8, int16_t, vld4q_s16);
|
873
|
+
IMPL_LOAD4_TRANSPOSED(16, int8_t, vld4q_s8);
|
874
|
+
IMPL_LOAD4_TRANSPOSED(4, float, vld4q_f32);
|
875
|
+
#undef IMPL_LOAD4_TRANSPOSED
|
876
|
+
|
877
|
+
#elif SKVX_USE_SIMD && defined(__SSE__)
|
878
|
+
|
879
|
+
SI void strided_load4(const float* v,
|
880
|
+
Vec<4,float>& a,
|
881
|
+
Vec<4,float>& b,
|
882
|
+
Vec<4,float>& c,
|
883
|
+
Vec<4,float>& d) {
|
884
|
+
using skvx::bit_pun;
|
885
|
+
__m128 a_ = _mm_loadu_ps(v);
|
886
|
+
__m128 b_ = _mm_loadu_ps(v+4);
|
887
|
+
__m128 c_ = _mm_loadu_ps(v+8);
|
888
|
+
__m128 d_ = _mm_loadu_ps(v+12);
|
889
|
+
_MM_TRANSPOSE4_PS(a_, b_, c_, d_);
|
890
|
+
a = bit_pun<Vec<4,float>>(a_);
|
891
|
+
b = bit_pun<Vec<4,float>>(b_);
|
892
|
+
c = bit_pun<Vec<4,float>>(c_);
|
893
|
+
d = bit_pun<Vec<4,float>>(d_);
|
894
|
+
}
|
895
|
+
#endif
|
896
|
+
|
897
|
+
// De-interleaving load of 2 vectors.
|
898
|
+
//
|
899
|
+
// WARNING: These are really only supported well on NEON. Consider restructuring your data before
|
900
|
+
// resorting to these methods.
|
901
|
+
SIT void strided_load2(const T* v, skvx::Vec<1,T>& a, skvx::Vec<1,T>& b) {
|
902
|
+
a.val = v[0];
|
903
|
+
b.val = v[1];
|
904
|
+
}
|
905
|
+
SINT void strided_load2(const T* v, skvx::Vec<N,T>& a, skvx::Vec<N,T>& b) {
|
906
|
+
strided_load2(v, a.lo, b.lo);
|
907
|
+
strided_load2(v + 2*(N/2), a.hi, b.hi);
|
908
|
+
}
|
909
|
+
#if SKVX_USE_SIMD && defined(__ARM_NEON)
|
910
|
+
#define IMPL_LOAD2_TRANSPOSED(N, T, VLD) \
|
911
|
+
SI void strided_load2(const T* v, skvx::Vec<N,T>& a, skvx::Vec<N,T>& b) { \
|
912
|
+
auto mat = VLD(v); \
|
913
|
+
a = skvx::bit_pun<skvx::Vec<N,T>>(mat.val[0]); \
|
914
|
+
b = skvx::bit_pun<skvx::Vec<N,T>>(mat.val[1]); \
|
915
|
+
}
|
916
|
+
IMPL_LOAD2_TRANSPOSED(2, uint32_t, vld2_u32);
|
917
|
+
IMPL_LOAD2_TRANSPOSED(4, uint16_t, vld2_u16);
|
918
|
+
IMPL_LOAD2_TRANSPOSED(8, uint8_t, vld2_u8);
|
919
|
+
IMPL_LOAD2_TRANSPOSED(2, int32_t, vld2_s32);
|
920
|
+
IMPL_LOAD2_TRANSPOSED(4, int16_t, vld2_s16);
|
921
|
+
IMPL_LOAD2_TRANSPOSED(8, int8_t, vld2_s8);
|
922
|
+
IMPL_LOAD2_TRANSPOSED(2, float, vld2_f32);
|
923
|
+
IMPL_LOAD2_TRANSPOSED(4, uint32_t, vld2q_u32);
|
924
|
+
IMPL_LOAD2_TRANSPOSED(8, uint16_t, vld2q_u16);
|
925
|
+
IMPL_LOAD2_TRANSPOSED(16, uint8_t, vld2q_u8);
|
926
|
+
IMPL_LOAD2_TRANSPOSED(4, int32_t, vld2q_s32);
|
927
|
+
IMPL_LOAD2_TRANSPOSED(8, int16_t, vld2q_s16);
|
928
|
+
IMPL_LOAD2_TRANSPOSED(16, int8_t, vld2q_s8);
|
929
|
+
IMPL_LOAD2_TRANSPOSED(4, float, vld2q_f32);
|
930
|
+
#undef IMPL_LOAD2_TRANSPOSED
|
931
|
+
#endif
|
932
|
+
|
933
|
+
} // namespace skvx
|
934
|
+
|
935
|
+
#undef SINTU
|
936
|
+
#undef SINT
|
937
|
+
#undef SIN
|
938
|
+
#undef SIT
|
939
|
+
#undef SI
|
940
|
+
#undef SKVX_ALWAYS_INLINE
|
941
|
+
#undef SKVX_USE_SIMD
|
942
|
+
|
943
|
+
#endif//SKVX_DEFINED
|