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

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 (304) hide show
  1. package/android/CMakeLists.txt +153 -30
  2. package/android/build.gradle +1 -1
  3. package/cpp/skia/include/codec/SkCodec.h +2 -7
  4. package/cpp/skia/include/config/SkUserConfig.h +0 -11
  5. package/cpp/skia/include/core/SkCanvas.h +7 -11
  6. package/cpp/skia/include/core/SkColor.h +0 -10
  7. package/cpp/skia/include/core/SkColorSpace.h +2 -184
  8. package/cpp/skia/include/core/SkColorType.h +32 -114
  9. package/cpp/skia/include/core/SkFontScanner.h +8 -5
  10. package/cpp/skia/include/core/SkFontStyle.h +1 -1
  11. package/cpp/skia/include/core/SkMaskFilter.h +8 -0
  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 +1 -3
  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 +0 -14
  18. package/cpp/skia/include/core/SkTypeface.h +7 -24
  19. package/cpp/skia/include/effects/SkGradientShader.h +1 -6
  20. package/cpp/skia/include/effects/SkRuntimeEffect.h +0 -1
  21. package/cpp/skia/include/encode/SkPngEncoder.h +0 -14
  22. package/cpp/skia/include/gpu/GpuTypes.h +0 -9
  23. package/cpp/skia/include/gpu/ganesh/GrContextOptions.h +133 -135
  24. package/cpp/skia/include/gpu/ganesh/GrDirectContext.h +0 -5
  25. package/cpp/skia/include/gpu/ganesh/GrDriverBugWorkarounds.h +3 -3
  26. package/cpp/skia/include/gpu/ganesh/GrTypes.h +9 -14
  27. package/cpp/skia/include/gpu/graphite/Context.h +2 -25
  28. package/cpp/skia/include/gpu/graphite/ContextOptions.h +5 -23
  29. package/cpp/skia/include/gpu/graphite/GraphiteTypes.h +1 -20
  30. package/cpp/skia/include/gpu/graphite/Image.h +0 -1
  31. package/cpp/skia/include/gpu/graphite/Recorder.h +0 -6
  32. package/cpp/skia/include/gpu/graphite/Recording.h +1 -3
  33. package/cpp/skia/include/gpu/graphite/mtl/MtlGraphiteTypes.h +36 -4
  34. package/cpp/skia/include/gpu/graphite/precompile/Precompile.h +2 -3
  35. package/cpp/skia/include/pathops/SkPathOps.h +1 -9
  36. package/cpp/skia/include/ports/SkFontMgr_FontConfigInterface.h +0 -3
  37. package/cpp/skia/include/private/SkPathRef.h +21 -15
  38. package/cpp/skia/include/private/base/SkAttributes.h +10 -16
  39. package/cpp/skia/include/private/base/SkMutex.h +0 -8
  40. package/cpp/skia/include/private/base/SkTArray.h +1 -1
  41. package/cpp/skia/include/private/base/SkTDArray.h +1 -1
  42. package/cpp/skia/include/private/base/SkTemplates.h +11 -24
  43. package/cpp/skia/include/private/gpu/ganesh/GrTypesPriv.h +1 -1
  44. package/cpp/skia/include/sksl/SkSLDebugTrace.h +3 -0
  45. package/cpp/skia/modules/skcms/src/Transform_inl.h +20 -20
  46. package/cpp/skia/modules/skcms/src/skcms_Transform.h +3 -4
  47. package/cpp/skia/modules/skcms/src/skcms_public.h +15 -19
  48. package/cpp/skia/modules/skresources/include/SkResources.h +1 -3
  49. package/cpp/skia/modules/svg/include/SkSVGCircle.h +1 -1
  50. package/cpp/skia/modules/svg/include/SkSVGContainer.h +1 -1
  51. package/cpp/skia/modules/svg/include/SkSVGFeLightSource.h +1 -1
  52. package/cpp/skia/modules/svg/include/SkSVGImage.h +2 -2
  53. package/cpp/skia/modules/svg/include/SkSVGPath.h +1 -1
  54. package/cpp/skia/modules/svg/include/SkSVGPoly.h +1 -1
  55. package/cpp/skia/modules/svg/include/SkSVGRect.h +1 -1
  56. package/cpp/skia/modules/svg/include/SkSVGRenderContext.h +0 -2
  57. package/cpp/skia/modules/svg/include/SkSVGShape.h +0 -1
  58. package/cpp/skia/modules/svg/include/SkSVGText.h +1 -1
  59. package/cpp/skia/modules/svg/include/SkSVGTransformableNode.h +0 -4
  60. package/cpp/skia/modules/svg/include/SkSVGUse.h +1 -1
  61. package/cpp/skia/src/core/SkLRUCache.h +13 -19
  62. package/cpp/skia/src/core/SkTHash.h +4 -50
  63. package/cpp/skia/src/gpu/ganesh/gl/GrGLDefines.h +0 -1
  64. package/lib/commonjs/external/reanimated/textures.js +3 -4
  65. package/lib/commonjs/external/reanimated/textures.js.map +1 -1
  66. package/lib/commonjs/headless/index.d.ts +1 -1
  67. package/lib/commonjs/headless/index.js +2 -2
  68. package/lib/commonjs/headless/index.js.map +1 -1
  69. package/lib/commonjs/renderer/Canvas.d.ts +2 -2
  70. package/lib/commonjs/renderer/Canvas.js +28 -11
  71. package/lib/commonjs/renderer/Canvas.js.map +1 -1
  72. package/lib/commonjs/renderer/Offscreen.d.ts +2 -2
  73. package/lib/commonjs/renderer/Offscreen.js +4 -4
  74. package/lib/commonjs/renderer/Offscreen.js.map +1 -1
  75. package/lib/commonjs/renderer/__tests__/setup.d.ts +5 -5
  76. package/lib/commonjs/sksg/Container.d.ts +1 -3
  77. package/lib/commonjs/sksg/Container.js +1 -7
  78. package/lib/commonjs/sksg/Container.js.map +1 -1
  79. package/lib/commonjs/sksg/HostConfig.d.ts +1 -1
  80. package/lib/commonjs/sksg/HostConfig.js +6 -36
  81. package/lib/commonjs/sksg/HostConfig.js.map +1 -1
  82. package/lib/commonjs/sksg/HostConfig2.d.ts +19 -0
  83. package/lib/commonjs/sksg/HostConfig2.js +159 -0
  84. package/lib/commonjs/sksg/HostConfig2.js.map +1 -0
  85. package/lib/commonjs/sksg/Reconciler.d.ts +2 -3
  86. package/lib/commonjs/sksg/Reconciler.js +6 -16
  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 +2 -1
  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 +5 -3
  95. package/lib/module/dom/nodes/datatypes/Rect.js.map +1 -1
  96. package/lib/module/external/reanimated/buffers.js +2 -1
  97. package/lib/module/external/reanimated/buffers.js.map +1 -1
  98. package/lib/module/external/reanimated/textures.js +4 -5
  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 +23 -10
  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 +28 -10
  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 +4 -1
  117. package/lib/module/skia/web/CanvasKitWebGLBufferImpl.js.map +1 -1
  118. package/lib/module/skia/web/Host.js +7 -1
  119. package/lib/module/skia/web/Host.js.map +1 -1
  120. package/lib/module/skia/web/JsiSkAnimatedImage.js +6 -3
  121. package/lib/module/skia/web/JsiSkAnimatedImage.js.map +1 -1
  122. package/lib/module/skia/web/JsiSkCanvas.js +6 -3
  123. package/lib/module/skia/web/JsiSkCanvas.js.map +1 -1
  124. package/lib/module/skia/web/JsiSkColorFilter.js +6 -3
  125. package/lib/module/skia/web/JsiSkColorFilter.js.map +1 -1
  126. package/lib/module/skia/web/JsiSkContourMeasure.js +6 -3
  127. package/lib/module/skia/web/JsiSkContourMeasure.js.map +1 -1
  128. package/lib/module/skia/web/JsiSkContourMeasureIter.js +6 -3
  129. package/lib/module/skia/web/JsiSkContourMeasureIter.js.map +1 -1
  130. package/lib/module/skia/web/JsiSkData.js +6 -3
  131. package/lib/module/skia/web/JsiSkData.js.map +1 -1
  132. package/lib/module/skia/web/JsiSkFont.js +6 -3
  133. package/lib/module/skia/web/JsiSkFont.js.map +1 -1
  134. package/lib/module/skia/web/JsiSkImage.js +12 -8
  135. package/lib/module/skia/web/JsiSkImage.js.map +1 -1
  136. package/lib/module/skia/web/JsiSkImageFilter.js +6 -3
  137. package/lib/module/skia/web/JsiSkImageFilter.js.map +1 -1
  138. package/lib/module/skia/web/JsiSkMaskFilter.js +6 -3
  139. package/lib/module/skia/web/JsiSkMaskFilter.js.map +1 -1
  140. package/lib/module/skia/web/JsiSkMatrix.js +8 -5
  141. package/lib/module/skia/web/JsiSkMatrix.js.map +1 -1
  142. package/lib/module/skia/web/JsiSkPaint.js +6 -3
  143. package/lib/module/skia/web/JsiSkPaint.js.map +1 -1
  144. package/lib/module/skia/web/JsiSkParagraphBuilder.js +3 -2
  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 +6 -3
  151. package/lib/module/skia/web/JsiSkPath.js.map +1 -1
  152. package/lib/module/skia/web/JsiSkPathEffect.js +6 -3
  153. package/lib/module/skia/web/JsiSkPathEffect.js.map +1 -1
  154. package/lib/module/skia/web/JsiSkPicture.js +6 -3
  155. package/lib/module/skia/web/JsiSkPicture.js.map +1 -1
  156. package/lib/module/skia/web/JsiSkPictureRecorder.js +6 -3
  157. package/lib/module/skia/web/JsiSkPictureRecorder.js.map +1 -1
  158. package/lib/module/skia/web/JsiSkPoint.js +6 -3
  159. package/lib/module/skia/web/JsiSkPoint.js.map +1 -1
  160. package/lib/module/skia/web/JsiSkRRect.js +6 -3
  161. package/lib/module/skia/web/JsiSkRRect.js.map +1 -1
  162. package/lib/module/skia/web/JsiSkRSXform.js +6 -3
  163. package/lib/module/skia/web/JsiSkRSXform.js.map +1 -1
  164. package/lib/module/skia/web/JsiSkRect.js +6 -3
  165. package/lib/module/skia/web/JsiSkRect.js.map +1 -1
  166. package/lib/module/skia/web/JsiSkRuntimeEffect.js +6 -3
  167. package/lib/module/skia/web/JsiSkRuntimeEffect.js.map +1 -1
  168. package/lib/module/skia/web/JsiSkSVG.js +8 -5
  169. package/lib/module/skia/web/JsiSkSVG.js.map +1 -1
  170. package/lib/module/skia/web/JsiSkShader.js +6 -3
  171. package/lib/module/skia/web/JsiSkShader.js.map +1 -1
  172. package/lib/module/skia/web/JsiSkSurface.js +6 -3
  173. package/lib/module/skia/web/JsiSkSurface.js.map +1 -1
  174. package/lib/module/skia/web/JsiSkTextBlob.js +6 -3
  175. package/lib/module/skia/web/JsiSkTextBlob.js.map +1 -1
  176. package/lib/module/skia/web/JsiSkTypeface.js +6 -3
  177. package/lib/module/skia/web/JsiSkTypeface.js.map +1 -1
  178. package/lib/module/skia/web/JsiSkTypefaceFontProvider.js +4 -1
  179. package/lib/module/skia/web/JsiSkTypefaceFontProvider.js.map +1 -1
  180. package/lib/module/skia/web/JsiSkVertices.js +6 -3
  181. package/lib/module/skia/web/JsiSkVertices.js.map +1 -1
  182. package/lib/module/skia/web/JsiVideo.js +5 -2
  183. package/lib/module/skia/web/JsiVideo.js.map +1 -1
  184. package/lib/module/sksg/Container.d.ts +1 -3
  185. package/lib/module/sksg/Container.js +8 -11
  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 +7 -36
  189. package/lib/module/sksg/HostConfig.js.map +1 -1
  190. package/lib/module/sksg/HostConfig2.d.ts +19 -0
  191. package/lib/module/sksg/HostConfig2.js +152 -0
  192. package/lib/module/sksg/HostConfig2.js.map +1 -0
  193. package/lib/module/sksg/Reconciler.d.ts +2 -3
  194. package/lib/module/sksg/Reconciler.js +11 -16
  195. package/lib/module/sksg/Reconciler.js.map +1 -1
  196. package/lib/module/sksg/Recorder/ReanimatedRecorder.js +5 -1
  197. package/lib/module/sksg/Recorder/ReanimatedRecorder.js.map +1 -1
  198. package/lib/module/sksg/Recorder/Recorder.js +6 -3
  199. package/lib/module/sksg/Recorder/Recorder.js.map +1 -1
  200. package/lib/module/sksg/Recorder/Visitor.js +1 -1
  201. package/lib/module/sksg/Recorder/Visitor.js.map +1 -1
  202. package/lib/module/sksg/Recorder/commands/Drawing.js +4 -2
  203. package/lib/module/sksg/Recorder/commands/Drawing.js.map +1 -1
  204. package/lib/module/sksg/Recorder/commands/Shaders.js +3 -2
  205. package/lib/module/sksg/Recorder/commands/Shaders.js.map +1 -1
  206. package/lib/module/views/SkiaBaseWebView.js +12 -9
  207. package/lib/module/views/SkiaBaseWebView.js.map +1 -1
  208. package/lib/module/views/SkiaPictureView.js +5 -1
  209. package/lib/module/views/SkiaPictureView.js.map +1 -1
  210. package/lib/module/views/SkiaPictureView.web.js +4 -1
  211. package/lib/module/views/SkiaPictureView.web.js.map +1 -1
  212. package/lib/module/web/LoadSkiaWeb.js +2 -1
  213. package/lib/module/web/LoadSkiaWeb.js.map +1 -1
  214. package/lib/module/web/WithSkiaWeb.js +1 -1
  215. package/lib/module/web/WithSkiaWeb.js.map +1 -1
  216. package/lib/typescript/lib/commonjs/headless/index.d.ts +1 -1
  217. package/lib/typescript/lib/commonjs/renderer/Canvas.d.ts +1 -9
  218. package/lib/typescript/lib/commonjs/renderer/Offscreen.d.ts +2 -2
  219. package/lib/typescript/lib/commonjs/sksg/Container.d.ts +0 -3
  220. package/lib/typescript/lib/commonjs/sksg/HostConfig.d.ts +4 -21
  221. package/lib/typescript/lib/commonjs/sksg/HostConfig2.d.ts +44 -0
  222. package/lib/typescript/lib/commonjs/sksg/Reconciler.d.ts +2 -9
  223. package/lib/typescript/lib/module/headless/index.d.ts +1 -1
  224. package/lib/typescript/lib/module/renderer/Canvas.d.ts +1 -9
  225. package/lib/typescript/lib/module/renderer/Offscreen.d.ts +2 -2
  226. package/lib/typescript/lib/module/skia/web/CanvasKitWebGLBufferImpl.d.ts +2 -2
  227. package/lib/typescript/lib/module/skia/web/JsiSkAnimatedImage.d.ts +0 -1
  228. package/lib/typescript/lib/module/skia/web/JsiSkCanvas.d.ts +0 -1
  229. package/lib/typescript/lib/module/skia/web/JsiSkColorFilter.d.ts +0 -1
  230. package/lib/typescript/lib/module/skia/web/JsiSkContourMeasure.d.ts +0 -1
  231. package/lib/typescript/lib/module/skia/web/JsiSkContourMeasureIter.d.ts +0 -1
  232. package/lib/typescript/lib/module/skia/web/JsiSkData.d.ts +0 -1
  233. package/lib/typescript/lib/module/skia/web/JsiSkFont.d.ts +0 -1
  234. package/lib/typescript/lib/module/skia/web/JsiSkImage.d.ts +0 -1
  235. package/lib/typescript/lib/module/skia/web/JsiSkImageFilter.d.ts +0 -1
  236. package/lib/typescript/lib/module/skia/web/JsiSkMaskFilter.d.ts +0 -1
  237. package/lib/typescript/lib/module/skia/web/JsiSkMatrix.d.ts +0 -1
  238. package/lib/typescript/lib/module/skia/web/JsiSkPaint.d.ts +0 -1
  239. package/lib/typescript/lib/module/skia/web/JsiSkPath.d.ts +0 -1
  240. package/lib/typescript/lib/module/skia/web/JsiSkPathEffect.d.ts +0 -1
  241. package/lib/typescript/lib/module/skia/web/JsiSkPicture.d.ts +0 -1
  242. package/lib/typescript/lib/module/skia/web/JsiSkPictureRecorder.d.ts +0 -1
  243. package/lib/typescript/lib/module/skia/web/JsiSkPoint.d.ts +0 -1
  244. package/lib/typescript/lib/module/skia/web/JsiSkRRect.d.ts +0 -1
  245. package/lib/typescript/lib/module/skia/web/JsiSkRSXform.d.ts +0 -1
  246. package/lib/typescript/lib/module/skia/web/JsiSkRect.d.ts +0 -1
  247. package/lib/typescript/lib/module/skia/web/JsiSkRuntimeEffect.d.ts +0 -1
  248. package/lib/typescript/lib/module/skia/web/JsiSkSVG.d.ts +0 -1
  249. package/lib/typescript/lib/module/skia/web/JsiSkShader.d.ts +0 -1
  250. package/lib/typescript/lib/module/skia/web/JsiSkSurface.d.ts +0 -1
  251. package/lib/typescript/lib/module/skia/web/JsiSkTextBlob.d.ts +0 -1
  252. package/lib/typescript/lib/module/skia/web/JsiSkTypeface.d.ts +0 -1
  253. package/lib/typescript/lib/module/skia/web/JsiSkTypefaceFontProvider.d.ts +0 -1
  254. package/lib/typescript/lib/module/skia/web/JsiSkVertices.d.ts +0 -1
  255. package/lib/typescript/lib/module/skia/web/JsiVideo.d.ts +2 -2
  256. package/lib/typescript/lib/module/sksg/Container.d.ts +12 -7
  257. package/lib/typescript/lib/module/sksg/HostConfig.d.ts +4 -20
  258. package/lib/typescript/lib/module/sksg/HostConfig2.d.ts +43 -0
  259. package/lib/typescript/lib/module/sksg/Reconciler.d.ts +17 -18
  260. package/lib/typescript/lib/module/sksg/Recorder/ReanimatedRecorder.d.ts +0 -1
  261. package/lib/typescript/lib/module/sksg/Recorder/Recorder.d.ts +2 -5
  262. package/lib/typescript/lib/module/views/SkiaBaseWebView.d.ts +11 -12
  263. package/lib/typescript/lib/module/views/SkiaPictureView.d.ts +2 -2
  264. package/lib/typescript/lib/module/views/SkiaPictureView.web.d.ts +1 -1
  265. package/lib/typescript/src/headless/index.d.ts +1 -1
  266. package/lib/typescript/src/renderer/Canvas.d.ts +2 -2
  267. package/lib/typescript/src/renderer/Offscreen.d.ts +2 -2
  268. package/lib/typescript/src/renderer/__tests__/setup.d.ts +5 -5
  269. package/lib/typescript/src/sksg/Container.d.ts +1 -3
  270. package/lib/typescript/src/sksg/HostConfig.d.ts +1 -1
  271. package/lib/typescript/src/sksg/HostConfig2.d.ts +19 -0
  272. package/lib/typescript/src/sksg/Reconciler.d.ts +2 -3
  273. package/package.json +9 -10
  274. package/src/external/reanimated/textures.tsx +4 -5
  275. package/src/headless/index.ts +2 -2
  276. package/src/renderer/Canvas.tsx +81 -57
  277. package/src/renderer/Offscreen.tsx +4 -4
  278. package/src/renderer/__tests__/Data.spec.tsx +10 -9
  279. package/src/renderer/__tests__/Drawings.spec.tsx +11 -11
  280. package/src/renderer/__tests__/FitBox.spec.tsx +10 -10
  281. package/src/renderer/__tests__/Glyphs.spec.tsx +2 -2
  282. package/src/renderer/__tests__/Image.spec.tsx +2 -2
  283. package/src/renderer/__tests__/Paths.spec.tsx +8 -8
  284. package/src/renderer/__tests__/Picture.spec.tsx +12 -10
  285. package/src/renderer/__tests__/Simple.spec.tsx +6 -6
  286. package/src/renderer/__tests__/Surfaces.spec.tsx +2 -2
  287. package/src/renderer/__tests__/Text.spec.tsx +12 -12
  288. package/src/renderer/__tests__/Transform.spec.tsx +8 -8
  289. package/src/renderer/__tests__/documentation/Group.spec.tsx +12 -12
  290. package/src/renderer/__tests__/documentation/getting-started/HelloWorld.spec.tsx +2 -2
  291. package/src/renderer/__tests__/documentation/paint/Overview.spec.tsx +8 -8
  292. package/src/renderer/__tests__/documentation/shapes/Box.spec.tsx +4 -4
  293. package/src/renderer/__tests__/e2e/Atlas.spec.tsx +3 -3
  294. package/src/renderer/__tests__/e2e/Offscreen.spec.tsx +1 -1
  295. package/src/renderer/__tests__/examples/BlendModes.spec.tsx +4 -4
  296. package/src/renderer/__tests__/setup.tsx +13 -13
  297. package/src/sksg/Container.ts +1 -9
  298. package/src/sksg/HostConfig.ts +7 -37
  299. package/src/sksg/HostConfig2.ts +247 -0
  300. package/src/sksg/Reconciler.ts +6 -17
  301. package/src/sksg/__tests__/Simple.spec.tsx +8 -8
  302. package/cpp/skia/include/gpu/graphite/LogPriority.h +0 -36
  303. package/cpp/skia/include/gpu/graphite/PrecompileContext.h +0 -52
  304. package/cpp/skia/include/gpu/graphite/mtl/MtlGraphiteTypesUtils.h +0 -48
@@ -3,47 +3,46 @@ export class SkiaSGRoot {
3
3
  Skia: any;
4
4
  container: {
5
5
  redraw(): void;
6
- recording: null;
7
- _root: any[];
8
- unmounted: boolean;
6
+ recording: {
7
+ commands: any;
8
+ paintPool: never[];
9
+ animationValues: any;
10
+ } | undefined;
9
11
  Skia: any;
10
12
  nativeId: any;
11
- root: any[];
12
13
  unmount(): void;
14
+ unmounted: boolean | undefined;
13
15
  drawOnCanvas(canvas: any): void;
14
16
  } | {
15
- mapperId: null;
16
17
  redraw(): void;
17
- recording: null;
18
- _root: any[];
19
- unmounted: boolean;
18
+ recording: {
19
+ commands: any;
20
+ paintPool: never[];
21
+ } | undefined;
22
+ mapperId: any;
20
23
  Skia: any;
21
24
  nativeId: any;
22
- root: any[];
23
25
  unmount(): void;
26
+ unmounted: boolean | undefined;
24
27
  drawOnCanvas(canvas: any): void;
25
28
  } | {
26
- mapperId: null;
27
29
  redraw(): void;
28
- _root: any[];
29
- recording: null;
30
- unmounted: boolean;
30
+ mapperId: any;
31
31
  Skia: any;
32
32
  nativeId: any;
33
- root: any[];
34
33
  unmount(): void;
34
+ unmounted: boolean | undefined;
35
35
  drawOnCanvas(canvas: any): void;
36
36
  };
37
37
  root: any;
38
38
  get sg(): {
39
39
  type: any;
40
40
  props: {};
41
- children: any[];
41
+ children: any;
42
42
  isDeclaration: boolean;
43
43
  };
44
- updateContainer(element: any): Promise<any>;
45
- render(element: any): Promise<void>;
44
+ render(element: any): void;
46
45
  drawOnCanvas(canvas: any): void;
47
46
  getPicture(): any;
48
- unmount(): Promise<any>;
47
+ unmount(): void;
49
48
  }
@@ -1,6 +1,5 @@
1
1
  export class ReanimatedRecorder {
2
2
  constructor(Skia: any);
3
- values: Set<any>;
4
3
  recorder: any;
5
4
  processAnimationValues(props: any): void;
6
5
  getRecorder(): any;
@@ -1,11 +1,8 @@
1
1
  export class Recorder {
2
- commands: any[];
3
- cursors: any[];
4
- animationValues: Set<any>;
5
2
  getRecording(): {
6
- commands: any[];
3
+ commands: any;
7
4
  paintPool: never[];
8
- animationValues: Set<any>;
5
+ animationValues: any;
9
6
  };
10
7
  processProps(props: any): {
11
8
  props: any;
@@ -1,18 +1,15 @@
1
1
  export class SkiaBaseWebView extends React.Component<any, any, any> {
2
2
  constructor(props: any);
3
- _surface: null;
4
- _unsubscriptions: any[];
5
- _canvas: null;
6
- _canvasRef: React.RefObject<any>;
7
- _redrawRequests: number;
8
- requestId: number;
9
- width: number;
10
- height: number;
11
3
  unsubscribeAll(): void;
4
+ _unsubscriptions: any[] | undefined;
12
5
  onLayoutEvent(evt: any): void;
6
+ width: any;
7
+ height: any;
8
+ _surface: JsiSkSurface | undefined;
9
+ _canvas: import("../skia/web/JsiSkCanvas").JsiSkCanvas | undefined;
13
10
  getSize(): {
14
- width: number;
15
- height: number;
11
+ width: any;
12
+ height: any;
16
13
  };
17
14
  componentDidMount(): void;
18
15
  componentDidUpdate(): void;
@@ -22,7 +19,7 @@ export class SkiaBaseWebView extends React.Component<any, any, any> {
22
19
  * @param rect Rect to use as bounds. Optional.
23
20
  * @returns An Image object.
24
21
  */
25
- makeImageSnapshot(rect: any): any;
22
+ makeImageSnapshot(rect: any): import("..").JsiSkImage | undefined;
26
23
  /**
27
24
  * Override to render
28
25
  */
@@ -30,8 +27,10 @@ export class SkiaBaseWebView extends React.Component<any, any, any> {
30
27
  * Sends a redraw request to the native SkiaView.
31
28
  */
32
29
  tick(): void;
30
+ _redrawRequests: number | undefined;
31
+ requestId: number | undefined;
33
32
  redraw(): void;
34
- onLayout: (evt: any) => void;
35
33
  render(): React.CElement<import("react-native").ViewProps, import("react-native").View>;
36
34
  }
37
35
  import React from "react";
36
+ import { JsiSkSurface } from "../skia/web/JsiSkSurface";
@@ -1,11 +1,11 @@
1
1
  export class SkiaPictureView extends React.Component<any, any, any> {
2
2
  constructor(props: any);
3
- requestId: number;
4
3
  _nativeId: number;
5
4
  get nativeId(): number;
6
5
  componentDidUpdate(prevProps: any): void;
7
6
  componentWillUnmount(): void;
8
7
  tick(): void;
8
+ requestId: number | undefined;
9
9
  /**
10
10
  * Creates a snapshot from the canvas in the surface
11
11
  * @param rect Rect to use as bounds. Optional.
@@ -16,6 +16,6 @@ export class SkiaPictureView extends React.Component<any, any, any> {
16
16
  * Sends a redraw request to the native SkiaView.
17
17
  */
18
18
  redraw(): void;
19
- render(): React.CElement<object, React.Component<object, {}, any> & import("react-native").NativeMethods>;
19
+ render(): React.CElement<object, React.Component<object, {}, any> & Readonly<import("react-native").NativeMethods>>;
20
20
  }
21
21
  import React from "react";
@@ -1,6 +1,6 @@
1
1
  export class SkiaPictureView extends SkiaBaseWebView {
2
- picture: null;
3
2
  setPicture(picture: any): void;
3
+ picture: any;
4
4
  renderInCanvas(canvas: any): void;
5
5
  }
6
6
  import { SkiaBaseWebView } from "./SkiaBaseWebView";
@@ -5,4 +5,4 @@ export declare const makeOffscreenSurface: (width: number, height: number) => Sk
5
5
  export declare const getSkiaExports: () => {
6
6
  Skia: import("../skia/types").Skia;
7
7
  };
8
- export declare const drawOffscreen: (surface: SkSurface, element: ReactNode) => Promise<import("../skia").SkImage>;
8
+ export declare const drawOffscreen: (surface: SkSurface, element: ReactNode) => import("../skia").SkImage;
@@ -14,7 +14,7 @@ export interface CanvasProps extends ViewProps {
14
14
  debug?: boolean;
15
15
  opaque?: boolean;
16
16
  onSize?: SharedValue<SkSize>;
17
- ref?: React.Ref<CanvasRef>;
17
+ mode?: "continuous" | "default";
18
18
  }
19
- export declare const Canvas: ({ debug, opaque, children, onSize, onLayout: _onLayout, ref, ...viewProps }: CanvasProps) => React.JSX.Element;
19
+ export declare const Canvas: React.ForwardRefExoticComponent<CanvasProps & React.RefAttributes<unknown>>;
20
20
  export {};
@@ -1,6 +1,6 @@
1
1
  import type { ReactElement } from "react";
2
2
  import type { SkPicture, SkRect, SkSize } from "../skia/types";
3
3
  export declare const isOnMainThread: () => boolean;
4
- export declare const drawAsPicture: (element: ReactElement, bounds?: SkRect) => Promise<SkPicture>;
5
- export declare const drawAsImage: (element: ReactElement, size: SkSize) => Promise<import("../skia").SkImage>;
4
+ export declare const drawAsPicture: (element: ReactElement, bounds?: SkRect) => SkPicture;
5
+ export declare const drawAsImage: (element: ReactElement, size: SkSize) => import("../skia").SkImage;
6
6
  export declare const drawAsImageFromPicture: (picture: SkPicture, size: SkSize) => import("../skia").SkImage;
@@ -43,13 +43,13 @@ export declare const center: {
43
43
  x: number;
44
44
  y: number;
45
45
  };
46
- export declare const drawOnNode: (element: ReactNode) => Promise<SkiaExports.SkSurface>;
47
- export declare const mountCanvas: (element: ReactNode) => Promise<{
46
+ export declare const drawOnNode: (element: ReactNode) => SkiaExports.SkSurface;
47
+ export declare const mountCanvas: (element: ReactNode) => {
48
48
  surface: SkiaExports.SkSurface;
49
49
  root: SkiaSGRoot;
50
- draw: () => Promise<void>;
51
- }>;
52
- export declare const serialize: (element: ReactNode) => Promise<string>;
50
+ draw: () => void;
51
+ };
52
+ export declare const serialize: (element: ReactNode) => string;
53
53
  export type EvalContext = Record<string, any>;
54
54
  interface TestingSurface {
55
55
  eval<Ctx extends EvalContext = EvalContext, R = any>(fn: (Skia: Skia, ctx: Ctx) => R, ctx?: Ctx): Promise<R>;
@@ -5,12 +5,10 @@ import "../views/api";
5
5
  export declare abstract class Container {
6
6
  protected Skia: Skia;
7
7
  protected nativeId: number;
8
- private _root;
8
+ root: Node[];
9
9
  protected recording: Recording | null;
10
10
  protected unmounted: boolean;
11
11
  constructor(Skia: Skia, nativeId: number);
12
- get root(): Node[];
13
- set root(value: Node[]);
14
12
  unmount(): void;
15
13
  drawOnCanvas(canvas: SkCanvas): void;
16
14
  abstract redraw(): void;
@@ -9,7 +9,7 @@ type TextInstance = Node;
9
9
  type SuspenseInstance = Instance;
10
10
  type HydratableInstance = Instance;
11
11
  type PublicInstance = Instance;
12
- type HostContext = object;
12
+ type HostContext = null;
13
13
  type UpdatePayload = Container;
14
14
  type ChildSet = Node[];
15
15
  type TimeoutHandle = NodeJS.Timeout;
@@ -0,0 +1,19 @@
1
+ import type { HostConfig } from "react-reconciler";
2
+ import type { NodeType } from "../dom/types";
3
+ import type { Container } from "./Container";
4
+ import type { Node } from "./Node";
5
+ export declare const debug: (message?: any, ...optionalParams: any[]) => void;
6
+ type Instance = Node<unknown>;
7
+ type Props = object;
8
+ type TextInstance = Node<unknown>;
9
+ type SuspenseInstance = Instance;
10
+ type HydratableInstance = Instance;
11
+ type PublicInstance = Instance;
12
+ type HostContext = null;
13
+ type UpdatePayload = Container;
14
+ type ChildSet = unknown;
15
+ type TimeoutHandle = NodeJS.Timeout;
16
+ type NoTimeout = -1;
17
+ type SkiaHostConfig = HostConfig<NodeType, Props, Container, Instance, TextInstance, SuspenseInstance, HydratableInstance, PublicInstance, HostContext, UpdatePayload, ChildSet, TimeoutHandle, NoTimeout>;
18
+ export declare const sksgHostConfig: SkiaHostConfig;
19
+ export {};
@@ -13,9 +13,8 @@ export declare class SkiaSGRoot {
13
13
  children: import("./Node").Node<unknown>[];
14
14
  isDeclaration: boolean;
15
15
  };
16
- private updateContainer;
17
- render(element: ReactNode): Promise<void>;
16
+ render(element: ReactNode): void;
18
17
  drawOnCanvas(canvas: SkCanvas): void;
19
18
  getPicture(): import("../skia/types").SkPicture;
20
- unmount(): Promise<unknown>;
19
+ unmount(): void;
21
20
  }
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.9-next.1",
11
+ "version": "1.11.10",
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": ">=19.0",
80
- "react-native": ">=0.78",
81
- "react-native-reanimated": ">=3.0.0"
79
+ "react": ">=18.0",
80
+ "react-native": ">=0.64",
81
+ "react-native-reanimated": ">=2.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": "19.0.0",
112
- "react-native": "0.78.0",
111
+ "react": "18.3.1",
112
+ "react-native": "0.75.2",
113
113
  "react-native-builder-bob": "0.18.2",
114
- "react-native-reanimated": "^3.17.1",
114
+ "react-native-reanimated": "^3.16.5",
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.31.0"
125
+ "react-reconciler": "0.27.0"
126
126
  },
127
127
  "eslintIgnore": [
128
128
  "node_modules/",
@@ -154,6 +154,5 @@
154
154
  }
155
155
  ]
156
156
  ]
157
- },
158
- "stableVersion": "0.0.0"
157
+ }
159
158
  }
@@ -1,4 +1,4 @@
1
- import { useEffect, useMemo, useState } from "react";
1
+ import { useEffect, useMemo } from "react";
2
2
  import type { ReactElement } from "react";
3
3
  import type { SharedValue } from "react-native-reanimated";
4
4
 
@@ -27,14 +27,13 @@ const createTexture = (
27
27
 
28
28
  export const useTexture = (element: ReactElement, size: SkSize) => {
29
29
  const { width, height } = size;
30
- const [picture, setPicture] = useState<SkPicture | null>(null);
31
- useEffect(() => {
32
- drawAsPicture(element, {
30
+ const picture = useMemo(() => {
31
+ return drawAsPicture(element, {
33
32
  x: 0,
34
33
  y: 0,
35
34
  width,
36
35
  height,
37
- }).then((pic) => setPicture(pic));
36
+ });
38
37
  }, [element, width, height]);
39
38
  return usePictureAsTexture(picture, size);
40
39
  };
@@ -29,9 +29,9 @@ export const getSkiaExports = () => {
29
29
  return { Skia };
30
30
  };
31
31
 
32
- export const drawOffscreen = async (surface: SkSurface, element: ReactNode) => {
32
+ export const drawOffscreen = (surface: SkSurface, element: ReactNode) => {
33
33
  const root = new SkiaSGRoot(Skia);
34
- await root.render(element);
34
+ root.render(element);
35
35
  const canvas = surface.getCanvas();
36
36
  root.drawOnCanvas(canvas);
37
37
  root.unmount();
@@ -1,8 +1,10 @@
1
1
  import type { FC } from "react";
2
2
  import React, {
3
+ forwardRef,
3
4
  useCallback,
4
5
  useEffect,
5
6
  useImperativeHandle,
7
+ useLayoutEffect,
6
8
  useMemo,
7
9
  useRef,
8
10
  } from "react";
@@ -25,7 +27,7 @@ interface CanvasRef extends FC<CanvasProps> {
25
27
 
26
28
  export const useCanvasRef = () => useRef<CanvasRef>(null);
27
29
 
28
- //const NativeSkiaPictureView = SkiaPictureViewNativeComponent;
30
+ const NativeSkiaPictureView = SkiaPictureViewNativeComponent;
29
31
 
30
32
  // TODO: no need to go through the JS thread for this
31
33
  const useOnSizeEvent = (
@@ -51,65 +53,87 @@ export interface CanvasProps extends ViewProps {
51
53
  debug?: boolean;
52
54
  opaque?: boolean;
53
55
  onSize?: SharedValue<SkSize>;
54
- ref?: React.Ref<CanvasRef>;
56
+ mode?: "continuous" | "default";
55
57
  }
56
58
 
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
- }, []);
59
+ export const Canvas = forwardRef(
60
+ (
61
+ {
62
+ mode,
63
+ debug,
64
+ opaque,
65
+ children,
66
+ onSize,
67
+ onLayout: _onLayout,
68
+ ...viewProps
69
+ }: CanvasProps,
70
+ ref
71
+ ) => {
72
+ const rafId = useRef<number | null>(null);
73
+ const onLayout = useOnSizeEvent(onSize, _onLayout);
74
+ // Native ID
75
+ const nativeId = useMemo(() => {
76
+ return SkiaViewNativeId.current++;
77
+ }, []);
71
78
 
72
- // Root
73
- const root = useMemo(() => new SkiaSGRoot(Skia, nativeId), [nativeId]);
79
+ // Root
80
+ const root = useMemo(() => new SkiaSGRoot(Skia, nativeId), [nativeId]);
74
81
 
75
- // Render effects
76
- useEffect(() => {
77
- root.render(children);
78
- }, [children, root]);
82
+ // Render effects
83
+ useLayoutEffect(() => {
84
+ root.render(children);
85
+ }, [children, root]);
79
86
 
80
- useEffect(() => {
81
- return () => {
82
- root.unmount();
83
- };
84
- }, [root]);
87
+ useEffect(() => {
88
+ return () => {
89
+ root.unmount();
90
+ };
91
+ }, [root]);
85
92
 
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
- };
93
+ const requestRedraw = useCallback(() => {
94
+ rafId.current = requestAnimationFrame(() => {
95
+ root.render(children);
96
+ if (mode === "continuous") {
97
+ requestRedraw();
98
+ }
99
+ });
100
+ }, [children, mode, root]);
101
+
102
+ useEffect(() => {
103
+ if (mode === "continuous") {
104
+ console.warn("The `mode` property in `Canvas` is deprecated.");
105
+ requestRedraw();
106
+ }
107
+ return () => {
108
+ if (rafId.current !== null) {
109
+ cancelAnimationFrame(rafId.current);
110
+ }
111
+ };
112
+ }, [mode, requestRedraw]);
113
+ // Component methods
114
+ useImperativeHandle(ref, () => ({
115
+ makeImageSnapshot: (rect?: SkRect) => {
116
+ return SkiaViewApi.makeImageSnapshot(nativeId, rect);
117
+ },
118
+ makeImageSnapshotAsync: (rect?: SkRect) => {
119
+ return SkiaViewApi.makeImageSnapshotAsync(nativeId, rect);
120
+ },
121
+ redraw: () => {
122
+ SkiaViewApi.requestRedraw(nativeId);
123
+ },
124
+ getNativeId: () => {
125
+ return nativeId;
126
+ },
127
+ }));
128
+ return (
129
+ <NativeSkiaPictureView
130
+ collapsable={false}
131
+ nativeID={`${nativeId}`}
132
+ debug={debug}
133
+ opaque={opaque}
134
+ onLayout={onLayout}
135
+ {...viewProps}
136
+ />
137
+ );
138
+ }
139
+ );
@@ -14,19 +14,19 @@ export const isOnMainThread = () => {
14
14
  );
15
15
  };
16
16
 
17
- export const drawAsPicture = async (element: ReactElement, bounds?: SkRect) => {
17
+ export const drawAsPicture = (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
- await root.render(element);
21
+ 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 = async (element: ReactElement, size: SkSize) => {
29
- return drawAsImageFromPicture(await drawAsPicture(element), size);
28
+ export const drawAsImage = (element: ReactElement, size: SkSize) => {
29
+ return drawAsImageFromPicture(drawAsPicture(element), size);
30
30
  };
31
31
 
32
32
  export const drawAsImageFromPicture = (picture: SkPicture, size: SkSize) => {
@@ -39,28 +39,29 @@ describe("Data Loading", () => {
39
39
  expect(SkiaRenderer).toBeDefined();
40
40
  });
41
41
  it("Should accept null as an argument", async () => {
42
- const { surface, draw } = await mountCanvas(<CheckData />);
43
- await draw();
42
+ const { surface, draw } = mountCanvas(<CheckData />);
43
+ draw();
44
44
  processResult(surface, "snapshots/font/green.png");
45
- await draw();
45
+ await wait(42);
46
+ draw();
46
47
  processResult(surface, "snapshots/font/green.png");
47
48
  });
48
49
 
49
50
  it("Should load a font file", async () => {
50
- const { surface, draw } = await mountCanvas(<CheckFont />);
51
- await draw();
51
+ const { surface, draw } = mountCanvas(<CheckFont />);
52
+ draw();
52
53
  processResult(surface, "snapshots/font/red.png");
53
54
  await wait(1500);
54
- await draw();
55
+ draw();
55
56
  processResult(surface, "snapshots/font/green.png");
56
57
  });
57
58
 
58
59
  it("Should load an image", async () => {
59
- const { surface, draw } = await mountCanvas(<CheckImage />);
60
- await draw();
60
+ const { surface, draw } = mountCanvas(<CheckImage />);
61
+ draw();
61
62
  processResult(surface, "snapshots/font/red.png");
62
63
  await wait(1500);
63
- await draw();
64
+ draw();
64
65
  processResult(surface, "snapshots/font/green.png");
65
66
  });
66
67
  });
@@ -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", async () => {
33
+ it("Should blend colors using multiplication", () => {
34
34
  const r = width * 0.33;
35
- const surface = await drawOnNode(
35
+ const surface = 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", async () => {
45
+ it("Should use a blur image filter", () => {
46
46
  const r = width * 0.33;
47
- const surface = await drawOnNode(
47
+ const surface = 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", async () => {
58
+ it("Should use multiple paint definitions for one drawing command", () => {
59
59
  const r = width / 4;
60
60
  const strokeWidth = 50;
61
- const surface = await drawOnNode(
61
+ const surface = 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", async () => {
73
+ it("Should draw DRect", () => {
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 = await drawOnNode(
82
+ const surface = 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 } = await mountCanvas(<CheckEmptyCanvas />);
90
- await draw();
89
+ const { surface, draw } = mountCanvas(<CheckEmptyCanvas />);
90
+ draw();
91
91
  processResult(surface, "snapshots/green.png");
92
92
  await wait(1000);
93
- await draw();
93
+ draw();
94
94
  processResult(surface, "snapshots/transparent.png");
95
95
  });
96
96
  });