@shopify/react-native-skia 2.0.0-next.2 → 2.0.0-next.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/android/build.gradle +14 -10
- package/cpp/api/JsiSkCanvas.h +45 -2
- package/cpp/api/recorder/Drawings.h +31 -2
- package/cpp/api/recorder/Shaders.h +40 -0
- package/cpp/skia/include/codec/SkCodec.h +39 -1
- package/cpp/skia/include/config/SkUserConfig.h +1 -10
- package/cpp/skia/include/core/SkCanvas.h +8 -4
- package/cpp/skia/include/core/SkContourMeasure.h +2 -2
- package/cpp/skia/include/core/SkMilestone.h +1 -1
- package/cpp/skia/include/core/SkPaint.h +8 -5
- package/cpp/skia/include/core/SkStream.h +8 -3
- package/cpp/skia/include/core/SkTextBlob.h +9 -9
- package/cpp/skia/include/core/SkTypeface.h +4 -6
- package/cpp/skia/include/core/SkTypes.h +5 -0
- package/cpp/skia/include/docs/SkPDFDocument.h +47 -2
- package/cpp/skia/include/docs/SkPDFJpegHelpers.h +41 -0
- package/cpp/skia/include/effects/SkRuntimeEffect.h +5 -1
- package/cpp/skia/include/effects/SkTableMaskFilter.h +4 -0
- package/cpp/skia/include/gpu/graphite/BackendTexture.h +0 -2
- package/cpp/skia/include/gpu/graphite/ContextOptions.h +17 -0
- package/cpp/skia/include/gpu/graphite/GraphiteTypes.h +21 -18
- package/cpp/skia/include/gpu/graphite/PrecompileContext.h +24 -0
- package/cpp/skia/include/gpu/graphite/TextureInfo.h +87 -42
- package/cpp/skia/include/gpu/graphite/YUVABackendTextures.h +13 -4
- package/cpp/skia/include/gpu/graphite/dawn/DawnBackendContext.h +9 -0
- package/cpp/skia/include/gpu/graphite/dawn/DawnGraphiteTypes.h +166 -0
- package/cpp/skia/include/gpu/graphite/dawn/DawnTypes.h +3 -141
- package/cpp/skia/include/gpu/graphite/dawn/DawnUtils.h +2 -21
- package/cpp/skia/include/gpu/graphite/mtl/MtlBackendContext.h +4 -0
- package/cpp/skia/include/gpu/graphite/mtl/MtlGraphiteTypes.h +30 -6
- package/cpp/skia/include/gpu/graphite/mtl/MtlGraphiteTypesUtils.h +4 -42
- package/cpp/skia/include/gpu/graphite/mtl/MtlGraphiteTypes_cpp.h +50 -0
- package/cpp/skia/include/gpu/graphite/mtl/MtlGraphiteUtils.h +2 -20
- package/cpp/skia/include/gpu/graphite/precompile/Precompile.h +14 -4
- package/cpp/skia/include/gpu/graphite/precompile/PrecompileShader.h +14 -6
- package/cpp/skia/include/gpu/graphite/vk/VulkanGraphiteContext.h +31 -0
- package/cpp/skia/include/gpu/graphite/vk/VulkanGraphiteTypes.h +36 -14
- package/cpp/skia/include/gpu/graphite/vk/VulkanGraphiteUtils.h +3 -21
- package/cpp/skia/include/ports/SkTypeface_fontations.h +3 -0
- package/cpp/skia/include/private/SkJpegMetadataDecoder.h +7 -0
- package/cpp/skia/include/private/base/SkAnySubclass.h +6 -0
- package/cpp/skia/include/private/chromium/SkPMColor.h +38 -0
- package/cpp/skia/modules/skparagraph/include/Paragraph.h +2 -2
- package/cpp/skia/modules/skunicode/include/SkUnicode.h +10 -6
- package/cpp/skia/modules/svg/include/SkSVGDOM.h +1 -3
- package/cpp/skia/src/base/SkTInternalLList.h +1 -1
- package/cpp/skia/src/core/SkLRUCache.h +6 -3
- package/lib/commonjs/external/reanimated/textures.d.ts +2 -4
- package/lib/commonjs/external/reanimated/textures.js +8 -15
- package/lib/commonjs/external/reanimated/textures.js.map +1 -1
- package/lib/commonjs/renderer/Canvas.d.ts +1 -2
- package/lib/commonjs/renderer/Canvas.js.map +1 -1
- package/lib/commonjs/sksg/HostConfig.js +2 -1
- package/lib/commonjs/sksg/HostConfig.js.map +1 -1
- package/lib/commonjs/sksg/Recorder/Player.d.ts +1 -1
- package/lib/commonjs/sksg/Recorder/Player.js.map +1 -1
- package/lib/commonjs/sksg/Recorder/commands/Box.js +2 -2
- package/lib/commonjs/sksg/Recorder/commands/Box.js.map +1 -1
- package/lib/commonjs/sksg/Recorder/commands/Drawing.d.ts +1 -3
- package/lib/commonjs/sksg/Recorder/commands/Drawing.js +1 -58
- package/lib/commonjs/sksg/Recorder/commands/Drawing.js.map +1 -1
- package/lib/module/external/reanimated/textures.d.ts +2 -4
- package/lib/module/external/reanimated/textures.js +7 -12
- package/lib/module/external/reanimated/textures.js.map +1 -1
- package/lib/module/renderer/Canvas.d.ts +1 -2
- package/lib/module/renderer/Canvas.js.map +1 -1
- package/lib/module/sksg/HostConfig.js +2 -1
- package/lib/module/sksg/HostConfig.js.map +1 -1
- package/lib/module/sksg/Recorder/Player.d.ts +1 -1
- package/lib/module/sksg/Recorder/Player.js.map +1 -1
- package/lib/module/sksg/Recorder/commands/Box.js +2 -2
- package/lib/module/sksg/Recorder/commands/Box.js.map +1 -1
- package/lib/module/sksg/Recorder/commands/Drawing.d.ts +1 -3
- package/lib/module/sksg/Recorder/commands/Drawing.js +2 -58
- package/lib/module/sksg/Recorder/commands/Drawing.js.map +1 -1
- package/lib/typescript/lib/commonjs/external/reanimated/textures.d.ts +1 -3
- package/lib/typescript/lib/commonjs/sksg/HostConfig.d.ts +1 -1
- package/lib/typescript/lib/commonjs/sksg/Recorder/commands/Drawing.d.ts +0 -1
- package/lib/typescript/lib/module/external/reanimated/textures.d.ts +1 -3
- package/lib/typescript/lib/module/sksg/HostConfig.d.ts +1 -1
- package/lib/typescript/lib/module/sksg/Recorder/commands/Drawing.d.ts +0 -1
- package/lib/typescript/src/external/reanimated/textures.d.ts +2 -4
- package/lib/typescript/src/renderer/Canvas.d.ts +1 -2
- package/lib/typescript/src/sksg/Recorder/Player.d.ts +1 -1
- package/lib/typescript/src/sksg/Recorder/commands/Drawing.d.ts +1 -3
- 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_icu.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_icu.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_icu.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_icu.a +0 -0
- package/libs/android/x86_64/libsvg.a +0 -0
- package/libs/apple/libskia.xcframework/Info.plist +15 -15
- package/libs/apple/libskia.xcframework/ios-arm64_arm64e/libskia.a +0 -0
- package/libs/apple/libskia.xcframework/ios-arm64_arm64e_x86_64-simulator/libskia.a +0 -0
- package/libs/apple/libskia.xcframework/macos-arm64_x86_64/libskia.a +0 -0
- package/libs/apple/libskia.xcframework/tvos-arm64_arm64e/libskia.a +0 -0
- package/libs/apple/libskia.xcframework/tvos-arm64_arm64e_x86_64-simulator/libskia.a +0 -0
- package/libs/apple/libskottie.xcframework/Info.plist +7 -7
- package/libs/apple/libskottie.xcframework/ios-arm64_arm64e/libskottie.a +0 -0
- package/libs/apple/libskottie.xcframework/ios-arm64_arm64e_x86_64-simulator/libskottie.a +0 -0
- package/libs/apple/libskottie.xcframework/macos-arm64_x86_64/libskottie.a +0 -0
- package/libs/apple/libskottie.xcframework/tvos-arm64_arm64e/libskottie.a +0 -0
- package/libs/apple/libskottie.xcframework/tvos-arm64_arm64e_x86_64-simulator/libskottie.a +0 -0
- package/libs/apple/libskparagraph.xcframework/Info.plist +13 -13
- package/libs/apple/libskparagraph.xcframework/ios-arm64_arm64e/libskparagraph.a +0 -0
- package/libs/apple/libskparagraph.xcframework/ios-arm64_arm64e_x86_64-simulator/libskparagraph.a +0 -0
- package/libs/apple/libskparagraph.xcframework/macos-arm64_x86_64/libskparagraph.a +0 -0
- package/libs/apple/libskparagraph.xcframework/tvos-arm64_arm64e/libskparagraph.a +0 -0
- package/libs/apple/libskparagraph.xcframework/tvos-arm64_arm64e_x86_64-simulator/libskparagraph.a +0 -0
- package/libs/apple/libsksg.xcframework/Info.plist +13 -13
- package/libs/apple/libsksg.xcframework/ios-arm64_arm64e/libsksg.a +0 -0
- package/libs/apple/libsksg.xcframework/ios-arm64_arm64e_x86_64-simulator/libsksg.a +0 -0
- package/libs/apple/libsksg.xcframework/macos-arm64_x86_64/libsksg.a +0 -0
- package/libs/apple/libsksg.xcframework/tvos-arm64_arm64e/libsksg.a +0 -0
- package/libs/apple/libsksg.xcframework/tvos-arm64_arm64e_x86_64-simulator/libsksg.a +0 -0
- package/libs/apple/libskshaper.xcframework/Info.plist +14 -14
- package/libs/apple/libskshaper.xcframework/ios-arm64_arm64e/libskshaper.a +0 -0
- package/libs/apple/libskshaper.xcframework/ios-arm64_arm64e_x86_64-simulator/libskshaper.a +0 -0
- package/libs/apple/libskshaper.xcframework/macos-arm64_x86_64/libskshaper.a +0 -0
- package/libs/apple/libskshaper.xcframework/tvos-arm64_arm64e/libskshaper.a +0 -0
- package/libs/apple/libskshaper.xcframework/tvos-arm64_arm64e_x86_64-simulator/libskshaper.a +0 -0
- package/libs/apple/libskunicode_core.xcframework/Info.plist +12 -12
- package/libs/apple/libskunicode_core.xcframework/ios-arm64_arm64e/libskunicode_core.a +0 -0
- package/libs/apple/libskunicode_core.xcframework/ios-arm64_arm64e_x86_64-simulator/libskunicode_core.a +0 -0
- package/libs/apple/libskunicode_core.xcframework/macos-arm64_x86_64/libskunicode_core.a +0 -0
- package/libs/apple/libskunicode_core.xcframework/tvos-arm64_arm64e/libskunicode_core.a +0 -0
- package/libs/apple/libskunicode_core.xcframework/tvos-arm64_arm64e_x86_64-simulator/libskunicode_core.a +0 -0
- package/libs/apple/libskunicode_libgrapheme.xcframework/Info.plist +15 -15
- package/libs/apple/libskunicode_libgrapheme.xcframework/ios-arm64_arm64e/libskunicode_libgrapheme.a +0 -0
- package/libs/apple/libskunicode_libgrapheme.xcframework/ios-arm64_arm64e_x86_64-simulator/libskunicode_libgrapheme.a +0 -0
- package/libs/apple/libskunicode_libgrapheme.xcframework/macos-arm64_x86_64/libskunicode_libgrapheme.a +0 -0
- package/libs/apple/libskunicode_libgrapheme.xcframework/tvos-arm64_arm64e/libskunicode_libgrapheme.a +0 -0
- package/libs/apple/libskunicode_libgrapheme.xcframework/tvos-arm64_arm64e_x86_64-simulator/libskunicode_libgrapheme.a +0 -0
- package/libs/apple/libsvg.xcframework/Info.plist +8 -8
- package/libs/apple/libsvg.xcframework/ios-arm64_arm64e/libsvg.a +0 -0
- package/libs/apple/libsvg.xcframework/ios-arm64_arm64e_x86_64-simulator/libsvg.a +0 -0
- package/libs/apple/libsvg.xcframework/macos-arm64_x86_64/libsvg.a +0 -0
- package/libs/apple/libsvg.xcframework/tvos-arm64_arm64e/libsvg.a +0 -0
- package/libs/apple/libsvg.xcframework/tvos-arm64_arm64e_x86_64-simulator/libsvg.a +0 -0
- package/package.json +3 -3
- package/src/__tests__/snapshots/box/box-shadow-opacity.png +0 -0
- package/src/__tests__/snapshots/platform-buffer.png +0 -0
- package/src/__tests__/snapshots/screens/snapshot2-android-ci.png +0 -0
- package/src/external/reanimated/textures.tsx +12 -20
- package/src/renderer/Canvas.tsx +1 -1
- package/src/renderer/__tests__/e2e/Box.spec.tsx +22 -0
- package/src/renderer/__tests__/e2e/NativeBuffer.spec.tsx +2 -0
- package/src/sksg/HostConfig.ts +2 -1
- package/src/sksg/Recorder/Player.ts +1 -1
- package/src/sksg/Recorder/commands/Box.ts +2 -2
- package/src/sksg/Recorder/commands/Drawing.ts +0 -65
- package/cpp/skia/include/core/SkColorPriv.h +0 -165
- package/cpp/skia/include/private/SkColorData.h +0 -385
@@ -8,52 +8,55 @@
|
|
8
8
|
<key>BinaryPath</key>
|
9
9
|
<string>libsksg.a</string>
|
10
10
|
<key>LibraryIdentifier</key>
|
11
|
-
<string>ios-
|
11
|
+
<string>ios-arm64_arm64e_x86_64-simulator</string>
|
12
12
|
<key>LibraryPath</key>
|
13
13
|
<string>libsksg.a</string>
|
14
14
|
<key>SupportedArchitectures</key>
|
15
15
|
<array>
|
16
16
|
<string>arm64</string>
|
17
17
|
<string>arm64e</string>
|
18
|
+
<string>x86_64</string>
|
18
19
|
</array>
|
19
20
|
<key>SupportedPlatform</key>
|
20
21
|
<string>ios</string>
|
22
|
+
<key>SupportedPlatformVariant</key>
|
23
|
+
<string>simulator</string>
|
21
24
|
</dict>
|
22
25
|
<dict>
|
23
26
|
<key>BinaryPath</key>
|
24
27
|
<string>libsksg.a</string>
|
25
28
|
<key>LibraryIdentifier</key>
|
26
|
-
<string>
|
29
|
+
<string>macos-arm64_x86_64</string>
|
27
30
|
<key>LibraryPath</key>
|
28
31
|
<string>libsksg.a</string>
|
29
32
|
<key>SupportedArchitectures</key>
|
30
33
|
<array>
|
31
34
|
<string>arm64</string>
|
32
|
-
<string>
|
35
|
+
<string>x86_64</string>
|
33
36
|
</array>
|
34
37
|
<key>SupportedPlatform</key>
|
35
|
-
<string>
|
38
|
+
<string>macos</string>
|
36
39
|
</dict>
|
37
40
|
<dict>
|
38
41
|
<key>BinaryPath</key>
|
39
42
|
<string>libsksg.a</string>
|
40
43
|
<key>LibraryIdentifier</key>
|
41
|
-
<string>
|
44
|
+
<string>ios-arm64_arm64e</string>
|
42
45
|
<key>LibraryPath</key>
|
43
46
|
<string>libsksg.a</string>
|
44
47
|
<key>SupportedArchitectures</key>
|
45
48
|
<array>
|
46
49
|
<string>arm64</string>
|
47
|
-
<string>
|
50
|
+
<string>arm64e</string>
|
48
51
|
</array>
|
49
52
|
<key>SupportedPlatform</key>
|
50
|
-
<string>
|
53
|
+
<string>ios</string>
|
51
54
|
</dict>
|
52
55
|
<dict>
|
53
56
|
<key>BinaryPath</key>
|
54
57
|
<string>libsksg.a</string>
|
55
58
|
<key>LibraryIdentifier</key>
|
56
|
-
<string>
|
59
|
+
<string>tvos-arm64_arm64e_x86_64-simulator</string>
|
57
60
|
<key>LibraryPath</key>
|
58
61
|
<string>libsksg.a</string>
|
59
62
|
<key>SupportedArchitectures</key>
|
@@ -63,7 +66,7 @@
|
|
63
66
|
<string>x86_64</string>
|
64
67
|
</array>
|
65
68
|
<key>SupportedPlatform</key>
|
66
|
-
<string>
|
69
|
+
<string>tvos</string>
|
67
70
|
<key>SupportedPlatformVariant</key>
|
68
71
|
<string>simulator</string>
|
69
72
|
</dict>
|
@@ -71,19 +74,16 @@
|
|
71
74
|
<key>BinaryPath</key>
|
72
75
|
<string>libsksg.a</string>
|
73
76
|
<key>LibraryIdentifier</key>
|
74
|
-
<string>tvos-
|
77
|
+
<string>tvos-arm64_arm64e</string>
|
75
78
|
<key>LibraryPath</key>
|
76
79
|
<string>libsksg.a</string>
|
77
80
|
<key>SupportedArchitectures</key>
|
78
81
|
<array>
|
79
82
|
<string>arm64</string>
|
80
83
|
<string>arm64e</string>
|
81
|
-
<string>x86_64</string>
|
82
84
|
</array>
|
83
85
|
<key>SupportedPlatform</key>
|
84
86
|
<string>tvos</string>
|
85
|
-
<key>SupportedPlatformVariant</key>
|
86
|
-
<string>simulator</string>
|
87
87
|
</dict>
|
88
88
|
</array>
|
89
89
|
<key>CFBundlePackageType</key>
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
@@ -8,82 +8,82 @@
|
|
8
8
|
<key>BinaryPath</key>
|
9
9
|
<string>libskshaper.a</string>
|
10
10
|
<key>LibraryIdentifier</key>
|
11
|
-
<string>
|
11
|
+
<string>macos-arm64_x86_64</string>
|
12
12
|
<key>LibraryPath</key>
|
13
13
|
<string>libskshaper.a</string>
|
14
14
|
<key>SupportedArchitectures</key>
|
15
15
|
<array>
|
16
16
|
<string>arm64</string>
|
17
|
-
<string>arm64e</string>
|
18
17
|
<string>x86_64</string>
|
19
18
|
</array>
|
20
19
|
<key>SupportedPlatform</key>
|
21
|
-
<string>
|
22
|
-
<key>SupportedPlatformVariant</key>
|
23
|
-
<string>simulator</string>
|
20
|
+
<string>macos</string>
|
24
21
|
</dict>
|
25
22
|
<dict>
|
26
23
|
<key>BinaryPath</key>
|
27
24
|
<string>libskshaper.a</string>
|
28
25
|
<key>LibraryIdentifier</key>
|
29
|
-
<string>ios-
|
26
|
+
<string>ios-arm64_arm64e_x86_64-simulator</string>
|
30
27
|
<key>LibraryPath</key>
|
31
28
|
<string>libskshaper.a</string>
|
32
29
|
<key>SupportedArchitectures</key>
|
33
30
|
<array>
|
34
31
|
<string>arm64</string>
|
35
32
|
<string>arm64e</string>
|
33
|
+
<string>x86_64</string>
|
36
34
|
</array>
|
37
35
|
<key>SupportedPlatform</key>
|
38
36
|
<string>ios</string>
|
37
|
+
<key>SupportedPlatformVariant</key>
|
38
|
+
<string>simulator</string>
|
39
39
|
</dict>
|
40
40
|
<dict>
|
41
41
|
<key>BinaryPath</key>
|
42
42
|
<string>libskshaper.a</string>
|
43
43
|
<key>LibraryIdentifier</key>
|
44
|
-
<string>
|
44
|
+
<string>ios-arm64_arm64e</string>
|
45
45
|
<key>LibraryPath</key>
|
46
46
|
<string>libskshaper.a</string>
|
47
47
|
<key>SupportedArchitectures</key>
|
48
48
|
<array>
|
49
49
|
<string>arm64</string>
|
50
|
-
<string>
|
50
|
+
<string>arm64e</string>
|
51
51
|
</array>
|
52
52
|
<key>SupportedPlatform</key>
|
53
|
-
<string>
|
53
|
+
<string>ios</string>
|
54
54
|
</dict>
|
55
55
|
<dict>
|
56
56
|
<key>BinaryPath</key>
|
57
57
|
<string>libskshaper.a</string>
|
58
58
|
<key>LibraryIdentifier</key>
|
59
|
-
<string>tvos-
|
59
|
+
<string>tvos-arm64_arm64e</string>
|
60
60
|
<key>LibraryPath</key>
|
61
61
|
<string>libskshaper.a</string>
|
62
62
|
<key>SupportedArchitectures</key>
|
63
63
|
<array>
|
64
64
|
<string>arm64</string>
|
65
65
|
<string>arm64e</string>
|
66
|
-
<string>x86_64</string>
|
67
66
|
</array>
|
68
67
|
<key>SupportedPlatform</key>
|
69
68
|
<string>tvos</string>
|
70
|
-
<key>SupportedPlatformVariant</key>
|
71
|
-
<string>simulator</string>
|
72
69
|
</dict>
|
73
70
|
<dict>
|
74
71
|
<key>BinaryPath</key>
|
75
72
|
<string>libskshaper.a</string>
|
76
73
|
<key>LibraryIdentifier</key>
|
77
|
-
<string>tvos-
|
74
|
+
<string>tvos-arm64_arm64e_x86_64-simulator</string>
|
78
75
|
<key>LibraryPath</key>
|
79
76
|
<string>libskshaper.a</string>
|
80
77
|
<key>SupportedArchitectures</key>
|
81
78
|
<array>
|
82
79
|
<string>arm64</string>
|
83
80
|
<string>arm64e</string>
|
81
|
+
<string>x86_64</string>
|
84
82
|
</array>
|
85
83
|
<key>SupportedPlatform</key>
|
86
84
|
<string>tvos</string>
|
85
|
+
<key>SupportedPlatformVariant</key>
|
86
|
+
<string>simulator</string>
|
87
87
|
</dict>
|
88
88
|
</array>
|
89
89
|
<key>CFBundlePackageType</key>
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
@@ -8,16 +8,19 @@
|
|
8
8
|
<key>BinaryPath</key>
|
9
9
|
<string>libskunicode_core.a</string>
|
10
10
|
<key>LibraryIdentifier</key>
|
11
|
-
<string>tvos-
|
11
|
+
<string>tvos-arm64_arm64e_x86_64-simulator</string>
|
12
12
|
<key>LibraryPath</key>
|
13
13
|
<string>libskunicode_core.a</string>
|
14
14
|
<key>SupportedArchitectures</key>
|
15
15
|
<array>
|
16
16
|
<string>arm64</string>
|
17
17
|
<string>arm64e</string>
|
18
|
+
<string>x86_64</string>
|
18
19
|
</array>
|
19
20
|
<key>SupportedPlatform</key>
|
20
21
|
<string>tvos</string>
|
22
|
+
<key>SupportedPlatformVariant</key>
|
23
|
+
<string>simulator</string>
|
21
24
|
</dict>
|
22
25
|
<dict>
|
23
26
|
<key>BinaryPath</key>
|
@@ -38,52 +41,49 @@
|
|
38
41
|
<key>BinaryPath</key>
|
39
42
|
<string>libskunicode_core.a</string>
|
40
43
|
<key>LibraryIdentifier</key>
|
41
|
-
<string>
|
44
|
+
<string>tvos-arm64_arm64e</string>
|
42
45
|
<key>LibraryPath</key>
|
43
46
|
<string>libskunicode_core.a</string>
|
44
47
|
<key>SupportedArchitectures</key>
|
45
48
|
<array>
|
46
49
|
<string>arm64</string>
|
47
50
|
<string>arm64e</string>
|
48
|
-
<string>x86_64</string>
|
49
51
|
</array>
|
50
52
|
<key>SupportedPlatform</key>
|
51
|
-
<string>
|
52
|
-
<key>SupportedPlatformVariant</key>
|
53
|
-
<string>simulator</string>
|
53
|
+
<string>tvos</string>
|
54
54
|
</dict>
|
55
55
|
<dict>
|
56
56
|
<key>BinaryPath</key>
|
57
57
|
<string>libskunicode_core.a</string>
|
58
58
|
<key>LibraryIdentifier</key>
|
59
|
-
<string>
|
59
|
+
<string>ios-arm64_arm64e</string>
|
60
60
|
<key>LibraryPath</key>
|
61
61
|
<string>libskunicode_core.a</string>
|
62
62
|
<key>SupportedArchitectures</key>
|
63
63
|
<array>
|
64
64
|
<string>arm64</string>
|
65
65
|
<string>arm64e</string>
|
66
|
-
<string>x86_64</string>
|
67
66
|
</array>
|
68
67
|
<key>SupportedPlatform</key>
|
69
|
-
<string>
|
70
|
-
<key>SupportedPlatformVariant</key>
|
71
|
-
<string>simulator</string>
|
68
|
+
<string>ios</string>
|
72
69
|
</dict>
|
73
70
|
<dict>
|
74
71
|
<key>BinaryPath</key>
|
75
72
|
<string>libskunicode_core.a</string>
|
76
73
|
<key>LibraryIdentifier</key>
|
77
|
-
<string>ios-
|
74
|
+
<string>ios-arm64_arm64e_x86_64-simulator</string>
|
78
75
|
<key>LibraryPath</key>
|
79
76
|
<string>libskunicode_core.a</string>
|
80
77
|
<key>SupportedArchitectures</key>
|
81
78
|
<array>
|
82
79
|
<string>arm64</string>
|
83
80
|
<string>arm64e</string>
|
81
|
+
<string>x86_64</string>
|
84
82
|
</array>
|
85
83
|
<key>SupportedPlatform</key>
|
86
84
|
<string>ios</string>
|
85
|
+
<key>SupportedPlatformVariant</key>
|
86
|
+
<string>simulator</string>
|
87
87
|
</dict>
|
88
88
|
</array>
|
89
89
|
<key>CFBundlePackageType</key>
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
@@ -8,82 +8,82 @@
|
|
8
8
|
<key>BinaryPath</key>
|
9
9
|
<string>libskunicode_libgrapheme.a</string>
|
10
10
|
<key>LibraryIdentifier</key>
|
11
|
-
<string>
|
11
|
+
<string>macos-arm64_x86_64</string>
|
12
12
|
<key>LibraryPath</key>
|
13
13
|
<string>libskunicode_libgrapheme.a</string>
|
14
14
|
<key>SupportedArchitectures</key>
|
15
15
|
<array>
|
16
16
|
<string>arm64</string>
|
17
|
-
<string>arm64e</string>
|
18
17
|
<string>x86_64</string>
|
19
18
|
</array>
|
20
19
|
<key>SupportedPlatform</key>
|
21
|
-
<string>
|
22
|
-
<key>SupportedPlatformVariant</key>
|
23
|
-
<string>simulator</string>
|
20
|
+
<string>macos</string>
|
24
21
|
</dict>
|
25
22
|
<dict>
|
26
23
|
<key>BinaryPath</key>
|
27
24
|
<string>libskunicode_libgrapheme.a</string>
|
28
25
|
<key>LibraryIdentifier</key>
|
29
|
-
<string>
|
26
|
+
<string>tvos-arm64_arm64e</string>
|
30
27
|
<key>LibraryPath</key>
|
31
28
|
<string>libskunicode_libgrapheme.a</string>
|
32
29
|
<key>SupportedArchitectures</key>
|
33
30
|
<array>
|
34
31
|
<string>arm64</string>
|
35
|
-
<string>
|
32
|
+
<string>arm64e</string>
|
36
33
|
</array>
|
37
34
|
<key>SupportedPlatform</key>
|
38
|
-
<string>
|
35
|
+
<string>tvos</string>
|
39
36
|
</dict>
|
40
37
|
<dict>
|
41
38
|
<key>BinaryPath</key>
|
42
39
|
<string>libskunicode_libgrapheme.a</string>
|
43
40
|
<key>LibraryIdentifier</key>
|
44
|
-
<string>
|
41
|
+
<string>ios-arm64_arm64e</string>
|
45
42
|
<key>LibraryPath</key>
|
46
43
|
<string>libskunicode_libgrapheme.a</string>
|
47
44
|
<key>SupportedArchitectures</key>
|
48
45
|
<array>
|
49
46
|
<string>arm64</string>
|
50
47
|
<string>arm64e</string>
|
51
|
-
<string>x86_64</string>
|
52
48
|
</array>
|
53
49
|
<key>SupportedPlatform</key>
|
54
|
-
<string>
|
55
|
-
<key>SupportedPlatformVariant</key>
|
56
|
-
<string>simulator</string>
|
50
|
+
<string>ios</string>
|
57
51
|
</dict>
|
58
52
|
<dict>
|
59
53
|
<key>BinaryPath</key>
|
60
54
|
<string>libskunicode_libgrapheme.a</string>
|
61
55
|
<key>LibraryIdentifier</key>
|
62
|
-
<string>ios-
|
56
|
+
<string>ios-arm64_arm64e_x86_64-simulator</string>
|
63
57
|
<key>LibraryPath</key>
|
64
58
|
<string>libskunicode_libgrapheme.a</string>
|
65
59
|
<key>SupportedArchitectures</key>
|
66
60
|
<array>
|
67
61
|
<string>arm64</string>
|
68
62
|
<string>arm64e</string>
|
63
|
+
<string>x86_64</string>
|
69
64
|
</array>
|
70
65
|
<key>SupportedPlatform</key>
|
71
66
|
<string>ios</string>
|
67
|
+
<key>SupportedPlatformVariant</key>
|
68
|
+
<string>simulator</string>
|
72
69
|
</dict>
|
73
70
|
<dict>
|
74
71
|
<key>BinaryPath</key>
|
75
72
|
<string>libskunicode_libgrapheme.a</string>
|
76
73
|
<key>LibraryIdentifier</key>
|
77
|
-
<string>tvos-
|
74
|
+
<string>tvos-arm64_arm64e_x86_64-simulator</string>
|
78
75
|
<key>LibraryPath</key>
|
79
76
|
<string>libskunicode_libgrapheme.a</string>
|
80
77
|
<key>SupportedArchitectures</key>
|
81
78
|
<array>
|
82
79
|
<string>arm64</string>
|
83
80
|
<string>arm64e</string>
|
81
|
+
<string>x86_64</string>
|
84
82
|
</array>
|
85
83
|
<key>SupportedPlatform</key>
|
86
84
|
<string>tvos</string>
|
85
|
+
<key>SupportedPlatformVariant</key>
|
86
|
+
<string>simulator</string>
|
87
87
|
</dict>
|
88
88
|
</array>
|
89
89
|
<key>CFBundlePackageType</key>
|
package/libs/apple/libskunicode_libgrapheme.xcframework/ios-arm64_arm64e/libskunicode_libgrapheme.a
CHANGED
Binary file
|
Binary file
|
Binary file
|
package/libs/apple/libskunicode_libgrapheme.xcframework/tvos-arm64_arm64e/libskunicode_libgrapheme.a
CHANGED
Binary file
|
Binary file
|
@@ -44,22 +44,22 @@
|
|
44
44
|
<key>BinaryPath</key>
|
45
45
|
<string>libsvg.a</string>
|
46
46
|
<key>LibraryIdentifier</key>
|
47
|
-
<string>
|
47
|
+
<string>ios-arm64_arm64e</string>
|
48
48
|
<key>LibraryPath</key>
|
49
49
|
<string>libsvg.a</string>
|
50
50
|
<key>SupportedArchitectures</key>
|
51
51
|
<array>
|
52
52
|
<string>arm64</string>
|
53
|
-
<string>
|
53
|
+
<string>arm64e</string>
|
54
54
|
</array>
|
55
55
|
<key>SupportedPlatform</key>
|
56
|
-
<string>
|
56
|
+
<string>ios</string>
|
57
57
|
</dict>
|
58
58
|
<dict>
|
59
59
|
<key>BinaryPath</key>
|
60
60
|
<string>libsvg.a</string>
|
61
61
|
<key>LibraryIdentifier</key>
|
62
|
-
<string>
|
62
|
+
<string>tvos-arm64_arm64e</string>
|
63
63
|
<key>LibraryPath</key>
|
64
64
|
<string>libsvg.a</string>
|
65
65
|
<key>SupportedArchitectures</key>
|
@@ -68,22 +68,22 @@
|
|
68
68
|
<string>arm64e</string>
|
69
69
|
</array>
|
70
70
|
<key>SupportedPlatform</key>
|
71
|
-
<string>
|
71
|
+
<string>tvos</string>
|
72
72
|
</dict>
|
73
73
|
<dict>
|
74
74
|
<key>BinaryPath</key>
|
75
75
|
<string>libsvg.a</string>
|
76
76
|
<key>LibraryIdentifier</key>
|
77
|
-
<string>
|
77
|
+
<string>macos-arm64_x86_64</string>
|
78
78
|
<key>LibraryPath</key>
|
79
79
|
<string>libsvg.a</string>
|
80
80
|
<key>SupportedArchitectures</key>
|
81
81
|
<array>
|
82
82
|
<string>arm64</string>
|
83
|
-
<string>
|
83
|
+
<string>x86_64</string>
|
84
84
|
</array>
|
85
85
|
<key>SupportedPlatform</key>
|
86
|
-
<string>
|
86
|
+
<string>macos</string>
|
87
87
|
</dict>
|
88
88
|
</array>
|
89
89
|
<key>CFBundlePackageType</key>
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
package/package.json
CHANGED
@@ -8,7 +8,7 @@
|
|
8
8
|
"setup-skia-web": "scripts/setup-canvaskit.js"
|
9
9
|
},
|
10
10
|
"title": "React Native Skia",
|
11
|
-
"version": "2.0.0-next.
|
11
|
+
"version": "2.0.0-next.4",
|
12
12
|
"description": "High-performance React Native Graphics using Skia",
|
13
13
|
"main": "lib/module/index.js",
|
14
14
|
"react-native": "src/index.ts",
|
@@ -78,7 +78,7 @@
|
|
78
78
|
"peerDependencies": {
|
79
79
|
"react": ">=19.0",
|
80
80
|
"react-native": ">=0.78",
|
81
|
-
"react-native-reanimated": "
|
81
|
+
"react-native-reanimated": "^3.0"
|
82
82
|
},
|
83
83
|
"peerDependenciesMeta": {
|
84
84
|
"react-native": {
|
@@ -112,7 +112,7 @@
|
|
112
112
|
"react": "19.0.0",
|
113
113
|
"react-native": "0.78.0",
|
114
114
|
"react-native-builder-bob": "0.18.2",
|
115
|
-
"react-native-reanimated": "3.
|
115
|
+
"react-native-reanimated": "^3.0",
|
116
116
|
"rimraf": "3.0.2",
|
117
117
|
"semantic-release": "^24.1.0",
|
118
118
|
"semantic-release-yarn": "^3.0.2",
|
Binary file
|
Binary file
|
Binary file
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { useEffect, useMemo, useState } from "react";
|
2
|
-
import type { ReactElement } from "react";
|
2
|
+
import type { DependencyList, ReactElement } from "react";
|
3
3
|
import type { SharedValue } from "react-native-reanimated";
|
4
4
|
|
5
5
|
import type {
|
@@ -25,7 +25,11 @@ const createTexture = (
|
|
25
25
|
texture.value = drawAsImageFromPicture(picture, size);
|
26
26
|
};
|
27
27
|
|
28
|
-
export const useTexture = (
|
28
|
+
export const useTexture = (
|
29
|
+
element: ReactElement,
|
30
|
+
size: SkSize,
|
31
|
+
deps?: DependencyList
|
32
|
+
) => {
|
29
33
|
const { width, height } = size;
|
30
34
|
const [picture, setPicture] = useState<SkPicture | null>(null);
|
31
35
|
useEffect(() => {
|
@@ -34,23 +38,11 @@ export const useTexture = (element: ReactElement, size: SkSize) => {
|
|
34
38
|
y: 0,
|
35
39
|
width,
|
36
40
|
height,
|
37
|
-
}).then((pic) =>
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
export const useTextureAsValue = (element: ReactElement, size: SkSize) => {
|
43
|
-
console.warn("useTextureAsValue has been renamed to use useTexture");
|
44
|
-
return useTexture(element, size);
|
45
|
-
};
|
46
|
-
|
47
|
-
export const useTextureValueFromPicture = (
|
48
|
-
picture: SkPicture | null,
|
49
|
-
size: SkSize
|
50
|
-
) => {
|
51
|
-
console.warn(
|
52
|
-
"useTextureValueFromPicture has been renamed to use usePictureAsTexture"
|
53
|
-
);
|
41
|
+
}).then((pic) => {
|
42
|
+
setPicture(pic);
|
43
|
+
});
|
44
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
45
|
+
}, deps ?? []);
|
54
46
|
return usePictureAsTexture(picture, size);
|
55
47
|
};
|
56
48
|
|
@@ -63,7 +55,7 @@ export const usePictureAsTexture = (
|
|
63
55
|
if (picture !== null) {
|
64
56
|
Rea.runOnUI(createTexture)(texture, picture, size);
|
65
57
|
}
|
66
|
-
}, [
|
58
|
+
}, [picture, size, texture]);
|
67
59
|
return texture;
|
68
60
|
};
|
69
61
|
|
package/src/renderer/Canvas.tsx
CHANGED
@@ -17,7 +17,7 @@ import { SkiaSGRoot } from "../sksg/Reconciler";
|
|
17
17
|
import { Skia } from "../skia";
|
18
18
|
import type { SkiaBaseViewProps } from "../views";
|
19
19
|
|
20
|
-
interface CanvasRef extends FC<CanvasProps> {
|
20
|
+
export interface CanvasRef extends FC<CanvasProps> {
|
21
21
|
makeImageSnapshot(rect?: SkRect): SkImage;
|
22
22
|
makeImageSnapshotAsync(rect?: SkRect): Promise<SkImage>;
|
23
23
|
redraw(): void;
|
@@ -80,4 +80,26 @@ describe("Box", () => {
|
|
80
80
|
);
|
81
81
|
checkImage(img, "snapshots/box/box-stroke.png");
|
82
82
|
});
|
83
|
+
|
84
|
+
it("should draw a shadow with opacity", async () => {
|
85
|
+
const { rect } = importSkia();
|
86
|
+
const { width } = surface;
|
87
|
+
const size = width / 2;
|
88
|
+
const img = await surface.draw(
|
89
|
+
<>
|
90
|
+
<Fill color="white" />
|
91
|
+
<Box box={rect(size / 2, size / 2, size, size)} color="red">
|
92
|
+
<BoxShadow
|
93
|
+
dx={0}
|
94
|
+
dy={0}
|
95
|
+
blur={5}
|
96
|
+
spread={10}
|
97
|
+
inner
|
98
|
+
color={"rgba(0, 0, 255, 0.5)"}
|
99
|
+
/>
|
100
|
+
</Box>
|
101
|
+
</>
|
102
|
+
);
|
103
|
+
checkImage(img, "snapshots/box/box-shadow-opacity.png");
|
104
|
+
});
|
83
105
|
});
|
@@ -72,6 +72,7 @@ describe("Native Buffers", () => {
|
|
72
72
|
);
|
73
73
|
expect(success).toBe(true);
|
74
74
|
});
|
75
|
+
|
75
76
|
it("creates a native buffer from an image", async () => {
|
76
77
|
if (!shouldNativeBufferTestRun()) {
|
77
78
|
return;
|
@@ -114,6 +115,7 @@ describe("Native Buffers", () => {
|
|
114
115
|
expect(image).not.toBeNull();
|
115
116
|
checkImage(image, "snapshots/cyan-buffer.png");
|
116
117
|
});
|
118
|
+
|
117
119
|
it("creates an image from native color type", async () => {
|
118
120
|
const { Skia: Sk } = setupSkia();
|
119
121
|
// Skip outside iOS and Android
|
package/src/sksg/HostConfig.ts
CHANGED
@@ -130,8 +130,9 @@ export const sksgHostConfig: SkiaHostConfig = {
|
|
130
130
|
return null;
|
131
131
|
},
|
132
132
|
|
133
|
-
resetAfterCommit(
|
133
|
+
resetAfterCommit(container: Container) {
|
134
134
|
debug("resetAfterCommit");
|
135
|
+
container.redraw();
|
135
136
|
},
|
136
137
|
|
137
138
|
getPublicInstance(node: Instance) {
|