@shopify/react-native-skia 0.1.213 → 0.1.215
Sign up to get free protection for your applications and to get access to all the features.
- package/android/cpp/rnskia-android/SkiaOpenGLHelper.h +3 -2
- package/android/cpp/rnskia-android/SkiaOpenGLSurfaceFactory.cpp +9 -2
- package/cpp/api/JsiSkMatrix.h +31 -0
- package/cpp/api/JsiSkPath.h +15 -7
- package/cpp/api/JsiSkSurface.h +4 -1
- package/cpp/skia/include/android/GrAHardwareBufferUtils.h +99 -0
- package/cpp/skia/include/android/SkHeifDecoder.h +10 -3
- package/cpp/skia/include/codec/SkAvifDecoder.h +1 -0
- package/cpp/skia/include/codec/SkBmpDecoder.h +1 -0
- package/cpp/skia/include/codec/SkCodec.h +4 -3
- package/cpp/skia/include/codec/SkEncodedImageFormat.h +0 -3
- package/cpp/skia/include/codec/SkGifDecoder.h +1 -0
- package/cpp/skia/include/codec/SkIcoDecoder.h +1 -0
- package/cpp/skia/include/codec/SkJpegDecoder.h +1 -0
- package/cpp/skia/include/codec/SkJpegxlDecoder.h +1 -0
- package/cpp/skia/include/codec/SkPngDecoder.h +1 -0
- package/cpp/skia/include/codec/SkRawDecoder.h +1 -0
- package/cpp/skia/include/codec/SkWbmpDecoder.h +1 -0
- package/cpp/skia/include/codec/SkWebpDecoder.h +1 -0
- package/cpp/skia/include/config/SkUserConfig.h +0 -2
- package/cpp/skia/include/core/SkBitmap.h +8 -8
- package/cpp/skia/include/core/SkCanvas.h +37 -50
- package/cpp/skia/include/core/SkCapabilities.h +2 -7
- package/cpp/skia/include/core/SkColor.h +1 -1
- package/cpp/skia/include/core/SkColorFilter.h +6 -0
- package/cpp/skia/include/core/SkColorTable.h +3 -0
- package/cpp/skia/include/core/SkColorType.h +2 -0
- package/cpp/skia/include/core/SkContourMeasure.h +12 -8
- package/cpp/skia/include/core/SkDocument.h +1 -0
- package/cpp/skia/include/core/SkFont.h +11 -2
- package/cpp/skia/include/core/SkFontMgr.h +2 -3
- package/cpp/skia/include/core/SkGraphics.h +3 -13
- package/cpp/skia/include/core/SkImage.h +57 -111
- package/cpp/skia/include/core/SkImageFilter.h +6 -1
- package/cpp/skia/include/core/SkImageGenerator.h +8 -0
- package/cpp/skia/include/core/SkImageInfo.h +0 -2
- package/cpp/skia/include/core/SkM44.h +7 -3
- package/cpp/skia/include/core/SkMallocPixelRef.h +4 -1
- package/cpp/skia/include/core/SkMatrix.h +17 -17
- package/cpp/skia/include/core/SkMesh.h +71 -61
- package/cpp/skia/include/core/SkMilestone.h +1 -1
- package/cpp/skia/include/core/SkOverdrawCanvas.h +25 -0
- package/cpp/skia/include/core/SkPaint.h +1 -1
- package/cpp/skia/include/core/SkPath.h +12 -4
- package/cpp/skia/include/core/SkPathMeasure.h +3 -4
- package/cpp/skia/include/core/SkPicture.h +19 -6
- package/cpp/skia/include/core/SkPictureRecorder.h +6 -6
- package/cpp/skia/include/core/SkPixmap.h +2 -3
- package/cpp/skia/include/core/SkRRect.h +1 -1
- package/cpp/skia/include/core/SkRect.h +107 -110
- package/cpp/skia/include/core/SkRefCnt.h +1 -1
- package/cpp/skia/include/core/SkRegion.h +7 -1
- package/cpp/skia/include/core/SkSerialProcs.h +14 -0
- package/cpp/skia/include/core/SkShader.h +9 -0
- package/cpp/skia/include/core/SkStream.h +9 -9
- package/cpp/skia/include/core/SkString.h +1 -1
- package/cpp/skia/include/core/SkSurface.h +14 -25
- package/cpp/skia/include/core/SkTextBlob.h +17 -4
- package/cpp/skia/include/core/SkTiledImageUtils.h +28 -0
- package/cpp/skia/include/core/SkTypeface.h +7 -2
- package/cpp/skia/include/core/SkTypes.h +4 -12
- package/cpp/skia/include/docs/SkPDFDocument.h +17 -3
- package/cpp/skia/include/effects/SkImageFilters.h +73 -24
- package/cpp/skia/include/effects/SkRuntimeEffect.h +20 -51
- package/cpp/skia/include/gpu/GpuTypes.h +13 -0
- package/cpp/skia/include/gpu/GrBackendSurface.h +95 -262
- package/cpp/skia/include/gpu/GrContextOptions.h +7 -1
- package/cpp/skia/include/gpu/GrDirectContext.h +138 -128
- package/cpp/skia/include/gpu/GrRecordingContext.h +9 -4
- package/cpp/skia/include/gpu/GrSurfaceInfo.h +0 -24
- package/cpp/skia/include/gpu/GrTypes.h +16 -1
- package/cpp/skia/include/gpu/GrYUVABackendTextures.h +4 -4
- package/cpp/skia/include/gpu/d3d/GrD3DTypes.h +2 -2
- package/cpp/skia/include/gpu/ganesh/SkImageGanesh.h +44 -12
- package/cpp/skia/include/gpu/ganesh/SkMeshGanesh.h +57 -0
- package/cpp/skia/include/gpu/ganesh/SkSurfaceGanesh.h +2 -1
- package/cpp/skia/include/gpu/ganesh/gl/GrGLBackendSurface.h +58 -0
- package/cpp/skia/include/gpu/ganesh/gl/GrGLDirectContext.h +29 -0
- package/cpp/skia/include/gpu/ganesh/mtl/SkSurfaceMetal.h +1 -1
- package/cpp/skia/include/gpu/ganesh/vk/GrVkBackendSurface.h +67 -0
- package/cpp/skia/include/gpu/gl/GrGLInterface.h +2 -2
- package/cpp/skia/include/gpu/graphite/BackendTexture.h +14 -3
- package/cpp/skia/include/gpu/graphite/Context.h +93 -13
- package/cpp/skia/include/gpu/graphite/ContextOptions.h +19 -8
- package/cpp/skia/include/gpu/graphite/GraphiteTypes.h +23 -0
- package/cpp/skia/include/gpu/graphite/Image.h +56 -0
- package/cpp/skia/include/gpu/graphite/ImageProvider.h +5 -0
- package/cpp/skia/include/gpu/graphite/Recorder.h +26 -9
- package/cpp/skia/include/gpu/graphite/Recording.h +7 -5
- package/cpp/skia/include/gpu/graphite/TextureInfo.h +8 -0
- package/cpp/skia/include/gpu/graphite/mtl/MtlGraphiteTypes.h +2 -2
- package/cpp/skia/include/gpu/mtl/GrMtlTypes.h +2 -2
- package/cpp/skia/include/gpu/vk/GrVkTypes.h +4 -3
- package/cpp/skia/include/ports/SkCFObject.h +1 -1
- package/cpp/skia/include/private/SkGainmapInfo.h +4 -13
- package/cpp/skia/include/private/SkJpegGainmapEncoder.h +1 -24
- package/cpp/skia/include/private/SkWeakRefCnt.h +1 -1
- package/cpp/skia/include/private/base/SkAnySubclass.h +73 -0
- package/cpp/skia/include/private/base/SkAssert.h +106 -12
- package/cpp/skia/include/private/base/SkAttributes.h +0 -12
- package/cpp/skia/include/private/base/SkFeatures.h +0 -3
- package/cpp/skia/include/private/base/SkFloatingPoint.h +58 -105
- package/cpp/skia/include/private/base/SkSpan_impl.h +18 -12
- package/cpp/skia/include/private/base/SkTArray.h +22 -17
- package/cpp/skia/include/private/base/SkTDArray.h +5 -6
- package/cpp/skia/include/private/base/SkTemplates.h +50 -30
- package/cpp/skia/include/private/chromium/GrDeferredDisplayListRecorder.h +5 -2
- package/cpp/skia/include/private/chromium/GrSurfaceCharacterization.h +2 -2
- package/cpp/skia/include/private/chromium/SkChromeRemoteGlyphCache.h +13 -8
- package/cpp/skia/include/private/chromium/SkDiscardableMemory.h +1 -1
- package/cpp/skia/include/private/chromium/SkImageChromium.h +16 -3
- package/cpp/skia/include/private/chromium/Slug.h +11 -4
- package/cpp/skia/include/private/gpu/ganesh/GrD3DTypesMinimal.h +1 -1
- package/cpp/skia/include/private/gpu/ganesh/GrGLTypesPriv.h +6 -9
- package/cpp/skia/include/private/gpu/ganesh/GrTypesPriv.h +29 -13
- package/cpp/skia/include/private/gpu/ganesh/GrVkTypesPriv.h +2 -28
- package/cpp/skia/include/private/gpu/graphite/ContextOptionsPriv.h +34 -0
- package/cpp/skia/include/private/gpu/graphite/DawnTypesPriv.h +6 -0
- package/cpp/skia/include/private/gpu/graphite/MtlGraphiteTypesPriv.h +8 -0
- package/cpp/skia/include/private/gpu/graphite/VulkanGraphiteTypesPriv.h +10 -0
- package/cpp/skia/include/utils/SkBase64.h +2 -2
- package/cpp/skia/include/utils/SkNWayCanvas.h +1 -11
- package/cpp/skia/include/utils/SkNoDrawCanvas.h +0 -2
- package/cpp/skia/include/utils/SkPaintFilterCanvas.h +1 -2
- package/cpp/skia/include/utils/SkShadowUtils.h +15 -1
- package/cpp/skia/include/utils/SkTextUtils.h +1 -1
- package/cpp/skia/modules/skparagraph/include/Paragraph.h +107 -1
- package/cpp/skia/modules/skparagraph/include/ParagraphBuilder.h +3 -2
- package/cpp/skia/modules/skparagraph/include/ParagraphStyle.h +4 -0
- package/cpp/skia/modules/skparagraph/include/TypefaceFontProvider.h +5 -3
- package/cpp/skia/modules/svg/include/SkSVGAttributeParser.h +4 -0
- package/cpp/skia/src/core/SkChecksum.h +2 -1
- package/cpp/skia/src/core/SkPathPriv.h +1 -1
- package/cpp/skia/src/core/SkTHash.h +19 -9
- package/ios/RNSkia-iOS/RNSkMetalCanvasProvider.mm +3 -1
- package/ios/RNSkia-iOS/SkiaMetalSurfaceFactory.mm +1 -1
- package/lib/commonjs/animation/functions/interpolatePaths.d.ts +1 -1
- package/lib/commonjs/animation/functions/interpolatePaths.js +4 -4
- package/lib/commonjs/animation/functions/interpolatePaths.js.map +1 -1
- package/lib/commonjs/dom/nodes/datatypes/Rect.js +5 -1
- package/lib/commonjs/dom/nodes/datatypes/Rect.js.map +1 -1
- package/lib/commonjs/external/reanimated/index.d.ts +3 -1
- package/lib/commonjs/external/reanimated/index.js +30 -4
- package/lib/commonjs/external/reanimated/index.js.map +1 -1
- package/lib/commonjs/external/reanimated/interpolators.d.ts +9 -0
- package/lib/commonjs/external/reanimated/interpolators.js +56 -0
- package/lib/commonjs/external/reanimated/interpolators.js.map +1 -0
- package/lib/commonjs/external/reanimated/moduleWrapper.d.ts +8 -6
- package/lib/commonjs/external/reanimated/moduleWrapper.js +8 -18
- package/lib/commonjs/external/reanimated/moduleWrapper.js.map +1 -1
- package/lib/commonjs/external/reanimated/renderHelpers.js +46 -1
- package/lib/commonjs/external/reanimated/renderHelpers.js.map +1 -1
- package/lib/commonjs/external/reanimated/useAnimatedImageValue.d.ts +2 -0
- package/lib/commonjs/external/reanimated/useAnimatedImageValue.js +53 -0
- package/lib/commonjs/external/reanimated/useAnimatedImageValue.js.map +1 -0
- package/lib/commonjs/external/reanimated/useDerivedValueOnJS.d.ts +1 -0
- package/lib/commonjs/external/reanimated/useDerivedValueOnJS.js +27 -0
- package/lib/commonjs/external/reanimated/useDerivedValueOnJS.js.map +1 -0
- package/lib/commonjs/mock/index.js +8 -0
- package/lib/commonjs/mock/index.js.map +1 -1
- package/lib/commonjs/renderer/HostConfig.js +5 -5
- package/lib/commonjs/renderer/HostConfig.js.map +1 -1
- package/lib/commonjs/skia/core/AnimatedImage.d.ts +0 -1
- package/lib/commonjs/skia/core/AnimatedImage.js +1 -45
- package/lib/commonjs/skia/core/AnimatedImage.js.map +1 -1
- package/lib/commonjs/skia/types/MaskFilter.js +4 -0
- package/lib/commonjs/skia/types/MaskFilter.js.map +1 -1
- package/lib/commonjs/skia/types/Matrix.d.ts +4 -0
- package/lib/commonjs/skia/types/Matrix.js.map +1 -1
- package/lib/commonjs/skia/types/Path/Path.d.ts +10 -9
- package/lib/commonjs/skia/types/Path/Path.js.map +1 -1
- package/lib/commonjs/skia/web/JsiSkMatrix.d.ts +6 -0
- package/lib/commonjs/skia/web/JsiSkMatrix.js +33 -5
- package/lib/commonjs/skia/web/JsiSkMatrix.js.map +1 -1
- package/lib/commonjs/skia/web/JsiSkPath.d.ts +9 -9
- package/lib/commonjs/skia/web/JsiSkPath.js +15 -2
- package/lib/commonjs/skia/web/JsiSkPath.js.map +1 -1
- package/lib/commonjs/skia/web/JsiSkPicture.js +2 -1
- package/lib/commonjs/skia/web/JsiSkPicture.js.map +1 -1
- package/lib/commonjs/views/SkiaBaseWebView.js +1 -1
- package/lib/commonjs/views/SkiaBaseWebView.js.map +1 -1
- package/lib/commonjs/views/types.js +3 -0
- package/lib/commonjs/views/types.js.map +1 -1
- package/lib/module/animation/functions/interpolatePaths.d.ts +1 -1
- package/lib/module/animation/functions/interpolatePaths.js +4 -4
- package/lib/module/animation/functions/interpolatePaths.js.map +1 -1
- package/lib/module/dom/nodes/datatypes/Rect.js +5 -1
- package/lib/module/dom/nodes/datatypes/Rect.js.map +1 -1
- package/lib/module/external/reanimated/index.d.ts +3 -1
- package/lib/module/external/reanimated/index.js +3 -1
- package/lib/module/external/reanimated/index.js.map +1 -1
- package/lib/module/external/reanimated/interpolators.d.ts +9 -0
- package/lib/module/external/reanimated/interpolators.js +34 -0
- package/lib/module/external/reanimated/interpolators.js.map +1 -0
- package/lib/module/external/reanimated/moduleWrapper.d.ts +8 -6
- package/lib/module/external/reanimated/moduleWrapper.js +5 -16
- package/lib/module/external/reanimated/moduleWrapper.js.map +1 -1
- package/lib/module/external/reanimated/renderHelpers.js +48 -2
- package/lib/module/external/reanimated/renderHelpers.js.map +1 -1
- package/lib/module/external/reanimated/useAnimatedImageValue.d.ts +2 -0
- package/lib/module/external/reanimated/useAnimatedImageValue.js +41 -0
- package/lib/module/external/reanimated/useAnimatedImageValue.js.map +1 -0
- package/lib/module/external/reanimated/useDerivedValueOnJS.d.ts +1 -0
- package/lib/module/external/reanimated/useDerivedValueOnJS.js +16 -0
- package/lib/module/external/reanimated/useDerivedValueOnJS.js.map +1 -0
- package/lib/module/mock/index.js +8 -0
- package/lib/module/mock/index.js.map +1 -1
- package/lib/module/renderer/HostConfig.js +1 -1
- package/lib/module/renderer/HostConfig.js.map +1 -1
- package/lib/module/skia/core/AnimatedImage.d.ts +0 -1
- package/lib/module/skia/core/AnimatedImage.js +0 -40
- package/lib/module/skia/core/AnimatedImage.js.map +1 -1
- package/lib/module/skia/types/MaskFilter.js +3 -0
- package/lib/module/skia/types/MaskFilter.js.map +1 -1
- package/lib/module/skia/types/Matrix.d.ts +4 -0
- package/lib/module/skia/types/Matrix.js.map +1 -1
- package/lib/module/skia/types/Path/Path.d.ts +10 -9
- package/lib/module/skia/types/Path/Path.js.map +1 -1
- package/lib/module/skia/web/JsiSkMatrix.d.ts +6 -0
- package/lib/module/skia/web/JsiSkMatrix.js +33 -5
- package/lib/module/skia/web/JsiSkMatrix.js.map +1 -1
- package/lib/module/skia/web/JsiSkPath.d.ts +9 -9
- package/lib/module/skia/web/JsiSkPath.js +15 -2
- package/lib/module/skia/web/JsiSkPath.js.map +1 -1
- package/lib/module/views/types.js +3 -0
- package/lib/module/views/types.js.map +1 -1
- package/lib/typescript/jestEnv.d.mts +5 -0
- package/lib/typescript/jestSetup.d.mts +1 -0
- package/lib/typescript/src/animation/functions/interpolatePaths.d.ts +1 -1
- package/lib/typescript/src/external/reanimated/index.d.ts +3 -1
- package/lib/typescript/src/external/reanimated/interpolators.d.ts +9 -0
- package/lib/typescript/src/external/reanimated/moduleWrapper.d.ts +8 -6
- package/lib/typescript/src/external/reanimated/useAnimatedImageValue.d.ts +2 -0
- package/lib/typescript/src/external/reanimated/useDerivedValueOnJS.d.ts +1 -0
- package/lib/typescript/src/skia/core/AnimatedImage.d.ts +0 -1
- package/lib/typescript/src/skia/types/Matrix.d.ts +4 -0
- package/lib/typescript/src/skia/types/Path/Path.d.ts +10 -9
- package/lib/typescript/src/skia/web/JsiSkMatrix.d.ts +6 -0
- package/lib/typescript/src/skia/web/JsiSkPath.d.ts +9 -9
- package/libs/android/arm64-v8a/libskia.a +0 -0
- package/libs/android/arm64-v8a/libskottie.a +0 -0
- package/libs/android/arm64-v8a/libskparagraph.a +0 -0
- package/libs/android/arm64-v8a/libsksg.a +0 -0
- package/libs/android/arm64-v8a/libskshaper.a +0 -0
- package/libs/android/arm64-v8a/libskunicode.a +0 -0
- package/libs/android/arm64-v8a/libsvg.a +0 -0
- package/libs/android/armeabi-v7a/libskia.a +0 -0
- package/libs/android/armeabi-v7a/libskottie.a +0 -0
- package/libs/android/armeabi-v7a/libskparagraph.a +0 -0
- package/libs/android/armeabi-v7a/libsksg.a +0 -0
- package/libs/android/armeabi-v7a/libskshaper.a +0 -0
- package/libs/android/armeabi-v7a/libskunicode.a +0 -0
- package/libs/android/armeabi-v7a/libsvg.a +0 -0
- package/libs/android/x86/libskia.a +0 -0
- package/libs/android/x86/libskottie.a +0 -0
- package/libs/android/x86/libskparagraph.a +0 -0
- package/libs/android/x86/libsksg.a +0 -0
- package/libs/android/x86/libskshaper.a +0 -0
- package/libs/android/x86/libskunicode.a +0 -0
- package/libs/android/x86/libsvg.a +0 -0
- package/libs/android/x86_64/libskia.a +0 -0
- package/libs/android/x86_64/libskottie.a +0 -0
- package/libs/android/x86_64/libskparagraph.a +0 -0
- package/libs/android/x86_64/libsksg.a +0 -0
- package/libs/android/x86_64/libskshaper.a +0 -0
- package/libs/android/x86_64/libskunicode.a +0 -0
- package/libs/android/x86_64/libsvg.a +0 -0
- package/libs/ios/libskia.xcframework/Info.plist +5 -5
- package/libs/ios/libskia.xcframework/ios-arm64_arm64e/libskia.a +0 -0
- package/libs/ios/libskia.xcframework/ios-arm64_arm64e_x86_64-simulator/libskia.a +0 -0
- package/libs/ios/libskottie.xcframework/ios-arm64_arm64e/libskottie.a +0 -0
- package/libs/ios/libskottie.xcframework/ios-arm64_arm64e_x86_64-simulator/libskottie.a +0 -0
- package/libs/ios/libskparagraph.xcframework/Info.plist +5 -5
- package/libs/ios/libskparagraph.xcframework/ios-arm64_arm64e/libskparagraph.a +0 -0
- package/libs/ios/libskparagraph.xcframework/ios-arm64_arm64e_x86_64-simulator/libskparagraph.a +0 -0
- package/libs/ios/libsksg.xcframework/Info.plist +5 -5
- package/libs/ios/libsksg.xcframework/ios-arm64_arm64e/libsksg.a +0 -0
- package/libs/ios/libsksg.xcframework/ios-arm64_arm64e_x86_64-simulator/libsksg.a +0 -0
- package/libs/ios/libskshaper.xcframework/ios-arm64_arm64e/libskshaper.a +0 -0
- package/libs/ios/libskshaper.xcframework/ios-arm64_arm64e_x86_64-simulator/libskshaper.a +0 -0
- package/libs/ios/libskunicode.xcframework/Info.plist +5 -5
- package/libs/ios/libskunicode.xcframework/ios-arm64_arm64e/libskunicode.a +0 -0
- package/libs/ios/libskunicode.xcframework/ios-arm64_arm64e_x86_64-simulator/libskunicode.a +0 -0
- package/libs/ios/libsvg.xcframework/Info.plist +5 -5
- package/libs/ios/libsvg.xcframework/ios-arm64_arm64e/libsvg.a +0 -0
- package/libs/ios/libsvg.xcframework/ios-arm64_arm64e_x86_64-simulator/libsvg.a +0 -0
- package/package.json +4 -3
- package/react-native-skia.podspec +1 -1
- package/src/animation/functions/interpolatePaths.ts +7 -4
- package/src/dom/nodes/datatypes/Rect.ts +6 -2
- package/src/external/reanimated/index.ts +3 -1
- package/src/external/reanimated/interpolators.ts +89 -0
- package/src/external/reanimated/moduleWrapper.ts +38 -25
- package/src/external/reanimated/renderHelpers.ts +42 -2
- package/src/external/reanimated/useAnimatedImageValue.ts +51 -0
- package/src/external/reanimated/useDerivedValueOnJS.ts +25 -0
- package/src/mock/index.ts +5 -0
- package/src/renderer/HostConfig.ts +1 -1
- package/src/skia/core/AnimatedImage.ts +0 -47
- package/src/skia/types/Matrix.ts +4 -0
- package/src/skia/types/Path/Path.ts +10 -9
- package/src/skia/web/JsiSkMatrix.ts +33 -27
- package/src/skia/web/JsiSkPath.ts +15 -2
- package/cpp/skia/include/core/SkDeferredDisplayList.h +0 -15
- package/cpp/skia/include/core/SkDeferredDisplayListRecorder.h +0 -15
- package/cpp/skia/include/core/SkPromiseImageTexture.h +0 -20
- package/cpp/skia/include/core/SkSurfaceCharacterization.h +0 -15
- package/cpp/skia/include/core/SkTime.h +0 -63
- package/cpp/skia/include/effects/SkOpPathEffect.h +0 -43
- package/cpp/skia/include/effects/SkStrokeAndFillPathEffect.h +0 -28
- package/cpp/skia/include/gpu/GrBackendSurfaceMutableState.h +0 -32
- package/cpp/skia/include/gpu/dawn/GrDawnTypes.h +0 -95
- package/cpp/skia/include/private/SkBitmaskEnum.h +0 -59
- package/cpp/skia/include/private/SkSLDefines.h +0 -64
- package/cpp/skia/include/private/SkShadowFlags.h +0 -27
- package/cpp/skia/include/private/gpu/ganesh/GrDawnTypesPriv.h +0 -26
- package/globalJestSetup.js +0 -6
- package/lib/commonjs/external/reanimated/useSharedValueEffect.d.ts +0 -8
- package/lib/commonjs/external/reanimated/useSharedValueEffect.js +0 -52
- package/lib/commonjs/external/reanimated/useSharedValueEffect.js.map +0 -1
- package/lib/module/external/reanimated/useSharedValueEffect.d.ts +0 -8
- package/lib/module/external/reanimated/useSharedValueEffect.js +0 -42
- package/lib/module/external/reanimated/useSharedValueEffect.js.map +0 -1
- package/lib/typescript/globalJestSetup.d.ts +0 -2
- package/lib/typescript/src/external/reanimated/useSharedValueEffect.d.ts +0 -8
- package/src/external/reanimated/useSharedValueEffect.ts +0 -58
- /package/cpp/skia/{include/private/base → src/core}/SkPathEnums.h +0 -0
@@ -9,12 +9,14 @@ import {
|
|
9
9
|
stopMapper,
|
10
10
|
isSharedValue,
|
11
11
|
HAS_REANIMATED3,
|
12
|
+
HAS_REANIMATED2,
|
13
|
+
runOnJS,
|
12
14
|
} from "./moduleWrapper";
|
13
15
|
|
14
16
|
const _bindings = new WeakMap<Node<unknown>, unknown>();
|
15
17
|
|
16
18
|
export function extractReanimatedProps(props: AnimatedProps<any>) {
|
17
|
-
if (!HAS_REANIMATED3) {
|
19
|
+
if (!HAS_REANIMATED3 && !HAS_REANIMATED2) {
|
18
20
|
return [props, {}];
|
19
21
|
}
|
20
22
|
const reanimatedProps = {} as AnimatedProps<any>;
|
@@ -34,18 +36,56 @@ export function extractReanimatedProps(props: AnimatedProps<any>) {
|
|
34
36
|
return [otherProps, reanimatedProps];
|
35
37
|
}
|
36
38
|
|
39
|
+
function bindReanimatedProps2(
|
40
|
+
container: Container,
|
41
|
+
node: Node<any>,
|
42
|
+
reanimatedProps: AnimatedProps<any>
|
43
|
+
) {
|
44
|
+
const sharedValues = Object.values(reanimatedProps);
|
45
|
+
const previousMapperId = _bindings.get(node);
|
46
|
+
if (previousMapperId !== undefined) {
|
47
|
+
stopMapper(previousMapperId as number);
|
48
|
+
}
|
49
|
+
if (sharedValues.length > 0) {
|
50
|
+
const viewId = container.getNativeId();
|
51
|
+
const { SkiaViewApi } = global;
|
52
|
+
const updateProps = () => {
|
53
|
+
for (const propName in reanimatedProps) {
|
54
|
+
node && node.setProp(propName, reanimatedProps[propName].value);
|
55
|
+
}
|
56
|
+
// On React Native we use the SkiaViewApi to redraw because it can
|
57
|
+
// run on the worklet thread (container.redraw can't)
|
58
|
+
// if SkiaViewApi is undefined, we are on web and container.redraw()
|
59
|
+
// can safely be invoked
|
60
|
+
if (SkiaViewApi) {
|
61
|
+
SkiaViewApi.requestRedraw(viewId);
|
62
|
+
} else {
|
63
|
+
container.redraw();
|
64
|
+
}
|
65
|
+
};
|
66
|
+
const mapperId = startMapper(() => {
|
67
|
+
"worklet";
|
68
|
+
runOnJS(updateProps)();
|
69
|
+
}, sharedValues);
|
70
|
+
_bindings.set(node, mapperId);
|
71
|
+
}
|
72
|
+
}
|
73
|
+
|
37
74
|
export function bindReanimatedProps(
|
38
75
|
container: Container,
|
39
76
|
node: Node<any>,
|
40
77
|
reanimatedProps: AnimatedProps<any>
|
41
78
|
) {
|
79
|
+
if (HAS_REANIMATED2) {
|
80
|
+
return bindReanimatedProps2(container, node, reanimatedProps);
|
81
|
+
}
|
42
82
|
if (!HAS_REANIMATED3) {
|
43
83
|
return;
|
44
84
|
}
|
45
85
|
const sharedValues = Object.values(reanimatedProps);
|
46
86
|
const previousMapperId = _bindings.get(node);
|
47
87
|
if (previousMapperId !== undefined) {
|
48
|
-
stopMapper(previousMapperId);
|
88
|
+
stopMapper(previousMapperId as number);
|
49
89
|
}
|
50
90
|
if (sharedValues.length > 0) {
|
51
91
|
const viewId = container.getNativeId();
|
@@ -0,0 +1,51 @@
|
|
1
|
+
import type { FrameInfo } from "react-native-reanimated";
|
2
|
+
|
3
|
+
import { useAnimatedImage } from "../../skia/core/AnimatedImage";
|
4
|
+
import type { DataSourceParam, SkImage } from "../../skia/types";
|
5
|
+
|
6
|
+
import {
|
7
|
+
throwOnMissingReanimated,
|
8
|
+
useFrameCallback,
|
9
|
+
useSharedValue,
|
10
|
+
} from "./moduleWrapper";
|
11
|
+
|
12
|
+
const DEFAULT_FRAME_DURATION = 60;
|
13
|
+
|
14
|
+
export const useAnimatedImageValue = (source: DataSourceParam) => {
|
15
|
+
throwOnMissingReanimated();
|
16
|
+
const currentFrame = useSharedValue<null | SkImage>(null);
|
17
|
+
const lastTimestamp = useSharedValue(0);
|
18
|
+
const animatedImage = useAnimatedImage(source, (err) => {
|
19
|
+
console.error(err);
|
20
|
+
throw new Error(`Could not load animated image - got '${err.message}'`);
|
21
|
+
});
|
22
|
+
const frameDuration =
|
23
|
+
animatedImage?.currentFrameDuration() || DEFAULT_FRAME_DURATION;
|
24
|
+
|
25
|
+
useFrameCallback((frameInfo: FrameInfo) => {
|
26
|
+
if (!animatedImage) {
|
27
|
+
currentFrame.value = null;
|
28
|
+
return;
|
29
|
+
}
|
30
|
+
|
31
|
+
const { timestamp } = frameInfo;
|
32
|
+
const elapsed = timestamp - lastTimestamp.value;
|
33
|
+
|
34
|
+
// Check if it's time to switch frames based on GIF frame duration
|
35
|
+
if (elapsed < frameDuration) {
|
36
|
+
return;
|
37
|
+
}
|
38
|
+
|
39
|
+
// Update the current frame
|
40
|
+
animatedImage.decodeNextFrame();
|
41
|
+
if (currentFrame.value) {
|
42
|
+
currentFrame.value.dispose();
|
43
|
+
}
|
44
|
+
currentFrame.value = animatedImage.getCurrentFrame();
|
45
|
+
|
46
|
+
// Update the last timestamp
|
47
|
+
lastTimestamp.value = timestamp;
|
48
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
49
|
+
}, true);
|
50
|
+
return currentFrame;
|
51
|
+
};
|
@@ -0,0 +1,25 @@
|
|
1
|
+
import { useEffect, useMemo } from "react";
|
2
|
+
|
3
|
+
import {
|
4
|
+
useSharedValue,
|
5
|
+
runOnJS,
|
6
|
+
startMapper,
|
7
|
+
stopMapper,
|
8
|
+
} from "./moduleWrapper";
|
9
|
+
|
10
|
+
export const useDerivedValueOnJS = (
|
11
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
12
|
+
fn: () => any,
|
13
|
+
deps: unknown[]
|
14
|
+
) => {
|
15
|
+
const init = useMemo(() => fn(), [fn]);
|
16
|
+
const value = useSharedValue(init);
|
17
|
+
useEffect(() => {
|
18
|
+
const mapperId = startMapper(() => {
|
19
|
+
"worklet";
|
20
|
+
runOnJS(fn)();
|
21
|
+
}, deps);
|
22
|
+
return () => stopMapper(mapperId);
|
23
|
+
}, [deps, fn]);
|
24
|
+
return value;
|
25
|
+
};
|
package/src/mock/index.ts
CHANGED
@@ -6,6 +6,7 @@ import { ValueApi } from "../values/web";
|
|
6
6
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
7
7
|
const Noop: () => any = () => undefined;
|
8
8
|
const NoopValue = () => ({ current: 0 });
|
9
|
+
const NoopSharedValue = () => ({ value: 0 });
|
9
10
|
|
10
11
|
export const Mock = (CanvasKit: CanvasKit) => {
|
11
12
|
global.SkiaApi = JsiSkApi(CanvasKit);
|
@@ -21,6 +22,7 @@ export const Mock = (CanvasKit: CanvasKit) => {
|
|
21
22
|
...require("../dom/nodes"),
|
22
23
|
// We could use the real Canvas if we mock the SkiaView component for node
|
23
24
|
Canvas: Noop,
|
25
|
+
// Skia Animations
|
24
26
|
useValue: NoopValue,
|
25
27
|
useComputedValue: NoopValue,
|
26
28
|
useTouchHandler: Noop,
|
@@ -29,6 +31,9 @@ export const Mock = (CanvasKit: CanvasKit) => {
|
|
29
31
|
useSpring: NoopValue,
|
30
32
|
useClockValue: NoopValue,
|
31
33
|
useValueEffect: Noop,
|
34
|
+
// Reanimated hooks
|
35
|
+
useClock: NoopSharedValue,
|
36
|
+
usePathInterpolation: NoopSharedValue,
|
32
37
|
useRawData: Noop,
|
33
38
|
useData: Noop,
|
34
39
|
useFont: () => Skia.Font(undefined, 0),
|
@@ -7,7 +7,7 @@ import type { SkiaValue } from "../values";
|
|
7
7
|
import {
|
8
8
|
bindReanimatedProps,
|
9
9
|
extractReanimatedProps,
|
10
|
-
} from "../external/reanimated";
|
10
|
+
} from "../external/reanimated/renderHelpers";
|
11
11
|
|
12
12
|
import type { Container } from "./Container";
|
13
13
|
import { createNode } from "./HostComponents";
|
@@ -1,8 +1,3 @@
|
|
1
|
-
import {
|
2
|
-
throwOnMissingReanimated,
|
3
|
-
useFrameCallback,
|
4
|
-
useSharedValue,
|
5
|
-
} from "../../external/reanimated/moduleWrapper";
|
6
1
|
import { Skia } from "../Skia";
|
7
2
|
import type { DataSourceParam } from "../types";
|
8
3
|
|
@@ -19,45 +14,3 @@ export const useAnimatedImage = (
|
|
19
14
|
source: DataSourceParam,
|
20
15
|
onError?: (err: Error) => void
|
21
16
|
) => useRawData(source, animatedImgFactory, onError);
|
22
|
-
|
23
|
-
const DEFAULT_FRAME_DURATION = 60;
|
24
|
-
|
25
|
-
export const useAnimatedImageValue = (source: DataSourceParam) => {
|
26
|
-
throwOnMissingReanimated();
|
27
|
-
const currentFrame = useSharedValue(null);
|
28
|
-
const lastTimestamp = useSharedValue(0);
|
29
|
-
const animatedImage = useAnimatedImage(source, (err) => {
|
30
|
-
console.error(err);
|
31
|
-
throw new Error(`Could not load animated image - got '${err.message}'`);
|
32
|
-
});
|
33
|
-
const frameDuration =
|
34
|
-
animatedImage?.currentFrameDuration() || DEFAULT_FRAME_DURATION;
|
35
|
-
|
36
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
37
|
-
useFrameCallback((frameInfo: any) => {
|
38
|
-
if (!animatedImage) {
|
39
|
-
currentFrame.value = null;
|
40
|
-
return;
|
41
|
-
}
|
42
|
-
|
43
|
-
const { timestamp } = frameInfo;
|
44
|
-
const elapsed = timestamp - lastTimestamp.value;
|
45
|
-
|
46
|
-
// Check if it's time to switch frames based on GIF frame duration
|
47
|
-
if (elapsed < frameDuration) {
|
48
|
-
return;
|
49
|
-
}
|
50
|
-
|
51
|
-
// Update the current frame
|
52
|
-
animatedImage.decodeNextFrame();
|
53
|
-
if (currentFrame.value) {
|
54
|
-
currentFrame.value.dispose();
|
55
|
-
}
|
56
|
-
currentFrame.value = animatedImage.getCurrentFrame();
|
57
|
-
|
58
|
-
// Update the last timestamp
|
59
|
-
lastTimestamp.value = timestamp;
|
60
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
61
|
-
}, true);
|
62
|
-
return currentFrame;
|
63
|
-
};
|
package/src/skia/types/Matrix.ts
CHANGED
@@ -21,6 +21,10 @@ export interface SkMatrix extends SkJSIInstance<"Matrix"> {
|
|
21
21
|
scale: (x: number, y?: number) => SkMatrix;
|
22
22
|
skew: (x: number, y: number) => SkMatrix;
|
23
23
|
rotate: (theta: number) => SkMatrix;
|
24
|
+
postTranslate: (x: number, y: number) => SkMatrix;
|
25
|
+
postScale: (x: number, y?: number) => SkMatrix;
|
26
|
+
postSkew: (x: number, y: number) => SkMatrix;
|
27
|
+
postRotate: (theta: number) => SkMatrix;
|
24
28
|
identity: () => SkMatrix;
|
25
29
|
get: () => number[];
|
26
30
|
}
|
@@ -213,7 +213,7 @@ export interface SkPath extends SkJSIInstance<"Path"> {
|
|
213
213
|
* Sets FillType, the rule used to fill Path.
|
214
214
|
* @param fill
|
215
215
|
*/
|
216
|
-
setFillType(fill: FillType):
|
216
|
+
setFillType(fill: FillType): SkPath;
|
217
217
|
|
218
218
|
/**
|
219
219
|
* Specifies whether Path is volatile; whether it will be altered or discarded
|
@@ -223,7 +223,7 @@ export interface SkPath extends SkJSIInstance<"Path"> {
|
|
223
223
|
* Mark unchanging Path non-volatile to improve repeated rendering.
|
224
224
|
* @param volatile
|
225
225
|
*/
|
226
|
-
setIsVolatile(volatile: boolean):
|
226
|
+
setIsVolatile(volatile: boolean): SkPath;
|
227
227
|
|
228
228
|
/**
|
229
229
|
* Turns this path into the filled equivalent of the stroked path. Returns false if the operation
|
@@ -237,14 +237,14 @@ export interface SkPath extends SkJSIInstance<"Path"> {
|
|
237
237
|
* Appends CLOSE_VERB to Path. A closed contour connects the first and last point
|
238
238
|
* with a line, forming a continuous loop.
|
239
239
|
*/
|
240
|
-
close():
|
240
|
+
close(): SkPath;
|
241
241
|
|
242
242
|
/**
|
243
243
|
* Sets Path to its initial state.
|
244
244
|
* Removes verb array, point array, and weights, and sets FillType to Winding.
|
245
245
|
* Internal storage associated with Path is released
|
246
246
|
*/
|
247
|
-
reset():
|
247
|
+
reset(): SkPath;
|
248
248
|
|
249
249
|
/**
|
250
250
|
* Sets Path to its initial state.
|
@@ -253,7 +253,7 @@ export interface SkPath extends SkJSIInstance<"Path"> {
|
|
253
253
|
* Use rewind() instead of reset() if Path storage will be reused and performance
|
254
254
|
* is critical.
|
255
255
|
*/
|
256
|
-
rewind():
|
256
|
+
rewind(): SkPath;
|
257
257
|
|
258
258
|
/**
|
259
259
|
* Returns minimum and maximum axes values of the lines and curves in Path.
|
@@ -420,7 +420,7 @@ export interface SkPath extends SkJSIInstance<"Path"> {
|
|
420
420
|
reference to SkPath
|
421
421
|
example: https://fiddle.skia.org/c/@Path_quadTo
|
422
422
|
*/
|
423
|
-
quadTo(x1: number, y1: number, x2: number, y2: number):
|
423
|
+
quadTo(x1: number, y1: number, x2: number, y2: number): SkPath;
|
424
424
|
|
425
425
|
/**
|
426
426
|
* Adds Rect to Path, appending kMove_Verb, three kLine_Verb, and kClose_Verb,
|
@@ -431,7 +431,7 @@ export interface SkPath extends SkJSIInstance<"Path"> {
|
|
431
431
|
* @param rect
|
432
432
|
* @param isCCW
|
433
433
|
*/
|
434
|
-
addRect(rect: SkRect, isCCW?: boolean):
|
434
|
+
addRect(rect: SkRect, isCCW?: boolean): SkPath;
|
435
435
|
|
436
436
|
/**
|
437
437
|
* Adds rrect to Path, creating a new closed contour.
|
@@ -540,7 +540,7 @@ export interface SkPath extends SkJSIInstance<"Path"> {
|
|
540
540
|
/**
|
541
541
|
* Transforms the path by the specified matrix.
|
542
542
|
*/
|
543
|
-
transform(m3: SkMatrix):
|
543
|
+
transform(m3: SkMatrix): SkPath;
|
544
544
|
|
545
545
|
/**
|
546
546
|
* Interpolates between Path with point array of equal size.
|
@@ -558,10 +558,11 @@ export interface SkPath extends SkJSIInstance<"Path"> {
|
|
558
558
|
* @param ending path to interpolate with
|
559
559
|
* @param weight contribution of this path, and
|
560
560
|
* one minus contribution of ending path
|
561
|
+
* @param output path to be replaced with the interpolated averages
|
561
562
|
* @return Path replaced by interpolated averages or null if
|
562
563
|
* not interpolatable
|
563
564
|
* */
|
564
|
-
interpolate(end: SkPath, weight: number): SkPath | null;
|
565
|
+
interpolate(end: SkPath, weight: number, output?: SkPath): SkPath | null;
|
565
566
|
|
566
567
|
/** Returns true if Path contain equal verbs and equal weights.
|
567
568
|
* @param compare path to compare
|
@@ -12,54 +12,60 @@ export class JsiSkMatrix
|
|
12
12
|
super(CanvasKit, ref, "Matrix");
|
13
13
|
}
|
14
14
|
|
15
|
+
private preMultiply(matrix: number[]) {
|
16
|
+
this.ref.set(this.CanvasKit.Matrix.multiply(this.ref, matrix));
|
17
|
+
}
|
18
|
+
|
19
|
+
private postMultiply(matrix: number[]) {
|
20
|
+
this.ref.set(this.CanvasKit.Matrix.multiply(matrix, this.ref));
|
21
|
+
}
|
22
|
+
|
15
23
|
dispose = () => {
|
16
24
|
// Do nothing - the matrix is represenetd by a Float32Array
|
17
25
|
};
|
18
26
|
|
19
27
|
concat(matrix: SkMatrix) {
|
20
|
-
this.
|
21
|
-
this.CanvasKit.Matrix.multiply(this.ref, JsiSkMatrix.fromValue(matrix))
|
22
|
-
);
|
28
|
+
this.preMultiply(JsiSkMatrix.fromValue(matrix));
|
23
29
|
return this;
|
24
30
|
}
|
25
31
|
|
26
32
|
translate(x: number, y: number) {
|
27
|
-
this.
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
);
|
33
|
+
this.preMultiply(this.CanvasKit.Matrix.translated(x, y));
|
34
|
+
return this;
|
35
|
+
}
|
36
|
+
|
37
|
+
postTranslate(x: number, y: number) {
|
38
|
+
this.postMultiply(this.CanvasKit.Matrix.translated(x, y));
|
33
39
|
return this;
|
34
40
|
}
|
35
41
|
|
36
42
|
scale(x: number, y?: number) {
|
37
|
-
this.
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
);
|
43
|
+
this.preMultiply(this.CanvasKit.Matrix.scaled(x, y ?? x));
|
44
|
+
return this;
|
45
|
+
}
|
46
|
+
|
47
|
+
postScale(x: number, y?: number) {
|
48
|
+
this.postMultiply(this.CanvasKit.Matrix.scaled(x, y ?? x));
|
43
49
|
return this;
|
44
50
|
}
|
45
51
|
|
46
52
|
skew(x: number, y: number) {
|
47
|
-
this.
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
);
|
53
|
+
this.preMultiply(this.CanvasKit.Matrix.skewed(x, y));
|
54
|
+
return this;
|
55
|
+
}
|
56
|
+
|
57
|
+
postSkew(x: number, y: number) {
|
58
|
+
this.postMultiply(this.CanvasKit.Matrix.skewed(x, y));
|
53
59
|
return this;
|
54
60
|
}
|
55
61
|
|
56
62
|
rotate(value: number) {
|
57
|
-
this.
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
);
|
63
|
+
this.preMultiply(this.CanvasKit.Matrix.rotated(value));
|
64
|
+
return this;
|
65
|
+
}
|
66
|
+
|
67
|
+
postRotate(value: number) {
|
68
|
+
this.postMultiply(this.CanvasKit.Matrix.rotated(value));
|
63
69
|
return this;
|
64
70
|
}
|
65
71
|
|
@@ -150,10 +150,12 @@ export class JsiSkPath extends HostObject<Path, "Path"> implements SkPath {
|
|
150
150
|
|
151
151
|
setFillType(fill: FillType) {
|
152
152
|
this.ref.setFillType(ckEnum(fill));
|
153
|
+
return this;
|
153
154
|
}
|
154
155
|
|
155
156
|
setIsVolatile(volatile: boolean) {
|
156
157
|
this.ref.setIsVolatile(volatile);
|
158
|
+
return this;
|
157
159
|
}
|
158
160
|
|
159
161
|
stroke(opts?: StrokeOpts) {
|
@@ -174,14 +176,17 @@ export class JsiSkPath extends HostObject<Path, "Path"> implements SkPath {
|
|
174
176
|
|
175
177
|
close() {
|
176
178
|
this.ref.close();
|
179
|
+
return this;
|
177
180
|
}
|
178
181
|
|
179
182
|
reset() {
|
180
183
|
this.ref.reset();
|
184
|
+
return this;
|
181
185
|
}
|
182
186
|
|
183
187
|
rewind() {
|
184
188
|
this.ref.rewind();
|
189
|
+
return this;
|
185
190
|
}
|
186
191
|
|
187
192
|
computeTightBounds(): SkRect {
|
@@ -272,10 +277,12 @@ export class JsiSkPath extends HostObject<Path, "Path"> implements SkPath {
|
|
272
277
|
|
273
278
|
quadTo(x1: number, y1: number, x2: number, y2: number) {
|
274
279
|
this.ref.quadTo(x1, y1, x2, y2);
|
280
|
+
return this;
|
275
281
|
}
|
276
282
|
|
277
283
|
addRect(rect: SkRect, isCCW?: boolean) {
|
278
284
|
this.ref.addRect(JsiSkRect.fromValue(this.CanvasKit, rect), isCCW);
|
285
|
+
return this;
|
279
286
|
}
|
280
287
|
|
281
288
|
addRRect(rrect: SkRRect, isCCW?: boolean) {
|
@@ -331,9 +338,10 @@ export class JsiSkPath extends HostObject<Path, "Path"> implements SkPath {
|
|
331
338
|
|
332
339
|
transform(m3: SkMatrix) {
|
333
340
|
this.ref.transform(JsiSkMatrix.fromValue(m3));
|
341
|
+
return this;
|
334
342
|
}
|
335
343
|
|
336
|
-
interpolate(end: SkPath, t: number) {
|
344
|
+
interpolate(end: SkPath, t: number, output?: SkPath) {
|
337
345
|
const path = this.CanvasKit.Path.MakeFromPathInterpolation(
|
338
346
|
this.ref,
|
339
347
|
JsiSkPath.fromValue(end),
|
@@ -342,7 +350,12 @@ export class JsiSkPath extends HostObject<Path, "Path"> implements SkPath {
|
|
342
350
|
if (path === null) {
|
343
351
|
return null;
|
344
352
|
}
|
345
|
-
|
353
|
+
if (output) {
|
354
|
+
(output as JsiSkPath).ref = path;
|
355
|
+
return output;
|
356
|
+
} else {
|
357
|
+
return new JsiSkPath(this.CanvasKit, path);
|
358
|
+
}
|
346
359
|
}
|
347
360
|
|
348
361
|
isInterpolatable(path2: SkPath): boolean {
|
@@ -1,15 +0,0 @@
|
|
1
|
-
/*
|
2
|
-
* Copyright 2017 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
|
-
// TODO(kjlubick, robertphillips) migrate Chromium to use the new location and name
|
9
|
-
#include "include/private/chromium/GrDeferredDisplayList.h" // IWYU pragma: export
|
10
|
-
|
11
|
-
class GrDeferredDisplayListRecorder;
|
12
|
-
class GrSurfaceCharacterization;
|
13
|
-
using SkDeferredDisplayList = GrDeferredDisplayList;
|
14
|
-
using SkDeferredDisplayListRecorder = GrDeferredDisplayListRecorder;
|
15
|
-
using SkSurfaceCharacterization = GrSurfaceCharacterization;
|
@@ -1,15 +0,0 @@
|
|
1
|
-
/*
|
2
|
-
* Copyright 2017 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
|
-
// TODO(kjlubick, robertphillips) migrate Chromium to use the new location
|
9
|
-
#include "include/private/chromium/GrDeferredDisplayListRecorder.h" // IWYU pragma: export
|
10
|
-
|
11
|
-
class GrDeferredDisplayList;
|
12
|
-
class GrSurfaceCharacterization;
|
13
|
-
using SkDeferredDisplayList = GrDeferredDisplayList;
|
14
|
-
using SkDeferredDisplayListRecorder = GrDeferredDisplayListRecorder;
|
15
|
-
using SkSurfaceCharacterization = GrSurfaceCharacterization;
|
@@ -1,20 +0,0 @@
|
|
1
|
-
/*
|
2
|
-
* Copyright 2017 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 SkPromiseImageTexture_DEFINED
|
9
|
-
#define SkPromiseImageTexture_DEFINED
|
10
|
-
|
11
|
-
#include "include/core/SkTypes.h"
|
12
|
-
|
13
|
-
// TODO(kjlubick) remove this shim header after clients are migrated
|
14
|
-
#if defined(SK_GANESH)
|
15
|
-
#include "include/private/chromium/GrPromiseImageTexture.h"
|
16
|
-
|
17
|
-
typedef GrPromiseImageTexture SkPromiseImageTexture;
|
18
|
-
#endif
|
19
|
-
|
20
|
-
#endif // SkPromiseImageTexture_DEFINED
|
@@ -1,15 +0,0 @@
|
|
1
|
-
/*
|
2
|
-
* Copyright 2017 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
|
-
// TODO(kjlubick, robertphillips) migrate Chromium to use the new location and name
|
9
|
-
#include "include/private/chromium/GrSurfaceCharacterization.h" // IWYU pragma: export
|
10
|
-
|
11
|
-
class GrDeferredDisplayList;
|
12
|
-
class GrDeferredDisplayListRecorder;
|
13
|
-
using SkDeferredDisplayList = GrDeferredDisplayList;
|
14
|
-
using SkDeferredDisplayListRecorder = GrDeferredDisplayListRecorder;
|
15
|
-
using SkSurfaceCharacterization = GrSurfaceCharacterization;
|
@@ -1,63 +0,0 @@
|
|
1
|
-
|
2
|
-
/*
|
3
|
-
* Copyright 2006 The Android Open Source Project
|
4
|
-
*
|
5
|
-
* Use of this source code is governed by a BSD-style license that can be
|
6
|
-
* found in the LICENSE file.
|
7
|
-
*/
|
8
|
-
|
9
|
-
|
10
|
-
#ifndef SkTime_DEFINED
|
11
|
-
#define SkTime_DEFINED
|
12
|
-
|
13
|
-
#include "include/core/SkTypes.h"
|
14
|
-
#include "include/private/base/SkMacros.h"
|
15
|
-
|
16
|
-
#include <cinttypes>
|
17
|
-
|
18
|
-
class SkString;
|
19
|
-
|
20
|
-
/** \class SkTime
|
21
|
-
Platform-implemented utilities to return time of day, and millisecond counter.
|
22
|
-
*/
|
23
|
-
class SK_API SkTime {
|
24
|
-
public:
|
25
|
-
struct DateTime {
|
26
|
-
int16_t fTimeZoneMinutes; // The number of minutes that GetDateTime()
|
27
|
-
// is ahead of or behind UTC.
|
28
|
-
uint16_t fYear; //!< e.g. 2005
|
29
|
-
uint8_t fMonth; //!< 1..12
|
30
|
-
uint8_t fDayOfWeek; //!< 0..6, 0==Sunday
|
31
|
-
uint8_t fDay; //!< 1..31
|
32
|
-
uint8_t fHour; //!< 0..23
|
33
|
-
uint8_t fMinute; //!< 0..59
|
34
|
-
uint8_t fSecond; //!< 0..59
|
35
|
-
|
36
|
-
void toISO8601(SkString* dst) const;
|
37
|
-
};
|
38
|
-
static void GetDateTime(DateTime*);
|
39
|
-
|
40
|
-
static double GetSecs() { return GetNSecs() * 1e-9; }
|
41
|
-
static double GetMSecs() { return GetNSecs() * 1e-6; }
|
42
|
-
static double GetNSecs();
|
43
|
-
};
|
44
|
-
|
45
|
-
///////////////////////////////////////////////////////////////////////////////
|
46
|
-
|
47
|
-
class SkAutoTime {
|
48
|
-
public:
|
49
|
-
// The label is not deep-copied, so its address must remain valid for the
|
50
|
-
// lifetime of this object
|
51
|
-
SkAutoTime(const char* label = nullptr)
|
52
|
-
: fLabel(label)
|
53
|
-
, fNow(SkTime::GetMSecs()) {}
|
54
|
-
~SkAutoTime() {
|
55
|
-
uint64_t dur = static_cast<uint64_t>(SkTime::GetMSecs() - fNow);
|
56
|
-
SkDebugf("%s %" PRIu64 "\n", fLabel ? fLabel : "", dur);
|
57
|
-
}
|
58
|
-
private:
|
59
|
-
const char* fLabel;
|
60
|
-
double fNow;
|
61
|
-
};
|
62
|
-
|
63
|
-
#endif
|
@@ -1,43 +0,0 @@
|
|
1
|
-
/*
|
2
|
-
* Copyright 2018 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 SkOpPathEffect_DEFINED
|
9
|
-
#define SkOpPathEffect_DEFINED
|
10
|
-
|
11
|
-
#include "include/core/SkPaint.h"
|
12
|
-
#include "include/core/SkRefCnt.h"
|
13
|
-
#include "include/core/SkScalar.h"
|
14
|
-
#include "include/core/SkTypes.h"
|
15
|
-
#include "include/pathops/SkPathOps.h"
|
16
|
-
|
17
|
-
class SkMatrix;
|
18
|
-
class SkPathEffect;
|
19
|
-
|
20
|
-
class SK_API SkMergePathEffect {
|
21
|
-
public:
|
22
|
-
/* Defers to two other patheffects, and then combines their outputs using the specified op.
|
23
|
-
* e.g.
|
24
|
-
* result = output_one op output_two
|
25
|
-
*
|
26
|
-
* If either one or two is nullptr, then the original path is passed through to the op.
|
27
|
-
*/
|
28
|
-
static sk_sp<SkPathEffect> Make(sk_sp<SkPathEffect> one, sk_sp<SkPathEffect> two, SkPathOp op);
|
29
|
-
};
|
30
|
-
|
31
|
-
class SK_API SkMatrixPathEffect {
|
32
|
-
public:
|
33
|
-
static sk_sp<SkPathEffect> MakeTranslate(SkScalar dx, SkScalar dy);
|
34
|
-
static sk_sp<SkPathEffect> Make(const SkMatrix&);
|
35
|
-
};
|
36
|
-
|
37
|
-
class SK_API SkStrokePathEffect {
|
38
|
-
public:
|
39
|
-
static sk_sp<SkPathEffect> Make(SkScalar width, SkPaint::Join, SkPaint::Cap,
|
40
|
-
SkScalar miter = 4);
|
41
|
-
};
|
42
|
-
|
43
|
-
#endif
|