@shopify/react-native-skia 2.11.0-next.2 → 2.12.0-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 (328) hide show
  1. package/cpp/api/recorder/Convertor.h +57 -9
  2. package/cpp/api/third_party/SkottieUtils.cpp +1 -1
  3. package/cpp/dawn/include/dawn/dawn_proc_table.h +4 -4
  4. package/cpp/dawn/include/dawn/dawn_version.h +1 -1
  5. package/cpp/dawn/include/dawn/native/D3D12Backend.h +18 -1
  6. package/cpp/dawn/include/dawn/native/DawnNative.h +1 -2
  7. package/cpp/dawn/include/dawn/platform/DawnPlatform.h +8 -11
  8. package/cpp/dawn/include/dawn/webgpu_cpp_print.h +91 -79
  9. package/cpp/dawn/include/tint/tint.h +1 -0
  10. package/cpp/dawn/include/webgpu/webgpu.h +86 -44
  11. package/cpp/dawn/include/webgpu/webgpu_cpp.h +556 -283
  12. package/cpp/dawn/include/webgpu/webgpu_cpp_chained_struct.h +1 -1
  13. package/cpp/dawn/include/webgpu/webgpu_enum_class_bitmasks.h +2 -1
  14. package/cpp/skia/include/android/SkAndroidFrameworkUtils.h +0 -2
  15. package/cpp/skia/include/android/vk/AndroidVulkanMemoryAllocator.h +1 -1
  16. package/cpp/skia/include/codec/SkAndroidCodec.h +1 -1
  17. package/cpp/skia/include/codec/SkAvifDecoder.h +1 -1
  18. package/cpp/skia/include/codec/SkBmpDecoder.h +1 -1
  19. package/cpp/skia/include/codec/SkBmpRustDecoder.h +42 -0
  20. package/cpp/skia/include/codec/SkCodec.h +3 -2
  21. package/cpp/skia/include/codec/SkGifDecoder.h +1 -1
  22. package/cpp/skia/include/codec/SkIcoDecoder.h +1 -1
  23. package/cpp/skia/include/codec/SkJpegDecoder.h +1 -1
  24. package/cpp/skia/include/codec/SkJpegxlDecoder.h +1 -1
  25. package/cpp/skia/include/codec/SkPixmapUtils.h +1 -1
  26. package/cpp/skia/include/codec/SkPngDecoder.h +1 -1
  27. package/cpp/skia/include/codec/SkPngRustDecoder.h +1 -1
  28. package/cpp/skia/include/codec/SkRawDecoder.h +1 -1
  29. package/cpp/skia/include/codec/SkWbmpDecoder.h +1 -1
  30. package/cpp/skia/include/codec/SkWebpDecoder.h +1 -1
  31. package/cpp/skia/include/core/SkBitmap.h +3 -3
  32. package/cpp/skia/include/core/SkCPUContext.h +1 -1
  33. package/cpp/skia/include/core/SkCPURecorder.h +2 -3
  34. package/cpp/skia/include/core/SkCanvas.h +23 -15
  35. package/cpp/skia/include/core/SkColor.h +2 -2
  36. package/cpp/skia/include/core/SkColorFilter.h +1 -1
  37. package/cpp/skia/include/core/SkColorSpace.h +2 -2
  38. package/cpp/skia/include/core/SkColorTable.h +1 -1
  39. package/cpp/skia/include/core/SkContourMeasure.h +1 -1
  40. package/cpp/skia/include/core/SkData.h +1 -1
  41. package/cpp/skia/include/core/SkDataTable.h +2 -2
  42. package/cpp/skia/include/core/SkDocument.h +1 -1
  43. package/cpp/skia/include/core/SkDrawable.h +1 -1
  44. package/cpp/skia/include/core/SkFont.h +2 -2
  45. package/cpp/skia/include/core/SkFontMetrics.h +1 -1
  46. package/cpp/skia/include/core/SkFontMgr.h +1 -1
  47. package/cpp/skia/include/core/SkFontScanner.h +3 -3
  48. package/cpp/skia/include/core/SkFontStyle.h +1 -1
  49. package/cpp/skia/include/core/SkGraphics.h +1 -1
  50. package/cpp/skia/include/core/SkImage.h +1 -1
  51. package/cpp/skia/include/core/SkImageFilter.h +1 -1
  52. package/cpp/skia/include/core/SkImageGenerator.h +1 -1
  53. package/cpp/skia/include/core/SkImageInfo.h +4 -4
  54. package/cpp/skia/include/core/SkMatrix.h +3 -3
  55. package/cpp/skia/include/core/SkMesh.h +2 -2
  56. package/cpp/skia/include/core/SkMilestone.h +1 -1
  57. package/cpp/skia/include/core/SkOverdrawCanvas.h +1 -1
  58. package/cpp/skia/include/core/SkPaint.h +4 -4
  59. package/cpp/skia/include/core/SkPath.h +5 -23
  60. package/cpp/skia/include/core/SkPathBuilder.h +4 -2
  61. package/cpp/skia/include/core/SkPathMeasure.h +1 -1
  62. package/cpp/skia/include/core/SkPictureRecorder.h +1 -1
  63. package/cpp/skia/include/core/SkPixelRef.h +3 -5
  64. package/cpp/skia/include/core/SkPixmap.h +7 -2
  65. package/cpp/skia/include/core/SkPoint.h +555 -5
  66. package/cpp/skia/include/core/SkPoint3.h +2 -2
  67. package/cpp/skia/include/core/SkRRect.h +9 -1
  68. package/cpp/skia/include/core/SkRSXform.h +1 -1
  69. package/cpp/skia/include/core/SkRecorder.h +2 -3
  70. package/cpp/skia/include/core/SkRect.h +3 -3
  71. package/cpp/skia/include/core/SkRefCnt.h +1 -1
  72. package/cpp/skia/include/core/SkRegion.h +4 -4
  73. package/cpp/skia/include/core/SkScalar.h +2 -3
  74. package/cpp/skia/include/core/SkSerialProcs.h +1 -1
  75. package/cpp/skia/include/core/SkShader.h +1 -1
  76. package/cpp/skia/include/core/SkSize.h +1 -1
  77. package/cpp/skia/include/core/SkSpan.h +165 -4
  78. package/cpp/skia/include/core/SkStream.h +2 -2
  79. package/cpp/skia/include/core/SkStrikeRef.h +16 -0
  80. package/cpp/skia/include/core/SkString.h +2 -2
  81. package/cpp/skia/include/core/SkStrokeRec.h +1 -1
  82. package/cpp/skia/include/core/SkSurfaceProps.h +1 -1
  83. package/cpp/skia/include/core/SkSwizzle.h +1 -1
  84. package/cpp/skia/include/core/SkTextBlob.h +2 -2
  85. package/cpp/skia/include/core/SkTiledImageUtils.h +1 -1
  86. package/cpp/skia/include/core/SkTypeface.h +8 -2
  87. package/cpp/skia/include/core/SkTypes.h +6 -6
  88. package/cpp/skia/include/core/SkUnPreMultiply.h +1 -1
  89. package/cpp/skia/include/core/SkVertices.h +1 -1
  90. package/cpp/skia/include/core/SkYUVAPixmaps.h +1 -1
  91. package/cpp/skia/include/docs/SkPDFDocument.h +9 -3
  92. package/cpp/skia/include/effects/SkGradient.h +1 -1
  93. package/cpp/skia/include/effects/SkPerlinNoiseShader.h +1 -1
  94. package/cpp/skia/include/effects/SkRuntimeEffect.h +4 -4
  95. package/cpp/skia/include/encode/SkEncoder.h +3 -3
  96. package/cpp/skia/include/encode/SkICC.h +1 -1
  97. package/cpp/skia/include/encode/SkJpegEncoder.h +1 -1
  98. package/cpp/skia/include/encode/SkPngEncoder.h +1 -1
  99. package/cpp/skia/include/encode/SkPngRustEncoder.h +16 -1
  100. package/cpp/skia/include/encode/SkWebpEncoder.h +1 -1
  101. package/cpp/skia/include/gpu/GpuTypes.h +1 -1
  102. package/cpp/skia/include/gpu/MutableTextureState.h +1 -1
  103. package/cpp/skia/include/gpu/ganesh/GrBackendSemaphore.h +2 -2
  104. package/cpp/skia/include/gpu/ganesh/GrBackendSurface.h +3 -3
  105. package/cpp/skia/include/gpu/ganesh/GrDriverBugWorkaroundsAutogen.h +39 -37
  106. package/cpp/skia/include/gpu/ganesh/GrExternalTextureGenerator.h +1 -1
  107. package/cpp/skia/include/gpu/ganesh/GrRecordingContext.h +3 -2
  108. package/cpp/skia/include/gpu/ganesh/GrTypes.h +1 -1
  109. package/cpp/skia/include/gpu/ganesh/SkImageGanesh.h +1 -1
  110. package/cpp/skia/include/gpu/ganesh/SkMeshGanesh.h +1 -1
  111. package/cpp/skia/include/gpu/ganesh/SkSurfaceGanesh.h +1 -1
  112. package/cpp/skia/include/gpu/ganesh/d3d/GrD3DBackendSemaphore.h +1 -1
  113. package/cpp/skia/include/gpu/ganesh/d3d/GrD3DBackendSurface.h +1 -1
  114. package/cpp/skia/include/gpu/ganesh/d3d/GrD3DDirectContext.h +1 -1
  115. package/cpp/skia/include/gpu/ganesh/gl/GrGLAssembleInterface.h +1 -1
  116. package/cpp/skia/include/gpu/ganesh/gl/GrGLBackendSurface.h +1 -1
  117. package/cpp/skia/include/gpu/ganesh/gl/GrGLConfig.h +1 -1
  118. package/cpp/skia/include/gpu/ganesh/gl/GrGLDirectContext.h +1 -1
  119. package/cpp/skia/include/gpu/ganesh/gl/GrGLExtensions.h +2 -2
  120. package/cpp/skia/include/gpu/ganesh/gl/GrGLFunctions.h +1 -1
  121. package/cpp/skia/include/gpu/ganesh/gl/GrGLMakeWebGLInterface.h +1 -1
  122. package/cpp/skia/include/gpu/ganesh/gl/epoxy/GrGLMakeEpoxyEGLInterface.h +1 -1
  123. package/cpp/skia/include/gpu/ganesh/gl/glx/GrGLMakeGLXInterface.h +1 -1
  124. package/cpp/skia/include/gpu/ganesh/gl/ios/GrGLMakeIOSInterface.h +1 -1
  125. package/cpp/skia/include/gpu/ganesh/gl/mac/GrGLMakeMacInterface.h +1 -1
  126. package/cpp/skia/include/gpu/ganesh/gl/win/GrGLMakeWinInterface.h +1 -1
  127. package/cpp/skia/include/gpu/ganesh/mock/GrMockBackendSurface.h +1 -1
  128. package/cpp/skia/include/gpu/ganesh/mock/GrMockTypes.h +1 -1
  129. package/cpp/skia/include/gpu/ganesh/mtl/GrMtlBackendSemaphore.h +1 -1
  130. package/cpp/skia/include/gpu/ganesh/mtl/GrMtlBackendSurface.h +1 -1
  131. package/cpp/skia/include/gpu/ganesh/mtl/GrMtlDirectContext.h +1 -1
  132. package/cpp/skia/include/gpu/ganesh/vk/GrVkBackendSemaphore.h +1 -1
  133. package/cpp/skia/include/gpu/ganesh/vk/GrVkBackendSurface.h +1 -1
  134. package/cpp/skia/include/gpu/ganesh/vk/GrVkDirectContext.h +1 -1
  135. package/cpp/skia/include/gpu/graphite/BackendSemaphore.h +2 -2
  136. package/cpp/skia/include/gpu/graphite/BackendTexture.h +2 -2
  137. package/cpp/skia/include/gpu/graphite/Context.h +3 -3
  138. package/cpp/skia/include/gpu/graphite/ContextOptions.h +8 -2
  139. package/cpp/skia/include/gpu/graphite/PersistentPipelineStorage.h +1 -1
  140. package/cpp/skia/include/gpu/graphite/PrecompileContext.h +16 -2
  141. package/cpp/skia/include/gpu/graphite/Recorder.h +8 -7
  142. package/cpp/skia/include/gpu/graphite/Recording.h +6 -4
  143. package/cpp/skia/include/gpu/graphite/TextureInfo.h +2 -2
  144. package/cpp/skia/include/gpu/graphite/dawn/DawnGraphiteTypes.h +1 -1
  145. package/cpp/skia/include/gpu/graphite/mtl/MtlBackendContext.h +1 -1
  146. package/cpp/skia/include/gpu/graphite/mtl/MtlGraphiteTypes.h +1 -1
  147. package/cpp/skia/include/gpu/graphite/mtl/MtlGraphiteTypes_cpp.h +1 -1
  148. package/cpp/skia/include/gpu/graphite/precompile/PaintOptions.h +2 -2
  149. package/cpp/skia/include/gpu/graphite/precompile/PrecompileImageFilter.h +1 -1
  150. package/cpp/skia/include/gpu/graphite/vk/VulkanGraphiteContext.h +1 -1
  151. package/cpp/skia/include/gpu/vk/VulkanBackendContext.h +1 -1
  152. package/cpp/skia/include/gpu/vk/VulkanExtensions.h +3 -3
  153. package/cpp/skia/include/gpu/vk/VulkanMutableTextureState.h +1 -1
  154. package/cpp/skia/include/gpu/vk/VulkanPreferredFeatures.h +1 -1
  155. package/cpp/skia/include/gpu/vk/VulkanTypes.h +1 -1
  156. package/cpp/skia/include/pathops/SkPathOps.h +2 -2
  157. package/cpp/skia/include/ports/SkImageGeneratorCG.h +2 -2
  158. package/cpp/skia/include/ports/SkImageGeneratorWIC.h +2 -2
  159. package/cpp/skia/include/private/{base/SingleOwner.h → SingleOwner.h} +5 -5
  160. package/cpp/skia/include/private/{base/SkAPI.h → SkAPI.h} +1 -1
  161. package/cpp/skia/include/private/{base/SkAlign.h → SkAlign.h} +1 -1
  162. package/cpp/skia/include/private/{base/SkAnySubclass.h → SkAnySubclass.h} +1 -1
  163. package/cpp/skia/include/private/{base/SkAssert.h → SkAssert.h} +4 -4
  164. package/cpp/skia/include/private/{base/SkAttributes.h → SkAttributes.h} +2 -2
  165. package/cpp/skia/include/private/{base/SkContainers.h → SkContainers.h} +3 -3
  166. package/cpp/skia/include/private/{base/SkDebug.h → SkDebug.h} +3 -3
  167. package/cpp/skia/include/private/{base/SkDeque.h → SkDeque.h} +1 -1
  168. package/cpp/skia/include/private/SkEncodedInfo.h +2 -2
  169. package/cpp/skia/include/private/SkEnumBitMask.h +92 -0
  170. package/cpp/skia/include/private/SkExif.h +1 -1
  171. package/cpp/skia/include/private/{base/SkFixed.h → SkFixed.h} +4 -4
  172. package/cpp/skia/include/private/{base/SkFloatingPoint.h → SkFloatingPoint.h} +2 -2
  173. package/cpp/skia/include/private/SkGainmapShader.h +1 -1
  174. package/cpp/skia/include/private/SkHdrMetadata.h +1 -1
  175. package/cpp/skia/include/private/SkIDChangeListener.h +3 -3
  176. package/cpp/skia/include/private/{base/SkLoadUserConfig.h → SkLoadUserConfig.h} +2 -2
  177. package/cpp/skia/include/private/{base/SkLog.h → SkLog.h} +4 -4
  178. package/cpp/skia/include/private/{base/SkMacros.h → SkMacros.h} +1 -1
  179. package/cpp/skia/include/private/{base/SkMalloc.h → SkMalloc.h} +1 -1
  180. package/cpp/skia/include/private/{base/SkMath.h → SkMath.h} +2 -2
  181. package/cpp/skia/include/private/{base/SkMutex.h → SkMutex.h} +5 -5
  182. package/cpp/skia/include/private/{base/SkNoncopyable.h → SkNoncopyable.h} +1 -1
  183. package/cpp/skia/include/private/{base/SkOnce.h → SkOnce.h} +1 -1
  184. package/cpp/skia/include/private/SkPathRef.h +4 -4
  185. package/cpp/skia/include/private/SkPixelStorage.h +20 -5
  186. package/cpp/skia/include/private/{base/SkSafe32.h → SkSafe32.h} +2 -2
  187. package/cpp/skia/include/private/{base/SkSemaphore.h → SkSemaphore.h} +3 -3
  188. package/cpp/skia/include/private/{base/SkTArray.h → SkTArray.h} +10 -11
  189. package/cpp/skia/include/private/{base/SkTDArray.h → SkTDArray.h} +4 -4
  190. package/cpp/skia/include/private/{base/SkTFitsIn.h → SkTFitsIn.h} +0 -2
  191. package/cpp/skia/include/private/{base/SkTLogic.h → SkTLogic.h} +1 -1
  192. package/cpp/skia/include/private/{base/SkTemplates.h → SkTemplates.h} +5 -6
  193. package/cpp/skia/include/private/{base/SkThreadAnnotations.h → SkThreadAnnotations.h} +1 -1
  194. package/cpp/skia/include/private/{base/SkThreadID.h → SkThreadID.h} +2 -2
  195. package/cpp/skia/include/private/{base/SkTo.h → SkTo.h} +2 -2
  196. package/cpp/skia/include/private/{base/SkTypeTraits.h → SkTypeTraits.h} +20 -0
  197. package/cpp/skia/include/private/SkXmp.h +1 -1
  198. package/cpp/skia/include/private/chromium/GrDeferredDisplayList.h +1 -1
  199. package/cpp/skia/include/private/chromium/GrSurfaceCharacterization.h +1 -1
  200. package/cpp/skia/include/private/chromium/SkChromeRemoteGlyphCache.h +1 -1
  201. package/cpp/skia/include/private/chromium/SkCodecsICCProfileChromium.h +1 -1
  202. package/cpp/skia/include/private/chromium/SkExifChromium.h +1 -1
  203. package/cpp/skia/include/private/chromium/SkImageChromium.h +1 -1
  204. package/cpp/skia/include/private/chromium/SkPMColor.h +1 -1
  205. package/cpp/skia/include/private/chromium/Slug.h +1 -1
  206. package/cpp/skia/include/private/gpu/ganesh/GrContext_Base.h +1 -1
  207. package/cpp/skia/include/private/gpu/ganesh/GrImageContext.h +2 -2
  208. package/cpp/skia/include/private/gpu/ganesh/GrTextureGenerator.h +1 -1
  209. package/cpp/skia/include/private/gpu/ganesh/GrTypesPriv.h +4 -4
  210. package/cpp/skia/include/utils/SkCamera.h +1 -1
  211. package/cpp/skia/include/utils/SkNWayCanvas.h +1 -1
  212. package/cpp/skia/include/utils/SkPaintFilterCanvas.h +1 -1
  213. package/cpp/skia/modules/jsonreader/SkJSONReader.cpp +6 -6
  214. package/cpp/skia/modules/jsonreader/SkJSONReader.h +2 -2
  215. package/cpp/skia/modules/skottie/include/SkottieProperty.h +1 -1
  216. package/cpp/skia/modules/skottie/include/SlotManager.h +2 -2
  217. package/cpp/skia/modules/skottie/include/TextShaper.h +1 -1
  218. package/cpp/skia/modules/skottie/src/text/Font.h +1 -1
  219. package/cpp/skia/modules/skparagraph/include/ParagraphCache.h +1 -1
  220. package/cpp/skia/modules/skparagraph/include/TypefaceFontProvider.h +1 -1
  221. package/cpp/skia/modules/skresources/include/SkResources.h +1 -1
  222. package/cpp/skia/modules/sksg/include/SkSGNode.h +1 -1
  223. package/cpp/skia/modules/sksg/include/SkSGRect.h +1 -1
  224. package/cpp/skia/modules/sksg/include/SkSGRenderEffect.h +1 -1
  225. package/cpp/skia/modules/skunicode/include/SkUnicode.h +3 -3
  226. package/cpp/skia/modules/svg/include/SkSVGAttributeParser.h +1 -1
  227. package/cpp/skia/modules/svg/include/SkSVGCircle.h +1 -1
  228. package/cpp/skia/modules/svg/include/SkSVGClipPath.h +1 -1
  229. package/cpp/skia/modules/svg/include/SkSVGContainer.h +2 -2
  230. package/cpp/skia/modules/svg/include/SkSVGDOM.h +1 -1
  231. package/cpp/skia/modules/svg/include/SkSVGEllipse.h +1 -1
  232. package/cpp/skia/modules/svg/include/SkSVGFe.h +1 -1
  233. package/cpp/skia/modules/svg/include/SkSVGFeBlend.h +1 -1
  234. package/cpp/skia/modules/svg/include/SkSVGFeColorMatrix.h +1 -1
  235. package/cpp/skia/modules/svg/include/SkSVGFeComponentTransfer.h +1 -1
  236. package/cpp/skia/modules/svg/include/SkSVGFeComposite.h +1 -1
  237. package/cpp/skia/modules/svg/include/SkSVGFeDisplacementMap.h +1 -1
  238. package/cpp/skia/modules/svg/include/SkSVGFeFlood.h +1 -1
  239. package/cpp/skia/modules/svg/include/SkSVGFeGaussianBlur.h +1 -1
  240. package/cpp/skia/modules/svg/include/SkSVGFeImage.h +1 -1
  241. package/cpp/skia/modules/svg/include/SkSVGFeLightSource.h +2 -2
  242. package/cpp/skia/modules/svg/include/SkSVGFeLighting.h +1 -1
  243. package/cpp/skia/modules/svg/include/SkSVGFeMerge.h +1 -1
  244. package/cpp/skia/modules/svg/include/SkSVGFeOffset.h +1 -1
  245. package/cpp/skia/modules/svg/include/SkSVGFeTurbulence.h +1 -1
  246. package/cpp/skia/modules/svg/include/SkSVGFilter.h +1 -1
  247. package/cpp/skia/modules/svg/include/SkSVGGradient.h +2 -2
  248. package/cpp/skia/modules/svg/include/SkSVGImage.h +2 -2
  249. package/cpp/skia/modules/svg/include/SkSVGLine.h +1 -1
  250. package/cpp/skia/modules/svg/include/SkSVGLinearGradient.h +1 -1
  251. package/cpp/skia/modules/svg/include/SkSVGMask.h +1 -1
  252. package/cpp/skia/modules/svg/include/SkSVGNode.h +1 -1
  253. package/cpp/skia/modules/svg/include/SkSVGPath.h +1 -1
  254. package/cpp/skia/modules/svg/include/SkSVGPattern.h +1 -1
  255. package/cpp/skia/modules/svg/include/SkSVGPoly.h +1 -1
  256. package/cpp/skia/modules/svg/include/SkSVGRadialGradient.h +1 -1
  257. package/cpp/skia/modules/svg/include/SkSVGRect.h +1 -1
  258. package/cpp/skia/modules/svg/include/SkSVGRenderContext.h +1 -1
  259. package/cpp/skia/modules/svg/include/SkSVGSVG.h +1 -1
  260. package/cpp/skia/modules/svg/include/SkSVGShape.h +1 -1
  261. package/cpp/skia/modules/svg/include/SkSVGStop.h +1 -1
  262. package/cpp/skia/modules/svg/include/SkSVGText.h +1 -1
  263. package/cpp/skia/modules/svg/include/SkSVGTransformableNode.h +1 -1
  264. package/cpp/skia/modules/svg/include/SkSVGUse.h +1 -1
  265. package/cpp/skia/modules/svg/include/SkSVGValue.h +1 -1
  266. package/cpp/skia/src/{base → core}/SkArenaAlloc.h +5 -5
  267. package/cpp/skia/src/{base → core}/SkAutoLocaleSetter.h +1 -1
  268. package/cpp/skia/src/core/SkChecksum.h +1 -1
  269. package/cpp/skia/src/core/SkLRUCache.h +1 -1
  270. package/cpp/skia/src/{base → core}/SkMathPriv.h +3 -3
  271. package/cpp/skia/src/core/SkTHash.h +1 -1
  272. package/cpp/skia/src/{base → core}/SkTInternalLList.h +3 -3
  273. package/cpp/skia/src/{base → core}/SkTLazy.h +1 -1
  274. package/cpp/skia/src/{base → core}/SkUTF.h +1 -1
  275. package/cpp/skia/src/gpu/graphite/ContextOptionsPriv.h +1 -1
  276. package/cpp/skia/src/gpu/graphite/ResourceTypes.h +3 -3
  277. package/lib/commonjs/renderer/processors/Animations/Animations.d.ts +27 -1
  278. package/lib/commonjs/renderer/processors/Animations/Animations.js +28 -0
  279. package/lib/commonjs/renderer/processors/Animations/Animations.js.map +1 -1
  280. package/lib/commonjs/sksg/Recorder/Core.js +8 -1
  281. package/lib/commonjs/sksg/Recorder/Core.js.map +1 -1
  282. package/lib/commonjs/sksg/Recorder/ReanimatedRecorder.js +8 -0
  283. package/lib/commonjs/sksg/Recorder/ReanimatedRecorder.js.map +1 -1
  284. package/lib/commonjs/sksg/Recorder/Recorder.d.ts +1 -1
  285. package/lib/commonjs/sksg/Recorder/Recorder.js +4 -0
  286. package/lib/commonjs/sksg/Recorder/Recorder.js.map +1 -1
  287. package/lib/commonjs/sksg/utils.d.ts +4 -0
  288. package/lib/commonjs/sksg/utils.js +14 -1
  289. package/lib/commonjs/sksg/utils.js.map +1 -1
  290. package/lib/module/renderer/processors/Animations/Animations.d.ts +27 -1
  291. package/lib/module/renderer/processors/Animations/Animations.js +21 -0
  292. package/lib/module/renderer/processors/Animations/Animations.js.map +1 -1
  293. package/lib/module/sksg/Recorder/Core.js +8 -1
  294. package/lib/module/sksg/Recorder/Core.js.map +1 -1
  295. package/lib/module/sksg/Recorder/ReanimatedRecorder.js +9 -1
  296. package/lib/module/sksg/Recorder/ReanimatedRecorder.js.map +1 -1
  297. package/lib/module/sksg/Recorder/Recorder.d.ts +1 -1
  298. package/lib/module/sksg/Recorder/Recorder.js +5 -1
  299. package/lib/module/sksg/Recorder/Recorder.js.map +1 -1
  300. package/lib/module/sksg/utils.d.ts +4 -0
  301. package/lib/module/sksg/utils.js +12 -0
  302. package/lib/module/sksg/utils.js.map +1 -1
  303. package/lib/typescript/lib/commonjs/renderer/processors/Animations/Animations.d.ts +22 -0
  304. package/lib/typescript/lib/commonjs/sksg/utils.d.ts +1 -0
  305. package/lib/typescript/lib/module/mock/index.d.ts +4 -0
  306. package/lib/typescript/lib/module/renderer/processors/Animations/Animations.d.ts +4 -0
  307. package/lib/typescript/lib/module/renderer/processors/Animations/index.d.ts +1 -1
  308. package/lib/typescript/lib/module/sksg/utils.d.ts +1 -0
  309. package/lib/typescript/src/renderer/processors/Animations/Animations.d.ts +27 -1
  310. package/lib/typescript/src/sksg/Recorder/Recorder.d.ts +1 -1
  311. package/lib/typescript/src/sksg/utils.d.ts +4 -0
  312. package/libs/.graphite +1 -1
  313. package/package.json +7 -7
  314. package/src/renderer/processors/Animations/Animations.ts +34 -1
  315. package/src/sksg/Recorder/Core.ts +11 -1
  316. package/src/sksg/Recorder/ReanimatedRecorder.ts +10 -1
  317. package/src/sksg/Recorder/Recorder.ts +7 -3
  318. package/src/sksg/utils.ts +18 -0
  319. package/cpp/skia/include/gpu/graphite/vk/VulkanGraphiteUtils.h +0 -10
  320. package/cpp/skia/include/private/base/README.md +0 -4
  321. package/cpp/skia/include/private/base/SkPoint_impl.h +0 -560
  322. package/cpp/skia/include/private/base/SkSpan_impl.h +0 -158
  323. /package/cpp/skia/include/private/{base/SkASAN.h → SkASAN.h} +0 -0
  324. /package/cpp/skia/include/private/{base/SkAlignedStorage.h → SkAlignedStorage.h} +0 -0
  325. /package/cpp/skia/include/private/{base/SkCPUTypes.h → SkCPUTypes.h} +0 -0
  326. /package/cpp/skia/include/private/{base/SkFeatures.h → SkFeatures.h} +0 -0
  327. /package/cpp/skia/include/private/{base/SkLogPriority.h → SkLogPriority.h} +0 -0
  328. /package/cpp/skia/include/private/{base/SkTPin.h → SkTPin.h} +0 -0
@@ -0,0 +1,4 @@
1
+ export function select(value: any, key: any): {
2
+ __sv: any;
3
+ __key: any;
4
+ };
@@ -1 +1 @@
1
- export {};
1
+ export * from "./Animations";
@@ -1,3 +1,4 @@
1
1
  export function isSharedValue(value: any): boolean;
2
+ export function isSharedValueSelector(value: any): boolean;
2
3
  export function materialize(props: any): any;
3
4
  export function composeDeclarations(filters: any, composer: any): any;
@@ -1,6 +1,32 @@
1
+ import type { SharedValue } from "react-native-reanimated";
2
+ /**
3
+ * Binds a prop to a single key of a "grouped" shared value: one shared value
4
+ * whose `.value` is an object can drive many props (one key each) instead of
5
+ * requiring a separate shared value per prop.
6
+ *
7
+ * Created via {@link select}. `T` is the type of the selected value; `__type`
8
+ * is a phantom marker carrying that type and is never present at runtime.
9
+ */
10
+ export type SharedValueSelector<T> = {
11
+ __sv: {
12
+ value: Record<string, unknown>;
13
+ };
14
+ __key: string;
15
+ readonly __type?: T;
16
+ };
1
17
  export type AnimatedProp<T> = T | {
2
18
  value: T;
3
- };
19
+ } | SharedValueSelector<T>;
20
+ /**
21
+ * Selects a single key of a shared value so it can drive an animated prop.
22
+ * This lets one shared value (whose value is an object) drive multiple props
23
+ * — one per key — instead of using a separate shared value for each.
24
+ *
25
+ * @example
26
+ * const data = useSharedValue({ x: 0, y: 0, r: 10 });
27
+ * <Circle cx={select(data, "x")} cy={select(data, "y")} r={select(data, "r")} />
28
+ */
29
+ export declare const select: <T extends object, K extends keyof T & string>(value: SharedValue<T>, key: K) => SharedValueSelector<T[K]>;
4
30
  export type AnimatedProps<T, O extends keyof T | never = never> = {
5
31
  [K in keyof T]: K extends "children" ? T[K] : K extends O ? T[K] : AnimatedProp<T[K]>;
6
32
  };
@@ -42,7 +42,7 @@ export declare class Recorder implements BaseRecorder {
42
42
  saveBackdropFilter(): void;
43
43
  drawBox(boxProps: AnimatedProps<BoxProps>, shadows: {
44
44
  props: BoxShadowProps;
45
- animatedProps?: Record<string, SharedValue<unknown>>;
45
+ animatedProps?: Record<string, unknown>;
46
46
  }[]): void;
47
47
  drawImage(props: AnimatedProps<ImageProps>): void;
48
48
  drawCircle(props: AnimatedProps<CircleProps>): void;
@@ -1,5 +1,9 @@
1
1
  import type { SharedValue } from "react-native-reanimated";
2
2
  export declare const isSharedValue: <T = unknown>(value: unknown) => value is SharedValue<T>;
3
+ export declare const isSharedValueSelector: (value: unknown) => value is {
4
+ __sv: SharedValue<unknown>;
5
+ __key: string;
6
+ };
3
7
  export declare const materialize: <T extends object>(props: T) => T;
4
8
  type Composer<T> = (outer: T, inner: T) => T;
5
9
  export declare const composeDeclarations: <T>(filters: T[], composer: Composer<T>) => T;
package/libs/.graphite CHANGED
@@ -1 +1 @@
1
- m150
1
+ m152
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.11.0-next.2",
11
+ "version": "2.12.0-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",
@@ -139,15 +139,15 @@
139
139
  },
140
140
  "dependencies": {
141
141
  "canvaskit-wasm": "0.41.0",
142
- "react-native-skia-graphite-android": "150.0.0",
143
- "react-native-skia-graphite-apple-ios": "150.0.0",
144
- "react-native-skia-graphite-apple-macos": "150.0.0",
142
+ "react-native-skia-graphite-android": "152.0.0",
143
+ "react-native-skia-graphite-apple-ios": "152.0.0",
144
+ "react-native-skia-graphite-apple-macos": "152.0.0",
145
145
  "react-reconciler": "0.31.0"
146
146
  },
147
147
  "graphiteDependencies": {
148
- "react-native-skia-graphite-android": "150.0.0",
149
- "react-native-skia-graphite-apple-ios": "150.0.0",
150
- "react-native-skia-graphite-apple-macos": "150.0.0"
148
+ "react-native-skia-graphite-android": "152.0.0",
149
+ "react-native-skia-graphite-apple-ios": "152.0.0",
150
+ "react-native-skia-graphite-apple-macos": "152.0.0"
151
151
  },
152
152
  "eslintIgnore": [
153
153
  "node_modules/",
@@ -1,4 +1,37 @@
1
- export type AnimatedProp<T> = T | { value: T };
1
+ import type { SharedValue } from "react-native-reanimated";
2
+
3
+ /**
4
+ * Binds a prop to a single key of a "grouped" shared value: one shared value
5
+ * whose `.value` is an object can drive many props (one key each) instead of
6
+ * requiring a separate shared value per prop.
7
+ *
8
+ * Created via {@link select}. `T` is the type of the selected value; `__type`
9
+ * is a phantom marker carrying that type and is never present at runtime.
10
+ */
11
+ export type SharedValueSelector<T> = {
12
+ __sv: { value: Record<string, unknown> };
13
+ __key: string;
14
+ readonly __type?: T;
15
+ };
16
+
17
+ export type AnimatedProp<T> = T | { value: T } | SharedValueSelector<T>;
18
+
19
+ /**
20
+ * Selects a single key of a shared value so it can drive an animated prop.
21
+ * This lets one shared value (whose value is an object) drive multiple props
22
+ * — one per key — instead of using a separate shared value for each.
23
+ *
24
+ * @example
25
+ * const data = useSharedValue({ x: 0, y: 0, r: 10 });
26
+ * <Circle cx={select(data, "x")} cy={select(data, "y")} r={select(data, "r")} />
27
+ */
28
+ export const select = <T extends object, K extends keyof T & string>(
29
+ value: SharedValue<T>,
30
+ key: K
31
+ ): SharedValueSelector<T[K]> => ({
32
+ __sv: value as unknown as { value: Record<string, unknown> },
33
+ __key: key,
34
+ });
2
35
 
3
36
  export type AnimatedProps<T, O extends keyof T | never = never> = {
4
37
  [K in keyof T]: K extends "children"
@@ -23,6 +23,7 @@ import type {
23
23
  DrawingNodeProps,
24
24
  SkottieProps,
25
25
  } from "../../dom/types";
26
+ import { isSharedValueSelector } from "../utils";
26
27
 
27
28
  export enum CommandType {
28
29
  // Context
@@ -79,7 +80,16 @@ export const materializeCommand = (command: any) => {
79
80
  const newProps = { ...command.props };
80
81
  if (command.animatedProps) {
81
82
  for (const key in command.animatedProps) {
82
- newProps[key] = command.animatedProps[key].value;
83
+ const entry = command.animatedProps[key];
84
+ if (isSharedValueSelector(entry)) {
85
+ const group = entry.__sv.value;
86
+ newProps[key] =
87
+ group && typeof group === "object"
88
+ ? (group as Record<string, unknown>)[entry.__key]
89
+ : undefined;
90
+ } else {
91
+ newProps[key] = entry.value;
92
+ }
83
93
  }
84
94
  }
85
95
  return { ...command, props: newProps };
@@ -31,7 +31,7 @@ import type {
31
31
  DrawingNodeProps,
32
32
  } from "../../dom/types";
33
33
  import type { AnimatedProps } from "../../renderer";
34
- import { isSharedValue } from "../utils";
34
+ import { isSharedValue, isSharedValueSelector } from "../utils";
35
35
 
36
36
  /**
37
37
  * Currently the recorder only work if the GPU resources (e.g Images) are owned by the main thread.
@@ -55,6 +55,15 @@ export class ReanimatedRecorder implements BaseRecorder {
55
55
  return;
56
56
  }
57
57
  Object.values(props).forEach((value) => {
58
+ if (isSharedValueSelector(value) && !this.values.has(value.__sv)) {
59
+ const sv = value.__sv;
60
+ // eslint-disable-next-line @typescript-eslint/ban-ts-comment
61
+ // @ts-expect-error
62
+ sv.name = `variable${this.values.size}`;
63
+ this.values.add(sv as SharedValue<unknown>);
64
+ return;
65
+ }
66
+
58
67
  if (isSharedValue(value) && !this.values.has(value)) {
59
68
  // eslint-disable-next-line @typescript-eslint/ban-ts-comment
60
69
  // @ts-expect-error
@@ -30,7 +30,7 @@ import type {
30
30
  DrawingNodeProps,
31
31
  } from "../../dom/types";
32
32
  import type { AnimatedProps } from "../../renderer";
33
- import { isSharedValue } from "../utils";
33
+ import { isSharedValue, isSharedValueSelector } from "../utils";
34
34
  import { isColorFilter, isImageFilter, isPathEffect, isShader } from "../Node";
35
35
  import type { SkPaint, SkPicture, BaseRecorder } from "../../skia/types";
36
36
 
@@ -78,7 +78,7 @@ export class Recorder implements BaseRecorder {
78
78
  }
79
79
 
80
80
  private processProps(props: Record<string, unknown>) {
81
- const animatedProps: Record<string, SharedValue<unknown>> = {};
81
+ const animatedProps: Record<string, unknown> = {};
82
82
  let hasAnimatedProps = false;
83
83
 
84
84
  for (const key in props) {
@@ -87,6 +87,10 @@ export class Recorder implements BaseRecorder {
87
87
  this.animationValues.add(prop);
88
88
  animatedProps[key] = prop;
89
89
  hasAnimatedProps = true;
90
+ } else if (isSharedValueSelector(prop)) {
91
+ this.animationValues.add(prop.__sv);
92
+ animatedProps[key] = prop;
93
+ hasAnimatedProps = true;
90
94
  }
91
95
  }
92
96
 
@@ -222,7 +226,7 @@ export class Recorder implements BaseRecorder {
222
226
  boxProps: AnimatedProps<BoxProps>,
223
227
  shadows: {
224
228
  props: BoxShadowProps;
225
- animatedProps?: Record<string, SharedValue<unknown>>;
229
+ animatedProps?: Record<string, unknown>;
226
230
  }[]
227
231
  ) {
228
232
  shadows.forEach((shadow) => {
package/src/sksg/utils.ts CHANGED
@@ -10,6 +10,17 @@ export const isSharedValue = <T = unknown>(
10
10
  return (value as Record<string, unknown>)?._isReanimatedSharedValue === true;
11
11
  };
12
12
 
13
+ export const isSharedValueSelector = (
14
+ value: unknown
15
+ ): value is { __sv: SharedValue<unknown>; __key: string } => {
16
+ "worklet";
17
+ if (!value || typeof value !== "object") {
18
+ return false;
19
+ }
20
+ const obj = value as Record<string, unknown>;
21
+ return isSharedValue(obj.__sv) && typeof obj.__key === "string";
22
+ };
23
+
13
24
  export const materialize = <T extends object>(props: T) => {
14
25
  "worklet";
15
26
  const result: T = Object.assign({}, props);
@@ -17,6 +28,13 @@ export const materialize = <T extends object>(props: T) => {
17
28
  const value = result[key];
18
29
  if (isSharedValue(value)) {
19
30
  result[key] = value.value as never;
31
+ } else if (isSharedValueSelector(value)) {
32
+ const group = value.__sv.value;
33
+ result[key] = (
34
+ group && typeof group === "object"
35
+ ? (group as Record<string, unknown>)[value.__key]
36
+ : undefined
37
+ ) as never;
20
38
  }
21
39
  });
22
40
  return result;
@@ -1,10 +0,0 @@
1
- /*
2
- * Copyright 2022 Google LLC
3
- *
4
- * Use of this source code is governed by a BSD-style license that can be
5
- * found in the LICENSE file.
6
- */
7
-
8
- // DEPRECRATED: VulkanGraphiteUtils.h will be removed in the future, please include
9
- // VulkanGraphiteContext.h
10
- #include "include/gpu/graphite/vk/VulkanGraphiteContext.h"
@@ -1,4 +0,0 @@
1
- Files in "base" are used by many parts of Skia, but are not part of the public Skia API.
2
- See also src/base for other files that are part of base, but not needed by the public API.
3
-
4
- Files here should not depend on anything other than system headers or other files in base.