@shopify/react-native-skia 1.11.8 → 1.11.9-next.1

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 (352) hide show
  1. package/android/CMakeLists.txt +30 -153
  2. package/android/build.gradle +1 -1
  3. package/cpp/skia/include/codec/SkCodec.h +7 -2
  4. package/cpp/skia/include/config/SkUserConfig.h +11 -0
  5. package/cpp/skia/include/core/SkCanvas.h +11 -7
  6. package/cpp/skia/include/core/SkColor.h +10 -0
  7. package/cpp/skia/include/core/SkColorSpace.h +184 -2
  8. package/cpp/skia/include/core/SkColorType.h +114 -32
  9. package/cpp/skia/include/core/SkFontScanner.h +5 -8
  10. package/cpp/skia/include/core/SkFontStyle.h +1 -1
  11. package/cpp/skia/include/core/SkMaskFilter.h +0 -8
  12. package/cpp/skia/include/core/SkMilestone.h +1 -1
  13. package/cpp/skia/include/core/SkPath.h +1 -1
  14. package/cpp/skia/include/core/SkRRect.h +3 -1
  15. package/cpp/skia/include/core/SkShader.h +3 -3
  16. package/cpp/skia/include/core/SkString.h +8 -8
  17. package/cpp/skia/include/core/SkSurface.h +14 -0
  18. package/cpp/skia/include/core/SkTypeface.h +24 -7
  19. package/cpp/skia/include/effects/SkGradientShader.h +6 -1
  20. package/cpp/skia/include/effects/SkRuntimeEffect.h +1 -0
  21. package/cpp/skia/include/encode/SkPngEncoder.h +14 -0
  22. package/cpp/skia/include/gpu/GpuTypes.h +9 -0
  23. package/cpp/skia/include/gpu/ganesh/GrContextOptions.h +135 -133
  24. package/cpp/skia/include/gpu/ganesh/GrDirectContext.h +5 -0
  25. package/cpp/skia/include/gpu/ganesh/GrDriverBugWorkarounds.h +3 -3
  26. package/cpp/skia/include/gpu/ganesh/GrTypes.h +14 -9
  27. package/cpp/skia/include/gpu/graphite/Context.h +25 -2
  28. package/cpp/skia/include/gpu/graphite/ContextOptions.h +23 -5
  29. package/cpp/skia/include/gpu/graphite/GraphiteTypes.h +20 -1
  30. package/cpp/skia/include/gpu/graphite/Image.h +1 -0
  31. package/cpp/skia/include/gpu/graphite/LogPriority.h +36 -0
  32. package/cpp/skia/include/gpu/graphite/PrecompileContext.h +52 -0
  33. package/cpp/skia/include/gpu/graphite/Recorder.h +6 -0
  34. package/cpp/skia/include/gpu/graphite/Recording.h +3 -1
  35. package/cpp/skia/include/gpu/graphite/mtl/MtlGraphiteTypes.h +4 -36
  36. package/cpp/skia/include/gpu/graphite/mtl/MtlGraphiteTypesUtils.h +48 -0
  37. package/cpp/skia/include/gpu/graphite/precompile/Precompile.h +3 -2
  38. package/cpp/skia/include/pathops/SkPathOps.h +9 -1
  39. package/cpp/skia/include/ports/SkFontMgr_FontConfigInterface.h +3 -0
  40. package/cpp/skia/include/private/SkPathRef.h +15 -21
  41. package/cpp/skia/include/private/base/SkAttributes.h +16 -10
  42. package/cpp/skia/include/private/base/SkMutex.h +8 -0
  43. package/cpp/skia/include/private/base/SkTArray.h +1 -1
  44. package/cpp/skia/include/private/base/SkTDArray.h +1 -1
  45. package/cpp/skia/include/private/base/SkTemplates.h +24 -11
  46. package/cpp/skia/include/private/gpu/ganesh/GrTypesPriv.h +1 -1
  47. package/cpp/skia/include/sksl/SkSLDebugTrace.h +0 -3
  48. package/cpp/skia/modules/skcms/src/Transform_inl.h +20 -20
  49. package/cpp/skia/modules/skcms/src/skcms_Transform.h +4 -3
  50. package/cpp/skia/modules/skcms/src/skcms_public.h +19 -15
  51. package/cpp/skia/modules/skresources/include/SkResources.h +3 -1
  52. package/cpp/skia/modules/svg/include/SkSVGCircle.h +1 -1
  53. package/cpp/skia/modules/svg/include/SkSVGContainer.h +1 -1
  54. package/cpp/skia/modules/svg/include/SkSVGFeLightSource.h +1 -1
  55. package/cpp/skia/modules/svg/include/SkSVGImage.h +2 -2
  56. package/cpp/skia/modules/svg/include/SkSVGPath.h +1 -1
  57. package/cpp/skia/modules/svg/include/SkSVGPoly.h +1 -1
  58. package/cpp/skia/modules/svg/include/SkSVGRect.h +1 -1
  59. package/cpp/skia/modules/svg/include/SkSVGRenderContext.h +2 -0
  60. package/cpp/skia/modules/svg/include/SkSVGShape.h +1 -0
  61. package/cpp/skia/modules/svg/include/SkSVGText.h +1 -1
  62. package/cpp/skia/modules/svg/include/SkSVGTransformableNode.h +4 -0
  63. package/cpp/skia/modules/svg/include/SkSVGUse.h +1 -1
  64. package/cpp/skia/src/core/SkLRUCache.h +19 -13
  65. package/cpp/skia/src/core/SkTHash.h +50 -4
  66. package/cpp/skia/src/gpu/ganesh/gl/GrGLDefines.h +1 -0
  67. package/lib/commonjs/external/reanimated/textures.js +4 -3
  68. package/lib/commonjs/external/reanimated/textures.js.map +1 -1
  69. package/lib/commonjs/headless/index.d.ts +1 -1
  70. package/lib/commonjs/headless/index.js +2 -2
  71. package/lib/commonjs/headless/index.js.map +1 -1
  72. package/lib/commonjs/renderer/Canvas.d.ts +2 -2
  73. package/lib/commonjs/renderer/Canvas.js +10 -27
  74. package/lib/commonjs/renderer/Canvas.js.map +1 -1
  75. package/lib/commonjs/renderer/Offscreen.d.ts +2 -2
  76. package/lib/commonjs/renderer/Offscreen.js +4 -4
  77. package/lib/commonjs/renderer/Offscreen.js.map +1 -1
  78. package/lib/commonjs/renderer/__tests__/setup.d.ts +5 -5
  79. package/lib/commonjs/sksg/Container.d.ts +3 -1
  80. package/lib/commonjs/sksg/Container.js +7 -1
  81. package/lib/commonjs/sksg/Container.js.map +1 -1
  82. package/lib/commonjs/sksg/HostConfig.d.ts +1 -1
  83. package/lib/commonjs/sksg/HostConfig.js +36 -6
  84. package/lib/commonjs/sksg/HostConfig.js.map +1 -1
  85. package/lib/commonjs/sksg/Reconciler.d.ts +3 -2
  86. package/lib/commonjs/sksg/Reconciler.js +16 -6
  87. package/lib/commonjs/sksg/Reconciler.js.map +1 -1
  88. package/lib/module/Platform/Platform.web.js +1 -1
  89. package/lib/module/Platform/Platform.web.js.map +1 -1
  90. package/lib/module/dom/nodes/datatypes/Circle.js +1 -2
  91. package/lib/module/dom/nodes/datatypes/Circle.js.map +1 -1
  92. package/lib/module/dom/nodes/datatypes/Gradient.js +3 -3
  93. package/lib/module/dom/nodes/datatypes/Gradient.js.map +1 -1
  94. package/lib/module/dom/nodes/datatypes/Rect.js +3 -5
  95. package/lib/module/dom/nodes/datatypes/Rect.js.map +1 -1
  96. package/lib/module/external/reanimated/buffers.js +1 -2
  97. package/lib/module/external/reanimated/buffers.js.map +1 -1
  98. package/lib/module/external/reanimated/textures.js +5 -4
  99. package/lib/module/external/reanimated/textures.js.map +1 -1
  100. package/lib/module/external/reanimated/useAnimatedImageValue.js +1 -1
  101. package/lib/module/external/reanimated/useAnimatedImageValue.js.map +1 -1
  102. package/lib/module/external/reanimated/useVideo.js +10 -23
  103. package/lib/module/external/reanimated/useVideo.js.map +1 -1
  104. package/lib/module/headless/index.d.ts +1 -1
  105. package/lib/module/headless/index.js +2 -2
  106. package/lib/module/headless/index.js.map +1 -1
  107. package/lib/module/renderer/Canvas.d.ts +2 -2
  108. package/lib/module/renderer/Canvas.js +9 -27
  109. package/lib/module/renderer/Canvas.js.map +1 -1
  110. package/lib/module/renderer/Offscreen.d.ts +2 -2
  111. package/lib/module/renderer/Offscreen.js +4 -4
  112. package/lib/module/renderer/Offscreen.js.map +1 -1
  113. package/lib/module/renderer/__tests__/setup.d.ts +5 -5
  114. package/lib/module/skia/core/Vector.js +1 -1
  115. package/lib/module/skia/core/Vector.js.map +1 -1
  116. package/lib/module/skia/web/CanvasKitWebGLBufferImpl.js +1 -4
  117. package/lib/module/skia/web/CanvasKitWebGLBufferImpl.js.map +1 -1
  118. package/lib/module/skia/web/Host.js +1 -7
  119. package/lib/module/skia/web/Host.js.map +1 -1
  120. package/lib/module/skia/web/JsiSkAnimatedImage.js +3 -6
  121. package/lib/module/skia/web/JsiSkAnimatedImage.js.map +1 -1
  122. package/lib/module/skia/web/JsiSkCanvas.js +3 -6
  123. package/lib/module/skia/web/JsiSkCanvas.js.map +1 -1
  124. package/lib/module/skia/web/JsiSkColorFilter.js +3 -6
  125. package/lib/module/skia/web/JsiSkColorFilter.js.map +1 -1
  126. package/lib/module/skia/web/JsiSkContourMeasure.js +3 -6
  127. package/lib/module/skia/web/JsiSkContourMeasure.js.map +1 -1
  128. package/lib/module/skia/web/JsiSkContourMeasureIter.js +3 -6
  129. package/lib/module/skia/web/JsiSkContourMeasureIter.js.map +1 -1
  130. package/lib/module/skia/web/JsiSkData.js +3 -6
  131. package/lib/module/skia/web/JsiSkData.js.map +1 -1
  132. package/lib/module/skia/web/JsiSkFont.js +3 -6
  133. package/lib/module/skia/web/JsiSkFont.js.map +1 -1
  134. package/lib/module/skia/web/JsiSkImage.js +8 -12
  135. package/lib/module/skia/web/JsiSkImage.js.map +1 -1
  136. package/lib/module/skia/web/JsiSkImageFilter.js +3 -6
  137. package/lib/module/skia/web/JsiSkImageFilter.js.map +1 -1
  138. package/lib/module/skia/web/JsiSkMaskFilter.js +3 -6
  139. package/lib/module/skia/web/JsiSkMaskFilter.js.map +1 -1
  140. package/lib/module/skia/web/JsiSkMatrix.js +5 -8
  141. package/lib/module/skia/web/JsiSkMatrix.js.map +1 -1
  142. package/lib/module/skia/web/JsiSkPaint.js +3 -6
  143. package/lib/module/skia/web/JsiSkPaint.js.map +1 -1
  144. package/lib/module/skia/web/JsiSkParagraphBuilder.js +2 -3
  145. package/lib/module/skia/web/JsiSkParagraphBuilder.js.map +1 -1
  146. package/lib/module/skia/web/JsiSkParagraphBuilderFactory.js +1 -1
  147. package/lib/module/skia/web/JsiSkParagraphBuilderFactory.js.map +1 -1
  148. package/lib/module/skia/web/JsiSkParagraphStyle.js +15 -15
  149. package/lib/module/skia/web/JsiSkParagraphStyle.js.map +1 -1
  150. package/lib/module/skia/web/JsiSkPath.js +3 -6
  151. package/lib/module/skia/web/JsiSkPath.js.map +1 -1
  152. package/lib/module/skia/web/JsiSkPathEffect.js +3 -6
  153. package/lib/module/skia/web/JsiSkPathEffect.js.map +1 -1
  154. package/lib/module/skia/web/JsiSkPicture.js +3 -6
  155. package/lib/module/skia/web/JsiSkPicture.js.map +1 -1
  156. package/lib/module/skia/web/JsiSkPictureRecorder.js +3 -6
  157. package/lib/module/skia/web/JsiSkPictureRecorder.js.map +1 -1
  158. package/lib/module/skia/web/JsiSkPoint.js +3 -6
  159. package/lib/module/skia/web/JsiSkPoint.js.map +1 -1
  160. package/lib/module/skia/web/JsiSkRRect.js +3 -6
  161. package/lib/module/skia/web/JsiSkRRect.js.map +1 -1
  162. package/lib/module/skia/web/JsiSkRSXform.js +3 -6
  163. package/lib/module/skia/web/JsiSkRSXform.js.map +1 -1
  164. package/lib/module/skia/web/JsiSkRect.js +3 -6
  165. package/lib/module/skia/web/JsiSkRect.js.map +1 -1
  166. package/lib/module/skia/web/JsiSkRuntimeEffect.js +3 -6
  167. package/lib/module/skia/web/JsiSkRuntimeEffect.js.map +1 -1
  168. package/lib/module/skia/web/JsiSkSVG.js +5 -8
  169. package/lib/module/skia/web/JsiSkSVG.js.map +1 -1
  170. package/lib/module/skia/web/JsiSkShader.js +3 -6
  171. package/lib/module/skia/web/JsiSkShader.js.map +1 -1
  172. package/lib/module/skia/web/JsiSkSurface.js +3 -6
  173. package/lib/module/skia/web/JsiSkSurface.js.map +1 -1
  174. package/lib/module/skia/web/JsiSkTextBlob.js +3 -6
  175. package/lib/module/skia/web/JsiSkTextBlob.js.map +1 -1
  176. package/lib/module/skia/web/JsiSkTypeface.js +3 -6
  177. package/lib/module/skia/web/JsiSkTypeface.js.map +1 -1
  178. package/lib/module/skia/web/JsiSkTypefaceFontProvider.js +1 -4
  179. package/lib/module/skia/web/JsiSkTypefaceFontProvider.js.map +1 -1
  180. package/lib/module/skia/web/JsiSkVertices.js +3 -6
  181. package/lib/module/skia/web/JsiSkVertices.js.map +1 -1
  182. package/lib/module/skia/web/JsiVideo.js +2 -5
  183. package/lib/module/skia/web/JsiVideo.js.map +1 -1
  184. package/lib/module/sksg/Container.d.ts +3 -1
  185. package/lib/module/sksg/Container.js +11 -8
  186. package/lib/module/sksg/Container.js.map +1 -1
  187. package/lib/module/sksg/HostConfig.d.ts +1 -1
  188. package/lib/module/sksg/HostConfig.js +36 -7
  189. package/lib/module/sksg/HostConfig.js.map +1 -1
  190. package/lib/module/sksg/Reconciler.d.ts +3 -2
  191. package/lib/module/sksg/Reconciler.js +16 -11
  192. package/lib/module/sksg/Reconciler.js.map +1 -1
  193. package/lib/module/sksg/Recorder/ReanimatedRecorder.js +1 -5
  194. package/lib/module/sksg/Recorder/ReanimatedRecorder.js.map +1 -1
  195. package/lib/module/sksg/Recorder/Recorder.js +3 -6
  196. package/lib/module/sksg/Recorder/Recorder.js.map +1 -1
  197. package/lib/module/sksg/Recorder/Visitor.js +1 -1
  198. package/lib/module/sksg/Recorder/Visitor.js.map +1 -1
  199. package/lib/module/sksg/Recorder/commands/Drawing.js +2 -4
  200. package/lib/module/sksg/Recorder/commands/Drawing.js.map +1 -1
  201. package/lib/module/sksg/Recorder/commands/Shaders.js +2 -3
  202. package/lib/module/sksg/Recorder/commands/Shaders.js.map +1 -1
  203. package/lib/module/views/SkiaBaseWebView.js +9 -12
  204. package/lib/module/views/SkiaBaseWebView.js.map +1 -1
  205. package/lib/module/views/SkiaPictureView.js +1 -5
  206. package/lib/module/views/SkiaPictureView.js.map +1 -1
  207. package/lib/module/views/SkiaPictureView.web.js +1 -4
  208. package/lib/module/views/SkiaPictureView.web.js.map +1 -1
  209. package/lib/module/web/LoadSkiaWeb.js +1 -2
  210. package/lib/module/web/LoadSkiaWeb.js.map +1 -1
  211. package/lib/module/web/WithSkiaWeb.js +1 -1
  212. package/lib/module/web/WithSkiaWeb.js.map +1 -1
  213. package/lib/typescript/lib/commonjs/headless/index.d.ts +1 -1
  214. package/lib/typescript/lib/commonjs/renderer/Canvas.d.ts +9 -1
  215. package/lib/typescript/lib/commonjs/renderer/Offscreen.d.ts +2 -2
  216. package/lib/typescript/lib/commonjs/sksg/Container.d.ts +3 -0
  217. package/lib/typescript/lib/commonjs/sksg/HostConfig.d.ts +21 -4
  218. package/lib/typescript/lib/commonjs/sksg/Reconciler.d.ts +9 -2
  219. package/lib/typescript/lib/module/headless/index.d.ts +1 -1
  220. package/lib/typescript/lib/module/renderer/Canvas.d.ts +9 -1
  221. package/lib/typescript/lib/module/renderer/Offscreen.d.ts +2 -2
  222. package/lib/typescript/lib/module/skia/web/CanvasKitWebGLBufferImpl.d.ts +2 -2
  223. package/lib/typescript/lib/module/skia/web/JsiSkAnimatedImage.d.ts +1 -0
  224. package/lib/typescript/lib/module/skia/web/JsiSkCanvas.d.ts +1 -0
  225. package/lib/typescript/lib/module/skia/web/JsiSkColorFilter.d.ts +1 -0
  226. package/lib/typescript/lib/module/skia/web/JsiSkContourMeasure.d.ts +1 -0
  227. package/lib/typescript/lib/module/skia/web/JsiSkContourMeasureIter.d.ts +1 -0
  228. package/lib/typescript/lib/module/skia/web/JsiSkData.d.ts +1 -0
  229. package/lib/typescript/lib/module/skia/web/JsiSkFont.d.ts +1 -0
  230. package/lib/typescript/lib/module/skia/web/JsiSkImage.d.ts +1 -0
  231. package/lib/typescript/lib/module/skia/web/JsiSkImageFilter.d.ts +1 -0
  232. package/lib/typescript/lib/module/skia/web/JsiSkMaskFilter.d.ts +1 -0
  233. package/lib/typescript/lib/module/skia/web/JsiSkMatrix.d.ts +1 -0
  234. package/lib/typescript/lib/module/skia/web/JsiSkPaint.d.ts +1 -0
  235. package/lib/typescript/lib/module/skia/web/JsiSkPath.d.ts +1 -0
  236. package/lib/typescript/lib/module/skia/web/JsiSkPathEffect.d.ts +1 -0
  237. package/lib/typescript/lib/module/skia/web/JsiSkPicture.d.ts +1 -0
  238. package/lib/typescript/lib/module/skia/web/JsiSkPictureRecorder.d.ts +1 -0
  239. package/lib/typescript/lib/module/skia/web/JsiSkPoint.d.ts +1 -0
  240. package/lib/typescript/lib/module/skia/web/JsiSkRRect.d.ts +1 -0
  241. package/lib/typescript/lib/module/skia/web/JsiSkRSXform.d.ts +1 -0
  242. package/lib/typescript/lib/module/skia/web/JsiSkRect.d.ts +1 -0
  243. package/lib/typescript/lib/module/skia/web/JsiSkRuntimeEffect.d.ts +1 -0
  244. package/lib/typescript/lib/module/skia/web/JsiSkSVG.d.ts +1 -0
  245. package/lib/typescript/lib/module/skia/web/JsiSkShader.d.ts +1 -0
  246. package/lib/typescript/lib/module/skia/web/JsiSkSurface.d.ts +1 -0
  247. package/lib/typescript/lib/module/skia/web/JsiSkTextBlob.d.ts +1 -0
  248. package/lib/typescript/lib/module/skia/web/JsiSkTypeface.d.ts +1 -0
  249. package/lib/typescript/lib/module/skia/web/JsiSkTypefaceFontProvider.d.ts +1 -0
  250. package/lib/typescript/lib/module/skia/web/JsiSkVertices.d.ts +1 -0
  251. package/lib/typescript/lib/module/skia/web/JsiVideo.d.ts +2 -2
  252. package/lib/typescript/lib/module/sksg/Container.d.ts +7 -12
  253. package/lib/typescript/lib/module/sksg/HostConfig.d.ts +20 -4
  254. package/lib/typescript/lib/module/sksg/Reconciler.d.ts +18 -17
  255. package/lib/typescript/lib/module/sksg/Recorder/ReanimatedRecorder.d.ts +1 -0
  256. package/lib/typescript/lib/module/sksg/Recorder/Recorder.d.ts +5 -2
  257. package/lib/typescript/lib/module/views/SkiaBaseWebView.d.ts +12 -11
  258. package/lib/typescript/lib/module/views/SkiaPictureView.d.ts +2 -2
  259. package/lib/typescript/lib/module/views/SkiaPictureView.web.d.ts +1 -1
  260. package/lib/typescript/src/headless/index.d.ts +1 -1
  261. package/lib/typescript/src/renderer/Canvas.d.ts +2 -2
  262. package/lib/typescript/src/renderer/Offscreen.d.ts +2 -2
  263. package/lib/typescript/src/renderer/__tests__/setup.d.ts +5 -5
  264. package/lib/typescript/src/sksg/Container.d.ts +3 -1
  265. package/lib/typescript/src/sksg/HostConfig.d.ts +1 -1
  266. package/lib/typescript/src/sksg/Reconciler.d.ts +3 -2
  267. package/libs/apple/libskia.xcframework/Info.plist +15 -15
  268. package/libs/apple/libskia.xcframework/ios-arm64_arm64e/libskia.a +0 -0
  269. package/libs/apple/libskia.xcframework/ios-arm64_arm64e_x86_64-simulator/libskia.a +0 -0
  270. package/libs/apple/libskia.xcframework/macos-arm64_x86_64/libskia.a +0 -0
  271. package/libs/apple/libskia.xcframework/tvos-arm64_arm64e/libskia.a +0 -0
  272. package/libs/apple/libskia.xcframework/tvos-arm64_arm64e_x86_64-simulator/libskia.a +0 -0
  273. package/libs/apple/libskottie.xcframework/Info.plist +8 -8
  274. package/libs/apple/libskottie.xcframework/ios-arm64_arm64e/libskottie.a +0 -0
  275. package/libs/apple/libskottie.xcframework/ios-arm64_arm64e_x86_64-simulator/libskottie.a +0 -0
  276. package/libs/apple/libskottie.xcframework/macos-arm64_x86_64/libskottie.a +0 -0
  277. package/libs/apple/libskottie.xcframework/tvos-arm64_arm64e/libskottie.a +0 -0
  278. package/libs/apple/libskottie.xcframework/tvos-arm64_arm64e_x86_64-simulator/libskottie.a +0 -0
  279. package/libs/apple/libskparagraph.xcframework/Info.plist +7 -7
  280. package/libs/apple/libskparagraph.xcframework/ios-arm64_arm64e/libskparagraph.a +0 -0
  281. package/libs/apple/libskparagraph.xcframework/ios-arm64_arm64e_x86_64-simulator/libskparagraph.a +0 -0
  282. package/libs/apple/libskparagraph.xcframework/macos-arm64_x86_64/libskparagraph.a +0 -0
  283. package/libs/apple/libskparagraph.xcframework/tvos-arm64_arm64e/libskparagraph.a +0 -0
  284. package/libs/apple/libskparagraph.xcframework/tvos-arm64_arm64e_x86_64-simulator/libskparagraph.a +0 -0
  285. package/libs/apple/libsksg.xcframework/Info.plist +12 -12
  286. package/libs/apple/libsksg.xcframework/ios-arm64_arm64e/libsksg.a +0 -0
  287. package/libs/apple/libsksg.xcframework/ios-arm64_arm64e_x86_64-simulator/libsksg.a +0 -0
  288. package/libs/apple/libsksg.xcframework/macos-arm64_x86_64/libsksg.a +0 -0
  289. package/libs/apple/libsksg.xcframework/tvos-arm64_arm64e/libsksg.a +0 -0
  290. package/libs/apple/libsksg.xcframework/tvos-arm64_arm64e_x86_64-simulator/libsksg.a +0 -0
  291. package/libs/apple/libskshaper.xcframework/Info.plist +14 -14
  292. package/libs/apple/libskshaper.xcframework/ios-arm64_arm64e/libskshaper.a +0 -0
  293. package/libs/apple/libskshaper.xcframework/ios-arm64_arm64e_x86_64-simulator/libskshaper.a +0 -0
  294. package/libs/apple/libskshaper.xcframework/macos-arm64_x86_64/libskshaper.a +0 -0
  295. package/libs/apple/libskshaper.xcframework/tvos-arm64_arm64e/libskshaper.a +0 -0
  296. package/libs/apple/libskshaper.xcframework/tvos-arm64_arm64e_x86_64-simulator/libskshaper.a +0 -0
  297. package/libs/apple/libskunicode_core.xcframework/Info.plist +14 -14
  298. package/libs/apple/libskunicode_core.xcframework/ios-arm64_arm64e/libskunicode_core.a +0 -0
  299. package/libs/apple/libskunicode_core.xcframework/ios-arm64_arm64e_x86_64-simulator/libskunicode_core.a +0 -0
  300. package/libs/apple/libskunicode_core.xcframework/macos-arm64_x86_64/libskunicode_core.a +0 -0
  301. package/libs/apple/libskunicode_core.xcframework/tvos-arm64_arm64e/libskunicode_core.a +0 -0
  302. package/libs/apple/libskunicode_core.xcframework/tvos-arm64_arm64e_x86_64-simulator/libskunicode_core.a +0 -0
  303. package/libs/apple/libskunicode_libgrapheme.xcframework/Info.plist +13 -13
  304. package/libs/apple/libskunicode_libgrapheme.xcframework/ios-arm64_arm64e/libskunicode_libgrapheme.a +0 -0
  305. package/libs/apple/libskunicode_libgrapheme.xcframework/ios-arm64_arm64e_x86_64-simulator/libskunicode_libgrapheme.a +0 -0
  306. package/libs/apple/libskunicode_libgrapheme.xcframework/macos-arm64_x86_64/libskunicode_libgrapheme.a +0 -0
  307. package/libs/apple/libskunicode_libgrapheme.xcframework/tvos-arm64_arm64e/libskunicode_libgrapheme.a +0 -0
  308. package/libs/apple/libskunicode_libgrapheme.xcframework/tvos-arm64_arm64e_x86_64-simulator/libskunicode_libgrapheme.a +0 -0
  309. package/libs/apple/libsvg.xcframework/Info.plist +11 -11
  310. package/libs/apple/libsvg.xcframework/ios-arm64_arm64e/libsvg.a +0 -0
  311. package/libs/apple/libsvg.xcframework/ios-arm64_arm64e_x86_64-simulator/libsvg.a +0 -0
  312. package/libs/apple/libsvg.xcframework/macos-arm64_x86_64/libsvg.a +0 -0
  313. package/libs/apple/libsvg.xcframework/tvos-arm64_arm64e/libsvg.a +0 -0
  314. package/libs/apple/libsvg.xcframework/tvos-arm64_arm64e_x86_64-simulator/libsvg.a +0 -0
  315. package/package.json +10 -9
  316. package/src/external/reanimated/textures.tsx +5 -4
  317. package/src/headless/index.ts +2 -2
  318. package/src/renderer/Canvas.tsx +57 -80
  319. package/src/renderer/Offscreen.tsx +4 -4
  320. package/src/renderer/__tests__/Data.spec.tsx +9 -10
  321. package/src/renderer/__tests__/Drawings.spec.tsx +11 -11
  322. package/src/renderer/__tests__/FitBox.spec.tsx +10 -10
  323. package/src/renderer/__tests__/Glyphs.spec.tsx +2 -2
  324. package/src/renderer/__tests__/Image.spec.tsx +2 -2
  325. package/src/renderer/__tests__/Paths.spec.tsx +8 -8
  326. package/src/renderer/__tests__/Picture.spec.tsx +10 -12
  327. package/src/renderer/__tests__/Simple.spec.tsx +6 -6
  328. package/src/renderer/__tests__/Surfaces.spec.tsx +2 -2
  329. package/src/renderer/__tests__/Text.spec.tsx +12 -12
  330. package/src/renderer/__tests__/Transform.spec.tsx +8 -8
  331. package/src/renderer/__tests__/documentation/Group.spec.tsx +12 -12
  332. package/src/renderer/__tests__/documentation/getting-started/HelloWorld.spec.tsx +2 -2
  333. package/src/renderer/__tests__/documentation/paint/Overview.spec.tsx +8 -8
  334. package/src/renderer/__tests__/documentation/shapes/Box.spec.tsx +4 -4
  335. package/src/renderer/__tests__/e2e/Atlas.spec.tsx +3 -3
  336. package/src/renderer/__tests__/e2e/Offscreen.spec.tsx +1 -1
  337. package/src/renderer/__tests__/examples/BlendModes.spec.tsx +4 -4
  338. package/src/renderer/__tests__/setup.tsx +13 -13
  339. package/src/sksg/Container.ts +9 -1
  340. package/src/sksg/HostConfig.ts +37 -7
  341. package/src/sksg/Reconciler.ts +17 -6
  342. package/src/sksg/__tests__/Simple.spec.tsx +8 -8
  343. package/lib/commonjs/sksg/HostConfig2.d.ts +0 -19
  344. package/lib/commonjs/sksg/HostConfig2.js +0 -159
  345. package/lib/commonjs/sksg/HostConfig2.js.map +0 -1
  346. package/lib/module/sksg/HostConfig2.d.ts +0 -19
  347. package/lib/module/sksg/HostConfig2.js +0 -152
  348. package/lib/module/sksg/HostConfig2.js.map +0 -1
  349. package/lib/typescript/lib/commonjs/sksg/HostConfig2.d.ts +0 -44
  350. package/lib/typescript/lib/module/sksg/HostConfig2.d.ts +0 -43
  351. package/lib/typescript/src/sksg/HostConfig2.d.ts +0 -19
  352. package/src/sksg/HostConfig2.ts +0 -247
@@ -8,22 +8,25 @@
8
8
  <key>BinaryPath</key>
9
9
  <string>libsvg.a</string>
10
10
  <key>LibraryIdentifier</key>
11
- <string>ios-arm64_arm64e</string>
11
+ <string>tvos-arm64_arm64e_x86_64-simulator</string>
12
12
  <key>LibraryPath</key>
13
13
  <string>libsvg.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
- <string>ios</string>
21
+ <string>tvos</string>
22
+ <key>SupportedPlatformVariant</key>
23
+ <string>simulator</string>
21
24
  </dict>
22
25
  <dict>
23
26
  <key>BinaryPath</key>
24
27
  <string>libsvg.a</string>
25
28
  <key>LibraryIdentifier</key>
26
- <string>tvos-arm64_arm64e_x86_64-simulator</string>
29
+ <string>ios-arm64_arm64e_x86_64-simulator</string>
27
30
  <key>LibraryPath</key>
28
31
  <string>libsvg.a</string>
29
32
  <key>SupportedArchitectures</key>
@@ -33,7 +36,7 @@
33
36
  <string>x86_64</string>
34
37
  </array>
35
38
  <key>SupportedPlatform</key>
36
- <string>tvos</string>
39
+ <string>ios</string>
37
40
  <key>SupportedPlatformVariant</key>
38
41
  <string>simulator</string>
39
42
  </dict>
@@ -56,7 +59,7 @@
56
59
  <key>BinaryPath</key>
57
60
  <string>libsvg.a</string>
58
61
  <key>LibraryIdentifier</key>
59
- <string>tvos-arm64_arm64e</string>
62
+ <string>ios-arm64_arm64e</string>
60
63
  <key>LibraryPath</key>
61
64
  <string>libsvg.a</string>
62
65
  <key>SupportedArchitectures</key>
@@ -65,25 +68,22 @@
65
68
  <string>arm64e</string>
66
69
  </array>
67
70
  <key>SupportedPlatform</key>
68
- <string>tvos</string>
71
+ <string>ios</string>
69
72
  </dict>
70
73
  <dict>
71
74
  <key>BinaryPath</key>
72
75
  <string>libsvg.a</string>
73
76
  <key>LibraryIdentifier</key>
74
- <string>ios-arm64_arm64e_x86_64-simulator</string>
77
+ <string>tvos-arm64_arm64e</string>
75
78
  <key>LibraryPath</key>
76
79
  <string>libsvg.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
- <string>ios</string>
85
- <key>SupportedPlatformVariant</key>
86
- <string>simulator</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": "1.11.8",
11
+ "version": "1.11.9-next.1",
12
12
  "description": "High-performance React Native Graphics using Skia",
13
13
  "main": "lib/module/index.js",
14
14
  "react-native": "src/index.ts",
@@ -76,9 +76,9 @@
76
76
  "licenseFilename": "LICENSE.md",
77
77
  "readmeFilename": "README.md",
78
78
  "peerDependencies": {
79
- "react": ">=18.0",
80
- "react-native": ">=0.64",
81
- "react-native-reanimated": ">=2.0.0"
79
+ "react": ">=19.0",
80
+ "react-native": ">=0.78",
81
+ "react-native-reanimated": ">=3.0.0"
82
82
  },
83
83
  "peerDependenciesMeta": {
84
84
  "react-native": {
@@ -108,10 +108,10 @@
108
108
  "pixelmatch": "5.3.0",
109
109
  "pngjs": "6.0.0",
110
110
  "prettier": "2.8.7",
111
- "react": "18.3.1",
112
- "react-native": "0.75.2",
111
+ "react": "19.0.0",
112
+ "react-native": "0.78.0",
113
113
  "react-native-builder-bob": "0.18.2",
114
- "react-native-reanimated": "^3.16.5",
114
+ "react-native-reanimated": "^3.17.1",
115
115
  "rimraf": "3.0.2",
116
116
  "semantic-release": "^24.1.0",
117
117
  "semantic-release-yarn": "^3.0.2",
@@ -122,7 +122,7 @@
122
122
  },
123
123
  "dependencies": {
124
124
  "canvaskit-wasm": "0.39.1",
125
- "react-reconciler": "0.27.0"
125
+ "react-reconciler": "0.31.0"
126
126
  },
127
127
  "eslintIgnore": [
128
128
  "node_modules/",
@@ -154,5 +154,6 @@
154
154
  }
155
155
  ]
156
156
  ]
157
- }
157
+ },
158
+ "stableVersion": "0.0.0"
158
159
  }
@@ -1,4 +1,4 @@
1
- import { useEffect, useMemo } from "react";
1
+ import { useEffect, useMemo, useState } from "react";
2
2
  import type { ReactElement } from "react";
3
3
  import type { SharedValue } from "react-native-reanimated";
4
4
 
@@ -27,13 +27,14 @@ const createTexture = (
27
27
 
28
28
  export const useTexture = (element: ReactElement, size: SkSize) => {
29
29
  const { width, height } = size;
30
- const picture = useMemo(() => {
31
- return drawAsPicture(element, {
30
+ const [picture, setPicture] = useState<SkPicture | null>(null);
31
+ useEffect(() => {
32
+ drawAsPicture(element, {
32
33
  x: 0,
33
34
  y: 0,
34
35
  width,
35
36
  height,
36
- });
37
+ }).then((pic) => setPicture(pic));
37
38
  }, [element, width, height]);
38
39
  return usePictureAsTexture(picture, size);
39
40
  };
@@ -29,9 +29,9 @@ export const getSkiaExports = () => {
29
29
  return { Skia };
30
30
  };
31
31
 
32
- export const drawOffscreen = (surface: SkSurface, element: ReactNode) => {
32
+ export const drawOffscreen = async (surface: SkSurface, element: ReactNode) => {
33
33
  const root = new SkiaSGRoot(Skia);
34
- root.render(element);
34
+ await root.render(element);
35
35
  const canvas = surface.getCanvas();
36
36
  root.drawOnCanvas(canvas);
37
37
  root.unmount();
@@ -1,6 +1,5 @@
1
1
  import type { FC } from "react";
2
2
  import React, {
3
- forwardRef,
4
3
  useCallback,
5
4
  useEffect,
6
5
  useImperativeHandle,
@@ -26,7 +25,7 @@ interface CanvasRef extends FC<CanvasProps> {
26
25
 
27
26
  export const useCanvasRef = () => useRef<CanvasRef>(null);
28
27
 
29
- const NativeSkiaPictureView = SkiaPictureViewNativeComponent;
28
+ //const NativeSkiaPictureView = SkiaPictureViewNativeComponent;
30
29
 
31
30
  // TODO: no need to go through the JS thread for this
32
31
  const useOnSizeEvent = (
@@ -52,87 +51,65 @@ export interface CanvasProps extends ViewProps {
52
51
  debug?: boolean;
53
52
  opaque?: boolean;
54
53
  onSize?: SharedValue<SkSize>;
55
- mode?: "continuous" | "default";
54
+ ref?: React.Ref<CanvasRef>;
56
55
  }
57
56
 
58
- export const Canvas = forwardRef(
59
- (
60
- {
61
- mode,
62
- debug,
63
- opaque,
64
- children,
65
- onSize,
66
- onLayout: _onLayout,
67
- ...viewProps
68
- }: CanvasProps,
69
- ref
70
- ) => {
71
- const rafId = useRef<number | null>(null);
72
- const onLayout = useOnSizeEvent(onSize, _onLayout);
73
- // Native ID
74
- const nativeId = useMemo(() => {
75
- return SkiaViewNativeId.current++;
76
- }, []);
57
+ export const Canvas = ({
58
+ debug,
59
+ opaque,
60
+ children,
61
+ onSize,
62
+ onLayout: _onLayout,
63
+ ref,
64
+ ...viewProps
65
+ }: CanvasProps) => {
66
+ const onLayout = useOnSizeEvent(onSize, _onLayout);
67
+ // Native ID
68
+ const nativeId = useMemo(() => {
69
+ return SkiaViewNativeId.current++;
70
+ }, []);
77
71
 
78
- // Root
79
- const root = useMemo(() => new SkiaSGRoot(Skia, nativeId), [nativeId]);
72
+ // Root
73
+ const root = useMemo(() => new SkiaSGRoot(Skia, nativeId), [nativeId]);
80
74
 
81
- // Render effects
82
- useEffect(() => {
83
- root.render(children);
84
- }, [children, root]);
75
+ // Render effects
76
+ useEffect(() => {
77
+ root.render(children);
78
+ }, [children, root]);
85
79
 
86
- useEffect(() => {
87
- return () => {
88
- root.unmount();
89
- };
90
- }, [root]);
80
+ useEffect(() => {
81
+ return () => {
82
+ root.unmount();
83
+ };
84
+ }, [root]);
91
85
 
92
- const requestRedraw = useCallback(() => {
93
- rafId.current = requestAnimationFrame(() => {
94
- root.render(children);
95
- if (mode === "continuous") {
96
- requestRedraw();
97
- }
98
- });
99
- }, [children, mode, root]);
100
-
101
- useEffect(() => {
102
- if (mode === "continuous") {
103
- console.warn("The `mode` property in `Canvas` is deprecated.");
104
- requestRedraw();
105
- }
106
- return () => {
107
- if (rafId.current !== null) {
108
- cancelAnimationFrame(rafId.current);
109
- }
110
- };
111
- }, [mode, requestRedraw]);
112
- // Component methods
113
- useImperativeHandle(ref, () => ({
114
- makeImageSnapshot: (rect?: SkRect) => {
115
- return SkiaViewApi.makeImageSnapshot(nativeId, rect);
116
- },
117
- makeImageSnapshotAsync: (rect?: SkRect) => {
118
- return SkiaViewApi.makeImageSnapshotAsync(nativeId, rect);
119
- },
120
- redraw: () => {
121
- SkiaViewApi.requestRedraw(nativeId);
122
- },
123
- getNativeId: () => {
124
- return nativeId;
125
- },
126
- }));
127
- return (
128
- <NativeSkiaPictureView
129
- collapsable={false}
130
- nativeID={`${nativeId}`}
131
- debug={debug}
132
- opaque={opaque}
133
- onLayout={onLayout}
134
- {...viewProps}
135
- />
136
- );
137
- }
138
- );
86
+ // Component methods
87
+ useImperativeHandle(
88
+ ref,
89
+ () =>
90
+ ({
91
+ makeImageSnapshot: (rect?: SkRect) => {
92
+ return SkiaViewApi.makeImageSnapshot(nativeId, rect);
93
+ },
94
+ makeImageSnapshotAsync: (rect?: SkRect) => {
95
+ return SkiaViewApi.makeImageSnapshotAsync(nativeId, rect);
96
+ },
97
+ redraw: () => {
98
+ SkiaViewApi.requestRedraw(nativeId);
99
+ },
100
+ getNativeId: () => {
101
+ return nativeId;
102
+ },
103
+ } as CanvasRef)
104
+ );
105
+ return (
106
+ <SkiaPictureViewNativeComponent
107
+ collapsable={false}
108
+ nativeID={`${nativeId}`}
109
+ debug={debug}
110
+ opaque={opaque}
111
+ onLayout={onLayout}
112
+ {...viewProps}
113
+ />
114
+ );
115
+ };
@@ -14,19 +14,19 @@ export const isOnMainThread = () => {
14
14
  );
15
15
  };
16
16
 
17
- export const drawAsPicture = (element: ReactElement, bounds?: SkRect) => {
17
+ export const drawAsPicture = async (element: ReactElement, bounds?: SkRect) => {
18
18
  const recorder = Skia.PictureRecorder();
19
19
  const canvas = recorder.beginRecording(bounds);
20
20
  const root = new SkiaSGRoot(Skia);
21
- root.render(element);
21
+ await root.render(element);
22
22
  root.drawOnCanvas(canvas);
23
23
  const picture = recorder.finishRecordingAsPicture();
24
24
  root.unmount();
25
25
  return picture;
26
26
  };
27
27
 
28
- export const drawAsImage = (element: ReactElement, size: SkSize) => {
29
- return drawAsImageFromPicture(drawAsPicture(element), size);
28
+ export const drawAsImage = async (element: ReactElement, size: SkSize) => {
29
+ return drawAsImageFromPicture(await drawAsPicture(element), size);
30
30
  };
31
31
 
32
32
  export const drawAsImageFromPicture = (picture: SkPicture, size: SkSize) => {
@@ -39,29 +39,28 @@ describe("Data Loading", () => {
39
39
  expect(SkiaRenderer).toBeDefined();
40
40
  });
41
41
  it("Should accept null as an argument", async () => {
42
- const { surface, draw } = mountCanvas(<CheckData />);
43
- draw();
42
+ const { surface, draw } = await mountCanvas(<CheckData />);
43
+ await draw();
44
44
  processResult(surface, "snapshots/font/green.png");
45
- await wait(42);
46
- draw();
45
+ await draw();
47
46
  processResult(surface, "snapshots/font/green.png");
48
47
  });
49
48
 
50
49
  it("Should load a font file", async () => {
51
- const { surface, draw } = mountCanvas(<CheckFont />);
52
- draw();
50
+ const { surface, draw } = await mountCanvas(<CheckFont />);
51
+ await draw();
53
52
  processResult(surface, "snapshots/font/red.png");
54
53
  await wait(1500);
55
- draw();
54
+ await draw();
56
55
  processResult(surface, "snapshots/font/green.png");
57
56
  });
58
57
 
59
58
  it("Should load an image", async () => {
60
- const { surface, draw } = mountCanvas(<CheckImage />);
61
- draw();
59
+ const { surface, draw } = await mountCanvas(<CheckImage />);
60
+ await draw();
62
61
  processResult(surface, "snapshots/font/red.png");
63
62
  await wait(1500);
64
- draw();
63
+ await draw();
65
64
  processResult(surface, "snapshots/font/green.png");
66
65
  });
67
66
  });
@@ -30,9 +30,9 @@ const CheckEmptyCanvas = () => {
30
30
  };
31
31
 
32
32
  describe("Test introductionary examples from our documentation", () => {
33
- it("Should blend colors using multiplication", () => {
33
+ it("Should blend colors using multiplication", async () => {
34
34
  const r = width * 0.33;
35
- const surface = drawOnNode(
35
+ const surface = await drawOnNode(
36
36
  <Group blendMode="multiply">
37
37
  <Circle cx={r} cy={r} r={r} color="cyan" />
38
38
  <Circle cx={width - r} cy={r} r={r} color="magenta" />
@@ -42,9 +42,9 @@ describe("Test introductionary examples from our documentation", () => {
42
42
  processResult(surface, "snapshots/drawings/blend-mode-multiply.png");
43
43
  });
44
44
 
45
- it("Should use a blur image filter", () => {
45
+ it("Should use a blur image filter", async () => {
46
46
  const r = width * 0.33;
47
- const surface = drawOnNode(
47
+ const surface = await drawOnNode(
48
48
  <Group blendMode="multiply">
49
49
  <Blur blur={30} />
50
50
  <Circle cx={r} cy={r} r={r} color="cyan" />
@@ -55,10 +55,10 @@ describe("Test introductionary examples from our documentation", () => {
55
55
  processResult(surface, "snapshots/drawings/blur-node.png");
56
56
  });
57
57
 
58
- it("Should use multiple paint definitions for one drawing command", () => {
58
+ it("Should use multiple paint definitions for one drawing command", async () => {
59
59
  const r = width / 4;
60
60
  const strokeWidth = 50;
61
- const surface = drawOnNode(
61
+ const surface = await drawOnNode(
62
62
  <>
63
63
  <Circle cx={width / 2} cy={width / 2} r={r} color="red">
64
64
  <Paint color="lightblue" />
@@ -70,7 +70,7 @@ describe("Test introductionary examples from our documentation", () => {
70
70
  processResult(surface, "snapshots/drawings/multiple-paints.png");
71
71
  });
72
72
 
73
- it("Should draw DRect", () => {
73
+ it("Should draw DRect", async () => {
74
74
  const { rrect, rect } = importSkia();
75
75
  const padding = 25 * PIXEL_RATIO;
76
76
  const outer = rrect(rect(0, 0, width, width), padding, padding);
@@ -79,18 +79,18 @@ describe("Test introductionary examples from our documentation", () => {
79
79
  padding * 2,
80
80
  padding * 2
81
81
  );
82
- const surface = drawOnNode(
82
+ const surface = await drawOnNode(
83
83
  <DiffRect inner={inner} outer={outer} color="lightblue" />
84
84
  );
85
85
  processResult(surface, docPath("shapes/drect.png"));
86
86
  });
87
87
 
88
88
  it("should clear the canvas even if it's empty", async () => {
89
- const { surface, draw } = mountCanvas(<CheckEmptyCanvas />);
90
- draw();
89
+ const { surface, draw } = await mountCanvas(<CheckEmptyCanvas />);
90
+ await draw();
91
91
  processResult(surface, "snapshots/green.png");
92
92
  await wait(1000);
93
- draw();
93
+ await draw();
94
94
  processResult(surface, "snapshots/transparent.png");
95
95
  });
96
96
  });
@@ -9,9 +9,9 @@ import { Circle, FitBox, Rect, Image, Group, fitbox } from "../components";
9
9
  import { drawOnNode, width, height, importSkia } from "./setup";
10
10
 
11
11
  describe("FitBox", () => {
12
- it("Should scale the rectangle in half", () => {
12
+ it("Should scale the rectangle in half", async () => {
13
13
  const { Skia } = importSkia();
14
- const surface = drawOnNode(
14
+ const surface = await drawOnNode(
15
15
  <FitBox
16
16
  src={Skia.XYWHRect(0, 0, width, height)}
17
17
  dst={Skia.XYWHRect(width / 4, height / 4, width / 2, height / 2)}
@@ -21,9 +21,9 @@ describe("FitBox", () => {
21
21
  );
22
22
  processResult(surface, "snapshots/drawings/lightblue-rect.png");
23
23
  });
24
- it("Should take the bottom right quarter of the circle and scale to the full canvas", () => {
24
+ it("Should take the bottom right quarter of the circle and scale to the full canvas", async () => {
25
25
  const { Skia } = importSkia();
26
- const surface = drawOnNode(
26
+ const surface = await drawOnNode(
27
27
  <FitBox
28
28
  src={Skia.XYWHRect(width / 2, height / 2, width / 2, height / 2)}
29
29
  dst={Skia.XYWHRect(0, 0, width, height)}
@@ -38,7 +38,7 @@ describe("FitBox", () => {
38
38
  );
39
39
  processResult(surface, "snapshots/drawings/lightblue-quarter-circle.png");
40
40
  });
41
- it("Should scale the image (1)", () => {
41
+ it("Should scale the image (1)", async () => {
42
42
  const { Skia, rect } = importSkia();
43
43
  const image = Skia.Image.MakeImageFromEncoded(
44
44
  Skia.Data.fromBytes(
@@ -47,7 +47,7 @@ describe("FitBox", () => {
47
47
  )
48
48
  )
49
49
  )!;
50
- const surface = drawOnNode(
50
+ const surface = await drawOnNode(
51
51
  <Group
52
52
  transform={fitbox(
53
53
  "cover",
@@ -66,7 +66,7 @@ describe("FitBox", () => {
66
66
  );
67
67
  processResult(surface, "snapshots/drawings/scaled-image.png");
68
68
  });
69
- it("Should scale the image (2)", () => {
69
+ it("Should scale the image (2)", async () => {
70
70
  const { Skia, rect } = importSkia();
71
71
  const image = Skia.Image.MakeImageFromEncoded(
72
72
  Skia.Data.fromBytes(
@@ -76,7 +76,7 @@ describe("FitBox", () => {
76
76
  )
77
77
  )!;
78
78
  const screen = rect(256, 128, 256, 512);
79
- const surface = drawOnNode(
79
+ const surface = await drawOnNode(
80
80
  <Group>
81
81
  <Image
82
82
  image={image}
@@ -95,7 +95,7 @@ describe("FitBox", () => {
95
95
  );
96
96
  processResult(surface, "snapshots/drawings/scaled-image2.png");
97
97
  });
98
- it("Should rotate and scale the image", () => {
98
+ it("Should rotate and scale the image", async () => {
99
99
  const { Skia, rect } = importSkia();
100
100
  const image = Skia.Image.MakeImageFromEncoded(
101
101
  Skia.Data.fromBytes(
@@ -107,7 +107,7 @@ describe("FitBox", () => {
107
107
  const screen = rect(256, 128, 256, 512);
108
108
  const imageRect = rect(0, 0, image.width(), image.height());
109
109
  const transform = fitbox("contain", imageRect, screen, 270);
110
- const surface = drawOnNode(
110
+ const surface = await drawOnNode(
111
111
  <Group>
112
112
  <Image
113
113
  image={image}
@@ -25,7 +25,7 @@ describe("Glyphs", () => {
25
25
  font = Skia.Font(tf!, 64);
26
26
  expect(font !== null).toBe(true);
27
27
  });
28
- it("Should draw glyphs in lightblue", () => {
28
+ it("Should draw glyphs in lightblue", async () => {
29
29
  const { Skia } = importSkia();
30
30
  const ids = font.getGlyphIDs("ab");
31
31
  const glyphs = [
@@ -38,7 +38,7 @@ describe("Glyphs", () => {
38
38
  ),
39
39
  },
40
40
  ];
41
- const surface = drawOnNode(
41
+ const surface = await drawOnNode(
42
42
  <Glyphs x={0} y={0} font={font} glyphs={glyphs} color="lightblue" />
43
43
  );
44
44
  processResult(surface, "snapshots/glyphs/simple.png");
@@ -9,7 +9,7 @@ import { Fill, ImageShader, Shader } from "../components";
9
9
  import { drawOnNode, width, height, importSkia } from "./setup";
10
10
 
11
11
  describe("Test Image Component", () => {
12
- it("Should display the image with a filter", () => {
12
+ it("Should display the image with a filter", async () => {
13
13
  const { Skia } = importSkia();
14
14
  const image = Skia.Image.MakeImageFromEncoded(
15
15
  Skia.Data.fromBytes(
@@ -26,7 +26,7 @@ half4 main(float2 xy) {
26
26
  xy.x += sin(xy.y / r) * 4;
27
27
  return image.eval(xy).rbga;
28
28
  }`)!;
29
- const surface = drawOnNode(
29
+ const surface = await drawOnNode(
30
30
  <Fill>
31
31
  <Shader source={filter} uniforms={{ r: 50 }}>
32
32
  <ImageShader
@@ -8,7 +8,7 @@ import { drawOnNode, width, importSkia } from "./setup";
8
8
  const size = width;
9
9
 
10
10
  describe("Path Examples", () => {
11
- it("Should draw an arc", () => {
11
+ it("Should draw an arc", async () => {
12
12
  const { Skia } = importSkia();
13
13
  const path = Skia.Path.Make();
14
14
  const arcRect = {
@@ -18,11 +18,11 @@ describe("Path Examples", () => {
18
18
  height: size,
19
19
  };
20
20
  path.addArc(arcRect, 45, 270);
21
- const surface = drawOnNode(<Path path={path} color="lightblue" />);
21
+ const surface = await drawOnNode(<Path path={path} color="lightblue" />);
22
22
  processResult(surface, "snapshots/paths/arc.png");
23
23
  });
24
24
 
25
- it("Should draw an oval", () => {
25
+ it("Should draw an oval", async () => {
26
26
  const { Skia } = importSkia();
27
27
  const path = Skia.Path.Make();
28
28
  const rct = {
@@ -32,11 +32,11 @@ describe("Path Examples", () => {
32
32
  height: size,
33
33
  };
34
34
  path.addOval(rct);
35
- const surface = drawOnNode(<Path path={path} color="lightblue" />);
35
+ const surface = await drawOnNode(<Path path={path} color="lightblue" />);
36
36
  processResult(surface, "snapshots/paths/oval.png");
37
37
  });
38
38
 
39
- it("Should draw an rounded rectangle", () => {
39
+ it("Should draw an rounded rectangle", async () => {
40
40
  const { Skia } = importSkia();
41
41
  const path = Skia.Path.Make();
42
42
  path.addRRect({
@@ -49,11 +49,11 @@ describe("Path Examples", () => {
49
49
  rx: size / 4,
50
50
  ry: size / 4,
51
51
  });
52
- const surface = drawOnNode(<Path path={path} color="lightblue" />);
52
+ const surface = await drawOnNode(<Path path={path} color="lightblue" />);
53
53
  processResult(surface, "snapshots/paths/rrect.png");
54
54
  });
55
55
 
56
- it("Should draw a polygon", () => {
56
+ it("Should draw a polygon", async () => {
57
57
  const { Skia, vec } = importSkia();
58
58
  const path = Skia.Path.Make();
59
59
  const r = size / 4;
@@ -67,7 +67,7 @@ describe("Path Examples", () => {
67
67
  true
68
68
  );
69
69
 
70
- const surface = drawOnNode(
70
+ const surface = await drawOnNode(
71
71
  <Path path={path} strokeWidth={4} style="stroke" color="lightblue" />
72
72
  );
73
73
  processResult(surface, "snapshots/paths/poly.png");