@shopify/react-native-skia 0.1.128 → 0.1.131
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +8 -0
- package/android/cpp/jni/JniSkiaDrawView.cpp +3 -2
- package/android/cpp/rnskia-android/SkiaOpenGLRenderer.h +1 -0
- package/android/src/main/java/com/shopify/reactnative/skia/SkiaDrawView.java +2 -1
- package/cpp/api/JsiSkCanvas.h +2 -2
- package/cpp/api/JsiSkMatrix.h +40 -27
- package/cpp/api/JsiSkPaint.h +3 -1
- package/cpp/api/JsiSkPath.h +67 -61
- package/cpp/api/JsiSkPathFactory.h +14 -1
- package/cpp/api/JsiSkRuntimeEffect.h +7 -9
- package/cpp/api/JsiSkRuntimeShaderBuilder.h +18 -0
- package/cpp/api/JsiSkTypeface.h +11 -2
- package/cpp/api/JsiSkTypefaceFactory.h +5 -1
- package/cpp/api/JsiSkVertices.h +0 -2
- package/cpp/rnskia/RNSkInfoParameter.h +2 -0
- package/cpp/rnskia/values/RNSkValue.h +1 -1
- package/cpp/skia/include/codec/SkCodec.h +7 -1
- package/cpp/skia/include/core/SkAlphaType.h +45 -0
- package/cpp/skia/include/core/SkBitmap.h +4 -2
- package/cpp/skia/include/core/SkCanvas.h +31 -20
- package/cpp/skia/include/core/SkColor.h +1 -1
- package/cpp/skia/include/core/SkColorFilter.h +1 -0
- package/cpp/skia/include/core/SkColorType.h +66 -0
- package/cpp/skia/include/core/SkDeferredDisplayListRecorder.h +1 -1
- package/cpp/skia/include/core/SkDrawable.h +7 -0
- package/cpp/skia/include/core/SkEncodedImageFormat.h +1 -0
- package/cpp/skia/include/core/SkFont.h +4 -3
- package/cpp/skia/include/core/SkFontArguments.h +33 -1
- package/cpp/skia/include/core/SkGraphics.h +13 -0
- package/cpp/skia/include/core/SkImage.h +67 -22
- package/cpp/skia/include/core/SkImageEncoder.h +0 -3
- package/cpp/skia/include/core/SkImageGenerator.h +4 -3
- package/cpp/skia/include/core/SkImageInfo.h +35 -142
- package/cpp/skia/include/core/SkMesh.h +303 -0
- package/cpp/skia/include/core/SkMilestone.h +1 -1
- package/cpp/skia/include/core/SkOpenTypeSVGDecoder.h +30 -0
- package/cpp/skia/include/core/SkPaint.h +4 -19
- package/cpp/skia/include/core/SkPath.h +20 -33
- package/cpp/skia/include/core/SkPathBuilder.h +1 -6
- package/cpp/skia/include/core/SkPixelRef.h +1 -1
- package/cpp/skia/include/core/SkPixmap.h +3 -2
- package/cpp/skia/include/core/SkRSXform.h +1 -1
- package/cpp/skia/include/core/SkSamplingOptions.h +16 -5
- package/cpp/skia/include/core/SkSpan.h +5 -5
- package/cpp/skia/include/core/SkString.h +5 -8
- package/cpp/skia/include/core/SkSurface.h +21 -0
- package/cpp/skia/include/core/SkTypeface.h +20 -4
- package/cpp/skia/include/core/SkTypes.h +9 -5
- package/cpp/skia/include/effects/SkGradientShader.h +9 -18
- package/cpp/skia/include/effects/SkRuntimeEffect.h +16 -12
- package/cpp/skia/include/gpu/GpuTypes.h +32 -0
- package/cpp/skia/include/gpu/GrBackendSemaphore.h +1 -1
- package/cpp/skia/include/gpu/GrBackendSurface.h +6 -5
- package/cpp/skia/include/gpu/GrBackendSurfaceMutableState.h +1 -1
- package/cpp/skia/include/gpu/GrContextOptions.h +11 -20
- package/cpp/skia/include/gpu/GrContextThreadSafeProxy.h +7 -0
- package/cpp/skia/include/gpu/GrDirectContext.h +16 -11
- package/cpp/skia/include/gpu/GrDriverBugWorkaroundsAutogen.h +0 -2
- package/cpp/skia/include/gpu/GrRecordingContext.h +14 -7
- package/cpp/skia/include/gpu/GrSurfaceInfo.h +6 -6
- package/cpp/skia/include/gpu/dawn/GrDawnTypes.h +1 -1
- package/cpp/skia/include/gpu/gl/GrGLFunctions.h +3 -1
- package/cpp/skia/include/gpu/gl/GrGLInterface.h +2 -2
- package/cpp/skia/include/gpu/graphite/BackendTexture.h +64 -0
- package/cpp/skia/include/gpu/graphite/Context.h +124 -0
- package/cpp/skia/include/gpu/graphite/GraphiteTypes.h +71 -0
- package/cpp/skia/include/gpu/graphite/Recorder.h +104 -0
- package/cpp/skia/include/gpu/graphite/Recording.h +39 -0
- package/cpp/skia/include/gpu/graphite/SkStuff.h +47 -0
- package/cpp/skia/include/gpu/graphite/TextureInfo.h +91 -0
- package/cpp/skia/include/gpu/graphite/mtl/MtlBackendContext.h +24 -0
- package/cpp/skia/include/gpu/graphite/mtl/MtlTypes.h +68 -0
- package/cpp/skia/include/gpu/mock/GrMockTypes.h +1 -2
- package/cpp/skia/include/ports/SkCFObject.h +0 -4
- package/cpp/skia/include/ports/SkTypeface_win.h +2 -2
- package/cpp/skia/include/private/SingleOwner.h +72 -0
- package/cpp/skia/include/private/SkChecksum.h +11 -0
- package/cpp/skia/include/private/SkEncodedInfo.h +22 -5
- package/cpp/skia/include/private/SkFloatingPoint.h +0 -53
- package/cpp/skia/include/private/SkImageInfoPriv.h +8 -2
- package/cpp/skia/include/private/SkMacros.h +13 -18
- package/cpp/skia/include/private/SkMutex.h +8 -0
- package/cpp/skia/include/private/SkPathRef.h +2 -16
- package/cpp/skia/include/private/SkSLDefines.h +9 -1
- package/cpp/skia/include/private/SkSLIRNode.h +6 -5
- package/cpp/skia/include/private/SkSLLayout.h +11 -10
- package/cpp/skia/include/private/SkSLModifiers.h +4 -3
- package/cpp/skia/include/private/SkSLProgramElement.h +2 -2
- package/cpp/skia/include/private/SkSLProgramKind.h +8 -5
- package/cpp/skia/include/private/SkSLStatement.h +2 -3
- package/cpp/skia/include/private/SkSLString.h +17 -56
- package/cpp/skia/include/private/SkSLSymbol.h +4 -4
- package/cpp/skia/include/private/SkShadowFlags.h +3 -1
- package/cpp/skia/include/private/SkStringView.h +47 -0
- package/cpp/skia/include/private/SkTArray.h +4 -3
- package/cpp/skia/include/private/SkTHash.h +66 -24
- package/cpp/skia/include/private/SkTLogic.h +2 -32
- package/cpp/skia/include/private/SkTemplates.h +2 -2
- package/cpp/skia/include/private/SkThreadAnnotations.h +4 -4
- package/cpp/skia/include/private/SkVx.h +28 -28
- package/cpp/skia/include/private/chromium/GrSlug.h +40 -3
- package/cpp/skia/include/private/chromium/SkChromeRemoteGlyphCache.h +12 -6
- package/cpp/skia/include/private/gpu/ganesh/GrContext_Base.h +99 -0
- package/cpp/skia/include/private/{GrD3DTypesMinimal.h → gpu/ganesh/GrD3DTypesMinimal.h} +0 -0
- package/cpp/skia/include/private/{GrDawnTypesPriv.h → gpu/ganesh/GrDawnTypesPriv.h} +0 -0
- package/cpp/skia/include/private/gpu/ganesh/GrGLTypesPriv.h +108 -0
- package/cpp/skia/include/private/gpu/ganesh/GrImageContext.h +55 -0
- package/cpp/skia/include/private/{GrMockTypesPriv.h → gpu/ganesh/GrMockTypesPriv.h} +0 -0
- package/cpp/skia/include/private/{GrMtlTypesPriv.h → gpu/ganesh/GrMtlTypesPriv.h} +0 -0
- package/cpp/skia/include/private/gpu/ganesh/GrTypesPriv.h +1012 -0
- package/cpp/skia/include/private/{GrVkTypesPriv.h → gpu/ganesh/GrVkTypesPriv.h} +0 -0
- package/cpp/skia/include/private/gpu/graphite/MtlTypesPriv.h +74 -0
- package/cpp/skia/include/sksl/DSL.h +4 -0
- package/cpp/skia/include/sksl/DSLBlock.h +8 -3
- package/cpp/skia/include/sksl/DSLCase.h +6 -6
- package/cpp/skia/include/sksl/DSLCore.h +89 -78
- package/cpp/skia/include/sksl/DSLExpression.h +78 -45
- package/cpp/skia/include/sksl/DSLFunction.h +23 -18
- package/cpp/skia/include/sksl/DSLLayout.h +14 -16
- package/cpp/skia/include/sksl/DSLModifiers.h +7 -5
- package/cpp/skia/include/sksl/DSLRuntimeEffects.h +1 -1
- package/cpp/skia/include/sksl/DSLStatement.h +16 -10
- package/cpp/skia/include/sksl/DSLSymbols.h +7 -7
- package/cpp/skia/include/sksl/DSLType.h +27 -23
- package/cpp/skia/include/sksl/DSLVar.h +72 -61
- package/cpp/skia/include/sksl/SkSLErrorReporter.h +12 -49
- package/cpp/skia/include/sksl/SkSLOperator.h +151 -0
- package/cpp/skia/include/sksl/SkSLPosition.h +102 -0
- package/cpp/skia/include/svg/SkSVGCanvas.h +5 -1
- package/cpp/skia/include/utils/SkAnimCodecPlayer.h +7 -0
- package/cpp/skia/include/utils/SkCamera.h +2 -0
- package/cpp/skia/include/utils/SkCanvasStateUtils.h +4 -1
- package/cpp/skia/include/utils/SkCustomTypeface.h +6 -4
- package/cpp/skia/include/utils/SkNWayCanvas.h +34 -0
- package/cpp/skia/include/utils/SkNullCanvas.h +5 -1
- package/cpp/skia/include/utils/SkOrderedFontMgr.h +12 -0
- package/cpp/skia/include/utils/SkPaintFilterCanvas.h +30 -1
- package/cpp/skia/include/utils/SkParse.h +2 -0
- package/cpp/skia/include/utils/SkShadowUtils.h +3 -2
- package/cpp/skia/include/utils/SkTextUtils.h +8 -4
- package/cpp/skia/modules/svg/include/SkSVGAttributeParser.h +27 -1
- package/cpp/skia/modules/svg/include/SkSVGDOM.h +4 -0
- package/cpp/skia/modules/svg/include/SkSVGOpenTypeSVGDecoder.h +32 -0
- package/cpp/skia/modules/svg/include/SkSVGRenderContext.h +3 -3
- package/cpp/skia/modules/svg/include/SkSVGSVG.h +2 -0
- package/cpp/skia/modules/svg/include/SkSVGTypes.h +48 -9
- package/cpp/utils/RNSkLog.h +22 -0
- package/ios/RNSkia-iOS/PlatformContext.h +1 -1
- package/ios/RNSkia-iOS/RNSkDrawViewImpl.mm +1 -0
- package/ios/RNSkia-iOS/SkiaDrawView.mm +3 -2
- package/lib/commonjs/animation/decay/runDecay.js.map +1 -1
- package/lib/commonjs/animation/functions/index.js +47 -17
- package/lib/commonjs/animation/functions/index.js.map +1 -1
- package/lib/commonjs/animation/functions/interpolateColors.js.map +1 -1
- package/lib/commonjs/animation/functions/interpolatePaths.js +45 -0
- package/lib/commonjs/animation/functions/interpolatePaths.js.map +1 -0
- package/lib/commonjs/animation/functions/interpolateVector.js +20 -0
- package/lib/commonjs/animation/functions/interpolateVector.js.map +1 -0
- package/lib/commonjs/animation/spring/runSpring.js.map +1 -1
- package/lib/commonjs/animation/spring/useSpring.js.map +1 -1
- package/lib/commonjs/animation/timing/createTiming.js.map +1 -1
- package/lib/commonjs/animation/timing/runTiming.js.map +1 -1
- package/lib/commonjs/animation/timing/useTiming.js.map +1 -1
- package/lib/commonjs/index.js +13 -0
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/renderer/Canvas.js +18 -36
- package/lib/commonjs/renderer/Canvas.js.map +1 -1
- package/lib/commonjs/renderer/DependencyManager.js.map +1 -1
- package/lib/commonjs/renderer/HostConfig.js +2 -2
- package/lib/commonjs/renderer/HostConfig.js.map +1 -1
- package/lib/commonjs/renderer/components/Blend.js +10 -9
- package/lib/commonjs/renderer/components/Blend.js.map +1 -1
- package/lib/commonjs/renderer/components/Compose.js +9 -10
- package/lib/commonjs/renderer/components/Compose.js.map +1 -1
- package/lib/commonjs/renderer/components/Group.js +7 -6
- package/lib/commonjs/renderer/components/Group.js.map +1 -1
- package/lib/commonjs/renderer/components/Mask.js +13 -10
- package/lib/commonjs/renderer/components/Mask.js.map +1 -1
- package/lib/commonjs/renderer/components/Paint.js +7 -4
- package/lib/commonjs/renderer/components/Paint.js.map +1 -1
- package/lib/commonjs/renderer/components/Picture.js.map +1 -1
- package/lib/commonjs/renderer/components/backdrop/BackdropFilter.js +1 -1
- package/lib/commonjs/renderer/components/backdrop/BackdropFilter.js.map +1 -1
- package/lib/commonjs/renderer/components/colorFilters/BlendColor.js +7 -6
- package/lib/commonjs/renderer/components/colorFilters/BlendColor.js.map +1 -1
- package/lib/commonjs/renderer/components/colorFilters/Compose.js +6 -6
- package/lib/commonjs/renderer/components/colorFilters/Compose.js.map +1 -1
- package/lib/commonjs/renderer/components/colorFilters/Lerp.js +8 -9
- package/lib/commonjs/renderer/components/colorFilters/Lerp.js.map +1 -1
- package/lib/commonjs/renderer/components/colorFilters/LinearToSRGBGamma.js +6 -6
- package/lib/commonjs/renderer/components/colorFilters/LinearToSRGBGamma.js.map +1 -1
- package/lib/commonjs/renderer/components/colorFilters/LumaColorFilter.js +6 -6
- package/lib/commonjs/renderer/components/colorFilters/LumaColorFilter.js.map +1 -1
- package/lib/commonjs/renderer/components/colorFilters/Matrix.js +6 -7
- package/lib/commonjs/renderer/components/colorFilters/Matrix.js.map +1 -1
- package/lib/commonjs/renderer/components/colorFilters/SRGBToLinearGamma.js +6 -6
- package/lib/commonjs/renderer/components/colorFilters/SRGBToLinearGamma.js.map +1 -1
- package/lib/commonjs/renderer/components/image/BoxFit.js +7 -9
- package/lib/commonjs/renderer/components/image/BoxFit.js.map +1 -1
- package/lib/commonjs/renderer/components/image/Image.js +3 -2
- package/lib/commonjs/renderer/components/image/Image.js.map +1 -1
- package/lib/commonjs/renderer/components/image/ImageSVG.js +3 -2
- package/lib/commonjs/renderer/components/image/ImageSVG.js.map +1 -1
- package/lib/commonjs/renderer/components/image/ImageShader.js +9 -6
- package/lib/commonjs/renderer/components/image/ImageShader.js.map +1 -1
- package/lib/commonjs/renderer/components/imageFilters/Blur.js +7 -4
- package/lib/commonjs/renderer/components/imageFilters/Blur.js.map +1 -1
- package/lib/commonjs/renderer/components/imageFilters/DisplacementMap.js +10 -9
- package/lib/commonjs/renderer/components/imageFilters/DisplacementMap.js.map +1 -1
- package/lib/commonjs/renderer/components/imageFilters/InnerShadow.js +10 -15
- package/lib/commonjs/renderer/components/imageFilters/InnerShadow.js.map +1 -1
- package/lib/commonjs/renderer/components/imageFilters/Morphology.js +7 -6
- package/lib/commonjs/renderer/components/imageFilters/Morphology.js.map +1 -1
- package/lib/commonjs/renderer/components/imageFilters/Offset.js +5 -4
- package/lib/commonjs/renderer/components/imageFilters/Offset.js.map +1 -1
- package/lib/commonjs/renderer/components/imageFilters/RuntimeShader.js +13 -6
- package/lib/commonjs/renderer/components/imageFilters/RuntimeShader.js.map +1 -1
- package/lib/commonjs/renderer/components/imageFilters/Shadow.js +7 -8
- package/lib/commonjs/renderer/components/imageFilters/Shadow.js.map +1 -1
- package/lib/commonjs/renderer/components/imageFilters/getInput.js +7 -7
- package/lib/commonjs/renderer/components/imageFilters/getInput.js.map +1 -1
- package/lib/commonjs/renderer/components/maskFilters/Blur.js +6 -5
- package/lib/commonjs/renderer/components/maskFilters/Blur.js.map +1 -1
- package/lib/commonjs/renderer/components/pathEffects/Corner.js +8 -8
- package/lib/commonjs/renderer/components/pathEffects/Corner.js.map +1 -1
- package/lib/commonjs/renderer/components/pathEffects/Dash.js +8 -8
- package/lib/commonjs/renderer/components/pathEffects/Dash.js.map +1 -1
- package/lib/commonjs/renderer/components/pathEffects/Discrete.js +8 -8
- package/lib/commonjs/renderer/components/pathEffects/Discrete.js.map +1 -1
- package/lib/commonjs/renderer/components/pathEffects/Line2D.js +8 -8
- package/lib/commonjs/renderer/components/pathEffects/Line2D.js.map +1 -1
- package/lib/commonjs/renderer/components/pathEffects/Path1D.js +8 -8
- package/lib/commonjs/renderer/components/pathEffects/Path1D.js.map +1 -1
- package/lib/commonjs/renderer/components/pathEffects/Path2D.js +8 -8
- package/lib/commonjs/renderer/components/pathEffects/Path2D.js.map +1 -1
- package/lib/commonjs/renderer/components/pathEffects/Sum.js +7 -6
- package/lib/commonjs/renderer/components/pathEffects/Sum.js.map +1 -1
- package/lib/commonjs/renderer/components/shaders/Color.js +7 -4
- package/lib/commonjs/renderer/components/shaders/Color.js.map +1 -1
- package/lib/commonjs/renderer/components/shaders/FractalNoise.js +5 -4
- package/lib/commonjs/renderer/components/shaders/FractalNoise.js.map +1 -1
- package/lib/commonjs/renderer/components/shaders/Gradient.js +5 -5
- package/lib/commonjs/renderer/components/shaders/Gradient.js.map +1 -1
- package/lib/commonjs/renderer/components/shaders/LinearGradient.js +6 -5
- package/lib/commonjs/renderer/components/shaders/LinearGradient.js.map +1 -1
- package/lib/commonjs/renderer/components/shaders/RadialGradient.js +6 -5
- package/lib/commonjs/renderer/components/shaders/RadialGradient.js.map +1 -1
- package/lib/commonjs/renderer/components/shaders/Shader.js +6 -44
- package/lib/commonjs/renderer/components/shaders/Shader.js.map +1 -1
- package/lib/commonjs/renderer/components/shaders/SweepGradient.js +6 -5
- package/lib/commonjs/renderer/components/shaders/SweepGradient.js.map +1 -1
- package/lib/commonjs/renderer/components/shaders/Turbulence.js +5 -4
- package/lib/commonjs/renderer/components/shaders/Turbulence.js.map +1 -1
- package/lib/commonjs/renderer/components/shaders/TwoPointConicalGradient.js +6 -5
- package/lib/commonjs/renderer/components/shaders/TwoPointConicalGradient.js.map +1 -1
- package/lib/commonjs/renderer/components/shapes/Box.js +26 -29
- package/lib/commonjs/renderer/components/shapes/Box.js.map +1 -1
- package/lib/commonjs/renderer/components/shapes/Circle.js +7 -5
- package/lib/commonjs/renderer/components/shapes/Circle.js.map +1 -1
- package/lib/commonjs/renderer/components/shapes/DiffRect.js.map +1 -1
- package/lib/commonjs/renderer/components/shapes/FitBox.js.map +1 -1
- package/lib/commonjs/renderer/components/shapes/Line.js.map +1 -1
- package/lib/commonjs/renderer/components/shapes/Oval.js +3 -2
- package/lib/commonjs/renderer/components/shapes/Oval.js.map +1 -1
- package/lib/commonjs/renderer/components/shapes/Patch.js +7 -6
- package/lib/commonjs/renderer/components/shapes/Patch.js.map +1 -1
- package/lib/commonjs/renderer/components/shapes/Path.js +5 -4
- package/lib/commonjs/renderer/components/shapes/Path.js.map +1 -1
- package/lib/commonjs/renderer/components/shapes/Points.js +2 -2
- package/lib/commonjs/renderer/components/shapes/Points.js.map +1 -1
- package/lib/commonjs/renderer/components/shapes/Rect.js +3 -2
- package/lib/commonjs/renderer/components/shapes/Rect.js.map +1 -1
- package/lib/commonjs/renderer/components/shapes/RoundedRect.js +3 -2
- package/lib/commonjs/renderer/components/shapes/RoundedRect.js.map +1 -1
- package/lib/commonjs/renderer/components/shapes/Vertices.js +9 -8
- package/lib/commonjs/renderer/components/shapes/Vertices.js.map +1 -1
- package/lib/commonjs/renderer/components/text/Glyphs.js +3 -2
- package/lib/commonjs/renderer/components/text/Glyphs.js.map +1 -1
- package/lib/commonjs/renderer/components/text/Text.js +3 -2
- package/lib/commonjs/renderer/components/text/Text.js.map +1 -1
- package/lib/commonjs/renderer/components/text/TextBlob.js.map +1 -1
- package/lib/commonjs/renderer/components/text/TextPath.js +7 -11
- package/lib/commonjs/renderer/components/text/TextPath.js.map +1 -1
- package/lib/commonjs/renderer/index.js +26 -13
- package/lib/commonjs/renderer/index.js.map +1 -1
- package/lib/commonjs/renderer/nodes/Declaration.js.map +1 -1
- package/lib/commonjs/renderer/nodes/Drawing.js +5 -5
- package/lib/commonjs/renderer/nodes/Drawing.js.map +1 -1
- package/lib/commonjs/renderer/nodes/Node.js.map +1 -1
- package/lib/commonjs/renderer/processors/Animations/Animations.js.map +1 -1
- package/lib/commonjs/renderer/processors/Circles.js +2 -4
- package/lib/commonjs/renderer/processors/Circles.js.map +1 -1
- package/lib/commonjs/renderer/processors/Clips.js +5 -5
- package/lib/commonjs/renderer/processors/Clips.js.map +1 -1
- package/lib/commonjs/renderer/processors/Color.js +27 -0
- package/lib/commonjs/renderer/processors/Color.js.map +1 -0
- package/lib/commonjs/renderer/processors/Font.js +4 -4
- package/lib/commonjs/renderer/processors/Font.js.map +1 -1
- package/lib/commonjs/renderer/processors/Paint.js +18 -14
- package/lib/commonjs/renderer/processors/Paint.js.map +1 -1
- package/lib/commonjs/renderer/processors/Paths.js +4 -4
- package/lib/commonjs/renderer/processors/Paths.js.map +1 -1
- package/lib/commonjs/renderer/processors/Radius.js +2 -4
- package/lib/commonjs/renderer/processors/Radius.js.map +1 -1
- package/lib/commonjs/renderer/processors/Rects.js +9 -56
- package/lib/commonjs/renderer/processors/Rects.js.map +1 -1
- package/lib/commonjs/renderer/processors/Transform.js +26 -17
- package/lib/commonjs/renderer/processors/Transform.js.map +1 -1
- package/lib/commonjs/renderer/processors/index.js +26 -13
- package/lib/commonjs/renderer/processors/index.js.map +1 -1
- package/lib/commonjs/renderer/processors/math/Coordinates.js.map +1 -1
- package/lib/commonjs/renderer/processors/math/Transforms.js.map +1 -1
- package/lib/commonjs/renderer/processors/math/index.js +0 -26
- package/lib/commonjs/renderer/processors/math/index.js.map +1 -1
- package/lib/commonjs/renderer/useCanvas.js +30 -0
- package/lib/commonjs/renderer/useCanvas.js.map +1 -0
- package/lib/commonjs/skia/NativeSetup.js +1 -1
- package/lib/commonjs/skia/NativeSetup.js.map +1 -1
- package/lib/commonjs/skia/Skia.js +2 -36
- package/lib/commonjs/skia/Skia.js.map +1 -1
- package/lib/commonjs/skia/Skia.web.js +12 -0
- package/lib/commonjs/skia/Skia.web.js.map +1 -0
- package/lib/commonjs/skia/core/Data.js +79 -0
- package/lib/commonjs/skia/core/Data.js.map +1 -0
- package/lib/commonjs/skia/core/Font.js +34 -0
- package/lib/commonjs/skia/core/Font.js.map +1 -0
- package/lib/commonjs/skia/core/Image.js +18 -0
- package/lib/commonjs/skia/core/Image.js.map +1 -0
- package/lib/commonjs/skia/core/Matrix.js +15 -0
- package/lib/commonjs/skia/core/Matrix.js.map +1 -0
- package/lib/commonjs/skia/core/Paint.js +28 -0
- package/lib/commonjs/skia/core/Paint.js.map +1 -0
- package/lib/commonjs/skia/core/Path.js +72 -0
- package/lib/commonjs/skia/core/Path.js.map +1 -0
- package/lib/commonjs/skia/core/Picture.js +30 -0
- package/lib/commonjs/skia/core/Picture.js.map +1 -0
- package/lib/commonjs/skia/core/RRect.js +13 -0
- package/lib/commonjs/skia/core/RRect.js.map +1 -0
- package/lib/commonjs/skia/core/Rect.js +47 -0
- package/lib/commonjs/skia/core/Rect.js.map +1 -0
- package/lib/commonjs/skia/core/SVG.js +15 -0
- package/lib/commonjs/skia/core/SVG.js.map +1 -0
- package/lib/commonjs/skia/core/Typeface.js +18 -0
- package/lib/commonjs/skia/core/Typeface.js.map +1 -0
- package/lib/commonjs/skia/core/Vector.js +49 -0
- package/lib/commonjs/skia/core/Vector.js.map +1 -0
- package/lib/commonjs/skia/core/index.js +162 -0
- package/lib/commonjs/skia/core/index.js.map +1 -0
- package/lib/commonjs/skia/index.js +8 -302
- package/lib/commonjs/skia/index.js.map +1 -1
- package/lib/commonjs/skia/{Canvas.js → types/Canvas.js} +0 -0
- package/lib/commonjs/skia/{Canvas.js.map → types/Canvas.js.map} +0 -0
- package/lib/commonjs/skia/types/Color.js +2 -0
- package/lib/commonjs/skia/{ColorFilter/ColorFilterFactory.js.map → types/Color.js.map} +0 -0
- package/lib/commonjs/skia/{ColorFilter → types/ColorFilter}/ColorFilter.js +0 -0
- package/lib/commonjs/skia/{ColorFilter → types/ColorFilter}/ColorFilter.js.map +0 -0
- package/lib/commonjs/skia/{ColorFilter → types/ColorFilter}/ColorFilterFactory.js +0 -0
- package/lib/{module/skia → commonjs/skia/types}/ColorFilter/ColorFilterFactory.js.map +0 -0
- package/lib/commonjs/skia/{ColorFilter → types/ColorFilter}/index.js +0 -0
- package/lib/commonjs/skia/{ColorFilter → types/ColorFilter}/index.js.map +0 -0
- package/lib/commonjs/skia/{ContourMeasure.js → types/ContourMeasure.js} +0 -0
- package/lib/commonjs/skia/{ContourMeasure.js.map → types/ContourMeasure.js.map} +0 -0
- package/lib/commonjs/skia/types/Data/Data.js +6 -0
- package/lib/commonjs/skia/{Data/DataFactory.js.map → types/Data/Data.js.map} +0 -0
- package/lib/commonjs/skia/{Data → types/Data}/DataFactory.js +0 -0
- package/lib/{module/skia → commonjs/skia/types}/Data/DataFactory.js.map +0 -0
- package/lib/commonjs/skia/{Data → types/Data}/index.js +0 -0
- package/lib/commonjs/skia/{Data → types/Data}/index.js.map +0 -0
- package/lib/commonjs/skia/{Font → types/Font}/Font.js +0 -0
- package/lib/commonjs/skia/types/Font/Font.js.map +1 -0
- package/lib/commonjs/skia/types/Font/index.js +19 -0
- package/lib/commonjs/skia/types/Font/index.js.map +1 -0
- package/lib/commonjs/skia/{FontMgr → types/FontMgr}/FontMgr.js +0 -0
- package/lib/commonjs/skia/{FontMgr → types/FontMgr}/FontMgr.js.map +0 -0
- package/lib/commonjs/skia/{FontMgr → types/FontMgr}/FontMgrFactory.js +0 -0
- package/lib/commonjs/skia/{FontMgr → types/FontMgr}/FontMgrFactory.js.map +0 -0
- package/lib/commonjs/skia/types/FontMgr/index.js +32 -0
- package/lib/commonjs/skia/types/FontMgr/index.js.map +1 -0
- package/lib/commonjs/skia/{Image → types/Image}/Image.js +0 -0
- package/lib/commonjs/skia/types/Image/Image.js.map +1 -0
- package/lib/commonjs/skia/{Image → types/Image}/ImageFactory.js +0 -0
- package/lib/commonjs/skia/types/Image/ImageFactory.js.map +1 -0
- package/lib/commonjs/skia/types/Image/index.js +32 -0
- package/lib/commonjs/skia/types/Image/index.js.map +1 -0
- package/lib/commonjs/skia/{ImageFilter → types/ImageFilter}/ImageFilter.js +0 -0
- package/lib/commonjs/skia/{ImageFilter → types/ImageFilter}/ImageFilter.js.map +0 -0
- package/lib/commonjs/skia/{ImageFilter → types/ImageFilter}/ImageFilterFactory.js +0 -0
- package/lib/commonjs/skia/types/ImageFilter/ImageFilterFactory.js.map +1 -0
- package/lib/commonjs/skia/{ImageFilter → types/ImageFilter}/index.js +0 -0
- package/lib/commonjs/skia/{ImageFilter → types/ImageFilter}/index.js.map +0 -0
- package/lib/commonjs/skia/{JsiInstance.js → types/JsiInstance.js} +0 -0
- package/lib/commonjs/skia/{JsiInstance.js.map → types/JsiInstance.js.map} +0 -0
- package/lib/commonjs/skia/{MaskFilter.js → types/MaskFilter.js} +0 -0
- package/lib/commonjs/skia/types/MaskFilter.js.map +1 -0
- package/lib/commonjs/skia/types/Matrix.js +78 -0
- package/lib/commonjs/skia/types/Matrix.js.map +1 -0
- package/lib/commonjs/skia/{Paint → types/Paint}/BlendMode.js +0 -0
- package/lib/commonjs/skia/{Paint → types/Paint}/BlendMode.js.map +0 -0
- package/lib/commonjs/skia/types/Paint/Paint.js +36 -0
- package/lib/commonjs/skia/types/Paint/Paint.js.map +1 -0
- package/lib/commonjs/skia/types/Paint/index.js +32 -0
- package/lib/commonjs/skia/types/Paint/index.js.map +1 -0
- package/lib/commonjs/skia/types/Path/Path.js +48 -0
- package/lib/commonjs/skia/types/Path/Path.js.map +1 -0
- package/lib/commonjs/skia/{Path → types/Path}/PathFactory.js +0 -0
- package/lib/commonjs/skia/{Path → types/Path}/PathFactory.js.map +0 -0
- package/lib/commonjs/skia/types/Path/index.js +32 -0
- package/lib/commonjs/skia/types/Path/index.js.map +1 -0
- package/lib/commonjs/skia/{PathEffect.js → types/PathEffect.js} +0 -0
- package/lib/commonjs/skia/types/PathEffect.js.map +1 -0
- package/lib/commonjs/skia/{Picture → types/Picture}/Picture.js +0 -0
- package/lib/commonjs/skia/{Picture → types/Picture}/Picture.js.map +0 -0
- package/lib/commonjs/skia/{Picture → types/Picture}/PictureFactory.js +0 -0
- package/lib/commonjs/skia/{Picture → types/Picture}/PictureFactory.js.map +0 -0
- package/lib/commonjs/skia/{Picture → types/Picture}/PictureRecorder.js +0 -0
- package/lib/commonjs/skia/{Picture → types/Picture}/PictureRecorder.js.map +0 -0
- package/lib/commonjs/skia/types/Picture/index.js +45 -0
- package/lib/commonjs/skia/types/Picture/index.js.map +1 -0
- package/lib/commonjs/skia/{Point.js → types/Point.js} +0 -0
- package/lib/commonjs/skia/types/Point.js.map +1 -0
- package/lib/commonjs/skia/types/RRect.js +13 -0
- package/lib/commonjs/skia/types/RRect.js.map +1 -0
- package/lib/commonjs/skia/{RSXform.js → types/RSXform.js} +0 -0
- package/lib/commonjs/skia/{RSXform.js.map → types/RSXform.js.map} +0 -0
- package/lib/commonjs/skia/{Rect.js → types/Rect.js} +0 -0
- package/lib/commonjs/skia/{Rect.js.map → types/Rect.js.map} +0 -0
- package/lib/commonjs/skia/{RuntimeEffect → types/RuntimeEffect}/RuntimeEffect.js +0 -0
- package/lib/commonjs/skia/{RuntimeEffect → types/RuntimeEffect}/RuntimeEffect.js.map +0 -0
- package/lib/commonjs/skia/{RuntimeEffect → types/RuntimeEffect}/RuntimeEffectFactory.js +0 -0
- package/lib/commonjs/skia/{RuntimeEffect → types/RuntimeEffect}/RuntimeEffectFactory.js.map +0 -0
- package/lib/commonjs/skia/{RuntimeEffect → types/RuntimeEffect}/index.js +0 -0
- package/lib/commonjs/skia/{RuntimeEffect → types/RuntimeEffect}/index.js.map +0 -0
- package/lib/commonjs/skia/{SVG → types/SVG}/SVG.js +0 -0
- package/lib/commonjs/skia/{SVG → types/SVG}/SVG.js.map +0 -0
- package/lib/commonjs/skia/{SVG → types/SVG}/SVGFactory.js +0 -0
- package/lib/commonjs/skia/{SVG → types/SVG}/SVGFactory.js.map +0 -0
- package/lib/commonjs/skia/types/SVG/index.js +32 -0
- package/lib/commonjs/skia/types/SVG/index.js.map +1 -0
- package/lib/commonjs/skia/types/Shader/Shader.js +61 -0
- package/lib/commonjs/skia/types/Shader/Shader.js.map +1 -0
- package/lib/commonjs/skia/{Shader → types/Shader}/ShaderFactory.js +0 -0
- package/lib/commonjs/skia/{Shader → types/Shader}/ShaderFactory.js.map +0 -0
- package/lib/commonjs/skia/types/Shader/index.js +32 -0
- package/lib/commonjs/skia/types/Shader/index.js.map +1 -0
- package/lib/commonjs/skia/types/Skia.js +6 -0
- package/lib/commonjs/skia/{RRect.js.map → types/Skia.js.map} +0 -0
- package/lib/commonjs/skia/{Surface → types/Surface}/Surface.js +0 -0
- package/lib/commonjs/skia/{Surface → types/Surface}/Surface.js.map +0 -0
- package/lib/commonjs/skia/{Surface → types/Surface}/SurfaceFactory.js +0 -0
- package/lib/commonjs/skia/{Surface → types/Surface}/SurfaceFactory.js.map +0 -0
- package/lib/commonjs/skia/{Surface → types/Surface}/index.js +0 -0
- package/lib/commonjs/skia/{Surface → types/Surface}/index.js.map +0 -0
- package/lib/commonjs/skia/{TextBlob.js → types/TextBlob.js} +0 -0
- package/lib/commonjs/skia/{TextBlob.js.map → types/TextBlob.js.map} +0 -0
- package/lib/commonjs/skia/{Typeface → types/Typeface}/Typeface.js +0 -0
- package/lib/commonjs/skia/{Typeface → types/Typeface}/Typeface.js.map +0 -0
- package/lib/commonjs/skia/{Typeface → types/Typeface}/TypefaceFactory.js +0 -0
- package/lib/commonjs/skia/{Typeface → types/Typeface}/TypefaceFactory.js.map +0 -0
- package/lib/commonjs/skia/types/Typeface/index.js +32 -0
- package/lib/commonjs/skia/types/Typeface/index.js.map +1 -0
- package/lib/commonjs/skia/{Vertices → types/Vertices}/Vertices.js +0 -0
- package/lib/commonjs/skia/{Vertices → types/Vertices}/Vertices.js.map +0 -0
- package/lib/commonjs/skia/{Vertices → types/Vertices}/index.js +0 -0
- package/lib/commonjs/skia/{Vertices → types/Vertices}/index.js.map +0 -0
- package/lib/commonjs/skia/types/index.js +370 -0
- package/lib/commonjs/skia/types/index.js.map +1 -0
- package/lib/commonjs/skia/web/Host.js +75 -0
- package/lib/commonjs/skia/web/Host.js.map +1 -0
- package/lib/commonjs/skia/web/JsiImageFilterFactory.js +68 -0
- package/lib/commonjs/skia/web/JsiImageFilterFactory.js.map +1 -0
- package/lib/commonjs/skia/web/JsiSkCanvas.js +184 -0
- package/lib/commonjs/skia/web/JsiSkCanvas.js.map +1 -0
- package/lib/commonjs/skia/web/JsiSkColor.js +339 -0
- package/lib/commonjs/skia/web/JsiSkColor.js.map +1 -0
- package/lib/commonjs/skia/web/JsiSkColorFilter.js +18 -0
- package/lib/commonjs/skia/web/JsiSkColorFilter.js.map +1 -0
- package/lib/commonjs/skia/web/JsiSkColorFilterFactory.js +48 -0
- package/lib/commonjs/skia/web/JsiSkColorFilterFactory.js.map +1 -0
- package/lib/commonjs/skia/web/JsiSkContourMeasure.js +42 -0
- package/lib/commonjs/skia/web/JsiSkContourMeasure.js.map +1 -0
- package/lib/commonjs/skia/web/JsiSkContourMeasureIter.js +30 -0
- package/lib/commonjs/skia/web/JsiSkContourMeasureIter.js.map +1 -0
- package/lib/commonjs/skia/web/JsiSkData.js +18 -0
- package/lib/commonjs/skia/web/JsiSkData.js.map +1 -0
- package/lib/commonjs/skia/web/JsiSkDataFactory.js +44 -0
- package/lib/commonjs/skia/web/JsiSkDataFactory.js.map +1 -0
- package/lib/commonjs/skia/web/JsiSkFont.js +111 -0
- package/lib/commonjs/skia/web/JsiSkFont.js.map +1 -0
- package/lib/commonjs/skia/web/JsiSkFontMgr.js +35 -0
- package/lib/commonjs/skia/web/JsiSkFontMgr.js.map +1 -0
- package/lib/commonjs/skia/web/JsiSkFontMgrFactory.js +25 -0
- package/lib/commonjs/skia/web/JsiSkFontMgrFactory.js.map +1 -0
- package/lib/commonjs/skia/web/JsiSkImage.js +56 -0
- package/lib/commonjs/skia/web/JsiSkImage.js.map +1 -0
- package/lib/commonjs/skia/web/JsiSkImageFactory.js +47 -0
- package/lib/commonjs/skia/web/JsiSkImageFactory.js.map +1 -0
- package/lib/commonjs/skia/web/JsiSkImageFilter.js +18 -0
- package/lib/commonjs/skia/web/JsiSkImageFilter.js.map +1 -0
- package/lib/commonjs/skia/web/JsiSkMaskFilter.js +18 -0
- package/lib/commonjs/skia/web/JsiSkMaskFilter.js.map +1 -0
- package/lib/commonjs/skia/web/JsiSkMaskFilterFactory.js +24 -0
- package/lib/commonjs/skia/web/JsiSkMaskFilterFactory.js.map +1 -0
- package/lib/commonjs/skia/web/JsiSkMatrix.js +38 -0
- package/lib/commonjs/skia/web/JsiSkMatrix.js.map +1 -0
- package/lib/commonjs/skia/web/JsiSkPaint.js +101 -0
- package/lib/commonjs/skia/web/JsiSkPaint.js.map +1 -0
- package/lib/commonjs/skia/web/JsiSkPath.js +324 -0
- package/lib/commonjs/skia/web/JsiSkPath.js.map +1 -0
- package/lib/commonjs/skia/web/JsiSkPathEffect.js +18 -0
- package/lib/commonjs/skia/web/JsiSkPathEffect.js.map +1 -0
- package/lib/commonjs/skia/web/JsiSkPathEffectFactory.js +78 -0
- package/lib/commonjs/skia/web/JsiSkPathEffectFactory.js.map +1 -0
- package/lib/commonjs/skia/web/JsiSkPathFactory.js +58 -0
- package/lib/commonjs/skia/web/JsiSkPathFactory.js.map +1 -0
- package/lib/commonjs/skia/web/JsiSkPicture.js +29 -0
- package/lib/commonjs/skia/web/JsiSkPicture.js.map +1 -0
- package/lib/commonjs/skia/web/JsiSkPictureFactory.js +30 -0
- package/lib/commonjs/skia/web/JsiSkPictureFactory.js.map +1 -0
- package/lib/commonjs/skia/web/JsiSkPictureRecorder.js +30 -0
- package/lib/commonjs/skia/web/JsiSkPictureRecorder.js.map +1 -0
- package/lib/commonjs/skia/web/JsiSkPoint.js +26 -0
- package/lib/commonjs/skia/web/JsiSkPoint.js.map +1 -0
- package/lib/commonjs/skia/web/JsiSkRRect.js +32 -0
- package/lib/commonjs/skia/web/JsiSkRRect.js.map +1 -0
- package/lib/commonjs/skia/web/JsiSkRSXform.js +18 -0
- package/lib/commonjs/skia/web/JsiSkRSXform.js.map +1 -0
- package/lib/commonjs/skia/web/JsiSkRect.js +42 -0
- package/lib/commonjs/skia/web/JsiSkRect.js.map +1 -0
- package/lib/commonjs/skia/web/JsiSkRuntimeEffect.js +44 -0
- package/lib/commonjs/skia/web/JsiSkRuntimeEffect.js.map +1 -0
- package/lib/commonjs/skia/web/JsiSkRuntimeEffectFactory.js +30 -0
- package/lib/commonjs/skia/web/JsiSkRuntimeEffectFactory.js.map +1 -0
- package/lib/commonjs/skia/web/JsiSkSVGFactory.js +26 -0
- package/lib/commonjs/skia/web/JsiSkSVGFactory.js.map +1 -0
- package/lib/commonjs/skia/web/JsiSkShader.js +18 -0
- package/lib/commonjs/skia/web/JsiSkShader.js.map +1 -0
- package/lib/commonjs/skia/web/JsiSkShaderFactory.js +52 -0
- package/lib/commonjs/skia/web/JsiSkShaderFactory.js.map +1 -0
- package/lib/commonjs/skia/web/JsiSkSurface.js +31 -0
- package/lib/commonjs/skia/web/JsiSkSurface.js.map +1 -0
- package/lib/commonjs/skia/web/JsiSkSurfaceFactory.js +30 -0
- package/lib/commonjs/skia/web/JsiSkSurfaceFactory.js.map +1 -0
- package/lib/commonjs/skia/web/JsiSkTextBlob.js +18 -0
- package/lib/commonjs/skia/web/JsiSkTextBlob.js.map +1 -0
- package/lib/commonjs/skia/web/JsiSkTextBlobFactory.js +36 -0
- package/lib/commonjs/skia/web/JsiSkTextBlobFactory.js.map +1 -0
- package/lib/commonjs/skia/web/JsiSkTypeface.js +28 -0
- package/lib/commonjs/skia/web/JsiSkTypeface.js.map +1 -0
- package/lib/commonjs/skia/web/JsiSkTypefaceFactory.js +30 -0
- package/lib/commonjs/skia/web/JsiSkTypefaceFactory.js.map +1 -0
- package/lib/commonjs/skia/web/JsiSkVertices.js +28 -0
- package/lib/commonjs/skia/web/JsiSkVertices.js.map +1 -0
- package/lib/commonjs/skia/web/JsiSkVerticesFactory.js +27 -0
- package/lib/commonjs/skia/web/JsiSkVerticesFactory.js.map +1 -0
- package/lib/commonjs/skia/web/JsiSkia.js +97 -0
- package/lib/commonjs/skia/web/JsiSkia.js.map +1 -0
- package/lib/commonjs/skia/web/index.js +19 -0
- package/lib/commonjs/skia/web/index.js.map +1 -0
- package/lib/commonjs/values/hooks/useValue.js.map +1 -1
- package/lib/commonjs/values/hooks/useValueEffect.js.map +1 -1
- package/lib/commonjs/values/web/RNSkReadonlyValue.js.map +1 -1
- package/lib/commonjs/values/web/api.js +2 -2
- package/lib/commonjs/values/web/api.js.map +1 -1
- package/lib/commonjs/views/SkiaView.js.map +1 -1
- package/lib/commonjs/views/SkiaView.web.js +216 -0
- package/lib/commonjs/views/SkiaView.web.js.map +1 -0
- package/lib/commonjs/views/types.js.map +1 -1
- package/lib/commonjs/views/useTouchHandler.js +70 -46
- package/lib/commonjs/views/useTouchHandler.js.map +1 -1
- package/lib/commonjs/web/index.js +20 -0
- package/lib/commonjs/web/index.js.map +1 -0
- package/lib/module/animation/decay/runDecay.js.map +1 -1
- package/lib/module/animation/functions/index.js +4 -2
- package/lib/module/animation/functions/index.js.map +1 -1
- package/lib/module/animation/functions/interpolateColors.js.map +1 -1
- package/lib/module/animation/functions/interpolatePaths.js +36 -0
- package/lib/module/animation/functions/interpolatePaths.js.map +1 -0
- package/lib/module/animation/functions/interpolateVector.js +7 -0
- package/lib/module/animation/functions/interpolateVector.js.map +1 -0
- package/lib/module/animation/spring/runSpring.js.map +1 -1
- package/lib/module/animation/spring/useSpring.js.map +1 -1
- package/lib/module/animation/timing/createTiming.js.map +1 -1
- package/lib/module/animation/timing/runTiming.js.map +1 -1
- package/lib/module/animation/timing/useTiming.js.map +1 -1
- package/lib/module/index.js +1 -0
- package/lib/module/index.js.map +1 -1
- package/lib/module/renderer/Canvas.js +15 -27
- package/lib/module/renderer/Canvas.js.map +1 -1
- package/lib/module/renderer/DependencyManager.js.map +1 -1
- package/lib/module/renderer/HostConfig.js +2 -2
- package/lib/module/renderer/HostConfig.js.map +1 -1
- package/lib/module/renderer/components/Blend.js +5 -3
- package/lib/module/renderer/components/Blend.js.map +1 -1
- package/lib/module/renderer/components/Compose.js +5 -4
- package/lib/module/renderer/components/Compose.js.map +1 -1
- package/lib/module/renderer/components/Group.js +7 -6
- package/lib/module/renderer/components/Group.js.map +1 -1
- package/lib/module/renderer/components/Mask.js +7 -3
- package/lib/module/renderer/components/Mask.js.map +1 -1
- package/lib/module/renderer/components/Paint.js +6 -3
- package/lib/module/renderer/components/Paint.js.map +1 -1
- package/lib/module/renderer/components/Picture.js.map +1 -1
- package/lib/module/renderer/components/backdrop/BackdropFilter.js +1 -1
- package/lib/module/renderer/components/backdrop/BackdropFilter.js.map +1 -1
- package/lib/module/renderer/components/colorFilters/BlendColor.js +6 -3
- package/lib/module/renderer/components/colorFilters/BlendColor.js.map +1 -1
- package/lib/module/renderer/components/colorFilters/Compose.js +2 -2
- package/lib/module/renderer/components/colorFilters/Compose.js.map +1 -1
- package/lib/module/renderer/components/colorFilters/Lerp.js +6 -4
- package/lib/module/renderer/components/colorFilters/Lerp.js.map +1 -1
- package/lib/module/renderer/components/colorFilters/LinearToSRGBGamma.js +5 -3
- package/lib/module/renderer/components/colorFilters/LinearToSRGBGamma.js.map +1 -1
- package/lib/module/renderer/components/colorFilters/LumaColorFilter.js +5 -3
- package/lib/module/renderer/components/colorFilters/LumaColorFilter.js.map +1 -1
- package/lib/module/renderer/components/colorFilters/Matrix.js +5 -3
- package/lib/module/renderer/components/colorFilters/Matrix.js.map +1 -1
- package/lib/module/renderer/components/colorFilters/SRGBToLinearGamma.js +5 -3
- package/lib/module/renderer/components/colorFilters/SRGBToLinearGamma.js.map +1 -1
- package/lib/module/renderer/components/image/BoxFit.js +7 -8
- package/lib/module/renderer/components/image/BoxFit.js.map +1 -1
- package/lib/module/renderer/components/image/Image.js +3 -2
- package/lib/module/renderer/components/image/Image.js.map +1 -1
- package/lib/module/renderer/components/image/ImageSVG.js +3 -2
- package/lib/module/renderer/components/image/ImageSVG.js.map +1 -1
- package/lib/module/renderer/components/image/ImageShader.js +10 -7
- package/lib/module/renderer/components/image/ImageShader.js.map +1 -1
- package/lib/module/renderer/components/imageFilters/Blur.js +7 -4
- package/lib/module/renderer/components/imageFilters/Blur.js.map +1 -1
- package/lib/module/renderer/components/imageFilters/DisplacementMap.js +7 -5
- package/lib/module/renderer/components/imageFilters/DisplacementMap.js.map +1 -1
- package/lib/module/renderer/components/imageFilters/InnerShadow.js +3 -3
- package/lib/module/renderer/components/imageFilters/InnerShadow.js.map +1 -1
- package/lib/module/renderer/components/imageFilters/Morphology.js +6 -4
- package/lib/module/renderer/components/imageFilters/Morphology.js.map +1 -1
- package/lib/module/renderer/components/imageFilters/Offset.js +5 -3
- package/lib/module/renderer/components/imageFilters/Offset.js.map +1 -1
- package/lib/module/renderer/components/imageFilters/RuntimeShader.js +13 -4
- package/lib/module/renderer/components/imageFilters/RuntimeShader.js.map +1 -1
- package/lib/module/renderer/components/imageFilters/Shadow.js +6 -6
- package/lib/module/renderer/components/imageFilters/Shadow.js.map +1 -1
- package/lib/module/renderer/components/imageFilters/getInput.js +2 -2
- package/lib/module/renderer/components/imageFilters/getInput.js.map +1 -1
- package/lib/module/renderer/components/maskFilters/Blur.js +5 -3
- package/lib/module/renderer/components/maskFilters/Blur.js.map +1 -1
- package/lib/module/renderer/components/pathEffects/Corner.js +5 -3
- package/lib/module/renderer/components/pathEffects/Corner.js.map +1 -1
- package/lib/module/renderer/components/pathEffects/Dash.js +5 -3
- package/lib/module/renderer/components/pathEffects/Dash.js.map +1 -1
- package/lib/module/renderer/components/pathEffects/Discrete.js +5 -3
- package/lib/module/renderer/components/pathEffects/Discrete.js.map +1 -1
- package/lib/module/renderer/components/pathEffects/Line2D.js +5 -3
- package/lib/module/renderer/components/pathEffects/Line2D.js.map +1 -1
- package/lib/module/renderer/components/pathEffects/Path1D.js +6 -4
- package/lib/module/renderer/components/pathEffects/Path1D.js.map +1 -1
- package/lib/module/renderer/components/pathEffects/Path2D.js +6 -4
- package/lib/module/renderer/components/pathEffects/Path2D.js.map +1 -1
- package/lib/module/renderer/components/pathEffects/Sum.js +5 -3
- package/lib/module/renderer/components/pathEffects/Sum.js.map +1 -1
- package/lib/module/renderer/components/shaders/Color.js +6 -3
- package/lib/module/renderer/components/shaders/Color.js.map +1 -1
- package/lib/module/renderer/components/shaders/FractalNoise.js +4 -2
- package/lib/module/renderer/components/shaders/FractalNoise.js.map +1 -1
- package/lib/module/renderer/components/shaders/Gradient.js +3 -3
- package/lib/module/renderer/components/shaders/Gradient.js.map +1 -1
- package/lib/module/renderer/components/shaders/LinearGradient.js +5 -3
- package/lib/module/renderer/components/shaders/LinearGradient.js.map +1 -1
- package/lib/module/renderer/components/shaders/RadialGradient.js +5 -3
- package/lib/module/renderer/components/shaders/RadialGradient.js.map +1 -1
- package/lib/module/renderer/components/shaders/Shader.js +6 -45
- package/lib/module/renderer/components/shaders/Shader.js.map +1 -1
- package/lib/module/renderer/components/shaders/SweepGradient.js +5 -3
- package/lib/module/renderer/components/shaders/SweepGradient.js.map +1 -1
- package/lib/module/renderer/components/shaders/Turbulence.js +4 -2
- package/lib/module/renderer/components/shaders/Turbulence.js.map +1 -1
- package/lib/module/renderer/components/shaders/TwoPointConicalGradient.js +5 -3
- package/lib/module/renderer/components/shaders/TwoPointConicalGradient.js.map +1 -1
- package/lib/module/renderer/components/shapes/Box.js +20 -19
- package/lib/module/renderer/components/shapes/Box.js.map +1 -1
- package/lib/module/renderer/components/shapes/Circle.js +7 -4
- package/lib/module/renderer/components/shapes/Circle.js.map +1 -1
- package/lib/module/renderer/components/shapes/DiffRect.js.map +1 -1
- package/lib/module/renderer/components/shapes/FitBox.js.map +1 -1
- package/lib/module/renderer/components/shapes/Line.js.map +1 -1
- package/lib/module/renderer/components/shapes/Oval.js +3 -2
- package/lib/module/renderer/components/shapes/Oval.js.map +1 -1
- package/lib/module/renderer/components/shapes/Patch.js +5 -4
- package/lib/module/renderer/components/shapes/Patch.js.map +1 -1
- package/lib/module/renderer/components/shapes/Path.js +4 -3
- package/lib/module/renderer/components/shapes/Path.js.map +1 -1
- package/lib/module/renderer/components/shapes/Points.js +1 -1
- package/lib/module/renderer/components/shapes/Points.js.map +1 -1
- package/lib/module/renderer/components/shapes/Rect.js +3 -2
- package/lib/module/renderer/components/shapes/Rect.js.map +1 -1
- package/lib/module/renderer/components/shapes/RoundedRect.js +3 -2
- package/lib/module/renderer/components/shapes/RoundedRect.js.map +1 -1
- package/lib/module/renderer/components/shapes/Vertices.js +5 -3
- package/lib/module/renderer/components/shapes/Vertices.js.map +1 -1
- package/lib/module/renderer/components/text/Glyphs.js +3 -2
- package/lib/module/renderer/components/text/Glyphs.js.map +1 -1
- package/lib/module/renderer/components/text/Text.js +3 -2
- package/lib/module/renderer/components/text/Text.js.map +1 -1
- package/lib/module/renderer/components/text/TextBlob.js.map +1 -1
- package/lib/module/renderer/components/text/TextPath.js +3 -3
- package/lib/module/renderer/components/text/TextPath.js.map +1 -1
- package/lib/module/renderer/index.js +2 -1
- package/lib/module/renderer/index.js.map +1 -1
- package/lib/module/renderer/nodes/Declaration.js.map +1 -1
- package/lib/module/renderer/nodes/Drawing.js +3 -3
- package/lib/module/renderer/nodes/Drawing.js.map +1 -1
- package/lib/module/renderer/nodes/Node.js.map +1 -1
- package/lib/module/renderer/processors/Animations/Animations.js.map +1 -1
- package/lib/module/renderer/processors/Circles.js +2 -4
- package/lib/module/renderer/processors/Circles.js.map +1 -1
- package/lib/module/renderer/processors/Clips.js +3 -3
- package/lib/module/renderer/processors/Clips.js.map +1 -1
- package/lib/module/renderer/processors/Color.js +11 -0
- package/lib/module/renderer/processors/Color.js.map +1 -0
- package/lib/module/renderer/processors/Font.js +3 -2
- package/lib/module/renderer/processors/Font.js.map +1 -1
- package/lib/module/renderer/processors/Paint.js +8 -5
- package/lib/module/renderer/processors/Paint.js.map +1 -1
- package/lib/module/renderer/processors/Paths.js +2 -2
- package/lib/module/renderer/processors/Paths.js.map +1 -1
- package/lib/module/renderer/processors/Radius.js +2 -3
- package/lib/module/renderer/processors/Radius.js.map +1 -1
- package/lib/module/renderer/processors/Rects.js +7 -25
- package/lib/module/renderer/processors/Rects.js.map +1 -1
- package/lib/module/renderer/processors/Transform.js +24 -16
- package/lib/module/renderer/processors/Transform.js.map +1 -1
- package/lib/module/renderer/processors/index.js +2 -1
- package/lib/module/renderer/processors/index.js.map +1 -1
- package/lib/module/renderer/processors/math/Coordinates.js.map +1 -1
- package/lib/module/renderer/processors/math/Transforms.js.map +1 -1
- package/lib/module/renderer/processors/math/index.js +0 -2
- package/lib/module/renderer/processors/math/index.js.map +1 -1
- package/lib/module/renderer/useCanvas.js +13 -0
- package/lib/module/renderer/useCanvas.js.map +1 -0
- package/lib/module/skia/NativeSetup.js +2 -2
- package/lib/module/skia/NativeSetup.js.map +1 -1
- package/lib/module/skia/Skia.js +2 -35
- package/lib/module/skia/Skia.js.map +1 -1
- package/lib/module/skia/Skia.web.js +3 -0
- package/lib/module/skia/Skia.web.js.map +1 -0
- package/lib/module/skia/core/Data.js +62 -0
- package/lib/module/skia/core/Data.js.map +1 -0
- package/lib/module/skia/core/Font.js +22 -0
- package/lib/module/skia/core/Font.js.map +1 -0
- package/lib/module/skia/core/Image.js +8 -0
- package/lib/module/skia/core/Image.js.map +1 -0
- package/lib/module/skia/core/Matrix.js +4 -0
- package/lib/module/skia/core/Matrix.js.map +1 -0
- package/lib/module/skia/core/Paint.js +17 -0
- package/lib/module/skia/core/Paint.js.map +1 -0
- package/lib/module/skia/core/Path.js +53 -0
- package/lib/module/skia/core/Path.js.map +1 -0
- package/lib/module/skia/core/Picture.js +19 -0
- package/lib/module/skia/core/Picture.js.map +1 -0
- package/lib/module/skia/core/RRect.js +3 -0
- package/lib/module/skia/core/RRect.js.map +1 -0
- package/lib/module/skia/core/Rect.js +17 -0
- package/lib/module/skia/core/Rect.js.map +1 -0
- package/lib/module/skia/core/SVG.js +4 -0
- package/lib/module/skia/core/SVG.js.map +1 -0
- package/lib/module/skia/core/Typeface.js +8 -0
- package/lib/module/skia/core/Typeface.js.map +1 -0
- package/lib/module/skia/core/Vector.js +23 -0
- package/lib/module/skia/core/Vector.js.map +1 -0
- package/lib/module/skia/core/index.js +13 -0
- package/lib/module/skia/core/index.js.map +1 -0
- package/lib/module/skia/index.js +2 -23
- package/lib/module/skia/index.js.map +1 -1
- package/lib/module/skia/{Canvas.js → types/Canvas.js} +0 -0
- package/lib/module/skia/{Canvas.js.map → types/Canvas.js.map} +0 -0
- package/lib/module/skia/types/Color.js +2 -0
- package/lib/module/skia/{ContourMeasure.js.map → types/Color.js.map} +0 -0
- package/lib/module/skia/{ColorFilter → types/ColorFilter}/ColorFilter.js +0 -0
- package/lib/module/skia/{ColorFilter → types/ColorFilter}/ColorFilter.js.map +0 -0
- package/lib/module/skia/{ColorFilter → types/ColorFilter}/ColorFilterFactory.js +0 -0
- package/lib/module/skia/{FontMgr/FontMgr.js.map → types/ColorFilter/ColorFilterFactory.js.map} +0 -0
- package/lib/module/skia/{ColorFilter → types/ColorFilter}/index.js +0 -0
- package/lib/module/skia/{ColorFilter → types/ColorFilter}/index.js.map +0 -0
- package/lib/module/skia/{ContourMeasure.js → types/ContourMeasure.js} +0 -0
- package/lib/module/skia/{FontMgr/FontMgrFactory.js.map → types/ContourMeasure.js.map} +0 -0
- package/lib/module/skia/types/Data/Data.js +2 -0
- package/lib/module/skia/{JsiInstance.js.map → types/Data/Data.js.map} +0 -0
- package/lib/module/skia/{Data → types/Data}/DataFactory.js +0 -0
- package/lib/module/skia/{Path/PathFactory.js.map → types/Data/DataFactory.js.map} +0 -0
- package/lib/module/skia/{Data → types/Data}/index.js +0 -0
- package/lib/module/skia/{Data → types/Data}/index.js.map +0 -0
- package/lib/module/skia/{Font → types/Font}/Font.js +0 -0
- package/lib/module/skia/types/Font/Font.js.map +1 -0
- package/lib/module/skia/types/Font/index.js +2 -0
- package/lib/module/skia/types/Font/index.js.map +1 -0
- package/lib/module/skia/{FontMgr → types/FontMgr}/FontMgr.js +0 -0
- package/lib/module/skia/{Picture/Picture.js.map → types/FontMgr/FontMgr.js.map} +0 -0
- package/lib/module/skia/{FontMgr → types/FontMgr}/FontMgrFactory.js +0 -0
- package/lib/module/skia/{Picture/PictureFactory.js.map → types/FontMgr/FontMgrFactory.js.map} +0 -0
- package/lib/module/skia/types/FontMgr/index.js +3 -0
- package/lib/module/skia/types/FontMgr/index.js.map +1 -0
- package/lib/module/skia/{Image → types/Image}/Image.js +0 -0
- package/lib/module/skia/types/Image/Image.js.map +1 -0
- package/lib/module/skia/{Image → types/Image}/ImageFactory.js +0 -0
- package/lib/module/skia/types/Image/ImageFactory.js.map +1 -0
- package/lib/module/skia/types/Image/index.js +3 -0
- package/lib/module/skia/types/Image/index.js.map +1 -0
- package/lib/module/skia/{ImageFilter → types/ImageFilter}/ImageFilter.js +0 -0
- package/lib/module/skia/{ImageFilter → types/ImageFilter}/ImageFilter.js.map +0 -0
- package/lib/module/skia/{ImageFilter → types/ImageFilter}/ImageFilterFactory.js +0 -0
- package/lib/module/skia/types/ImageFilter/ImageFilterFactory.js.map +1 -0
- package/lib/module/skia/{ImageFilter → types/ImageFilter}/index.js +0 -0
- package/lib/module/skia/{ImageFilter → types/ImageFilter}/index.js.map +0 -0
- package/lib/module/skia/{JsiInstance.js → types/JsiInstance.js} +0 -0
- package/lib/module/skia/{Picture/PictureRecorder.js.map → types/JsiInstance.js.map} +0 -0
- package/lib/module/skia/{MaskFilter.js → types/MaskFilter.js} +0 -0
- package/lib/module/skia/types/MaskFilter.js.map +1 -0
- package/lib/module/skia/types/Matrix.js +69 -0
- package/lib/module/skia/types/Matrix.js.map +1 -0
- package/lib/module/skia/{Paint → types/Paint}/BlendMode.js +0 -0
- package/lib/module/skia/{Paint → types/Paint}/BlendMode.js.map +0 -0
- package/lib/module/skia/types/Paint/Paint.js +25 -0
- package/lib/module/skia/types/Paint/Paint.js.map +1 -0
- package/lib/module/skia/types/Paint/index.js +3 -0
- package/lib/module/skia/types/Paint/index.js.map +1 -0
- package/lib/module/skia/types/Path/Path.js +36 -0
- package/lib/module/skia/types/Path/Path.js.map +1 -0
- package/lib/module/skia/{Path → types/Path}/PathFactory.js +0 -0
- package/lib/module/skia/{RRect.js.map → types/Path/PathFactory.js.map} +0 -0
- package/lib/module/skia/types/Path/index.js +3 -0
- package/lib/module/skia/types/Path/index.js.map +1 -0
- package/lib/module/skia/{PathEffect.js → types/PathEffect.js} +0 -0
- package/lib/module/skia/types/PathEffect.js.map +1 -0
- package/lib/module/skia/{Picture → types/Picture}/Picture.js +0 -0
- package/lib/module/skia/{RSXform.js.map → types/Picture/Picture.js.map} +0 -0
- package/lib/module/skia/{Picture → types/Picture}/PictureFactory.js +0 -0
- package/lib/module/skia/{Rect.js.map → types/Picture/PictureFactory.js.map} +0 -0
- package/lib/module/skia/{Picture → types/Picture}/PictureRecorder.js +0 -0
- package/lib/module/skia/{RuntimeEffect/RuntimeEffect.js.map → types/Picture/PictureRecorder.js.map} +0 -0
- package/lib/module/skia/types/Picture/index.js +4 -0
- package/lib/module/skia/types/Picture/index.js.map +1 -0
- package/lib/module/skia/{Point.js → types/Point.js} +0 -0
- package/lib/module/skia/types/Point.js.map +1 -0
- package/lib/module/skia/types/RRect.js +4 -0
- package/lib/module/skia/types/RRect.js.map +1 -0
- package/lib/module/skia/{RSXform.js → types/RSXform.js} +0 -0
- package/lib/module/skia/{RuntimeEffect/RuntimeEffectFactory.js.map → types/RSXform.js.map} +0 -0
- package/lib/module/skia/{Rect.js → types/Rect.js} +0 -0
- package/lib/module/skia/{SVG/SVG.js.map → types/Rect.js.map} +0 -0
- package/lib/module/skia/{RuntimeEffect → types/RuntimeEffect}/RuntimeEffect.js +0 -0
- package/lib/module/skia/{SVG/SVGFactory.js.map → types/RuntimeEffect/RuntimeEffect.js.map} +0 -0
- package/lib/module/skia/{RuntimeEffect → types/RuntimeEffect}/RuntimeEffectFactory.js +0 -0
- package/lib/module/skia/{Shader/ShaderFactory.js.map → types/RuntimeEffect/RuntimeEffectFactory.js.map} +0 -0
- package/lib/module/skia/{RuntimeEffect → types/RuntimeEffect}/index.js +0 -0
- package/lib/module/skia/{RuntimeEffect → types/RuntimeEffect}/index.js.map +0 -0
- package/lib/module/skia/{SVG → types/SVG}/SVG.js +0 -0
- package/lib/module/skia/{Surface/Surface.js.map → types/SVG/SVG.js.map} +0 -0
- package/lib/module/skia/{SVG → types/SVG}/SVGFactory.js +0 -0
- package/lib/module/skia/{Surface/SurfaceFactory.js.map → types/SVG/SVGFactory.js.map} +0 -0
- package/lib/module/skia/types/SVG/index.js +3 -0
- package/lib/module/skia/types/SVG/index.js.map +1 -0
- package/lib/module/skia/types/Shader/Shader.js +50 -0
- package/lib/module/skia/types/Shader/Shader.js.map +1 -0
- package/lib/module/skia/{Shader → types/Shader}/ShaderFactory.js +0 -0
- package/lib/module/skia/{TextBlob.js.map → types/Shader/ShaderFactory.js.map} +0 -0
- package/lib/module/skia/types/Shader/index.js +3 -0
- package/lib/module/skia/types/Shader/index.js.map +1 -0
- package/lib/module/skia/types/Skia.js +2 -0
- package/lib/module/skia/{Typeface/Typeface.js.map → types/Skia.js.map} +0 -0
- package/lib/module/skia/{Surface → types/Surface}/Surface.js +0 -0
- package/lib/module/skia/{Typeface/TypefaceFactory.js.map → types/Surface/Surface.js.map} +0 -0
- package/lib/module/skia/{Surface → types/Surface}/SurfaceFactory.js +0 -0
- package/lib/module/skia/types/Surface/SurfaceFactory.js.map +1 -0
- package/lib/module/skia/{Surface → types/Surface}/index.js +0 -0
- package/lib/module/skia/{Surface → types/Surface}/index.js.map +0 -0
- package/lib/module/skia/{TextBlob.js → types/TextBlob.js} +0 -0
- package/lib/module/skia/types/TextBlob.js.map +1 -0
- package/lib/module/skia/{Typeface → types/Typeface}/Typeface.js +0 -0
- package/lib/module/skia/types/Typeface/Typeface.js.map +1 -0
- package/lib/module/skia/{Typeface → types/Typeface}/TypefaceFactory.js +0 -0
- package/lib/module/skia/types/Typeface/TypefaceFactory.js.map +1 -0
- package/lib/module/skia/types/Typeface/index.js +3 -0
- package/lib/module/skia/types/Typeface/index.js.map +1 -0
- package/lib/module/skia/{Vertices → types/Vertices}/Vertices.js +0 -0
- package/lib/module/skia/{Vertices → types/Vertices}/Vertices.js.map +0 -0
- package/lib/module/skia/{Vertices → types/Vertices}/index.js +0 -0
- package/lib/module/skia/{Vertices → types/Vertices}/index.js.map +0 -0
- package/lib/module/skia/types/index.js +29 -0
- package/lib/module/skia/types/index.js.map +1 -0
- package/lib/module/skia/web/Host.js +42 -0
- package/lib/module/skia/web/Host.js.map +1 -0
- package/lib/module/skia/web/JsiImageFilterFactory.js +57 -0
- package/lib/module/skia/web/JsiImageFilterFactory.js.map +1 -0
- package/lib/module/skia/web/JsiSkCanvas.js +173 -0
- package/lib/module/skia/web/JsiSkCanvas.js.map +1 -0
- package/lib/module/skia/web/JsiSkColor.js +330 -0
- package/lib/module/skia/web/JsiSkColor.js.map +1 -0
- package/lib/module/skia/web/JsiSkColorFilter.js +8 -0
- package/lib/module/skia/web/JsiSkColorFilter.js.map +1 -0
- package/lib/module/skia/web/JsiSkColorFilterFactory.js +37 -0
- package/lib/module/skia/web/JsiSkColorFilterFactory.js.map +1 -0
- package/lib/module/skia/web/JsiSkContourMeasure.js +31 -0
- package/lib/module/skia/web/JsiSkContourMeasure.js.map +1 -0
- package/lib/module/skia/web/JsiSkContourMeasureIter.js +19 -0
- package/lib/module/skia/web/JsiSkContourMeasureIter.js.map +1 -0
- package/lib/module/skia/web/JsiSkData.js +8 -0
- package/lib/module/skia/web/JsiSkData.js.map +1 -0
- package/lib/module/skia/web/JsiSkDataFactory.js +33 -0
- package/lib/module/skia/web/JsiSkDataFactory.js.map +1 -0
- package/lib/module/skia/web/JsiSkFont.js +99 -0
- package/lib/module/skia/web/JsiSkFont.js.map +1 -0
- package/lib/module/skia/web/JsiSkFontMgr.js +25 -0
- package/lib/module/skia/web/JsiSkFontMgr.js.map +1 -0
- package/lib/module/skia/web/JsiSkFontMgrFactory.js +14 -0
- package/lib/module/skia/web/JsiSkFontMgrFactory.js.map +1 -0
- package/lib/module/skia/web/JsiSkImage.js +46 -0
- package/lib/module/skia/web/JsiSkImage.js.map +1 -0
- package/lib/module/skia/web/JsiSkImageFactory.js +36 -0
- package/lib/module/skia/web/JsiSkImageFactory.js.map +1 -0
- package/lib/module/skia/web/JsiSkImageFilter.js +8 -0
- package/lib/module/skia/web/JsiSkImageFilter.js.map +1 -0
- package/lib/module/skia/web/JsiSkMaskFilter.js +8 -0
- package/lib/module/skia/web/JsiSkMaskFilter.js.map +1 -0
- package/lib/module/skia/web/JsiSkMaskFilterFactory.js +13 -0
- package/lib/module/skia/web/JsiSkMaskFilterFactory.js.map +1 -0
- package/lib/module/skia/web/JsiSkMatrix.js +28 -0
- package/lib/module/skia/web/JsiSkMatrix.js.map +1 -0
- package/lib/module/skia/web/JsiSkPaint.js +91 -0
- package/lib/module/skia/web/JsiSkPaint.js.map +1 -0
- package/lib/module/skia/web/JsiSkPath.js +311 -0
- package/lib/module/skia/web/JsiSkPath.js.map +1 -0
- package/lib/module/skia/web/JsiSkPathEffect.js +8 -0
- package/lib/module/skia/web/JsiSkPathEffect.js.map +1 -0
- package/lib/module/skia/web/JsiSkPathEffectFactory.js +67 -0
- package/lib/module/skia/web/JsiSkPathEffectFactory.js.map +1 -0
- package/lib/module/skia/web/JsiSkPathFactory.js +47 -0
- package/lib/module/skia/web/JsiSkPathFactory.js.map +1 -0
- package/lib/module/skia/web/JsiSkPicture.js +18 -0
- package/lib/module/skia/web/JsiSkPicture.js.map +1 -0
- package/lib/module/skia/web/JsiSkPictureFactory.js +19 -0
- package/lib/module/skia/web/JsiSkPictureFactory.js.map +1 -0
- package/lib/module/skia/web/JsiSkPictureRecorder.js +18 -0
- package/lib/module/skia/web/JsiSkPictureRecorder.js.map +1 -0
- package/lib/module/skia/web/JsiSkPoint.js +16 -0
- package/lib/module/skia/web/JsiSkPoint.js.map +1 -0
- package/lib/module/skia/web/JsiSkRRect.js +21 -0
- package/lib/module/skia/web/JsiSkRRect.js.map +1 -0
- package/lib/module/skia/web/JsiSkRSXform.js +8 -0
- package/lib/module/skia/web/JsiSkRSXform.js.map +1 -0
- package/lib/module/skia/web/JsiSkRect.js +32 -0
- package/lib/module/skia/web/JsiSkRect.js.map +1 -0
- package/lib/module/skia/web/JsiSkRuntimeEffect.js +33 -0
- package/lib/module/skia/web/JsiSkRuntimeEffect.js.map +1 -0
- package/lib/module/skia/web/JsiSkRuntimeEffectFactory.js +19 -0
- package/lib/module/skia/web/JsiSkRuntimeEffectFactory.js.map +1 -0
- package/lib/module/skia/web/JsiSkSVGFactory.js +16 -0
- package/lib/module/skia/web/JsiSkSVGFactory.js.map +1 -0
- package/lib/module/skia/web/JsiSkShader.js +8 -0
- package/lib/module/skia/web/JsiSkShader.js.map +1 -0
- package/lib/module/skia/web/JsiSkShaderFactory.js +41 -0
- package/lib/module/skia/web/JsiSkShaderFactory.js.map +1 -0
- package/lib/module/skia/web/JsiSkSurface.js +19 -0
- package/lib/module/skia/web/JsiSkSurface.js.map +1 -0
- package/lib/module/skia/web/JsiSkSurfaceFactory.js +19 -0
- package/lib/module/skia/web/JsiSkSurfaceFactory.js.map +1 -0
- package/lib/module/skia/web/JsiSkTextBlob.js +8 -0
- package/lib/module/skia/web/JsiSkTextBlob.js.map +1 -0
- package/lib/module/skia/web/JsiSkTextBlobFactory.js +25 -0
- package/lib/module/skia/web/JsiSkTextBlobFactory.js.map +1 -0
- package/lib/module/skia/web/JsiSkTypeface.js +18 -0
- package/lib/module/skia/web/JsiSkTypeface.js.map +1 -0
- package/lib/module/skia/web/JsiSkTypefaceFactory.js +19 -0
- package/lib/module/skia/web/JsiSkTypefaceFactory.js.map +1 -0
- package/lib/module/skia/web/JsiSkVertices.js +17 -0
- package/lib/module/skia/web/JsiSkVertices.js.map +1 -0
- package/lib/module/skia/web/JsiSkVerticesFactory.js +16 -0
- package/lib/module/skia/web/JsiSkVerticesFactory.js.map +1 -0
- package/lib/module/skia/web/JsiSkia.js +61 -0
- package/lib/module/skia/web/JsiSkia.js.map +1 -0
- package/lib/module/skia/web/index.js +2 -0
- package/lib/module/skia/web/index.js.map +1 -0
- package/lib/module/values/hooks/useValue.js.map +1 -1
- package/lib/module/values/hooks/useValueEffect.js.map +1 -1
- package/lib/module/values/web/RNSkReadonlyValue.js.map +1 -1
- package/lib/module/values/web/api.js +2 -2
- package/lib/module/values/web/api.js.map +1 -1
- package/lib/module/views/SkiaView.js.map +1 -1
- package/lib/module/views/SkiaView.web.js +202 -0
- package/lib/module/views/SkiaView.web.js.map +1 -0
- package/lib/module/views/types.js.map +1 -1
- package/lib/module/views/useTouchHandler.js +64 -43
- package/lib/module/views/useTouchHandler.js.map +1 -1
- package/lib/module/web/index.js +8 -0
- package/lib/module/web/index.js.map +1 -0
- package/lib/typescript/src/animation/decay/runDecay.d.ts +2 -2
- package/lib/typescript/src/animation/functions/index.d.ts +4 -2
- package/lib/typescript/src/animation/functions/interpolatePaths.d.ts +17 -0
- package/lib/typescript/src/animation/functions/interpolateVector.d.ts +10 -0
- package/lib/typescript/src/animation/spring/runSpring.d.ts +2 -2
- package/lib/typescript/src/animation/spring/useSpring.d.ts +2 -2
- package/lib/typescript/src/animation/timing/createTiming.d.ts +2 -2
- package/lib/typescript/src/animation/timing/runTiming.d.ts +2 -2
- package/lib/typescript/src/animation/timing/useLoop.d.ts +1 -1
- package/lib/typescript/src/animation/timing/useTiming.d.ts +2 -2
- package/lib/typescript/src/index.d.ts +1 -0
- package/lib/typescript/src/renderer/Canvas.d.ts +3 -14
- package/lib/typescript/src/renderer/DependencyManager.d.ts +2 -2
- package/lib/typescript/src/renderer/DrawingContext.d.ts +3 -4
- package/lib/typescript/src/renderer/components/Blend.d.ts +1 -1
- package/lib/typescript/src/renderer/components/Group.d.ts +1 -1
- package/lib/typescript/src/renderer/components/Paint.d.ts +1 -1
- package/lib/typescript/src/renderer/components/Picture.d.ts +1 -1
- package/lib/typescript/src/renderer/components/colorFilters/BlendColor.d.ts +2 -2
- package/lib/typescript/src/renderer/components/colorFilters/Compose.d.ts +2 -2
- package/lib/typescript/src/renderer/components/image/BoxFit.d.ts +13 -3
- package/lib/typescript/src/renderer/components/image/Image.d.ts +1 -1
- package/lib/typescript/src/renderer/components/image/ImageSVG.d.ts +1 -1
- package/lib/typescript/src/renderer/components/image/ImageShader.d.ts +2 -2
- package/lib/typescript/src/renderer/components/imageFilters/Blur.d.ts +1 -1
- package/lib/typescript/src/renderer/components/imageFilters/DisplacementMap.d.ts +1 -1
- package/lib/typescript/src/renderer/components/imageFilters/InnerShadow.d.ts +2 -3
- package/lib/typescript/src/renderer/components/imageFilters/RuntimeShader.d.ts +2 -1
- package/lib/typescript/src/renderer/components/imageFilters/Shadow.d.ts +1 -1
- package/lib/typescript/src/renderer/components/imageFilters/getInput.d.ts +2 -1
- package/lib/typescript/src/renderer/components/maskFilters/Blur.d.ts +1 -1
- package/lib/typescript/src/renderer/components/pathEffects/Line2D.d.ts +1 -1
- package/lib/typescript/src/renderer/components/pathEffects/Path1D.d.ts +1 -1
- package/lib/typescript/src/renderer/components/pathEffects/Path2D.d.ts +1 -1
- package/lib/typescript/src/renderer/components/shaders/Color.d.ts +1 -1
- package/lib/typescript/src/renderer/components/shaders/Gradient.d.ts +4 -4
- package/lib/typescript/src/renderer/components/shaders/LinearGradient.d.ts +2 -1
- package/lib/typescript/src/renderer/components/shaders/RadialGradient.d.ts +2 -1
- package/lib/typescript/src/renderer/components/shaders/Shader.d.ts +2 -9
- package/lib/typescript/src/renderer/components/shaders/SweepGradient.d.ts +2 -1
- package/lib/typescript/src/renderer/components/shaders/TwoPointConicalGradient.d.ts +2 -1
- package/lib/typescript/src/renderer/components/shapes/Box.d.ts +1 -2
- package/lib/typescript/src/renderer/components/shapes/Circle.d.ts +4 -1
- package/lib/typescript/src/renderer/components/shapes/DiffRect.d.ts +1 -1
- package/lib/typescript/src/renderer/components/shapes/FitBox.d.ts +1 -1
- package/lib/typescript/src/renderer/components/shapes/Line.d.ts +2 -1
- package/lib/typescript/src/renderer/components/shapes/Patch.d.ts +3 -3
- package/lib/typescript/src/renderer/components/shapes/Path.d.ts +1 -1
- package/lib/typescript/src/renderer/components/shapes/Points.d.ts +2 -2
- package/lib/typescript/src/renderer/components/shapes/Vertices.d.ts +2 -2
- package/lib/typescript/src/renderer/components/text/Glyphs.d.ts +1 -1
- package/lib/typescript/src/renderer/components/text/TextBlob.d.ts +1 -1
- package/lib/typescript/src/renderer/components/text/TextPath.d.ts +1 -1
- package/lib/typescript/src/renderer/index.d.ts +2 -1
- package/lib/typescript/src/renderer/nodes/Declaration.d.ts +1 -1
- package/lib/typescript/src/renderer/nodes/Node.d.ts +1 -1
- package/lib/typescript/src/renderer/processors/Animations/Animations.d.ts +3 -5
- package/lib/typescript/src/renderer/processors/Circles.d.ts +2 -2
- package/lib/typescript/src/renderer/processors/Clips.d.ts +2 -3
- package/lib/typescript/src/renderer/processors/Color.d.ts +7 -0
- package/lib/typescript/src/renderer/processors/Font.d.ts +2 -3
- package/lib/typescript/src/renderer/processors/Paint.d.ts +3 -3
- package/lib/typescript/src/renderer/processors/Paths.d.ts +2 -2
- package/lib/typescript/src/renderer/processors/Radius.d.ts +2 -2
- package/lib/typescript/src/renderer/processors/Rects.d.ts +4 -13
- package/lib/typescript/src/renderer/processors/Transform.d.ts +3 -4
- package/lib/typescript/src/renderer/processors/index.d.ts +2 -1
- package/lib/typescript/src/renderer/processors/math/Coordinates.d.ts +1 -1
- package/lib/typescript/src/renderer/processors/math/Transforms.d.ts +1 -1
- package/lib/typescript/src/renderer/processors/math/index.d.ts +0 -2
- package/lib/typescript/src/renderer/useCanvas.d.ts +14 -0
- package/lib/typescript/src/skia/Skia.d.ts +2 -35
- package/lib/typescript/src/skia/Skia.web.d.ts +1 -0
- package/lib/typescript/src/skia/core/Data.d.ts +5 -0
- package/lib/typescript/src/skia/core/Font.d.ts +5 -0
- package/lib/typescript/src/skia/core/Image.d.ts +5 -0
- package/lib/typescript/src/skia/core/Matrix.d.ts +2 -0
- package/lib/typescript/src/skia/core/Paint.d.ts +6 -0
- package/lib/typescript/src/skia/core/Path.d.ts +21 -0
- package/lib/typescript/src/skia/core/Picture.d.ts +9 -0
- package/lib/typescript/src/skia/core/RRect.d.ts +2 -0
- package/lib/typescript/src/skia/core/Rect.d.ts +8 -0
- package/lib/typescript/src/skia/core/SVG.d.ts +2 -0
- package/lib/typescript/src/skia/core/Typeface.d.ts +5 -0
- package/lib/typescript/src/skia/core/Vector.d.ts +12 -0
- package/lib/typescript/src/skia/core/index.d.ts +12 -0
- package/lib/typescript/src/skia/index.d.ts +2 -23
- package/lib/typescript/src/skia/{Canvas.d.ts → types/Canvas.d.ts} +0 -0
- package/lib/typescript/src/skia/types/Color.d.ts +2 -0
- package/lib/typescript/src/skia/{ColorFilter → types/ColorFilter}/ColorFilter.d.ts +0 -0
- package/lib/typescript/src/skia/types/ColorFilter/ColorFilterFactory.d.ts +43 -0
- package/lib/typescript/src/skia/{ColorFilter → types/ColorFilter}/index.d.ts +0 -0
- package/lib/typescript/src/skia/types/ContourMeasure.d.ts +40 -0
- package/lib/typescript/src/skia/types/Data/Data.d.ts +5 -0
- package/lib/typescript/src/skia/types/Data/DataFactory.d.ts +18 -0
- package/lib/typescript/src/skia/{Data → types/Data}/index.d.ts +0 -0
- package/lib/typescript/src/skia/types/Font/Font.d.ts +187 -0
- package/lib/typescript/src/skia/types/Font/index.d.ts +1 -0
- package/lib/typescript/src/skia/types/FontMgr/FontMgr.d.ts +18 -0
- package/lib/typescript/src/skia/types/FontMgr/FontMgrFactory.d.ts +4 -0
- package/lib/typescript/src/skia/types/FontMgr/index.d.ts +2 -0
- package/lib/typescript/src/skia/types/Image/Image.d.ts +75 -0
- package/lib/typescript/src/skia/types/Image/ImageFactory.d.ts +62 -0
- package/lib/typescript/src/skia/types/Image/index.d.ts +2 -0
- package/lib/typescript/src/skia/{ImageFilter → types/ImageFilter}/ImageFilter.d.ts +0 -0
- package/lib/typescript/src/skia/types/ImageFilter/ImageFilterFactory.d.ts +130 -0
- package/lib/typescript/src/skia/{ImageFilter → types/ImageFilter}/index.d.ts +0 -0
- package/lib/typescript/src/skia/{JsiInstance.d.ts → types/JsiInstance.d.ts} +0 -0
- package/lib/typescript/src/skia/types/MaskFilter.d.ts +21 -0
- package/lib/typescript/src/skia/types/Matrix.d.ts +29 -0
- package/lib/typescript/src/skia/{Paint → types/Paint}/BlendMode.d.ts +0 -0
- package/lib/typescript/src/skia/types/Paint/Paint.d.ts +127 -0
- package/lib/typescript/src/skia/types/Paint/index.d.ts +2 -0
- package/lib/typescript/src/skia/types/Path/Path.d.ts +462 -0
- package/lib/typescript/src/skia/types/Path/PathFactory.d.ts +29 -0
- package/lib/typescript/src/skia/types/Path/index.d.ts +2 -0
- package/lib/typescript/src/skia/types/PathEffect.d.ts +75 -0
- package/lib/typescript/src/skia/types/Picture/Picture.d.ts +26 -0
- package/lib/typescript/src/skia/{Picture → types/Picture}/PictureFactory.d.ts +0 -0
- package/lib/typescript/src/skia/{Picture → types/Picture}/PictureRecorder.d.ts +0 -0
- package/lib/typescript/src/skia/types/Picture/index.d.ts +3 -0
- package/lib/typescript/src/skia/types/Point.d.ts +10 -0
- package/lib/typescript/src/skia/types/RRect.d.ts +7 -0
- package/lib/typescript/src/skia/{RSXform.d.ts → types/RSXform.d.ts} +0 -0
- package/lib/typescript/src/skia/{Rect.d.ts → types/Rect.d.ts} +0 -0
- package/lib/typescript/src/skia/types/RuntimeEffect/RuntimeEffect.d.ts +47 -0
- package/lib/typescript/src/skia/{RuntimeEffect → types/RuntimeEffect}/RuntimeEffectFactory.d.ts +0 -0
- package/lib/typescript/src/skia/{RuntimeEffect → types/RuntimeEffect}/index.d.ts +0 -0
- package/lib/typescript/src/skia/{SVG → types/SVG}/SVG.d.ts +0 -0
- package/lib/typescript/src/skia/types/SVG/SVGFactory.d.ts +6 -0
- package/lib/typescript/src/skia/types/SVG/index.d.ts +2 -0
- package/lib/typescript/src/skia/types/Shader/Shader.d.ts +11 -0
- package/lib/typescript/src/skia/{Shader → types/Shader}/ShaderFactory.d.ts +0 -0
- package/lib/typescript/src/skia/types/Shader/index.d.ts +2 -0
- package/lib/typescript/src/skia/types/Skia.d.ts +68 -0
- package/lib/typescript/src/skia/{Surface → types/Surface}/Surface.d.ts +0 -0
- package/lib/typescript/src/skia/{Surface → types/Surface}/SurfaceFactory.d.ts +0 -0
- package/lib/typescript/src/skia/{Surface → types/Surface}/index.d.ts +0 -0
- package/lib/typescript/src/skia/{TextBlob.d.ts → types/TextBlob.d.ts} +0 -0
- package/lib/typescript/src/skia/{Typeface → types/Typeface}/Typeface.d.ts +0 -0
- package/lib/typescript/src/skia/types/Typeface/TypefaceFactory.d.ts +5 -0
- package/lib/typescript/src/skia/types/Typeface/index.d.ts +2 -0
- package/lib/typescript/src/skia/{Vertices → types/Vertices}/Vertices.d.ts +0 -0
- package/lib/typescript/src/skia/{Vertices → types/Vertices}/index.d.ts +0 -0
- package/lib/typescript/src/skia/types/index.d.ts +28 -0
- package/lib/typescript/src/skia/web/Host.d.ts +21 -0
- package/lib/typescript/src/skia/web/JsiImageFilterFactory.d.ts +19 -0
- package/lib/typescript/src/skia/web/JsiSkCanvas.d.ts +44 -0
- package/lib/typescript/src/skia/web/JsiSkColor.d.ts +2 -0
- package/lib/typescript/src/skia/web/JsiSkColorFilter.d.ts +6 -0
- package/lib/typescript/src/skia/web/JsiSkColorFilterFactory.d.ts +14 -0
- package/lib/typescript/src/skia/web/JsiSkContourMeasure.d.ts +16 -0
- package/lib/typescript/src/skia/web/JsiSkContourMeasureIter.d.ts +8 -0
- package/lib/typescript/src/skia/web/JsiSkData.d.ts +8 -0
- package/lib/typescript/src/skia/web/JsiSkDataFactory.d.ts +19 -0
- package/lib/typescript/src/skia/web/JsiSkFont.d.ts +33 -0
- package/lib/typescript/src/skia/web/JsiSkFontMgr.d.ts +9 -0
- package/lib/typescript/src/skia/web/JsiSkFontMgrFactory.d.ts +8 -0
- package/lib/typescript/src/skia/web/JsiSkImage.d.ts +12 -0
- package/lib/typescript/src/skia/web/JsiSkImageFactory.d.ts +10 -0
- package/lib/typescript/src/skia/web/JsiSkImageFilter.d.ts +6 -0
- package/lib/typescript/src/skia/web/JsiSkMaskFilter.d.ts +6 -0
- package/lib/typescript/src/skia/web/JsiSkMaskFilterFactory.d.ts +9 -0
- package/lib/typescript/src/skia/web/JsiSkMatrix.d.ts +11 -0
- package/lib/typescript/src/skia/web/JsiSkPaint.d.ts +26 -0
- package/lib/typescript/src/skia/web/JsiSkPath.d.ts +56 -0
- package/lib/typescript/src/skia/web/JsiSkPathEffect.d.ts +6 -0
- package/lib/typescript/src/skia/web/JsiSkPathEffectFactory.d.ts +15 -0
- package/lib/typescript/src/skia/web/JsiSkPathFactory.d.ts +13 -0
- package/lib/typescript/src/skia/web/JsiSkPicture.d.ts +9 -0
- package/lib/typescript/src/skia/web/JsiSkPictureFactory.d.ts +8 -0
- package/lib/typescript/src/skia/web/JsiSkPictureRecorder.d.ts +11 -0
- package/lib/typescript/src/skia/web/JsiSkPoint.d.ts +8 -0
- package/lib/typescript/src/skia/web/JsiSkRRect.d.ts +10 -0
- package/lib/typescript/src/skia/web/JsiSkRSXform.d.ts +8 -0
- package/lib/typescript/src/skia/web/JsiSkRect.d.ts +11 -0
- package/lib/typescript/src/skia/web/JsiSkRuntimeEffect.d.ts +14 -0
- package/lib/typescript/src/skia/web/JsiSkRuntimeEffectFactory.d.ts +8 -0
- package/lib/typescript/src/skia/web/JsiSkSVGFactory.d.ts +9 -0
- package/lib/typescript/src/skia/web/JsiSkShader.d.ts +6 -0
- package/lib/typescript/src/skia/web/JsiSkShaderFactory.d.ts +16 -0
- package/lib/typescript/src/skia/web/JsiSkSurface.d.ts +8 -0
- package/lib/typescript/src/skia/web/JsiSkSurfaceFactory.d.ts +8 -0
- package/lib/typescript/src/skia/web/JsiSkTextBlob.d.ts +6 -0
- package/lib/typescript/src/skia/web/JsiSkTextBlobFactory.d.ts +12 -0
- package/lib/typescript/src/skia/web/JsiSkTypeface.d.ts +8 -0
- package/lib/typescript/src/skia/web/JsiSkTypefaceFactory.d.ts +8 -0
- package/lib/typescript/src/skia/web/JsiSkVertices.d.ts +9 -0
- package/lib/typescript/src/skia/web/JsiSkVerticesFactory.d.ts +4 -0
- package/lib/typescript/src/skia/web/JsiSkia.d.ts +3 -0
- package/lib/typescript/src/skia/web/index.d.ts +1 -0
- package/lib/typescript/src/values/api.d.ts +1 -1
- package/lib/typescript/src/values/api.web.d.ts +1 -1
- package/lib/typescript/src/values/hooks/useDerivedValue.d.ts +1 -1
- package/lib/typescript/src/values/hooks/useValue.d.ts +2 -2
- package/lib/typescript/src/values/hooks/useValueEffect.d.ts +2 -2
- package/lib/typescript/src/values/types.d.ts +5 -5
- package/lib/typescript/src/values/web/RNSkReadonlyValue.d.ts +2 -2
- package/lib/typescript/src/views/SkiaView.d.ts +4 -4
- package/lib/typescript/src/views/SkiaView.web.d.ts +56 -0
- package/lib/typescript/src/views/types.d.ts +4 -4
- package/lib/typescript/src/views/useTouchHandler.d.ts +11 -1
- package/lib/typescript/src/web/index.d.ts +5 -0
- package/libs/android/arm64-v8a/libskia.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/libsvg.a +0 -0
- package/libs/android/x86/libskia.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/libsvg.a +0 -0
- package/libs/ios/libskia.xcframework/Info.plist +5 -5
- package/libs/ios/libskia.xcframework/ios-arm64_arm64e/libskia.a +0 -0
- package/libs/ios/libskia.xcframework/ios-arm64_arm64e_x86_64-simulator/libskia.a +0 -0
- package/libs/ios/libskshaper.xcframework/Info.plist +5 -5
- package/libs/ios/libskshaper.xcframework/ios-arm64_arm64e/libskshaper.a +0 -0
- package/libs/ios/libskshaper.xcframework/ios-arm64_arm64e_x86_64-simulator/libskshaper.a +0 -0
- package/libs/ios/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 +3 -2
- package/src/animation/decay/runDecay.ts +5 -2
- package/src/animation/functions/index.ts +4 -2
- package/src/animation/functions/interpolateColors.ts +1 -2
- package/src/animation/functions/interpolatePaths.ts +38 -0
- package/src/animation/functions/interpolateVector.ts +26 -0
- package/src/animation/spring/runSpring.ts +2 -2
- package/src/animation/spring/useSpring.ts +2 -2
- package/src/animation/timing/createTiming.ts +2 -2
- package/src/animation/timing/runTiming.ts +2 -2
- package/src/animation/timing/useTiming.ts +2 -2
- package/src/index.ts +1 -1
- package/src/renderer/Canvas.tsx +13 -36
- package/src/renderer/DependencyManager.tsx +2 -2
- package/src/renderer/DrawingContext.ts +3 -5
- package/src/renderer/HostConfig.ts +2 -2
- package/src/renderer/components/Blend.tsx +12 -11
- package/src/renderer/components/Compose.tsx +2 -4
- package/src/renderer/components/Group.tsx +11 -6
- package/src/renderer/components/Mask.tsx +5 -3
- package/src/renderer/components/Paint.tsx +5 -4
- package/src/renderer/components/Picture.tsx +1 -1
- package/src/renderer/components/backdrop/BackdropFilter.tsx +1 -1
- package/src/renderer/components/colorFilters/BlendColor.tsx +4 -4
- package/src/renderer/components/colorFilters/Compose.ts +3 -2
- package/src/renderer/components/colorFilters/Lerp.tsx +3 -3
- package/src/renderer/components/colorFilters/LinearToSRGBGamma.tsx +2 -3
- package/src/renderer/components/colorFilters/LumaColorFilter.tsx +2 -3
- package/src/renderer/components/colorFilters/Matrix.tsx +2 -3
- package/src/renderer/components/colorFilters/SRGBToLinearGamma.tsx +2 -3
- package/src/renderer/components/image/BoxFit.ts +7 -13
- package/src/renderer/components/image/Image.tsx +3 -3
- package/src/renderer/components/image/ImageSVG.tsx +3 -3
- package/src/renderer/components/image/ImageShader.tsx +8 -7
- package/src/renderer/components/imageFilters/Blur.tsx +12 -10
- package/src/renderer/components/imageFilters/DisplacementMap.tsx +4 -5
- package/src/renderer/components/imageFilters/InnerShadow.tsx +4 -4
- package/src/renderer/components/imageFilters/Morphology.tsx +3 -4
- package/src/renderer/components/imageFilters/Offset.tsx +5 -4
- package/src/renderer/components/imageFilters/RuntimeShader.tsx +12 -4
- package/src/renderer/components/imageFilters/Shadow.tsx +10 -7
- package/src/renderer/components/imageFilters/getInput.ts +3 -2
- package/src/renderer/components/maskFilters/Blur.tsx +2 -3
- package/src/renderer/components/pathEffects/Corner.tsx +2 -3
- package/src/renderer/components/pathEffects/Dash.tsx +2 -3
- package/src/renderer/components/pathEffects/Discrete.tsx +2 -3
- package/src/renderer/components/pathEffects/Line2D.tsx +3 -4
- package/src/renderer/components/pathEffects/Path1D.tsx +3 -4
- package/src/renderer/components/pathEffects/Path2D.tsx +4 -5
- package/src/renderer/components/pathEffects/Sum.tsx +7 -6
- package/src/renderer/components/shaders/Color.tsx +7 -5
- package/src/renderer/components/shaders/FractalNoise.tsx +1 -2
- package/src/renderer/components/shaders/Gradient.ts +7 -10
- package/src/renderer/components/shaders/LinearGradient.tsx +4 -4
- package/src/renderer/components/shaders/RadialGradient.tsx +4 -4
- package/src/renderer/components/shaders/Shader.tsx +6 -58
- package/src/renderer/components/shaders/SweepGradient.tsx +4 -4
- package/src/renderer/components/shaders/Turbulence.tsx +1 -2
- package/src/renderer/components/shaders/TwoPointConicalGradient.tsx +4 -4
- package/src/renderer/components/shapes/Box.tsx +36 -19
- package/src/renderer/components/shapes/Circle.tsx +3 -4
- package/src/renderer/components/shapes/DiffRect.tsx +1 -1
- package/src/renderer/components/shapes/FitBox.tsx +1 -1
- package/src/renderer/components/shapes/Line.tsx +2 -1
- package/src/renderer/components/shapes/Oval.tsx +6 -4
- package/src/renderer/components/shapes/Patch.tsx +6 -11
- package/src/renderer/components/shapes/Path.tsx +3 -3
- package/src/renderer/components/shapes/Points.tsx +2 -2
- package/src/renderer/components/shapes/Rect.tsx +6 -4
- package/src/renderer/components/shapes/RoundedRect.tsx +2 -2
- package/src/renderer/components/shapes/Vertices.tsx +5 -4
- package/src/renderer/components/text/Glyphs.tsx +6 -3
- package/src/renderer/components/text/Text.tsx +2 -2
- package/src/renderer/components/text/TextBlob.tsx +1 -1
- package/src/renderer/components/text/TextPath.tsx +3 -5
- package/src/renderer/index.ts +2 -1
- package/src/renderer/nodes/Declaration.tsx +1 -1
- package/src/renderer/nodes/Drawing.tsx +3 -2
- package/src/renderer/nodes/Node.ts +1 -1
- package/src/renderer/processors/Animations/Animations.ts +5 -11
- package/src/renderer/processors/Circles.ts +4 -4
- package/src/renderer/processors/Clips.ts +9 -5
- package/src/renderer/processors/Color.ts +15 -0
- package/src/renderer/processors/Font.ts +10 -4
- package/src/renderer/processors/Paint.ts +12 -7
- package/src/renderer/processors/Paths.ts +3 -3
- package/src/renderer/processors/Radius.ts +3 -4
- package/src/renderer/processors/Rects.ts +12 -43
- package/src/renderer/processors/Transform.ts +28 -19
- package/src/renderer/processors/index.ts +2 -1
- package/src/renderer/processors/math/Coordinates.ts +1 -1
- package/src/renderer/processors/math/Transforms.ts +2 -1
- package/src/renderer/processors/math/index.ts +0 -2
- package/src/renderer/useCanvas.ts +21 -0
- package/src/skia/NativeSetup.ts +2 -2
- package/src/skia/Skia.ts +2 -38
- package/src/skia/Skia.web.ts +3 -0
- package/src/skia/core/Data.ts +81 -0
- package/src/skia/core/Font.ts +28 -0
- package/src/skia/core/Image.ts +12 -0
- package/src/skia/core/Matrix.ts +6 -0
- package/src/skia/core/Paint.ts +22 -0
- package/src/skia/core/Path.ts +60 -0
- package/src/skia/core/Picture.ts +25 -0
- package/src/skia/core/RRect.tsx +5 -0
- package/src/skia/core/Rect.ts +33 -0
- package/src/skia/core/SVG.ts +9 -0
- package/src/skia/core/Typeface.ts +11 -0
- package/src/skia/core/Vector.ts +11 -0
- package/src/skia/core/index.ts +12 -0
- package/src/skia/index.ts +2 -23
- package/src/skia/{Canvas.ts → types/Canvas.ts} +0 -0
- package/src/skia/types/Color.ts +4 -0
- package/src/skia/{ColorFilter → types/ColorFilter}/ColorFilter.ts +0 -0
- package/src/skia/types/ColorFilter/ColorFilterFactory.ts +52 -0
- package/src/skia/{ColorFilter → types/ColorFilter}/index.ts +0 -0
- package/src/skia/types/ContourMeasure.tsx +47 -0
- package/src/skia/types/Data/Data.ts +5 -0
- package/src/skia/types/Data/DataFactory.ts +19 -0
- package/src/skia/{Data → types/Data}/index.ts +0 -0
- package/src/skia/types/Font/Font.ts +230 -0
- package/src/skia/types/Font/index.ts +1 -0
- package/src/skia/types/FontMgr/FontMgr.ts +24 -0
- package/src/skia/types/FontMgr/FontMgrFactory.ts +12 -0
- package/src/skia/types/FontMgr/index.ts +2 -0
- package/src/skia/types/Image/Image.ts +96 -0
- package/src/skia/types/Image/ImageFactory.ts +78 -0
- package/src/skia/types/Image/index.ts +2 -0
- package/src/skia/{ImageFilter → types/ImageFilter}/ImageFilter.ts +0 -0
- package/src/skia/types/ImageFilter/ImageFilterFactory.ts +192 -0
- package/src/skia/{ImageFilter → types/ImageFilter}/index.ts +0 -0
- package/src/skia/{JsiInstance.ts → types/JsiInstance.ts} +0 -0
- package/src/skia/types/MaskFilter.ts +27 -0
- package/src/skia/types/Matrix.ts +95 -0
- package/src/skia/{Paint → types/Paint}/BlendMode.ts +0 -0
- package/src/skia/types/Paint/Paint.ts +153 -0
- package/src/skia/types/Paint/index.ts +2 -0
- package/src/skia/types/Path/Path.ts +565 -0
- package/src/skia/types/Path/PathFactory.ts +34 -0
- package/src/skia/types/Path/index.ts +2 -0
- package/src/skia/types/PathEffect.ts +97 -0
- package/src/skia/types/Picture/Picture.ts +34 -0
- package/src/skia/{Picture → types/Picture}/PictureFactory.ts +0 -0
- package/src/skia/{Picture → types/Picture}/PictureRecorder.ts +0 -0
- package/src/skia/types/Picture/index.ts +3 -0
- package/src/skia/types/Point.ts +12 -0
- package/src/skia/types/RRect.ts +12 -0
- package/src/skia/{RSXform.ts → types/RSXform.ts} +0 -0
- package/src/skia/{Rect.ts → types/Rect.ts} +0 -0
- package/src/skia/types/RuntimeEffect/RuntimeEffect.ts +60 -0
- package/src/skia/{RuntimeEffect → types/RuntimeEffect}/RuntimeEffectFactory.ts +0 -0
- package/src/skia/{RuntimeEffect → types/RuntimeEffect}/index.ts +0 -0
- package/src/skia/{SVG → types/SVG}/SVG.ts +0 -0
- package/src/skia/types/SVG/SVGFactory.ts +8 -0
- package/src/skia/types/SVG/index.ts +2 -0
- package/src/skia/types/Shader/Shader.ts +67 -0
- package/src/skia/{Shader → types/Shader}/ShaderFactory.ts +0 -0
- package/src/skia/types/Shader/index.ts +2 -0
- package/src/skia/types/Skia.ts +84 -0
- package/src/skia/{Surface → types/Surface}/Surface.ts +0 -0
- package/src/skia/{Surface → types/Surface}/SurfaceFactory.ts +0 -0
- package/src/skia/{Surface → types/Surface}/index.ts +0 -0
- package/src/skia/{TextBlob.ts → types/TextBlob.ts} +0 -0
- package/src/skia/{Typeface → types/Typeface}/Typeface.ts +0 -0
- package/src/skia/types/Typeface/TypefaceFactory.ts +7 -0
- package/src/skia/types/Typeface/index.ts +2 -0
- package/src/skia/{Vertices → types/Vertices}/Vertices.tsx +0 -0
- package/src/skia/{Vertices → types/Vertices}/index.ts +0 -0
- package/src/skia/types/index.ts +28 -0
- package/src/skia/web/Host.ts +56 -0
- package/src/skia/web/JsiImageFilterFactory.ts +144 -0
- package/src/skia/web/JsiSkCanvas.ts +330 -0
- package/src/skia/web/JsiSkColor.ts +327 -0
- package/src/skia/web/JsiSkColorFilter.ts +14 -0
- package/src/skia/web/JsiSkColorFilterFactory.ts +67 -0
- package/src/skia/web/JsiSkContourMeasure.ts +35 -0
- package/src/skia/web/JsiSkContourMeasureIter.ts +23 -0
- package/src/skia/web/JsiSkData.ts +13 -0
- package/src/skia/web/JsiSkDataFactory.ts +35 -0
- package/src/skia/web/JsiSkFont.ts +124 -0
- package/src/skia/web/JsiSkFontMgr.ts +42 -0
- package/src/skia/web/JsiSkFontMgrFactory.ts +18 -0
- package/src/skia/web/JsiSkImage.ts +66 -0
- package/src/skia/web/JsiSkImageFactory.ts +40 -0
- package/src/skia/web/JsiSkImageFilter.ts +14 -0
- package/src/skia/web/JsiSkMaskFilter.ts +14 -0
- package/src/skia/web/JsiSkMaskFilterFactory.ts +20 -0
- package/src/skia/web/JsiSkMatrix.ts +54 -0
- package/src/skia/web/JsiSkPaint.ts +104 -0
- package/src/skia/web/JsiSkPath.ts +369 -0
- package/src/skia/web/JsiSkPathEffect.ts +14 -0
- package/src/skia/web/JsiSkPathEffectFactory.ts +85 -0
- package/src/skia/web/JsiSkPathFactory.ts +54 -0
- package/src/skia/web/JsiSkPicture.ts +45 -0
- package/src/skia/web/JsiSkPictureFactory.ts +20 -0
- package/src/skia/web/JsiSkPictureRecorder.ts +31 -0
- package/src/skia/web/JsiSkPoint.ts +19 -0
- package/src/skia/web/JsiSkRRect.ts +27 -0
- package/src/skia/web/JsiSkRSXform.ts +16 -0
- package/src/skia/web/JsiSkRect.ts +37 -0
- package/src/skia/web/JsiSkRuntimeEffect.ts +57 -0
- package/src/skia/web/JsiSkRuntimeEffectFactory.ts +23 -0
- package/src/skia/web/JsiSkSVGFactory.ts +20 -0
- package/src/skia/web/JsiSkShader.ts +14 -0
- package/src/skia/web/JsiSkShaderFactory.ts +178 -0
- package/src/skia/web/JsiSkSurface.ts +25 -0
- package/src/skia/web/JsiSkSurfaceFactory.ts +20 -0
- package/src/skia/web/JsiSkTextBlob.ts +14 -0
- package/src/skia/web/JsiSkTextBlobFactory.ts +49 -0
- package/src/skia/web/JsiSkTypeface.ts +28 -0
- package/src/skia/web/JsiSkTypefaceFactory.tsx +20 -0
- package/src/skia/web/JsiSkVertices.ts +23 -0
- package/src/skia/web/JsiSkVerticesFactory.ts +27 -0
- package/src/skia/web/JsiSkia.ts +98 -0
- package/src/skia/web/index.ts +1 -0
- package/src/values/hooks/useValue.ts +2 -2
- package/src/values/hooks/useValueEffect.ts +2 -5
- package/src/values/types.ts +6 -6
- package/src/values/web/RNSkReadonlyValue.ts +2 -2
- package/src/values/web/api.ts +6 -6
- package/src/views/SkiaView.tsx +3 -3
- package/src/views/SkiaView.web.tsx +192 -0
- package/src/views/types.ts +4 -4
- package/src/views/useTouchHandler.ts +82 -51
- package/src/web/index.ts +13 -0
- package/cpp/skia/include/core/SkCustomMesh.h +0 -202
- package/cpp/skia/include/core/SkStringView.h +0 -185
- package/cpp/skia/include/private/GrContext_Base.h +0 -92
- package/cpp/skia/include/private/GrGLTypesPriv.h +0 -107
- package/cpp/skia/include/private/GrImageContext.h +0 -55
- package/cpp/skia/include/private/GrSingleOwner.h +0 -65
- package/cpp/skia/include/private/GrTypesPriv.h +0 -1354
- package/cpp/skia/include/private/SkPaintParamsKey.h +0 -110
- package/cpp/skia/include/private/SkShaderCodeDictionary.h +0 -63
- package/cpp/skia/include/private/SkTOptional.h +0 -362
- package/lib/commonjs/renderer/processors/math/Matrix3.js +0 -66
- package/lib/commonjs/renderer/processors/math/Matrix3.js.map +0 -1
- package/lib/commonjs/renderer/processors/math/Vector.js +0 -60
- package/lib/commonjs/renderer/processors/math/Vector.js.map +0 -1
- package/lib/commonjs/skia/Color.js +0 -31
- package/lib/commonjs/skia/Color.js.map +0 -1
- package/lib/commonjs/skia/Data/Data.js +0 -53
- package/lib/commonjs/skia/Data/Data.js.map +0 -1
- package/lib/commonjs/skia/Font/Font.js.map +0 -1
- package/lib/commonjs/skia/Font/index.js +0 -32
- package/lib/commonjs/skia/Font/index.js.map +0 -1
- package/lib/commonjs/skia/Font/useFont.js +0 -36
- package/lib/commonjs/skia/Font/useFont.js.map +0 -1
- package/lib/commonjs/skia/FontMgr/index.js +0 -19
- package/lib/commonjs/skia/FontMgr/index.js.map +0 -1
- package/lib/commonjs/skia/Image/Image.js.map +0 -1
- package/lib/commonjs/skia/Image/ImageFactory.js.map +0 -1
- package/lib/commonjs/skia/Image/index.js +0 -45
- package/lib/commonjs/skia/Image/index.js.map +0 -1
- package/lib/commonjs/skia/Image/useImage.js +0 -18
- package/lib/commonjs/skia/Image/useImage.js.map +0 -1
- package/lib/commonjs/skia/ImageFilter/ImageFilterFactory.js.map +0 -1
- package/lib/commonjs/skia/MaskFilter.js.map +0 -1
- package/lib/commonjs/skia/Matrix.js +0 -21
- package/lib/commonjs/skia/Matrix.js.map +0 -1
- package/lib/commonjs/skia/Paint/Paint.js +0 -48
- package/lib/commonjs/skia/Paint/Paint.js.map +0 -1
- package/lib/commonjs/skia/Paint/index.js +0 -45
- package/lib/commonjs/skia/Paint/index.js.map +0 -1
- package/lib/commonjs/skia/Paint/usePaint.js +0 -26
- package/lib/commonjs/skia/Paint/usePaint.js.map +0 -1
- package/lib/commonjs/skia/Path/Path.js +0 -47
- package/lib/commonjs/skia/Path/Path.js.map +0 -1
- package/lib/commonjs/skia/Path/index.js +0 -45
- package/lib/commonjs/skia/Path/index.js.map +0 -1
- package/lib/commonjs/skia/Path/usePath.js +0 -60
- package/lib/commonjs/skia/Path/usePath.js.map +0 -1
- package/lib/commonjs/skia/PathEffect.js.map +0 -1
- package/lib/commonjs/skia/Picture/index.js +0 -58
- package/lib/commonjs/skia/Picture/index.js.map +0 -1
- package/lib/commonjs/skia/Picture/usePicture.js +0 -30
- package/lib/commonjs/skia/Picture/usePicture.js.map +0 -1
- package/lib/commonjs/skia/Point.js.map +0 -1
- package/lib/commonjs/skia/RRect.js +0 -6
- package/lib/commonjs/skia/SVG/index.js +0 -45
- package/lib/commonjs/skia/SVG/index.js.map +0 -1
- package/lib/commonjs/skia/SVG/useSvg.js +0 -15
- package/lib/commonjs/skia/SVG/useSvg.js.map +0 -1
- package/lib/commonjs/skia/Shader/Shader.js +0 -11
- package/lib/commonjs/skia/Shader/Shader.js.map +0 -1
- package/lib/commonjs/skia/Shader/index.js +0 -45
- package/lib/commonjs/skia/Shader/index.js.map +0 -1
- package/lib/commonjs/skia/Shader/useShader.js +0 -18
- package/lib/commonjs/skia/Shader/useShader.js.map +0 -1
- package/lib/commonjs/skia/SkiaApi.js +0 -4
- package/lib/commonjs/skia/SkiaApi.js.map +0 -1
- package/lib/commonjs/skia/Typeface/index.js +0 -45
- package/lib/commonjs/skia/Typeface/index.js.map +0 -1
- package/lib/commonjs/skia/Typeface/useTypeface.js +0 -18
- package/lib/commonjs/skia/Typeface/useTypeface.js.map +0 -1
- package/lib/module/renderer/processors/math/Matrix3.js +0 -55
- package/lib/module/renderer/processors/math/Matrix3.js.map +0 -1
- package/lib/module/renderer/processors/math/Vector.js +0 -28
- package/lib/module/renderer/processors/math/Vector.js.map +0 -1
- package/lib/module/skia/Color.js +0 -13
- package/lib/module/skia/Color.js.map +0 -1
- package/lib/module/skia/Data/Data.js +0 -35
- package/lib/module/skia/Data/Data.js.map +0 -1
- package/lib/module/skia/Font/Font.js.map +0 -1
- package/lib/module/skia/Font/index.js +0 -3
- package/lib/module/skia/Font/index.js.map +0 -1
- package/lib/module/skia/Font/useFont.js +0 -24
- package/lib/module/skia/Font/useFont.js.map +0 -1
- package/lib/module/skia/FontMgr/index.js +0 -2
- package/lib/module/skia/FontMgr/index.js.map +0 -1
- package/lib/module/skia/Image/Image.js.map +0 -1
- package/lib/module/skia/Image/ImageFactory.js.map +0 -1
- package/lib/module/skia/Image/index.js +0 -4
- package/lib/module/skia/Image/index.js.map +0 -1
- package/lib/module/skia/Image/useImage.js +0 -8
- package/lib/module/skia/Image/useImage.js.map +0 -1
- package/lib/module/skia/ImageFilter/ImageFilterFactory.js.map +0 -1
- package/lib/module/skia/MaskFilter.js.map +0 -1
- package/lib/module/skia/Matrix.js +0 -14
- package/lib/module/skia/Matrix.js.map +0 -1
- package/lib/module/skia/Paint/Paint.js +0 -31
- package/lib/module/skia/Paint/Paint.js.map +0 -1
- package/lib/module/skia/Paint/index.js +0 -4
- package/lib/module/skia/Paint/index.js.map +0 -1
- package/lib/module/skia/Paint/usePaint.js +0 -16
- package/lib/module/skia/Paint/usePaint.js.map +0 -1
- package/lib/module/skia/Path/Path.js +0 -35
- package/lib/module/skia/Path/Path.js.map +0 -1
- package/lib/module/skia/Path/index.js +0 -4
- package/lib/module/skia/Path/index.js.map +0 -1
- package/lib/module/skia/Path/usePath.js +0 -44
- package/lib/module/skia/Path/usePath.js.map +0 -1
- package/lib/module/skia/PathEffect.js.map +0 -1
- package/lib/module/skia/Picture/index.js +0 -5
- package/lib/module/skia/Picture/index.js.map +0 -1
- package/lib/module/skia/Picture/usePicture.js +0 -19
- package/lib/module/skia/Picture/usePicture.js.map +0 -1
- package/lib/module/skia/Point.js.map +0 -1
- package/lib/module/skia/RRect.js +0 -2
- package/lib/module/skia/SVG/index.js +0 -4
- package/lib/module/skia/SVG/index.js.map +0 -1
- package/lib/module/skia/SVG/useSvg.js +0 -4
- package/lib/module/skia/SVG/useSvg.js.map +0 -1
- package/lib/module/skia/Shader/Shader.js +0 -2
- package/lib/module/skia/Shader/Shader.js.map +0 -1
- package/lib/module/skia/Shader/index.js +0 -4
- package/lib/module/skia/Shader/index.js.map +0 -1
- package/lib/module/skia/Shader/useShader.js +0 -7
- package/lib/module/skia/Shader/useShader.js.map +0 -1
- package/lib/module/skia/SkiaApi.js +0 -2
- package/lib/module/skia/SkiaApi.js.map +0 -1
- package/lib/module/skia/Typeface/index.js +0 -4
- package/lib/module/skia/Typeface/index.js.map +0 -1
- package/lib/module/skia/Typeface/useTypeface.js +0 -8
- package/lib/module/skia/Typeface/useTypeface.js.map +0 -1
- package/lib/typescript/src/renderer/processors/math/Matrix3.d.ts +0 -10
- package/lib/typescript/src/renderer/processors/math/Vector.d.ts +0 -23
- package/lib/typescript/src/skia/Color.d.ts +0 -8
- package/lib/typescript/src/skia/ColorFilter/ColorFilterFactory.d.ts +0 -43
- package/lib/typescript/src/skia/ContourMeasure.d.ts +0 -42
- package/lib/typescript/src/skia/Data/Data.d.ts +0 -9
- package/lib/typescript/src/skia/Data/DataFactory.d.ts +0 -18
- package/lib/typescript/src/skia/Font/Font.d.ts +0 -187
- package/lib/typescript/src/skia/Font/index.d.ts +0 -2
- package/lib/typescript/src/skia/Font/useFont.d.ts +0 -6
- package/lib/typescript/src/skia/FontMgr/FontMgr.d.ts +0 -18
- package/lib/typescript/src/skia/FontMgr/FontMgrFactory.d.ts +0 -4
- package/lib/typescript/src/skia/FontMgr/index.d.ts +0 -1
- package/lib/typescript/src/skia/Image/Image.d.ts +0 -75
- package/lib/typescript/src/skia/Image/ImageFactory.d.ts +0 -62
- package/lib/typescript/src/skia/Image/index.d.ts +0 -3
- package/lib/typescript/src/skia/Image/useImage.d.ts +0 -5
- package/lib/typescript/src/skia/ImageFilter/ImageFilterFactory.d.ts +0 -130
- package/lib/typescript/src/skia/MaskFilter.d.ts +0 -21
- package/lib/typescript/src/skia/Matrix.d.ts +0 -28
- package/lib/typescript/src/skia/Paint/Paint.d.ts +0 -128
- package/lib/typescript/src/skia/Paint/index.d.ts +0 -3
- package/lib/typescript/src/skia/Paint/usePaint.d.ts +0 -6
- package/lib/typescript/src/skia/Path/Path.d.ts +0 -456
- package/lib/typescript/src/skia/Path/PathFactory.d.ts +0 -24
- package/lib/typescript/src/skia/Path/index.d.ts +0 -3
- package/lib/typescript/src/skia/Path/usePath.d.ts +0 -22
- package/lib/typescript/src/skia/PathEffect.d.ts +0 -75
- package/lib/typescript/src/skia/Picture/Picture.d.ts +0 -26
- package/lib/typescript/src/skia/Picture/index.d.ts +0 -4
- package/lib/typescript/src/skia/Picture/usePicture.d.ts +0 -11
- package/lib/typescript/src/skia/Point.d.ts +0 -9
- package/lib/typescript/src/skia/RRect.d.ts +0 -6
- package/lib/typescript/src/skia/RuntimeEffect/RuntimeEffect.d.ts +0 -48
- package/lib/typescript/src/skia/SVG/SVGFactory.d.ts +0 -6
- package/lib/typescript/src/skia/SVG/index.d.ts +0 -3
- package/lib/typescript/src/skia/SVG/useSvg.d.ts +0 -2
- package/lib/typescript/src/skia/Shader/Shader.d.ts +0 -3
- package/lib/typescript/src/skia/Shader/index.d.ts +0 -3
- package/lib/typescript/src/skia/Shader/useShader.d.ts +0 -1
- package/lib/typescript/src/skia/SkiaApi.d.ts +0 -71
- package/lib/typescript/src/skia/Typeface/TypefaceFactory.d.ts +0 -5
- package/lib/typescript/src/skia/Typeface/index.d.ts +0 -3
- package/lib/typescript/src/skia/Typeface/useTypeface.d.ts +0 -5
- package/src/animation/timing/functions/__tests__/timing.spec.ts +0 -29
- package/src/renderer/processors/math/Matrix3.ts +0 -73
- package/src/renderer/processors/math/Vector.ts +0 -38
- package/src/skia/Color.ts +0 -20
- package/src/skia/ColorFilter/ColorFilterFactory.ts +0 -52
- package/src/skia/ContourMeasure.tsx +0 -49
- package/src/skia/Data/Data.ts +0 -61
- package/src/skia/Data/DataFactory.ts +0 -19
- package/src/skia/Font/Font.ts +0 -230
- package/src/skia/Font/index.ts +0 -2
- package/src/skia/Font/useFont.ts +0 -27
- package/src/skia/FontMgr/FontMgr.ts +0 -24
- package/src/skia/FontMgr/FontMgrFactory.ts +0 -17
- package/src/skia/FontMgr/index.ts +0 -1
- package/src/skia/Image/Image.ts +0 -96
- package/src/skia/Image/ImageFactory.ts +0 -78
- package/src/skia/Image/index.ts +0 -3
- package/src/skia/Image/useImage.ts +0 -9
- package/src/skia/ImageFilter/ImageFilterFactory.ts +0 -192
- package/src/skia/MaskFilter.ts +0 -27
- package/src/skia/Matrix.ts +0 -30
- package/src/skia/Paint/Paint.ts +0 -160
- package/src/skia/Paint/index.ts +0 -3
- package/src/skia/Paint/usePaint.ts +0 -21
- package/src/skia/Path/Path.ts +0 -554
- package/src/skia/Path/PathFactory.ts +0 -27
- package/src/skia/Path/index.ts +0 -3
- package/src/skia/Path/usePath.ts +0 -54
- package/src/skia/PathEffect.ts +0 -93
- package/src/skia/Picture/Picture.ts +0 -34
- package/src/skia/Picture/index.ts +0 -4
- package/src/skia/Picture/usePicture.ts +0 -28
- package/src/skia/Point.ts +0 -10
- package/src/skia/RRect.ts +0 -7
- package/src/skia/RuntimeEffect/RuntimeEffect.ts +0 -65
- package/src/skia/SVG/SVGFactory.ts +0 -8
- package/src/skia/SVG/index.ts +0 -3
- package/src/skia/SVG/useSvg.ts +0 -6
- package/src/skia/Shader/Shader.ts +0 -6
- package/src/skia/Shader/index.ts +0 -3
- package/src/skia/Shader/useShader.ts +0 -9
- package/src/skia/SkiaApi.ts +0 -86
- package/src/skia/Typeface/TypefaceFactory.ts +0 -7
- package/src/skia/Typeface/index.ts +0 -3
- package/src/skia/Typeface/useTypeface.ts +0 -9
- package/src/values/web/__tests__/RNSkAnimation.spec.ts +0 -21
- package/src/values/web/__tests__/RNSkDerivedValue.spec.ts +0 -15
- package/src/values/web/__tests__/RNSkReadonlyValue.spec.ts +0 -8
- package/src/values/web/__tests__/RNSkValue.spec.ts +0 -11
@@ -1,1354 +0,0 @@
|
|
1
|
-
/*
|
2
|
-
* Copyright 2013 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 GrTypesPriv_DEFINED
|
9
|
-
#define GrTypesPriv_DEFINED
|
10
|
-
|
11
|
-
#include <chrono>
|
12
|
-
#include "include/core/SkImage.h"
|
13
|
-
#include "include/core/SkImageInfo.h"
|
14
|
-
#include "include/core/SkPath.h"
|
15
|
-
#include "include/core/SkRefCnt.h"
|
16
|
-
#include "include/gpu/GrTypes.h"
|
17
|
-
#include "include/private/SkImageInfoPriv.h"
|
18
|
-
#include "include/private/SkMacros.h"
|
19
|
-
|
20
|
-
class GrBackendFormat;
|
21
|
-
class GrCaps;
|
22
|
-
class GrSurfaceProxy;
|
23
|
-
|
24
|
-
// The old libstdc++ uses the draft name "monotonic_clock" rather than "steady_clock". This might
|
25
|
-
// not actually be monotonic, depending on how libstdc++ was built. However, this is only currently
|
26
|
-
// used for idle resource purging so it shouldn't cause a correctness problem.
|
27
|
-
#if defined(__GLIBCXX__) && (__GLIBCXX__ < 20130000)
|
28
|
-
using GrStdSteadyClock = std::chrono::monotonic_clock;
|
29
|
-
#else
|
30
|
-
using GrStdSteadyClock = std::chrono::steady_clock;
|
31
|
-
#endif
|
32
|
-
|
33
|
-
/**
|
34
|
-
* divide, rounding up
|
35
|
-
*/
|
36
|
-
|
37
|
-
static inline constexpr size_t GrSizeDivRoundUp(size_t x, size_t y) { return (x + (y - 1)) / y; }
|
38
|
-
|
39
|
-
/**
|
40
|
-
* Geometric primitives used for drawing.
|
41
|
-
*/
|
42
|
-
enum class GrPrimitiveType : uint8_t {
|
43
|
-
kTriangles,
|
44
|
-
kTriangleStrip,
|
45
|
-
kPoints,
|
46
|
-
kLines, // 1 pix wide only
|
47
|
-
kLineStrip, // 1 pix wide only
|
48
|
-
kPatches,
|
49
|
-
kPath
|
50
|
-
};
|
51
|
-
static constexpr int kNumGrPrimitiveTypes = (int)GrPrimitiveType::kPath + 1;
|
52
|
-
|
53
|
-
static constexpr bool GrIsPrimTypeLines(GrPrimitiveType type) {
|
54
|
-
return GrPrimitiveType::kLines == type || GrPrimitiveType::kLineStrip == type;
|
55
|
-
}
|
56
|
-
|
57
|
-
enum class GrPrimitiveRestart : bool {
|
58
|
-
kNo = false,
|
59
|
-
kYes = true
|
60
|
-
};
|
61
|
-
|
62
|
-
/**
|
63
|
-
* Should a created surface be texturable?
|
64
|
-
*/
|
65
|
-
enum class GrTexturable : bool {
|
66
|
-
kNo = false,
|
67
|
-
kYes = true
|
68
|
-
};
|
69
|
-
|
70
|
-
// A DDL recorder has its own proxy provider and proxy cache. This enum indicates if
|
71
|
-
// a given proxy provider is one of these special ones.
|
72
|
-
enum class GrDDLProvider : bool {
|
73
|
-
kNo = false,
|
74
|
-
kYes = true
|
75
|
-
};
|
76
|
-
|
77
|
-
/**
|
78
|
-
* Formats for masks, used by the font cache. Important that these are 0-based.
|
79
|
-
*/
|
80
|
-
enum GrMaskFormat {
|
81
|
-
kA8_GrMaskFormat, //!< 1-byte per pixel
|
82
|
-
kA565_GrMaskFormat, //!< 2-bytes per pixel, RGB represent 3-channel LCD coverage
|
83
|
-
kARGB_GrMaskFormat, //!< 4-bytes per pixel, color format
|
84
|
-
|
85
|
-
kLast_GrMaskFormat = kARGB_GrMaskFormat
|
86
|
-
};
|
87
|
-
static const int kMaskFormatCount = kLast_GrMaskFormat + 1;
|
88
|
-
|
89
|
-
/**
|
90
|
-
* Return the number of bytes-per-pixel for the specified mask format.
|
91
|
-
*/
|
92
|
-
inline constexpr int GrMaskFormatBytesPerPixel(GrMaskFormat format) {
|
93
|
-
SkASSERT(format < kMaskFormatCount);
|
94
|
-
// kA8 (0) -> 1
|
95
|
-
// kA565 (1) -> 2
|
96
|
-
// kARGB (2) -> 4
|
97
|
-
static_assert(kA8_GrMaskFormat == 0, "enum_order_dependency");
|
98
|
-
static_assert(kA565_GrMaskFormat == 1, "enum_order_dependency");
|
99
|
-
static_assert(kARGB_GrMaskFormat == 2, "enum_order_dependency");
|
100
|
-
|
101
|
-
return SkTo<int>(1u << format);
|
102
|
-
}
|
103
|
-
|
104
|
-
/** Ownership rules for external GPU resources imported into Skia. */
|
105
|
-
enum GrWrapOwnership {
|
106
|
-
/** Skia will assume the client will keep the resource alive and Skia will not free it. */
|
107
|
-
kBorrow_GrWrapOwnership,
|
108
|
-
|
109
|
-
/** Skia will assume ownership of the resource and free it. */
|
110
|
-
kAdopt_GrWrapOwnership,
|
111
|
-
};
|
112
|
-
|
113
|
-
enum class GrWrapCacheable : bool {
|
114
|
-
/**
|
115
|
-
* The wrapped resource will be removed from the cache as soon as it becomes purgeable. It may
|
116
|
-
* still be assigned and found by a unique key, but the presence of the key will not be used to
|
117
|
-
* keep the resource alive when it has no references.
|
118
|
-
*/
|
119
|
-
kNo = false,
|
120
|
-
/**
|
121
|
-
* The wrapped resource is allowed to remain in the GrResourceCache when it has no references
|
122
|
-
* but has a unique key. Such resources should only be given unique keys when it is known that
|
123
|
-
* the key will eventually be removed from the resource or invalidated via the message bus.
|
124
|
-
*/
|
125
|
-
kYes = true
|
126
|
-
};
|
127
|
-
|
128
|
-
enum class GrBudgetedType : uint8_t {
|
129
|
-
/** The resource is budgeted and is subject to purging under budget pressure. */
|
130
|
-
kBudgeted,
|
131
|
-
/**
|
132
|
-
* The resource is unbudgeted and is purged as soon as it has no refs regardless of whether
|
133
|
-
* it has a unique or scratch key.
|
134
|
-
*/
|
135
|
-
kUnbudgetedUncacheable,
|
136
|
-
/**
|
137
|
-
* The resource is unbudgeted and is allowed to remain in the cache with no refs if it
|
138
|
-
* has a unique key. Scratch keys are ignored.
|
139
|
-
*/
|
140
|
-
kUnbudgetedCacheable,
|
141
|
-
};
|
142
|
-
|
143
|
-
enum class GrScissorTest : bool {
|
144
|
-
kDisabled = false,
|
145
|
-
kEnabled = true
|
146
|
-
};
|
147
|
-
|
148
|
-
/*
|
149
|
-
* Used to say whether texture is backed by memory.
|
150
|
-
*/
|
151
|
-
enum class GrMemoryless : bool {
|
152
|
-
/**
|
153
|
-
* The texture will be allocated normally and will affect memory budgets.
|
154
|
-
*/
|
155
|
-
kNo = false,
|
156
|
-
/**
|
157
|
-
* The texture will be not use GPU memory and will not affect memory budgets.
|
158
|
-
*/
|
159
|
-
kYes = true
|
160
|
-
};
|
161
|
-
|
162
|
-
struct GrMipLevel {
|
163
|
-
const void* fPixels = nullptr;
|
164
|
-
size_t fRowBytes = 0;
|
165
|
-
// This may be used to keep fPixels from being freed while a GrMipLevel exists.
|
166
|
-
sk_sp<SkData> fOptionalStorage;
|
167
|
-
};
|
168
|
-
|
169
|
-
enum class GrSemaphoreWrapType {
|
170
|
-
kWillSignal,
|
171
|
-
kWillWait,
|
172
|
-
};
|
173
|
-
|
174
|
-
/**
|
175
|
-
* This enum is used to specify the load operation to be used when an OpsTask/GrOpsRenderPass
|
176
|
-
* begins execution.
|
177
|
-
*/
|
178
|
-
enum class GrLoadOp {
|
179
|
-
kLoad,
|
180
|
-
kClear,
|
181
|
-
kDiscard,
|
182
|
-
};
|
183
|
-
|
184
|
-
/**
|
185
|
-
* This enum is used to specify the store operation to be used when an OpsTask/GrOpsRenderPass
|
186
|
-
* ends execution.
|
187
|
-
*/
|
188
|
-
enum class GrStoreOp {
|
189
|
-
kStore,
|
190
|
-
kDiscard,
|
191
|
-
};
|
192
|
-
|
193
|
-
/**
|
194
|
-
* Used to control antialiasing in draw calls.
|
195
|
-
*/
|
196
|
-
enum class GrAA : bool {
|
197
|
-
kNo = false,
|
198
|
-
kYes = true
|
199
|
-
};
|
200
|
-
|
201
|
-
enum class GrFillRule : bool {
|
202
|
-
kNonzero,
|
203
|
-
kEvenOdd
|
204
|
-
};
|
205
|
-
|
206
|
-
inline GrFillRule GrFillRuleForPathFillType(SkPathFillType fillType) {
|
207
|
-
switch (fillType) {
|
208
|
-
case SkPathFillType::kWinding:
|
209
|
-
case SkPathFillType::kInverseWinding:
|
210
|
-
return GrFillRule::kNonzero;
|
211
|
-
case SkPathFillType::kEvenOdd:
|
212
|
-
case SkPathFillType::kInverseEvenOdd:
|
213
|
-
return GrFillRule::kEvenOdd;
|
214
|
-
}
|
215
|
-
SkUNREACHABLE;
|
216
|
-
}
|
217
|
-
|
218
|
-
inline GrFillRule GrFillRuleForSkPath(const SkPath& path) {
|
219
|
-
return GrFillRuleForPathFillType(path.getFillType());
|
220
|
-
}
|
221
|
-
|
222
|
-
/** This enum indicates the type of antialiasing to be performed. */
|
223
|
-
enum class GrAAType : unsigned {
|
224
|
-
/** No antialiasing */
|
225
|
-
kNone,
|
226
|
-
/** Use fragment shader code to blend with a fractional pixel coverage. */
|
227
|
-
kCoverage,
|
228
|
-
/** Use normal MSAA. */
|
229
|
-
kMSAA,
|
230
|
-
|
231
|
-
kLast = kMSAA
|
232
|
-
};
|
233
|
-
static const int kGrAATypeCount = static_cast<int>(GrAAType::kLast) + 1;
|
234
|
-
|
235
|
-
static constexpr bool GrAATypeIsHW(GrAAType type) {
|
236
|
-
switch (type) {
|
237
|
-
case GrAAType::kNone:
|
238
|
-
return false;
|
239
|
-
case GrAAType::kCoverage:
|
240
|
-
return false;
|
241
|
-
case GrAAType::kMSAA:
|
242
|
-
return true;
|
243
|
-
}
|
244
|
-
SkUNREACHABLE;
|
245
|
-
}
|
246
|
-
|
247
|
-
/**
|
248
|
-
* Some pixel configs are inherently clamped to [0,1], some are allowed to go outside that range,
|
249
|
-
* and some are FP but manually clamped in the XP.
|
250
|
-
*/
|
251
|
-
enum class GrClampType {
|
252
|
-
kAuto, // Normalized, fixed-point configs
|
253
|
-
kManual, // Clamped FP configs
|
254
|
-
kNone, // Normal (unclamped) FP configs
|
255
|
-
};
|
256
|
-
|
257
|
-
/**
|
258
|
-
* A number of rectangle/quadrilateral drawing APIs can control anti-aliasing on a per edge basis.
|
259
|
-
* These masks specify which edges are AA'ed. The intent for this is to support tiling with seamless
|
260
|
-
* boundaries, where the inner edges are non-AA and the outer edges are AA. Regular draws (where AA
|
261
|
-
* is specified by GrAA) is almost equivalent to kNone or kAll, with the exception of how MSAA is
|
262
|
-
* handled.
|
263
|
-
*
|
264
|
-
* When tiling and there is MSAA, mixed edge rectangles are processed with MSAA, so in order for the
|
265
|
-
* tiled edges to remain seamless, inner tiles with kNone must also be processed with MSAA. In
|
266
|
-
* regular drawing, however, kNone should disable MSAA (if it's supported) to match the expected
|
267
|
-
* appearance.
|
268
|
-
*
|
269
|
-
* Therefore, APIs that use per-edge AA flags also take a GrAA value so that they can differentiate
|
270
|
-
* between the regular and tiling use case behaviors. Tiling operations should always pass
|
271
|
-
* GrAA::kYes while regular options should pass GrAA based on the SkPaint's anti-alias state.
|
272
|
-
*
|
273
|
-
* These values are identical to SkCanvas::QuadAAFlags.
|
274
|
-
*/
|
275
|
-
enum class GrQuadAAFlags {
|
276
|
-
kLeft = 0b0001,
|
277
|
-
kTop = 0b0010,
|
278
|
-
kRight = 0b0100,
|
279
|
-
kBottom = 0b1000,
|
280
|
-
|
281
|
-
kNone = 0b0000,
|
282
|
-
kAll = 0b1111,
|
283
|
-
};
|
284
|
-
|
285
|
-
GR_MAKE_BITFIELD_CLASS_OPS(GrQuadAAFlags)
|
286
|
-
|
287
|
-
static inline GrQuadAAFlags SkToGrQuadAAFlags(unsigned flags) {
|
288
|
-
return static_cast<GrQuadAAFlags>(flags);
|
289
|
-
}
|
290
|
-
|
291
|
-
/**
|
292
|
-
* Types of shader-language-specific boxed variables we can create.
|
293
|
-
*/
|
294
|
-
enum GrSLType {
|
295
|
-
kVoid_GrSLType,
|
296
|
-
kBool_GrSLType,
|
297
|
-
kBool2_GrSLType,
|
298
|
-
kBool3_GrSLType,
|
299
|
-
kBool4_GrSLType,
|
300
|
-
kShort_GrSLType,
|
301
|
-
kShort2_GrSLType,
|
302
|
-
kShort3_GrSLType,
|
303
|
-
kShort4_GrSLType,
|
304
|
-
kUShort_GrSLType,
|
305
|
-
kUShort2_GrSLType,
|
306
|
-
kUShort3_GrSLType,
|
307
|
-
kUShort4_GrSLType,
|
308
|
-
kFloat_GrSLType,
|
309
|
-
kFloat2_GrSLType,
|
310
|
-
kFloat3_GrSLType,
|
311
|
-
kFloat4_GrSLType,
|
312
|
-
kFloat2x2_GrSLType,
|
313
|
-
kFloat3x3_GrSLType,
|
314
|
-
kFloat4x4_GrSLType,
|
315
|
-
kHalf_GrSLType,
|
316
|
-
kHalf2_GrSLType,
|
317
|
-
kHalf3_GrSLType,
|
318
|
-
kHalf4_GrSLType,
|
319
|
-
kHalf2x2_GrSLType,
|
320
|
-
kHalf3x3_GrSLType,
|
321
|
-
kHalf4x4_GrSLType,
|
322
|
-
kInt_GrSLType,
|
323
|
-
kInt2_GrSLType,
|
324
|
-
kInt3_GrSLType,
|
325
|
-
kInt4_GrSLType,
|
326
|
-
kUInt_GrSLType,
|
327
|
-
kUInt2_GrSLType,
|
328
|
-
kUInt3_GrSLType,
|
329
|
-
kUInt4_GrSLType,
|
330
|
-
kTexture2DSampler_GrSLType,
|
331
|
-
kTextureExternalSampler_GrSLType,
|
332
|
-
kTexture2DRectSampler_GrSLType,
|
333
|
-
kTexture2D_GrSLType,
|
334
|
-
kSampler_GrSLType,
|
335
|
-
kInput_GrSLType,
|
336
|
-
|
337
|
-
kLast_GrSLType = kInput_GrSLType
|
338
|
-
};
|
339
|
-
static const int kGrSLTypeCount = kLast_GrSLType + 1;
|
340
|
-
|
341
|
-
/**
|
342
|
-
* The type of texture. Backends other than GL currently only use the 2D value but the type must
|
343
|
-
* still be known at the API-neutral layer as it used to determine whether MIP maps, renderability,
|
344
|
-
* and sampling parameters are legal for proxies that will be instantiated with wrapped textures.
|
345
|
-
*/
|
346
|
-
enum class GrTextureType {
|
347
|
-
kNone,
|
348
|
-
k2D,
|
349
|
-
/* Rectangle uses unnormalized texture coordinates. */
|
350
|
-
kRectangle,
|
351
|
-
kExternal
|
352
|
-
};
|
353
|
-
|
354
|
-
enum GrShaderType {
|
355
|
-
kVertex_GrShaderType,
|
356
|
-
kFragment_GrShaderType,
|
357
|
-
|
358
|
-
kLastkFragment_GrShaderType = kFragment_GrShaderType
|
359
|
-
};
|
360
|
-
static const int kGrShaderTypeCount = kLastkFragment_GrShaderType + 1;
|
361
|
-
|
362
|
-
enum GrShaderFlags {
|
363
|
-
kNone_GrShaderFlags = 0,
|
364
|
-
kVertex_GrShaderFlag = 1 << 0,
|
365
|
-
kTessControl_GrShaderFlag = 1 << 1,
|
366
|
-
kTessEvaluation_GrShaderFlag = 1 << 2,
|
367
|
-
kFragment_GrShaderFlag = 1 << 3
|
368
|
-
};
|
369
|
-
SK_MAKE_BITFIELD_OPS(GrShaderFlags)
|
370
|
-
|
371
|
-
/** Is the shading language type float (including vectors/matrices)? */
|
372
|
-
static constexpr bool GrSLTypeIsFloatType(GrSLType type) {
|
373
|
-
switch (type) {
|
374
|
-
case kFloat_GrSLType:
|
375
|
-
case kFloat2_GrSLType:
|
376
|
-
case kFloat3_GrSLType:
|
377
|
-
case kFloat4_GrSLType:
|
378
|
-
case kFloat2x2_GrSLType:
|
379
|
-
case kFloat3x3_GrSLType:
|
380
|
-
case kFloat4x4_GrSLType:
|
381
|
-
case kHalf_GrSLType:
|
382
|
-
case kHalf2_GrSLType:
|
383
|
-
case kHalf3_GrSLType:
|
384
|
-
case kHalf4_GrSLType:
|
385
|
-
case kHalf2x2_GrSLType:
|
386
|
-
case kHalf3x3_GrSLType:
|
387
|
-
case kHalf4x4_GrSLType:
|
388
|
-
return true;
|
389
|
-
|
390
|
-
case kVoid_GrSLType:
|
391
|
-
case kTexture2DSampler_GrSLType:
|
392
|
-
case kTextureExternalSampler_GrSLType:
|
393
|
-
case kTexture2DRectSampler_GrSLType:
|
394
|
-
case kBool_GrSLType:
|
395
|
-
case kBool2_GrSLType:
|
396
|
-
case kBool3_GrSLType:
|
397
|
-
case kBool4_GrSLType:
|
398
|
-
case kShort_GrSLType:
|
399
|
-
case kShort2_GrSLType:
|
400
|
-
case kShort3_GrSLType:
|
401
|
-
case kShort4_GrSLType:
|
402
|
-
case kUShort_GrSLType:
|
403
|
-
case kUShort2_GrSLType:
|
404
|
-
case kUShort3_GrSLType:
|
405
|
-
case kUShort4_GrSLType:
|
406
|
-
case kInt_GrSLType:
|
407
|
-
case kInt2_GrSLType:
|
408
|
-
case kInt3_GrSLType:
|
409
|
-
case kInt4_GrSLType:
|
410
|
-
case kUInt_GrSLType:
|
411
|
-
case kUInt2_GrSLType:
|
412
|
-
case kUInt3_GrSLType:
|
413
|
-
case kUInt4_GrSLType:
|
414
|
-
case kTexture2D_GrSLType:
|
415
|
-
case kSampler_GrSLType:
|
416
|
-
case kInput_GrSLType:
|
417
|
-
return false;
|
418
|
-
}
|
419
|
-
SkUNREACHABLE;
|
420
|
-
}
|
421
|
-
|
422
|
-
/** Is the shading language type integral (including vectors)? */
|
423
|
-
static constexpr bool GrSLTypeIsIntegralType(GrSLType type) {
|
424
|
-
switch (type) {
|
425
|
-
case kShort_GrSLType:
|
426
|
-
case kShort2_GrSLType:
|
427
|
-
case kShort3_GrSLType:
|
428
|
-
case kShort4_GrSLType:
|
429
|
-
case kUShort_GrSLType:
|
430
|
-
case kUShort2_GrSLType:
|
431
|
-
case kUShort3_GrSLType:
|
432
|
-
case kUShort4_GrSLType:
|
433
|
-
case kInt_GrSLType:
|
434
|
-
case kInt2_GrSLType:
|
435
|
-
case kInt3_GrSLType:
|
436
|
-
case kInt4_GrSLType:
|
437
|
-
case kUInt_GrSLType:
|
438
|
-
case kUInt2_GrSLType:
|
439
|
-
case kUInt3_GrSLType:
|
440
|
-
case kUInt4_GrSLType:
|
441
|
-
return true;
|
442
|
-
|
443
|
-
case kFloat_GrSLType:
|
444
|
-
case kFloat2_GrSLType:
|
445
|
-
case kFloat3_GrSLType:
|
446
|
-
case kFloat4_GrSLType:
|
447
|
-
case kFloat2x2_GrSLType:
|
448
|
-
case kFloat3x3_GrSLType:
|
449
|
-
case kFloat4x4_GrSLType:
|
450
|
-
case kHalf_GrSLType:
|
451
|
-
case kHalf2_GrSLType:
|
452
|
-
case kHalf3_GrSLType:
|
453
|
-
case kHalf4_GrSLType:
|
454
|
-
case kHalf2x2_GrSLType:
|
455
|
-
case kHalf3x3_GrSLType:
|
456
|
-
case kHalf4x4_GrSLType:
|
457
|
-
case kVoid_GrSLType:
|
458
|
-
case kTexture2DSampler_GrSLType:
|
459
|
-
case kTextureExternalSampler_GrSLType:
|
460
|
-
case kTexture2DRectSampler_GrSLType:
|
461
|
-
case kBool_GrSLType:
|
462
|
-
case kBool2_GrSLType:
|
463
|
-
case kBool3_GrSLType:
|
464
|
-
case kBool4_GrSLType:
|
465
|
-
case kTexture2D_GrSLType:
|
466
|
-
case kSampler_GrSLType:
|
467
|
-
case kInput_GrSLType:
|
468
|
-
return false;
|
469
|
-
}
|
470
|
-
SkUNREACHABLE;
|
471
|
-
}
|
472
|
-
|
473
|
-
/**
|
474
|
-
* Is the shading language type supported as a uniform (ie, does it have a corresponding set
|
475
|
-
* function on GrGLSLProgramDataManager)?
|
476
|
-
*/
|
477
|
-
static constexpr bool GrSLTypeCanBeUniformValue(GrSLType type) {
|
478
|
-
return GrSLTypeIsFloatType(type) || GrSLTypeIsIntegralType(type);
|
479
|
-
}
|
480
|
-
|
481
|
-
/** If the type represents a single value or vector return the vector length, else -1. */
|
482
|
-
static constexpr int GrSLTypeVecLength(GrSLType type) {
|
483
|
-
switch (type) {
|
484
|
-
case kFloat_GrSLType:
|
485
|
-
case kHalf_GrSLType:
|
486
|
-
case kBool_GrSLType:
|
487
|
-
case kShort_GrSLType:
|
488
|
-
case kUShort_GrSLType:
|
489
|
-
case kInt_GrSLType:
|
490
|
-
case kUInt_GrSLType:
|
491
|
-
return 1;
|
492
|
-
|
493
|
-
case kFloat2_GrSLType:
|
494
|
-
case kHalf2_GrSLType:
|
495
|
-
case kBool2_GrSLType:
|
496
|
-
case kShort2_GrSLType:
|
497
|
-
case kUShort2_GrSLType:
|
498
|
-
case kInt2_GrSLType:
|
499
|
-
case kUInt2_GrSLType:
|
500
|
-
return 2;
|
501
|
-
|
502
|
-
case kFloat3_GrSLType:
|
503
|
-
case kHalf3_GrSLType:
|
504
|
-
case kBool3_GrSLType:
|
505
|
-
case kShort3_GrSLType:
|
506
|
-
case kUShort3_GrSLType:
|
507
|
-
case kInt3_GrSLType:
|
508
|
-
case kUInt3_GrSLType:
|
509
|
-
return 3;
|
510
|
-
|
511
|
-
case kFloat4_GrSLType:
|
512
|
-
case kHalf4_GrSLType:
|
513
|
-
case kBool4_GrSLType:
|
514
|
-
case kShort4_GrSLType:
|
515
|
-
case kUShort4_GrSLType:
|
516
|
-
case kInt4_GrSLType:
|
517
|
-
case kUInt4_GrSLType:
|
518
|
-
return 4;
|
519
|
-
|
520
|
-
case kFloat2x2_GrSLType:
|
521
|
-
case kFloat3x3_GrSLType:
|
522
|
-
case kFloat4x4_GrSLType:
|
523
|
-
case kHalf2x2_GrSLType:
|
524
|
-
case kHalf3x3_GrSLType:
|
525
|
-
case kHalf4x4_GrSLType:
|
526
|
-
case kVoid_GrSLType:
|
527
|
-
case kTexture2DSampler_GrSLType:
|
528
|
-
case kTextureExternalSampler_GrSLType:
|
529
|
-
case kTexture2DRectSampler_GrSLType:
|
530
|
-
case kTexture2D_GrSLType:
|
531
|
-
case kSampler_GrSLType:
|
532
|
-
case kInput_GrSLType:
|
533
|
-
return -1;
|
534
|
-
}
|
535
|
-
SkUNREACHABLE;
|
536
|
-
}
|
537
|
-
|
538
|
-
static inline GrSLType GrSLCombinedSamplerTypeForTextureType(GrTextureType type) {
|
539
|
-
switch (type) {
|
540
|
-
case GrTextureType::k2D:
|
541
|
-
return kTexture2DSampler_GrSLType;
|
542
|
-
case GrTextureType::kRectangle:
|
543
|
-
return kTexture2DRectSampler_GrSLType;
|
544
|
-
case GrTextureType::kExternal:
|
545
|
-
return kTextureExternalSampler_GrSLType;
|
546
|
-
default:
|
547
|
-
SK_ABORT("Unexpected texture type");
|
548
|
-
}
|
549
|
-
}
|
550
|
-
|
551
|
-
/** Rectangle and external textures only support the clamp wrap mode and do not support
|
552
|
-
* MIP maps.
|
553
|
-
*/
|
554
|
-
static inline bool GrTextureTypeHasRestrictedSampling(GrTextureType type) {
|
555
|
-
switch (type) {
|
556
|
-
case GrTextureType::k2D:
|
557
|
-
return false;
|
558
|
-
case GrTextureType::kRectangle:
|
559
|
-
return true;
|
560
|
-
case GrTextureType::kExternal:
|
561
|
-
return true;
|
562
|
-
default:
|
563
|
-
SK_ABORT("Unexpected texture type");
|
564
|
-
}
|
565
|
-
}
|
566
|
-
|
567
|
-
static constexpr bool GrSLTypeIsCombinedSamplerType(GrSLType type) {
|
568
|
-
switch (type) {
|
569
|
-
case kTexture2DSampler_GrSLType:
|
570
|
-
case kTextureExternalSampler_GrSLType:
|
571
|
-
case kTexture2DRectSampler_GrSLType:
|
572
|
-
return true;
|
573
|
-
|
574
|
-
case kVoid_GrSLType:
|
575
|
-
case kFloat_GrSLType:
|
576
|
-
case kFloat2_GrSLType:
|
577
|
-
case kFloat3_GrSLType:
|
578
|
-
case kFloat4_GrSLType:
|
579
|
-
case kFloat2x2_GrSLType:
|
580
|
-
case kFloat3x3_GrSLType:
|
581
|
-
case kFloat4x4_GrSLType:
|
582
|
-
case kHalf_GrSLType:
|
583
|
-
case kHalf2_GrSLType:
|
584
|
-
case kHalf3_GrSLType:
|
585
|
-
case kHalf4_GrSLType:
|
586
|
-
case kHalf2x2_GrSLType:
|
587
|
-
case kHalf3x3_GrSLType:
|
588
|
-
case kHalf4x4_GrSLType:
|
589
|
-
case kInt_GrSLType:
|
590
|
-
case kInt2_GrSLType:
|
591
|
-
case kInt3_GrSLType:
|
592
|
-
case kInt4_GrSLType:
|
593
|
-
case kUInt_GrSLType:
|
594
|
-
case kUInt2_GrSLType:
|
595
|
-
case kUInt3_GrSLType:
|
596
|
-
case kUInt4_GrSLType:
|
597
|
-
case kBool_GrSLType:
|
598
|
-
case kBool2_GrSLType:
|
599
|
-
case kBool3_GrSLType:
|
600
|
-
case kBool4_GrSLType:
|
601
|
-
case kShort_GrSLType:
|
602
|
-
case kShort2_GrSLType:
|
603
|
-
case kShort3_GrSLType:
|
604
|
-
case kShort4_GrSLType:
|
605
|
-
case kUShort_GrSLType:
|
606
|
-
case kUShort2_GrSLType:
|
607
|
-
case kUShort3_GrSLType:
|
608
|
-
case kUShort4_GrSLType:
|
609
|
-
case kTexture2D_GrSLType:
|
610
|
-
case kSampler_GrSLType:
|
611
|
-
case kInput_GrSLType:
|
612
|
-
return false;
|
613
|
-
}
|
614
|
-
SkUNREACHABLE;
|
615
|
-
}
|
616
|
-
|
617
|
-
//////////////////////////////////////////////////////////////////////////////
|
618
|
-
|
619
|
-
/**
|
620
|
-
* Types used to describe format of vertices in arrays.
|
621
|
-
*/
|
622
|
-
enum GrVertexAttribType {
|
623
|
-
kFloat_GrVertexAttribType = 0,
|
624
|
-
kFloat2_GrVertexAttribType,
|
625
|
-
kFloat3_GrVertexAttribType,
|
626
|
-
kFloat4_GrVertexAttribType,
|
627
|
-
kHalf_GrVertexAttribType,
|
628
|
-
kHalf2_GrVertexAttribType,
|
629
|
-
kHalf4_GrVertexAttribType,
|
630
|
-
|
631
|
-
kInt2_GrVertexAttribType, // vector of 2 32-bit ints
|
632
|
-
kInt3_GrVertexAttribType, // vector of 3 32-bit ints
|
633
|
-
kInt4_GrVertexAttribType, // vector of 4 32-bit ints
|
634
|
-
|
635
|
-
|
636
|
-
kByte_GrVertexAttribType, // signed byte
|
637
|
-
kByte2_GrVertexAttribType, // vector of 2 8-bit signed bytes
|
638
|
-
kByte4_GrVertexAttribType, // vector of 4 8-bit signed bytes
|
639
|
-
kUByte_GrVertexAttribType, // unsigned byte
|
640
|
-
kUByte2_GrVertexAttribType, // vector of 2 8-bit unsigned bytes
|
641
|
-
kUByte4_GrVertexAttribType, // vector of 4 8-bit unsigned bytes
|
642
|
-
|
643
|
-
kUByte_norm_GrVertexAttribType, // unsigned byte, e.g. coverage, 0 -> 0.0f, 255 -> 1.0f.
|
644
|
-
kUByte4_norm_GrVertexAttribType, // vector of 4 unsigned bytes, e.g. colors, 0 -> 0.0f,
|
645
|
-
// 255 -> 1.0f.
|
646
|
-
|
647
|
-
kShort2_GrVertexAttribType, // vector of 2 16-bit shorts.
|
648
|
-
kShort4_GrVertexAttribType, // vector of 4 16-bit shorts.
|
649
|
-
|
650
|
-
kUShort2_GrVertexAttribType, // vector of 2 unsigned shorts. 0 -> 0, 65535 -> 65535.
|
651
|
-
kUShort2_norm_GrVertexAttribType, // vector of 2 unsigned shorts. 0 -> 0.0f, 65535 -> 1.0f.
|
652
|
-
|
653
|
-
kInt_GrVertexAttribType,
|
654
|
-
kUInt_GrVertexAttribType,
|
655
|
-
|
656
|
-
kUShort_norm_GrVertexAttribType,
|
657
|
-
|
658
|
-
kUShort4_norm_GrVertexAttribType, // vector of 4 unsigned shorts. 0 -> 0.0f, 65535 -> 1.0f.
|
659
|
-
|
660
|
-
kLast_GrVertexAttribType = kUShort4_norm_GrVertexAttribType
|
661
|
-
};
|
662
|
-
static const int kGrVertexAttribTypeCount = kLast_GrVertexAttribType + 1;
|
663
|
-
|
664
|
-
//////////////////////////////////////////////////////////////////////////////
|
665
|
-
|
666
|
-
/**
|
667
|
-
* We have coverage effects that clip rendering to the edge of some geometric primitive.
|
668
|
-
* This enum specifies how that clipping is performed. Not all factories that take a
|
669
|
-
* GrClipEdgeType will succeed with all values and it is up to the caller to verify success.
|
670
|
-
*/
|
671
|
-
enum class GrClipEdgeType {
|
672
|
-
kFillBW,
|
673
|
-
kFillAA,
|
674
|
-
kInverseFillBW,
|
675
|
-
kInverseFillAA,
|
676
|
-
|
677
|
-
kLast = kInverseFillAA
|
678
|
-
};
|
679
|
-
static const int kGrClipEdgeTypeCnt = (int) GrClipEdgeType::kLast + 1;
|
680
|
-
|
681
|
-
static constexpr bool GrClipEdgeTypeIsFill(const GrClipEdgeType edgeType) {
|
682
|
-
return (GrClipEdgeType::kFillAA == edgeType || GrClipEdgeType::kFillBW == edgeType);
|
683
|
-
}
|
684
|
-
|
685
|
-
static constexpr bool GrClipEdgeTypeIsInverseFill(const GrClipEdgeType edgeType) {
|
686
|
-
return (GrClipEdgeType::kInverseFillAA == edgeType ||
|
687
|
-
GrClipEdgeType::kInverseFillBW == edgeType);
|
688
|
-
}
|
689
|
-
|
690
|
-
static constexpr bool GrClipEdgeTypeIsAA(const GrClipEdgeType edgeType) {
|
691
|
-
return (GrClipEdgeType::kFillBW != edgeType &&
|
692
|
-
GrClipEdgeType::kInverseFillBW != edgeType);
|
693
|
-
}
|
694
|
-
|
695
|
-
static inline GrClipEdgeType GrInvertClipEdgeType(const GrClipEdgeType edgeType) {
|
696
|
-
switch (edgeType) {
|
697
|
-
case GrClipEdgeType::kFillBW:
|
698
|
-
return GrClipEdgeType::kInverseFillBW;
|
699
|
-
case GrClipEdgeType::kFillAA:
|
700
|
-
return GrClipEdgeType::kInverseFillAA;
|
701
|
-
case GrClipEdgeType::kInverseFillBW:
|
702
|
-
return GrClipEdgeType::kFillBW;
|
703
|
-
case GrClipEdgeType::kInverseFillAA:
|
704
|
-
return GrClipEdgeType::kFillAA;
|
705
|
-
}
|
706
|
-
SkUNREACHABLE;
|
707
|
-
}
|
708
|
-
|
709
|
-
/**
|
710
|
-
* Indicates the type of pending IO operations that can be recorded for gpu resources.
|
711
|
-
*/
|
712
|
-
enum GrIOType {
|
713
|
-
kRead_GrIOType,
|
714
|
-
kWrite_GrIOType,
|
715
|
-
kRW_GrIOType
|
716
|
-
};
|
717
|
-
|
718
|
-
/**
|
719
|
-
* Indicates the type of data that a GPU buffer will be used for.
|
720
|
-
*/
|
721
|
-
enum class GrGpuBufferType {
|
722
|
-
kVertex,
|
723
|
-
kIndex,
|
724
|
-
kDrawIndirect,
|
725
|
-
kXferCpuToGpu,
|
726
|
-
kXferGpuToCpu,
|
727
|
-
kUniform,
|
728
|
-
};
|
729
|
-
static const int kGrGpuBufferTypeCount = static_cast<int>(GrGpuBufferType::kUniform) + 1;
|
730
|
-
|
731
|
-
/**
|
732
|
-
* Provides a performance hint regarding the frequency at which a data store will be accessed.
|
733
|
-
*/
|
734
|
-
enum GrAccessPattern {
|
735
|
-
/** Data store will be respecified repeatedly and used many times. */
|
736
|
-
kDynamic_GrAccessPattern,
|
737
|
-
/** Data store will be specified once and used many times. (Thus disqualified from caching.) */
|
738
|
-
kStatic_GrAccessPattern,
|
739
|
-
/** Data store will be specified once and used at most a few times. (Also can't be cached.) */
|
740
|
-
kStream_GrAccessPattern,
|
741
|
-
|
742
|
-
kLast_GrAccessPattern = kStream_GrAccessPattern
|
743
|
-
};
|
744
|
-
|
745
|
-
// Flags shared between the GrSurface & GrSurfaceProxy class hierarchies
|
746
|
-
enum class GrInternalSurfaceFlags {
|
747
|
-
kNone = 0,
|
748
|
-
|
749
|
-
// Texture-level
|
750
|
-
|
751
|
-
// Means the pixels in the texture are read-only. Cannot also be a GrRenderTarget[Proxy].
|
752
|
-
kReadOnly = 1 << 0,
|
753
|
-
|
754
|
-
// RT-level
|
755
|
-
|
756
|
-
// This flag is for use with GL only. It tells us that the internal render target wraps FBO 0.
|
757
|
-
kGLRTFBOIDIs0 = 1 << 1,
|
758
|
-
|
759
|
-
// This means the render target is multisampled, and internally holds a non-msaa texture for
|
760
|
-
// resolving into. The render target resolves itself by blitting into this internal texture.
|
761
|
-
// (asTexture() might or might not return the internal texture, but if it does, we always
|
762
|
-
// resolve the render target before accessing this texture's data.)
|
763
|
-
kRequiresManualMSAAResolve = 1 << 2,
|
764
|
-
|
765
|
-
// This means the pixels in the render target are write-only. This is used for Dawn and Metal
|
766
|
-
// swap chain targets which can be rendered to, but not read or copied.
|
767
|
-
kFramebufferOnly = 1 << 3,
|
768
|
-
|
769
|
-
// This is a Vulkan only flag. If set the surface can be used as an input attachment in a
|
770
|
-
// shader. This is used for doing in shader blending where we want to sample from the same
|
771
|
-
// image we are drawing to.
|
772
|
-
kVkRTSupportsInputAttachment = 1 << 4,
|
773
|
-
};
|
774
|
-
|
775
|
-
GR_MAKE_BITFIELD_CLASS_OPS(GrInternalSurfaceFlags)
|
776
|
-
|
777
|
-
// 'GR_MAKE_BITFIELD_CLASS_OPS' defines the & operator on GrInternalSurfaceFlags to return bool.
|
778
|
-
// We want to find the bitwise & with these masks, so we declare them as ints.
|
779
|
-
constexpr static int kGrInternalTextureFlagsMask = static_cast<int>(
|
780
|
-
GrInternalSurfaceFlags::kReadOnly);
|
781
|
-
|
782
|
-
// We don't include kVkRTSupportsInputAttachment in this mask since we check it manually. We don't
|
783
|
-
// require that both the surface and proxy have matching values for this flag. Instead we require
|
784
|
-
// if the proxy has it set then the surface must also have it set. All other flags listed here must
|
785
|
-
// match on the proxy and surface.
|
786
|
-
// TODO: Add back kFramebufferOnly flag here once we update SkSurfaceCharacterization to take it
|
787
|
-
// as a flag. skbug.com/10672
|
788
|
-
constexpr static int kGrInternalRenderTargetFlagsMask = static_cast<int>(
|
789
|
-
GrInternalSurfaceFlags::kGLRTFBOIDIs0 |
|
790
|
-
GrInternalSurfaceFlags::kRequiresManualMSAAResolve/* |
|
791
|
-
GrInternalSurfaceFlags::kFramebufferOnly*/);
|
792
|
-
|
793
|
-
constexpr static int kGrInternalTextureRenderTargetFlagsMask =
|
794
|
-
kGrInternalTextureFlagsMask | kGrInternalRenderTargetFlagsMask;
|
795
|
-
|
796
|
-
#ifdef SK_DEBUG
|
797
|
-
// Takes a pointer to a GrCaps, and will suppress prints if required
|
798
|
-
#define GrCapsDebugf(caps, ...) if (!(caps)->suppressPrints()) SkDebugf(__VA_ARGS__)
|
799
|
-
#else
|
800
|
-
#define GrCapsDebugf(caps, ...) do {} while (0)
|
801
|
-
#endif
|
802
|
-
|
803
|
-
/**
|
804
|
-
* Specifies if the holder owns the backend, OpenGL or Vulkan, object.
|
805
|
-
*/
|
806
|
-
enum class GrBackendObjectOwnership : bool {
|
807
|
-
/** Holder does not destroy the backend object. */
|
808
|
-
kBorrowed = false,
|
809
|
-
/** Holder destroys the backend object. */
|
810
|
-
kOwned = true
|
811
|
-
};
|
812
|
-
|
813
|
-
/*
|
814
|
-
* Object for CPU-GPU synchronization
|
815
|
-
*/
|
816
|
-
typedef uint64_t GrFence;
|
817
|
-
|
818
|
-
/**
|
819
|
-
* Used to include or exclude specific GPU path renderers for testing purposes.
|
820
|
-
*/
|
821
|
-
enum class GpuPathRenderers {
|
822
|
-
kNone = 0, // Always use software masks and/or DefaultPathRenderer.
|
823
|
-
kDashLine = 1 << 0,
|
824
|
-
kAtlas = 1 << 1,
|
825
|
-
kTessellation = 1 << 2,
|
826
|
-
kCoverageCounting = 1 << 3,
|
827
|
-
kAAHairline = 1 << 4,
|
828
|
-
kAAConvex = 1 << 5,
|
829
|
-
kAALinearizing = 1 << 6,
|
830
|
-
kSmall = 1 << 7,
|
831
|
-
kTriangulating = 1 << 8,
|
832
|
-
kDefault = ((1 << 9) - 1) // All path renderers.
|
833
|
-
};
|
834
|
-
|
835
|
-
/**
|
836
|
-
* Used to describe the current state of Mips on a GrTexture
|
837
|
-
*/
|
838
|
-
enum class GrMipmapStatus {
|
839
|
-
kNotAllocated, // Mips have not been allocated
|
840
|
-
kDirty, // Mips are allocated but the full mip tree does not have valid data
|
841
|
-
kValid, // All levels fully allocated and have valid data in them
|
842
|
-
};
|
843
|
-
|
844
|
-
GR_MAKE_BITFIELD_CLASS_OPS(GpuPathRenderers)
|
845
|
-
|
846
|
-
/**
|
847
|
-
* Like SkColorType this describes a layout of pixel data in CPU memory. It specifies the channels,
|
848
|
-
* their type, and width. This exists so that the GPU backend can have private types that have no
|
849
|
-
* analog in the public facing SkColorType enum and omit types not implemented in the GPU backend.
|
850
|
-
* It does not refer to a texture format and the mapping to texture formats may be many-to-many.
|
851
|
-
* It does not specify the sRGB encoding of the stored values. The components are listed in order of
|
852
|
-
* where they appear in memory. In other words the first component listed is in the low bits and
|
853
|
-
* the last component in the high bits.
|
854
|
-
*/
|
855
|
-
enum class GrColorType {
|
856
|
-
kUnknown,
|
857
|
-
kAlpha_8,
|
858
|
-
kBGR_565,
|
859
|
-
kABGR_4444, // This name differs from SkColorType. kARGB_4444_SkColorType is misnamed.
|
860
|
-
kRGBA_8888,
|
861
|
-
kRGBA_8888_SRGB,
|
862
|
-
kRGB_888x,
|
863
|
-
kRG_88,
|
864
|
-
kBGRA_8888,
|
865
|
-
kRGBA_1010102,
|
866
|
-
kBGRA_1010102,
|
867
|
-
kGray_8,
|
868
|
-
kGrayAlpha_88,
|
869
|
-
kAlpha_F16,
|
870
|
-
kRGBA_F16,
|
871
|
-
kRGBA_F16_Clamped,
|
872
|
-
kRGBA_F32,
|
873
|
-
|
874
|
-
kAlpha_16,
|
875
|
-
kRG_1616,
|
876
|
-
kRG_F16,
|
877
|
-
kRGBA_16161616,
|
878
|
-
|
879
|
-
// Unusual types that come up after reading back in cases where we are reassigning the meaning
|
880
|
-
// of a texture format's channels to use for a particular color format but have to read back the
|
881
|
-
// data to a full RGBA quadruple. (e.g. using a R8 texture format as A8 color type but the API
|
882
|
-
// only supports reading to RGBA8.) None of these have SkColorType equivalents.
|
883
|
-
kAlpha_8xxx,
|
884
|
-
kAlpha_F32xxx,
|
885
|
-
kGray_8xxx,
|
886
|
-
|
887
|
-
// Types used to initialize backend textures.
|
888
|
-
kRGB_888,
|
889
|
-
kR_8,
|
890
|
-
kR_16,
|
891
|
-
kR_F16,
|
892
|
-
kGray_F16,
|
893
|
-
kBGRA_4444,
|
894
|
-
kARGB_4444,
|
895
|
-
|
896
|
-
kLast = kARGB_4444
|
897
|
-
};
|
898
|
-
|
899
|
-
static const int kGrColorTypeCnt = static_cast<int>(GrColorType::kLast) + 1;
|
900
|
-
|
901
|
-
static constexpr SkColorType GrColorTypeToSkColorType(GrColorType ct) {
|
902
|
-
switch (ct) {
|
903
|
-
case GrColorType::kUnknown: return kUnknown_SkColorType;
|
904
|
-
case GrColorType::kAlpha_8: return kAlpha_8_SkColorType;
|
905
|
-
case GrColorType::kBGR_565: return kRGB_565_SkColorType;
|
906
|
-
case GrColorType::kABGR_4444: return kARGB_4444_SkColorType;
|
907
|
-
case GrColorType::kRGBA_8888: return kRGBA_8888_SkColorType;
|
908
|
-
case GrColorType::kRGBA_8888_SRGB: return kSRGBA_8888_SkColorType;
|
909
|
-
case GrColorType::kRGB_888x: return kRGB_888x_SkColorType;
|
910
|
-
case GrColorType::kRG_88: return kR8G8_unorm_SkColorType;
|
911
|
-
case GrColorType::kBGRA_8888: return kBGRA_8888_SkColorType;
|
912
|
-
case GrColorType::kRGBA_1010102: return kRGBA_1010102_SkColorType;
|
913
|
-
case GrColorType::kBGRA_1010102: return kBGRA_1010102_SkColorType;
|
914
|
-
case GrColorType::kGray_8: return kGray_8_SkColorType;
|
915
|
-
case GrColorType::kGrayAlpha_88: return kUnknown_SkColorType;
|
916
|
-
case GrColorType::kAlpha_F16: return kA16_float_SkColorType;
|
917
|
-
case GrColorType::kRGBA_F16: return kRGBA_F16_SkColorType;
|
918
|
-
case GrColorType::kRGBA_F16_Clamped: return kRGBA_F16Norm_SkColorType;
|
919
|
-
case GrColorType::kRGBA_F32: return kRGBA_F32_SkColorType;
|
920
|
-
case GrColorType::kAlpha_8xxx: return kUnknown_SkColorType;
|
921
|
-
case GrColorType::kAlpha_F32xxx: return kUnknown_SkColorType;
|
922
|
-
case GrColorType::kGray_8xxx: return kUnknown_SkColorType;
|
923
|
-
case GrColorType::kAlpha_16: return kA16_unorm_SkColorType;
|
924
|
-
case GrColorType::kRG_1616: return kR16G16_unorm_SkColorType;
|
925
|
-
case GrColorType::kRGBA_16161616: return kR16G16B16A16_unorm_SkColorType;
|
926
|
-
case GrColorType::kRG_F16: return kR16G16_float_SkColorType;
|
927
|
-
case GrColorType::kRGB_888: return kUnknown_SkColorType;
|
928
|
-
case GrColorType::kR_8: return kUnknown_SkColorType;
|
929
|
-
case GrColorType::kR_16: return kUnknown_SkColorType;
|
930
|
-
case GrColorType::kR_F16: return kUnknown_SkColorType;
|
931
|
-
case GrColorType::kGray_F16: return kUnknown_SkColorType;
|
932
|
-
case GrColorType::kARGB_4444: return kUnknown_SkColorType;
|
933
|
-
case GrColorType::kBGRA_4444: return kUnknown_SkColorType;
|
934
|
-
}
|
935
|
-
SkUNREACHABLE;
|
936
|
-
}
|
937
|
-
|
938
|
-
static constexpr GrColorType SkColorTypeToGrColorType(SkColorType ct) {
|
939
|
-
switch (ct) {
|
940
|
-
case kUnknown_SkColorType: return GrColorType::kUnknown;
|
941
|
-
case kAlpha_8_SkColorType: return GrColorType::kAlpha_8;
|
942
|
-
case kRGB_565_SkColorType: return GrColorType::kBGR_565;
|
943
|
-
case kARGB_4444_SkColorType: return GrColorType::kABGR_4444;
|
944
|
-
case kRGBA_8888_SkColorType: return GrColorType::kRGBA_8888;
|
945
|
-
case kSRGBA_8888_SkColorType: return GrColorType::kRGBA_8888_SRGB;
|
946
|
-
case kRGB_888x_SkColorType: return GrColorType::kRGB_888x;
|
947
|
-
case kBGRA_8888_SkColorType: return GrColorType::kBGRA_8888;
|
948
|
-
case kGray_8_SkColorType: return GrColorType::kGray_8;
|
949
|
-
case kRGBA_F16Norm_SkColorType: return GrColorType::kRGBA_F16_Clamped;
|
950
|
-
case kRGBA_F16_SkColorType: return GrColorType::kRGBA_F16;
|
951
|
-
case kRGBA_1010102_SkColorType: return GrColorType::kRGBA_1010102;
|
952
|
-
case kRGB_101010x_SkColorType: return GrColorType::kUnknown;
|
953
|
-
case kBGRA_1010102_SkColorType: return GrColorType::kBGRA_1010102;
|
954
|
-
case kBGR_101010x_SkColorType: return GrColorType::kUnknown;
|
955
|
-
case kRGBA_F32_SkColorType: return GrColorType::kRGBA_F32;
|
956
|
-
case kR8G8_unorm_SkColorType: return GrColorType::kRG_88;
|
957
|
-
case kA16_unorm_SkColorType: return GrColorType::kAlpha_16;
|
958
|
-
case kR16G16_unorm_SkColorType: return GrColorType::kRG_1616;
|
959
|
-
case kA16_float_SkColorType: return GrColorType::kAlpha_F16;
|
960
|
-
case kR16G16_float_SkColorType: return GrColorType::kRG_F16;
|
961
|
-
case kR16G16B16A16_unorm_SkColorType: return GrColorType::kRGBA_16161616;
|
962
|
-
}
|
963
|
-
SkUNREACHABLE;
|
964
|
-
}
|
965
|
-
|
966
|
-
static constexpr uint32_t GrColorTypeChannelFlags(GrColorType ct) {
|
967
|
-
switch (ct) {
|
968
|
-
case GrColorType::kUnknown: return 0;
|
969
|
-
case GrColorType::kAlpha_8: return kAlpha_SkColorChannelFlag;
|
970
|
-
case GrColorType::kBGR_565: return kRGB_SkColorChannelFlags;
|
971
|
-
case GrColorType::kABGR_4444: return kRGBA_SkColorChannelFlags;
|
972
|
-
case GrColorType::kRGBA_8888: return kRGBA_SkColorChannelFlags;
|
973
|
-
case GrColorType::kRGBA_8888_SRGB: return kRGBA_SkColorChannelFlags;
|
974
|
-
case GrColorType::kRGB_888x: return kRGB_SkColorChannelFlags;
|
975
|
-
case GrColorType::kRG_88: return kRG_SkColorChannelFlags;
|
976
|
-
case GrColorType::kBGRA_8888: return kRGBA_SkColorChannelFlags;
|
977
|
-
case GrColorType::kRGBA_1010102: return kRGBA_SkColorChannelFlags;
|
978
|
-
case GrColorType::kBGRA_1010102: return kRGBA_SkColorChannelFlags;
|
979
|
-
case GrColorType::kGray_8: return kGray_SkColorChannelFlag;
|
980
|
-
case GrColorType::kGrayAlpha_88: return kGrayAlpha_SkColorChannelFlags;
|
981
|
-
case GrColorType::kAlpha_F16: return kAlpha_SkColorChannelFlag;
|
982
|
-
case GrColorType::kRGBA_F16: return kRGBA_SkColorChannelFlags;
|
983
|
-
case GrColorType::kRGBA_F16_Clamped: return kRGBA_SkColorChannelFlags;
|
984
|
-
case GrColorType::kRGBA_F32: return kRGBA_SkColorChannelFlags;
|
985
|
-
case GrColorType::kAlpha_8xxx: return kAlpha_SkColorChannelFlag;
|
986
|
-
case GrColorType::kAlpha_F32xxx: return kAlpha_SkColorChannelFlag;
|
987
|
-
case GrColorType::kGray_8xxx: return kGray_SkColorChannelFlag;
|
988
|
-
case GrColorType::kAlpha_16: return kAlpha_SkColorChannelFlag;
|
989
|
-
case GrColorType::kRG_1616: return kRG_SkColorChannelFlags;
|
990
|
-
case GrColorType::kRGBA_16161616: return kRGBA_SkColorChannelFlags;
|
991
|
-
case GrColorType::kRG_F16: return kRG_SkColorChannelFlags;
|
992
|
-
case GrColorType::kRGB_888: return kRGB_SkColorChannelFlags;
|
993
|
-
case GrColorType::kR_8: return kRed_SkColorChannelFlag;
|
994
|
-
case GrColorType::kR_16: return kRed_SkColorChannelFlag;
|
995
|
-
case GrColorType::kR_F16: return kRed_SkColorChannelFlag;
|
996
|
-
case GrColorType::kGray_F16: return kGray_SkColorChannelFlag;
|
997
|
-
case GrColorType::kARGB_4444: return kRGBA_SkColorChannelFlags;
|
998
|
-
case GrColorType::kBGRA_4444: return kRGBA_SkColorChannelFlags;
|
999
|
-
}
|
1000
|
-
SkUNREACHABLE;
|
1001
|
-
}
|
1002
|
-
|
1003
|
-
/**
|
1004
|
-
* Describes the encoding of channel data in a GrColorType.
|
1005
|
-
*/
|
1006
|
-
enum class GrColorTypeEncoding {
|
1007
|
-
kUnorm,
|
1008
|
-
kSRGBUnorm,
|
1009
|
-
// kSnorm,
|
1010
|
-
kFloat,
|
1011
|
-
// kSint
|
1012
|
-
// kUint
|
1013
|
-
};
|
1014
|
-
|
1015
|
-
/**
|
1016
|
-
* Describes a GrColorType by how many bits are used for each color component and how they are
|
1017
|
-
* encoded. Currently all the non-zero channels share a single GrColorTypeEncoding. This could be
|
1018
|
-
* expanded to store separate encodings and to indicate which bits belong to which components.
|
1019
|
-
*/
|
1020
|
-
class GrColorFormatDesc {
|
1021
|
-
public:
|
1022
|
-
static constexpr GrColorFormatDesc MakeRGBA(int rgba, GrColorTypeEncoding e) {
|
1023
|
-
return {rgba, rgba, rgba, rgba, 0, e};
|
1024
|
-
}
|
1025
|
-
|
1026
|
-
static constexpr GrColorFormatDesc MakeRGBA(int rgb, int a, GrColorTypeEncoding e) {
|
1027
|
-
return {rgb, rgb, rgb, a, 0, e};
|
1028
|
-
}
|
1029
|
-
|
1030
|
-
static constexpr GrColorFormatDesc MakeRGB(int rgb, GrColorTypeEncoding e) {
|
1031
|
-
return {rgb, rgb, rgb, 0, 0, e};
|
1032
|
-
}
|
1033
|
-
|
1034
|
-
static constexpr GrColorFormatDesc MakeRGB(int r, int g, int b, GrColorTypeEncoding e) {
|
1035
|
-
return {r, g, b, 0, 0, e};
|
1036
|
-
}
|
1037
|
-
|
1038
|
-
static constexpr GrColorFormatDesc MakeAlpha(int a, GrColorTypeEncoding e) {
|
1039
|
-
return {0, 0, 0, a, 0, e};
|
1040
|
-
}
|
1041
|
-
|
1042
|
-
static constexpr GrColorFormatDesc MakeR(int r, GrColorTypeEncoding e) {
|
1043
|
-
return {r, 0, 0, 0, 0, e};
|
1044
|
-
}
|
1045
|
-
|
1046
|
-
static constexpr GrColorFormatDesc MakeRG(int rg, GrColorTypeEncoding e) {
|
1047
|
-
return {rg, rg, 0, 0, 0, e};
|
1048
|
-
}
|
1049
|
-
|
1050
|
-
static constexpr GrColorFormatDesc MakeGray(int grayBits, GrColorTypeEncoding e) {
|
1051
|
-
return {0, 0, 0, 0, grayBits, e};
|
1052
|
-
}
|
1053
|
-
|
1054
|
-
static constexpr GrColorFormatDesc MakeGrayAlpha(int grayAlpha, GrColorTypeEncoding e) {
|
1055
|
-
return {0, 0, 0, 0, grayAlpha, e};
|
1056
|
-
}
|
1057
|
-
|
1058
|
-
static constexpr GrColorFormatDesc MakeInvalid() { return {}; }
|
1059
|
-
|
1060
|
-
constexpr int r() const { return fRBits; }
|
1061
|
-
constexpr int g() const { return fGBits; }
|
1062
|
-
constexpr int b() const { return fBBits; }
|
1063
|
-
constexpr int a() const { return fABits; }
|
1064
|
-
constexpr int operator[](int c) const {
|
1065
|
-
switch (c) {
|
1066
|
-
case 0: return this->r();
|
1067
|
-
case 1: return this->g();
|
1068
|
-
case 2: return this->b();
|
1069
|
-
case 3: return this->a();
|
1070
|
-
}
|
1071
|
-
SkUNREACHABLE;
|
1072
|
-
}
|
1073
|
-
|
1074
|
-
constexpr int gray() const { return fGrayBits; }
|
1075
|
-
|
1076
|
-
constexpr GrColorTypeEncoding encoding() const { return fEncoding; }
|
1077
|
-
|
1078
|
-
private:
|
1079
|
-
int fRBits = 0;
|
1080
|
-
int fGBits = 0;
|
1081
|
-
int fBBits = 0;
|
1082
|
-
int fABits = 0;
|
1083
|
-
int fGrayBits = 0;
|
1084
|
-
GrColorTypeEncoding fEncoding = GrColorTypeEncoding::kUnorm;
|
1085
|
-
|
1086
|
-
constexpr GrColorFormatDesc() = default;
|
1087
|
-
|
1088
|
-
constexpr GrColorFormatDesc(int r, int g, int b, int a, int gray, GrColorTypeEncoding encoding)
|
1089
|
-
: fRBits(r), fGBits(g), fBBits(b), fABits(a), fGrayBits(gray), fEncoding(encoding) {
|
1090
|
-
SkASSERT(r >= 0 && g >= 0 && b >= 0 && a >= 0 && gray >= 0);
|
1091
|
-
SkASSERT(!gray || (!r && !g && !b));
|
1092
|
-
SkASSERT(r || g || b || a || gray);
|
1093
|
-
}
|
1094
|
-
};
|
1095
|
-
|
1096
|
-
static constexpr GrColorFormatDesc GrGetColorTypeDesc(GrColorType ct) {
|
1097
|
-
switch (ct) {
|
1098
|
-
case GrColorType::kUnknown:
|
1099
|
-
return GrColorFormatDesc::MakeInvalid();
|
1100
|
-
case GrColorType::kAlpha_8:
|
1101
|
-
return GrColorFormatDesc::MakeAlpha(8, GrColorTypeEncoding::kUnorm);
|
1102
|
-
case GrColorType::kBGR_565:
|
1103
|
-
return GrColorFormatDesc::MakeRGB(5, 6, 5, GrColorTypeEncoding::kUnorm);
|
1104
|
-
case GrColorType::kABGR_4444:
|
1105
|
-
return GrColorFormatDesc::MakeRGBA(4, GrColorTypeEncoding::kUnorm);
|
1106
|
-
case GrColorType::kRGBA_8888:
|
1107
|
-
return GrColorFormatDesc::MakeRGBA(8, GrColorTypeEncoding::kUnorm);
|
1108
|
-
case GrColorType::kRGBA_8888_SRGB:
|
1109
|
-
return GrColorFormatDesc::MakeRGBA(8, GrColorTypeEncoding::kSRGBUnorm);
|
1110
|
-
case GrColorType::kRGB_888x:
|
1111
|
-
return GrColorFormatDesc::MakeRGB(8, GrColorTypeEncoding::kUnorm);
|
1112
|
-
case GrColorType::kRG_88:
|
1113
|
-
return GrColorFormatDesc::MakeRG(8, GrColorTypeEncoding::kUnorm);
|
1114
|
-
case GrColorType::kBGRA_8888:
|
1115
|
-
return GrColorFormatDesc::MakeRGBA(8, GrColorTypeEncoding::kUnorm);
|
1116
|
-
case GrColorType::kRGBA_1010102:
|
1117
|
-
return GrColorFormatDesc::MakeRGBA(10, 2, GrColorTypeEncoding::kUnorm);
|
1118
|
-
case GrColorType::kBGRA_1010102:
|
1119
|
-
return GrColorFormatDesc::MakeRGBA(10, 2, GrColorTypeEncoding::kUnorm);
|
1120
|
-
case GrColorType::kGray_8:
|
1121
|
-
return GrColorFormatDesc::MakeGray(8, GrColorTypeEncoding::kUnorm);
|
1122
|
-
case GrColorType::kGrayAlpha_88:
|
1123
|
-
return GrColorFormatDesc::MakeGrayAlpha(8, GrColorTypeEncoding::kUnorm);
|
1124
|
-
case GrColorType::kAlpha_F16:
|
1125
|
-
return GrColorFormatDesc::MakeAlpha(16, GrColorTypeEncoding::kFloat);
|
1126
|
-
case GrColorType::kRGBA_F16:
|
1127
|
-
return GrColorFormatDesc::MakeRGBA(16, GrColorTypeEncoding::kFloat);
|
1128
|
-
case GrColorType::kRGBA_F16_Clamped:
|
1129
|
-
return GrColorFormatDesc::MakeRGBA(16, GrColorTypeEncoding::kFloat);
|
1130
|
-
case GrColorType::kRGBA_F32:
|
1131
|
-
return GrColorFormatDesc::MakeRGBA(32, GrColorTypeEncoding::kFloat);
|
1132
|
-
case GrColorType::kAlpha_8xxx:
|
1133
|
-
return GrColorFormatDesc::MakeAlpha(8, GrColorTypeEncoding::kUnorm);
|
1134
|
-
case GrColorType::kAlpha_F32xxx:
|
1135
|
-
return GrColorFormatDesc::MakeAlpha(32, GrColorTypeEncoding::kFloat);
|
1136
|
-
case GrColorType::kGray_8xxx:
|
1137
|
-
return GrColorFormatDesc::MakeGray(8, GrColorTypeEncoding::kUnorm);
|
1138
|
-
case GrColorType::kAlpha_16:
|
1139
|
-
return GrColorFormatDesc::MakeAlpha(16, GrColorTypeEncoding::kUnorm);
|
1140
|
-
case GrColorType::kRG_1616:
|
1141
|
-
return GrColorFormatDesc::MakeRG(16, GrColorTypeEncoding::kUnorm);
|
1142
|
-
case GrColorType::kRGBA_16161616:
|
1143
|
-
return GrColorFormatDesc::MakeRGBA(16, GrColorTypeEncoding::kUnorm);
|
1144
|
-
case GrColorType::kRG_F16:
|
1145
|
-
return GrColorFormatDesc::MakeRG(16, GrColorTypeEncoding::kFloat);
|
1146
|
-
case GrColorType::kRGB_888:
|
1147
|
-
return GrColorFormatDesc::MakeRGB(8, GrColorTypeEncoding::kUnorm);
|
1148
|
-
case GrColorType::kR_8:
|
1149
|
-
return GrColorFormatDesc::MakeR(8, GrColorTypeEncoding::kUnorm);
|
1150
|
-
case GrColorType::kR_16:
|
1151
|
-
return GrColorFormatDesc::MakeR(16, GrColorTypeEncoding::kUnorm);
|
1152
|
-
case GrColorType::kR_F16:
|
1153
|
-
return GrColorFormatDesc::MakeR(16, GrColorTypeEncoding::kFloat);
|
1154
|
-
case GrColorType::kGray_F16:
|
1155
|
-
return GrColorFormatDesc::MakeGray(16, GrColorTypeEncoding::kFloat);
|
1156
|
-
case GrColorType::kARGB_4444:
|
1157
|
-
return GrColorFormatDesc::MakeRGBA(4, GrColorTypeEncoding::kUnorm);
|
1158
|
-
case GrColorType::kBGRA_4444:
|
1159
|
-
return GrColorFormatDesc::MakeRGBA(4, GrColorTypeEncoding::kUnorm);
|
1160
|
-
}
|
1161
|
-
SkUNREACHABLE;
|
1162
|
-
}
|
1163
|
-
|
1164
|
-
static constexpr GrClampType GrColorTypeClampType(GrColorType colorType) {
|
1165
|
-
if (GrGetColorTypeDesc(colorType).encoding() == GrColorTypeEncoding::kUnorm ||
|
1166
|
-
GrGetColorTypeDesc(colorType).encoding() == GrColorTypeEncoding::kSRGBUnorm) {
|
1167
|
-
return GrClampType::kAuto;
|
1168
|
-
}
|
1169
|
-
return GrColorType::kRGBA_F16_Clamped == colorType ? GrClampType::kManual : GrClampType::kNone;
|
1170
|
-
}
|
1171
|
-
|
1172
|
-
// Consider a color type "wider" than n if it has more than n bits for any its representable
|
1173
|
-
// channels.
|
1174
|
-
static constexpr bool GrColorTypeIsWiderThan(GrColorType colorType, int n) {
|
1175
|
-
SkASSERT(n > 0);
|
1176
|
-
auto desc = GrGetColorTypeDesc(colorType);
|
1177
|
-
return (desc.r() && desc.r() > n )||
|
1178
|
-
(desc.g() && desc.g() > n) ||
|
1179
|
-
(desc.b() && desc.b() > n) ||
|
1180
|
-
(desc.a() && desc.a() > n) ||
|
1181
|
-
(desc.gray() && desc.gray() > n);
|
1182
|
-
}
|
1183
|
-
|
1184
|
-
static constexpr bool GrColorTypeIsAlphaOnly(GrColorType ct) {
|
1185
|
-
return GrColorTypeChannelFlags(ct) == kAlpha_SkColorChannelFlag;
|
1186
|
-
}
|
1187
|
-
|
1188
|
-
static constexpr bool GrColorTypeHasAlpha(GrColorType ct) {
|
1189
|
-
return GrColorTypeChannelFlags(ct) & kAlpha_SkColorChannelFlag;
|
1190
|
-
}
|
1191
|
-
|
1192
|
-
static constexpr size_t GrColorTypeBytesPerPixel(GrColorType ct) {
|
1193
|
-
switch (ct) {
|
1194
|
-
case GrColorType::kUnknown: return 0;
|
1195
|
-
case GrColorType::kAlpha_8: return 1;
|
1196
|
-
case GrColorType::kBGR_565: return 2;
|
1197
|
-
case GrColorType::kABGR_4444: return 2;
|
1198
|
-
case GrColorType::kRGBA_8888: return 4;
|
1199
|
-
case GrColorType::kRGBA_8888_SRGB: return 4;
|
1200
|
-
case GrColorType::kRGB_888x: return 4;
|
1201
|
-
case GrColorType::kRG_88: return 2;
|
1202
|
-
case GrColorType::kBGRA_8888: return 4;
|
1203
|
-
case GrColorType::kRGBA_1010102: return 4;
|
1204
|
-
case GrColorType::kBGRA_1010102: return 4;
|
1205
|
-
case GrColorType::kGray_8: return 1;
|
1206
|
-
case GrColorType::kGrayAlpha_88: return 2;
|
1207
|
-
case GrColorType::kAlpha_F16: return 2;
|
1208
|
-
case GrColorType::kRGBA_F16: return 8;
|
1209
|
-
case GrColorType::kRGBA_F16_Clamped: return 8;
|
1210
|
-
case GrColorType::kRGBA_F32: return 16;
|
1211
|
-
case GrColorType::kAlpha_8xxx: return 4;
|
1212
|
-
case GrColorType::kAlpha_F32xxx: return 16;
|
1213
|
-
case GrColorType::kGray_8xxx: return 4;
|
1214
|
-
case GrColorType::kAlpha_16: return 2;
|
1215
|
-
case GrColorType::kRG_1616: return 4;
|
1216
|
-
case GrColorType::kRGBA_16161616: return 8;
|
1217
|
-
case GrColorType::kRG_F16: return 4;
|
1218
|
-
case GrColorType::kRGB_888: return 3;
|
1219
|
-
case GrColorType::kR_8: return 1;
|
1220
|
-
case GrColorType::kR_16: return 2;
|
1221
|
-
case GrColorType::kR_F16: return 2;
|
1222
|
-
case GrColorType::kGray_F16: return 2;
|
1223
|
-
case GrColorType::kARGB_4444: return 2;
|
1224
|
-
case GrColorType::kBGRA_4444: return 2;
|
1225
|
-
}
|
1226
|
-
SkUNREACHABLE;
|
1227
|
-
}
|
1228
|
-
|
1229
|
-
// In general we try to not mix CompressionType and ColorType, but currently SkImage still requires
|
1230
|
-
// an SkColorType even for CompressedTypes so we need some conversion.
|
1231
|
-
static constexpr SkColorType GrCompressionTypeToSkColorType(SkImage::CompressionType compression) {
|
1232
|
-
switch (compression) {
|
1233
|
-
case SkImage::CompressionType::kNone: return kUnknown_SkColorType;
|
1234
|
-
case SkImage::CompressionType::kETC2_RGB8_UNORM: return kRGB_888x_SkColorType;
|
1235
|
-
case SkImage::CompressionType::kBC1_RGB8_UNORM: return kRGB_888x_SkColorType;
|
1236
|
-
case SkImage::CompressionType::kBC1_RGBA8_UNORM: return kRGBA_8888_SkColorType;
|
1237
|
-
}
|
1238
|
-
|
1239
|
-
SkUNREACHABLE;
|
1240
|
-
}
|
1241
|
-
|
1242
|
-
static constexpr GrColorType GrMaskFormatToColorType(GrMaskFormat format) {
|
1243
|
-
switch (format) {
|
1244
|
-
case kA8_GrMaskFormat:
|
1245
|
-
return GrColorType::kAlpha_8;
|
1246
|
-
case kA565_GrMaskFormat:
|
1247
|
-
return GrColorType::kBGR_565;
|
1248
|
-
case kARGB_GrMaskFormat:
|
1249
|
-
return GrColorType::kRGBA_8888;
|
1250
|
-
}
|
1251
|
-
SkUNREACHABLE;
|
1252
|
-
}
|
1253
|
-
|
1254
|
-
/**
|
1255
|
-
* Ref-counted object that calls a callback from its destructor.
|
1256
|
-
*/
|
1257
|
-
class GrRefCntedCallback : public SkNVRefCnt<GrRefCntedCallback> {
|
1258
|
-
public:
|
1259
|
-
using Context = void*;
|
1260
|
-
using Callback = void (*)(Context);
|
1261
|
-
|
1262
|
-
static sk_sp<GrRefCntedCallback> Make(Callback proc, Context ctx) {
|
1263
|
-
if (!proc) {
|
1264
|
-
return nullptr;
|
1265
|
-
}
|
1266
|
-
return sk_sp<GrRefCntedCallback>(new GrRefCntedCallback(proc, ctx));
|
1267
|
-
}
|
1268
|
-
|
1269
|
-
~GrRefCntedCallback() { fReleaseProc(fReleaseCtx); }
|
1270
|
-
|
1271
|
-
Context context() const { return fReleaseCtx; }
|
1272
|
-
|
1273
|
-
private:
|
1274
|
-
GrRefCntedCallback(Callback proc, Context ctx) : fReleaseProc(proc), fReleaseCtx(ctx) {}
|
1275
|
-
GrRefCntedCallback(const GrRefCntedCallback&) = delete;
|
1276
|
-
GrRefCntedCallback(GrRefCntedCallback&&) = delete;
|
1277
|
-
GrRefCntedCallback& operator=(const GrRefCntedCallback&) = delete;
|
1278
|
-
GrRefCntedCallback& operator=(GrRefCntedCallback&&) = delete;
|
1279
|
-
|
1280
|
-
Callback fReleaseProc;
|
1281
|
-
Context fReleaseCtx;
|
1282
|
-
};
|
1283
|
-
|
1284
|
-
enum class GrDstSampleFlags {
|
1285
|
-
kNone = 0,
|
1286
|
-
kRequiresTextureBarrier = 1 << 0,
|
1287
|
-
kAsInputAttachment = 1 << 1,
|
1288
|
-
};
|
1289
|
-
GR_MAKE_BITFIELD_CLASS_OPS(GrDstSampleFlags)
|
1290
|
-
|
1291
|
-
using GrVisitProxyFunc = std::function<void(GrSurfaceProxy*, GrMipmapped)>;
|
1292
|
-
|
1293
|
-
#if defined(SK_DEBUG) || GR_TEST_UTILS || defined(SK_ENABLE_DUMP_GPU)
|
1294
|
-
static constexpr const char* GrBackendApiToStr(GrBackendApi api) {
|
1295
|
-
switch (api) {
|
1296
|
-
case GrBackendApi::kOpenGL: return "OpenGL";
|
1297
|
-
case GrBackendApi::kVulkan: return "Vulkan";
|
1298
|
-
case GrBackendApi::kMetal: return "Metal";
|
1299
|
-
case GrBackendApi::kDirect3D: return "Direct3D";
|
1300
|
-
case GrBackendApi::kDawn: return "Dawn";
|
1301
|
-
case GrBackendApi::kMock: return "Mock";
|
1302
|
-
}
|
1303
|
-
SkUNREACHABLE;
|
1304
|
-
}
|
1305
|
-
|
1306
|
-
static constexpr const char* GrColorTypeToStr(GrColorType ct) {
|
1307
|
-
switch (ct) {
|
1308
|
-
case GrColorType::kUnknown: return "kUnknown";
|
1309
|
-
case GrColorType::kAlpha_8: return "kAlpha_8";
|
1310
|
-
case GrColorType::kBGR_565: return "kRGB_565";
|
1311
|
-
case GrColorType::kABGR_4444: return "kABGR_4444";
|
1312
|
-
case GrColorType::kRGBA_8888: return "kRGBA_8888";
|
1313
|
-
case GrColorType::kRGBA_8888_SRGB: return "kRGBA_8888_SRGB";
|
1314
|
-
case GrColorType::kRGB_888x: return "kRGB_888x";
|
1315
|
-
case GrColorType::kRG_88: return "kRG_88";
|
1316
|
-
case GrColorType::kBGRA_8888: return "kBGRA_8888";
|
1317
|
-
case GrColorType::kRGBA_1010102: return "kRGBA_1010102";
|
1318
|
-
case GrColorType::kBGRA_1010102: return "kBGRA_1010102";
|
1319
|
-
case GrColorType::kGray_8: return "kGray_8";
|
1320
|
-
case GrColorType::kGrayAlpha_88: return "kGrayAlpha_88";
|
1321
|
-
case GrColorType::kAlpha_F16: return "kAlpha_F16";
|
1322
|
-
case GrColorType::kRGBA_F16: return "kRGBA_F16";
|
1323
|
-
case GrColorType::kRGBA_F16_Clamped: return "kRGBA_F16_Clamped";
|
1324
|
-
case GrColorType::kRGBA_F32: return "kRGBA_F32";
|
1325
|
-
case GrColorType::kAlpha_8xxx: return "kAlpha_8xxx";
|
1326
|
-
case GrColorType::kAlpha_F32xxx: return "kAlpha_F32xxx";
|
1327
|
-
case GrColorType::kGray_8xxx: return "kGray_8xxx";
|
1328
|
-
case GrColorType::kAlpha_16: return "kAlpha_16";
|
1329
|
-
case GrColorType::kRG_1616: return "kRG_1616";
|
1330
|
-
case GrColorType::kRGBA_16161616: return "kRGBA_16161616";
|
1331
|
-
case GrColorType::kRG_F16: return "kRG_F16";
|
1332
|
-
case GrColorType::kRGB_888: return "kRGB_888";
|
1333
|
-
case GrColorType::kR_8: return "kR_8";
|
1334
|
-
case GrColorType::kR_16: return "kR_16";
|
1335
|
-
case GrColorType::kR_F16: return "kR_F16";
|
1336
|
-
case GrColorType::kGray_F16: return "kGray_F16";
|
1337
|
-
case GrColorType::kARGB_4444: return "kARGB_4444";
|
1338
|
-
case GrColorType::kBGRA_4444: return "kBGRA_4444";
|
1339
|
-
}
|
1340
|
-
SkUNREACHABLE;
|
1341
|
-
}
|
1342
|
-
|
1343
|
-
static constexpr const char* GrCompressionTypeToStr(SkImage::CompressionType compression) {
|
1344
|
-
switch (compression) {
|
1345
|
-
case SkImage::CompressionType::kNone: return "kNone";
|
1346
|
-
case SkImage::CompressionType::kETC2_RGB8_UNORM: return "kETC2_RGB8_UNORM";
|
1347
|
-
case SkImage::CompressionType::kBC1_RGB8_UNORM: return "kBC1_RGB8_UNORM";
|
1348
|
-
case SkImage::CompressionType::kBC1_RGBA8_UNORM: return "kBC1_RGBA8_UNORM";
|
1349
|
-
}
|
1350
|
-
SkUNREACHABLE;
|
1351
|
-
}
|
1352
|
-
#endif
|
1353
|
-
|
1354
|
-
#endif
|