@shopify/react-native-skia 2.0.5 → 2.0.7

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.
Files changed (180) hide show
  1. package/android/CMakeLists.txt +10 -0
  2. package/android/build.gradle +2 -1
  3. package/apple/SkiaCVPixelBufferUtils.mm +8 -4
  4. package/cpp/api/JsiSkCanvas.h +10 -8
  5. package/cpp/api/JsiSkFont.h +14 -18
  6. package/cpp/api/JsiSkPath.h +6 -3
  7. package/cpp/api/JsiSkPathEffectFactory.h +2 -2
  8. package/cpp/api/JsiSkPathFactory.h +1 -1
  9. package/cpp/api/JsiSkTextBlobFactory.h +5 -3
  10. package/cpp/api/JsiSkTypeface.h +5 -4
  11. package/cpp/api/recorder/Drawings.h +26 -20
  12. package/cpp/api/recorder/PathEffects.h +3 -2
  13. package/cpp/skia/include/android/SkAndroidFrameworkUtils.h +1 -1
  14. package/cpp/skia/include/android/SkImageAndroid.h +1 -8
  15. package/cpp/skia/include/config/SkUserConfig.h +9 -0
  16. package/cpp/skia/include/core/SkCPUContext.h +31 -0
  17. package/cpp/skia/include/core/SkCPURecorder.h +69 -0
  18. package/cpp/skia/include/core/SkCanvas.h +57 -13
  19. package/cpp/skia/include/core/SkContourMeasure.h +1 -1
  20. package/cpp/skia/include/core/SkData.h +63 -37
  21. package/cpp/skia/include/core/SkFont.h +94 -65
  22. package/cpp/skia/include/core/SkImage.h +10 -9
  23. package/cpp/skia/include/core/SkImageGenerator.h +3 -0
  24. package/cpp/skia/include/core/SkMatrix.h +102 -116
  25. package/cpp/skia/include/core/SkMilestone.h +1 -1
  26. package/cpp/skia/include/core/SkPath.h +163 -60
  27. package/cpp/skia/include/core/SkPathBuilder.h +713 -30
  28. package/cpp/skia/include/core/SkPathTypes.h +5 -1
  29. package/cpp/skia/include/core/SkPictureRecorder.h +6 -6
  30. package/cpp/skia/include/core/SkRecorder.h +35 -0
  31. package/cpp/skia/include/core/SkRect.h +57 -27
  32. package/cpp/skia/include/core/SkRegion.h +1 -1
  33. package/cpp/skia/include/core/SkSurface.h +8 -1
  34. package/cpp/skia/include/core/SkTextBlob.h +50 -6
  35. package/cpp/skia/include/core/SkTraceMemoryDump.h +7 -0
  36. package/cpp/skia/include/core/SkTypeface.h +53 -26
  37. package/cpp/skia/include/core/SkTypes.h +6 -0
  38. package/cpp/skia/include/effects/SkDashPathEffect.h +9 -3
  39. package/cpp/skia/include/effects/SkRuntimeEffect.h +1 -1
  40. package/cpp/skia/include/encode/SkEncoder.h +1 -1
  41. package/cpp/skia/include/encode/SkICC.h +1 -1
  42. package/cpp/skia/include/gpu/ganesh/GrDirectContext.h +23 -0
  43. package/cpp/skia/include/gpu/ganesh/GrRecordingContext.h +12 -0
  44. package/cpp/skia/include/gpu/graphite/Context.h +32 -8
  45. package/cpp/skia/include/gpu/graphite/ContextOptions.h +22 -4
  46. package/cpp/skia/include/gpu/graphite/GraphiteTypes.h +21 -4
  47. package/cpp/skia/include/gpu/graphite/PrecompileContext.h +16 -2
  48. package/cpp/skia/include/gpu/graphite/Recorder.h +30 -10
  49. package/cpp/skia/include/gpu/graphite/Recording.h +7 -3
  50. package/cpp/skia/include/gpu/graphite/TextureInfo.h +3 -3
  51. package/cpp/skia/include/gpu/graphite/precompile/PaintOptions.h +15 -0
  52. package/cpp/skia/include/gpu/graphite/precompile/PrecompileShader.h +89 -13
  53. package/cpp/skia/include/gpu/graphite/vk/precompile/VulkanPrecompileShader.h +39 -0
  54. package/cpp/skia/include/gpu/vk/VulkanBackendContext.h +1 -1
  55. package/cpp/skia/include/gpu/vk/VulkanPreferredFeatures.h +214 -0
  56. package/cpp/skia/include/ports/SkFontMgr_fontconfig.h +3 -0
  57. package/cpp/skia/include/private/SkGainmapShader.h +10 -4
  58. package/cpp/skia/include/private/SkPathRef.h +6 -2
  59. package/cpp/skia/include/private/base/SkAlign.h +11 -0
  60. package/cpp/skia/include/private/gpu/ganesh/GrTypesPriv.h +1 -1
  61. package/cpp/skia/include/third_party/vulkan/vulkan/vk_icd.h +255 -0
  62. package/cpp/skia/include/third_party/vulkan/vulkan/vk_layer.h +203 -0
  63. package/cpp/skia/include/third_party/vulkan/vulkan/vk_platform.h +1 -2
  64. package/cpp/skia/include/third_party/vulkan/vulkan/vk_video/vulkan_video_codec_av1std.h +390 -0
  65. package/cpp/skia/include/third_party/vulkan/vulkan/vk_video/vulkan_video_codec_av1std_decode.h +106 -0
  66. package/cpp/skia/include/third_party/vulkan/vulkan/vk_video/vulkan_video_codec_av1std_encode.h +140 -0
  67. package/cpp/skia/include/third_party/vulkan/vulkan/vk_video/vulkan_video_codec_h264std.h +1 -1
  68. package/cpp/skia/include/third_party/vulkan/vulkan/vk_video/vulkan_video_codec_h264std_decode.h +1 -1
  69. package/cpp/skia/include/third_party/vulkan/vulkan/vk_video/vulkan_video_codec_h264std_encode.h +144 -0
  70. package/cpp/skia/include/third_party/vulkan/vulkan/vk_video/vulkan_video_codec_h265std.h +1 -1
  71. package/cpp/skia/include/third_party/vulkan/vulkan/vk_video/vulkan_video_codec_h265std_decode.h +1 -1
  72. package/cpp/skia/include/third_party/vulkan/vulkan/vk_video/vulkan_video_codec_h265std_encode.h +158 -0
  73. package/cpp/skia/include/third_party/vulkan/vulkan/vk_video/vulkan_video_codecs_common.h +1 -1
  74. package/cpp/skia/include/third_party/vulkan/vulkan/vulkan.h +1 -1
  75. package/cpp/skia/include/third_party/vulkan/vulkan/vulkan_android.h +1 -1
  76. package/cpp/skia/include/third_party/vulkan/vulkan/vulkan_beta.h +242 -0
  77. package/cpp/skia/include/third_party/vulkan/vulkan/vulkan_core.h +10094 -5707
  78. package/cpp/skia/include/third_party/vulkan/vulkan/vulkan_directfb.h +55 -0
  79. package/cpp/skia/include/third_party/vulkan/vulkan/vulkan_fuchsia.h +288 -0
  80. package/cpp/skia/include/third_party/vulkan/vulkan/vulkan_ggp.h +59 -0
  81. package/cpp/skia/include/third_party/vulkan/vulkan/vulkan_ios.h +1 -1
  82. package/cpp/skia/include/third_party/vulkan/vulkan/vulkan_macos.h +1 -1
  83. package/cpp/skia/include/third_party/vulkan/vulkan/vulkan_metal.h +238 -0
  84. package/cpp/skia/include/third_party/vulkan/vulkan/vulkan_screen.h +110 -0
  85. package/cpp/skia/include/third_party/vulkan/vulkan/vulkan_vi.h +47 -0
  86. package/cpp/skia/include/third_party/vulkan/vulkan/vulkan_wayland.h +55 -0
  87. package/cpp/skia/include/third_party/vulkan/vulkan/vulkan_win32.h +1 -1
  88. package/cpp/skia/include/third_party/vulkan/vulkan/vulkan_xcb.h +1 -1
  89. package/cpp/skia/include/third_party/vulkan/vulkan/vulkan_xlib.h +60 -0
  90. package/cpp/skia/include/third_party/vulkan/vulkan/vulkan_xlib_xrandr.h +46 -0
  91. package/cpp/skia/modules/skcms/src/skcms_internals.h +10 -2
  92. package/cpp/skia/modules/skcms/src/skcms_public.h +39 -10
  93. package/libs/android/arm64-v8a/libpathops.a +0 -0
  94. package/libs/android/arm64-v8a/libskia.a +0 -0
  95. package/libs/android/arm64-v8a/libskottie.a +0 -0
  96. package/libs/android/arm64-v8a/libskparagraph.a +0 -0
  97. package/libs/android/arm64-v8a/libsksg.a +0 -0
  98. package/libs/android/arm64-v8a/libskshaper.a +0 -0
  99. package/libs/android/arm64-v8a/libskunicode_icu.a +0 -0
  100. package/libs/android/arm64-v8a/libsvg.a +0 -0
  101. package/libs/android/armeabi-v7a/libpathops.a +0 -0
  102. package/libs/android/armeabi-v7a/libskia.a +0 -0
  103. package/libs/android/armeabi-v7a/libskottie.a +0 -0
  104. package/libs/android/armeabi-v7a/libskparagraph.a +0 -0
  105. package/libs/android/armeabi-v7a/libsksg.a +0 -0
  106. package/libs/android/armeabi-v7a/libskshaper.a +0 -0
  107. package/libs/android/armeabi-v7a/libskunicode_icu.a +0 -0
  108. package/libs/android/armeabi-v7a/libsvg.a +0 -0
  109. package/libs/android/x86/libpathops.a +0 -0
  110. package/libs/android/x86/libskia.a +0 -0
  111. package/libs/android/x86/libskottie.a +0 -0
  112. package/libs/android/x86/libskparagraph.a +0 -0
  113. package/libs/android/x86/libsksg.a +0 -0
  114. package/libs/android/x86/libskshaper.a +0 -0
  115. package/libs/android/x86/libskunicode_icu.a +0 -0
  116. package/libs/android/x86/libsvg.a +0 -0
  117. package/libs/android/x86_64/libpathops.a +0 -0
  118. package/libs/android/x86_64/libskia.a +0 -0
  119. package/libs/android/x86_64/libskottie.a +0 -0
  120. package/libs/android/x86_64/libskparagraph.a +0 -0
  121. package/libs/android/x86_64/libsksg.a +0 -0
  122. package/libs/android/x86_64/libskshaper.a +0 -0
  123. package/libs/android/x86_64/libskunicode_icu.a +0 -0
  124. package/libs/android/x86_64/libsvg.a +0 -0
  125. package/libs/apple/libpathops.xcframework/Info.plist +94 -0
  126. package/libs/apple/libpathops.xcframework/ios-arm64_arm64e/libpathops.a +0 -0
  127. package/libs/apple/libpathops.xcframework/ios-arm64_arm64e_x86_64-simulator/libpathops.a +0 -0
  128. package/libs/apple/libpathops.xcframework/macos-arm64_x86_64/libpathops.a +0 -0
  129. package/libs/apple/libpathops.xcframework/tvos-arm64_arm64e/libpathops.a +0 -0
  130. package/libs/apple/libpathops.xcframework/tvos-arm64_arm64e_x86_64-simulator/libpathops.a +0 -0
  131. package/libs/apple/libskia.xcframework/Info.plist +14 -14
  132. package/libs/apple/libskia.xcframework/ios-arm64_arm64e/libskia.a +0 -0
  133. package/libs/apple/libskia.xcframework/ios-arm64_arm64e_x86_64-simulator/libskia.a +0 -0
  134. package/libs/apple/libskia.xcframework/macos-arm64_x86_64/libskia.a +0 -0
  135. package/libs/apple/libskia.xcframework/tvos-arm64_arm64e/libskia.a +0 -0
  136. package/libs/apple/libskia.xcframework/tvos-arm64_arm64e_x86_64-simulator/libskia.a +0 -0
  137. package/libs/apple/libskottie.xcframework/Info.plist +8 -8
  138. package/libs/apple/libskottie.xcframework/ios-arm64_arm64e/libskottie.a +0 -0
  139. package/libs/apple/libskottie.xcframework/ios-arm64_arm64e_x86_64-simulator/libskottie.a +0 -0
  140. package/libs/apple/libskottie.xcframework/macos-arm64_x86_64/libskottie.a +0 -0
  141. package/libs/apple/libskottie.xcframework/tvos-arm64_arm64e/libskottie.a +0 -0
  142. package/libs/apple/libskottie.xcframework/tvos-arm64_arm64e_x86_64-simulator/libskottie.a +0 -0
  143. package/libs/apple/libskparagraph.xcframework/Info.plist +14 -14
  144. package/libs/apple/libskparagraph.xcframework/ios-arm64_arm64e/libskparagraph.a +0 -0
  145. package/libs/apple/libskparagraph.xcframework/ios-arm64_arm64e_x86_64-simulator/libskparagraph.a +0 -0
  146. package/libs/apple/libskparagraph.xcframework/macos-arm64_x86_64/libskparagraph.a +0 -0
  147. package/libs/apple/libskparagraph.xcframework/tvos-arm64_arm64e/libskparagraph.a +0 -0
  148. package/libs/apple/libskparagraph.xcframework/tvos-arm64_arm64e_x86_64-simulator/libskparagraph.a +0 -0
  149. package/libs/apple/libsksg.xcframework/Info.plist +8 -8
  150. package/libs/apple/libsksg.xcframework/ios-arm64_arm64e/libsksg.a +0 -0
  151. package/libs/apple/libsksg.xcframework/ios-arm64_arm64e_x86_64-simulator/libsksg.a +0 -0
  152. package/libs/apple/libsksg.xcframework/macos-arm64_x86_64/libsksg.a +0 -0
  153. package/libs/apple/libsksg.xcframework/tvos-arm64_arm64e/libsksg.a +0 -0
  154. package/libs/apple/libsksg.xcframework/tvos-arm64_arm64e_x86_64-simulator/libsksg.a +0 -0
  155. package/libs/apple/libskshaper.xcframework/Info.plist +14 -14
  156. package/libs/apple/libskshaper.xcframework/ios-arm64_arm64e/libskshaper.a +0 -0
  157. package/libs/apple/libskshaper.xcframework/ios-arm64_arm64e_x86_64-simulator/libskshaper.a +0 -0
  158. package/libs/apple/libskshaper.xcframework/macos-arm64_x86_64/libskshaper.a +0 -0
  159. package/libs/apple/libskshaper.xcframework/tvos-arm64_arm64e/libskshaper.a +0 -0
  160. package/libs/apple/libskshaper.xcframework/tvos-arm64_arm64e_x86_64-simulator/libskshaper.a +0 -0
  161. package/libs/apple/libskunicode_core.xcframework/Info.plist +12 -12
  162. package/libs/apple/libskunicode_core.xcframework/ios-arm64_arm64e_x86_64-simulator/libskunicode_core.a +0 -0
  163. package/libs/apple/libskunicode_core.xcframework/macos-arm64_x86_64/libskunicode_core.a +0 -0
  164. package/libs/apple/libskunicode_core.xcframework/tvos-arm64_arm64e_x86_64-simulator/libskunicode_core.a +0 -0
  165. package/libs/apple/libskunicode_libgrapheme.xcframework/Info.plist +13 -13
  166. package/libs/apple/libskunicode_libgrapheme.xcframework/ios-arm64_arm64e/libskunicode_libgrapheme.a +0 -0
  167. package/libs/apple/libskunicode_libgrapheme.xcframework/ios-arm64_arm64e_x86_64-simulator/libskunicode_libgrapheme.a +0 -0
  168. package/libs/apple/libskunicode_libgrapheme.xcframework/macos-arm64_x86_64/libskunicode_libgrapheme.a +0 -0
  169. package/libs/apple/libskunicode_libgrapheme.xcframework/tvos-arm64_arm64e/libskunicode_libgrapheme.a +0 -0
  170. package/libs/apple/libskunicode_libgrapheme.xcframework/tvos-arm64_arm64e_x86_64-simulator/libskunicode_libgrapheme.a +0 -0
  171. package/libs/apple/libsvg.xcframework/Info.plist +12 -12
  172. package/libs/apple/libsvg.xcframework/ios-arm64_arm64e/libsvg.a +0 -0
  173. package/libs/apple/libsvg.xcframework/ios-arm64_arm64e_x86_64-simulator/libsvg.a +0 -0
  174. package/libs/apple/libsvg.xcframework/macos-arm64_x86_64/libsvg.a +0 -0
  175. package/libs/apple/libsvg.xcframework/tvos-arm64_arm64e/libsvg.a +0 -0
  176. package/libs/apple/libsvg.xcframework/tvos-arm64_arm64e_x86_64-simulator/libsvg.a +0 -0
  177. package/package.json +1 -1
  178. package/react-native-skia.podspec +2 -1
  179. package/src/renderer/__tests__/e2e/BackdropFilters.spec.tsx +23 -0
  180. /package/cpp/skia/{include/pathops → modules/pathops/include}/SkPathOps.h +0 -0
@@ -8,7 +8,7 @@
8
8
  <key>BinaryPath</key>
9
9
  <string>libsvg.a</string>
10
10
  <key>LibraryIdentifier</key>
11
- <string>tvos-arm64_arm64e_x86_64-simulator</string>
11
+ <string>ios-arm64_arm64e_x86_64-simulator</string>
12
12
  <key>LibraryPath</key>
13
13
  <string>libsvg.a</string>
14
14
  <key>SupportedArchitectures</key>
@@ -18,7 +18,7 @@
18
18
  <string>x86_64</string>
19
19
  </array>
20
20
  <key>SupportedPlatform</key>
21
- <string>tvos</string>
21
+ <string>ios</string>
22
22
  <key>SupportedPlatformVariant</key>
23
23
  <string>simulator</string>
24
24
  </dict>
@@ -26,7 +26,7 @@
26
26
  <key>BinaryPath</key>
27
27
  <string>libsvg.a</string>
28
28
  <key>LibraryIdentifier</key>
29
- <string>ios-arm64_arm64e_x86_64-simulator</string>
29
+ <string>tvos-arm64_arm64e_x86_64-simulator</string>
30
30
  <key>LibraryPath</key>
31
31
  <string>libsvg.a</string>
32
32
  <key>SupportedArchitectures</key>
@@ -36,7 +36,7 @@
36
36
  <string>x86_64</string>
37
37
  </array>
38
38
  <key>SupportedPlatform</key>
39
- <string>ios</string>
39
+ <string>tvos</string>
40
40
  <key>SupportedPlatformVariant</key>
41
41
  <string>simulator</string>
42
42
  </dict>
@@ -44,22 +44,22 @@
44
44
  <key>BinaryPath</key>
45
45
  <string>libsvg.a</string>
46
46
  <key>LibraryIdentifier</key>
47
- <string>ios-arm64_arm64e</string>
47
+ <string>macos-arm64_x86_64</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>arm64e</string>
53
+ <string>x86_64</string>
54
54
  </array>
55
55
  <key>SupportedPlatform</key>
56
- <string>ios</string>
56
+ <string>macos</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>tvos-arm64_arm64e</string>
62
+ <string>ios-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>tvos</string>
71
+ <string>ios</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>macos-arm64_x86_64</string>
77
+ <string>tvos-arm64_arm64e</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>x86_64</string>
83
+ <string>arm64e</string>
84
84
  </array>
85
85
  <key>SupportedPlatform</key>
86
- <string>macos</string>
86
+ <string>tvos</string>
87
87
  </dict>
88
88
  </array>
89
89
  <key>CFBundlePackageType</key>
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.5",
11
+ "version": "2.0.7",
12
12
  "description": "High-performance React Native Graphics using Skia",
13
13
  "main": "lib/module/index.js",
14
14
  "react-native": "src/index.ts",
@@ -58,7 +58,8 @@ base_frameworks = ['libs/apple/libskia.xcframework',
58
58
  'libs/apple/libskshaper.xcframework',
59
59
  'libs/apple/libskparagraph.xcframework',
60
60
  'libs/apple/libskunicode_core.xcframework',
61
- 'libs/apple/libskunicode_libgrapheme.xcframework',]
61
+ 'libs/apple/libskunicode_libgrapheme.xcframework',
62
+ 'libs/apple/libpathops.xcframework',]
62
63
 
63
64
  Pod::Spec.new do |s|
64
65
  s.name = "react-native-skia"
@@ -138,4 +138,27 @@ describe("Backdrop Filters", () => {
138
138
  );
139
139
  checkImage(img, docPath("blur-backdrop-aurora.png"));
140
140
  });
141
+ it("Blur backdrop blur on text with white background", async () => {
142
+ const { width, height } = surface;
143
+ const { rect } = importSkia();
144
+ const img = await surface.draw(
145
+ <>
146
+ <Circle c={{ x: 0, y: 0 }} r={100} color="black" />
147
+ <BackdropBlur blur={10 / 3} clip={rect(0, 0, width, height)} />
148
+ </>
149
+ );
150
+ checkImage(img, docPath("backdrop-circle.png"));
151
+ });
152
+ it("Blur backdrop blur on text with opaque background", async () => {
153
+ const { width, height } = surface;
154
+ const { rect } = importSkia();
155
+ const img = await surface.draw(
156
+ <>
157
+ <Fill color="white" />
158
+ <Circle c={{ x: 0, y: 0 }} r={100} color="black" />
159
+ <BackdropBlur blur={10 / 3} clip={rect(0, 0, width, height)} />
160
+ </>
161
+ );
162
+ checkImage(img, docPath("backdrop-circle-opaque.png"));
163
+ });
141
164
  });