@shopify/react-native-skia 2.11.0-next.2 → 2.11.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 (414) hide show
  1. package/android/cpp/rnskia-android/RNSkAndroidPlatformContext.h +0 -10
  2. package/android/src/main/java/com/shopify/reactnative/skia/ViewScreenshotService.java +9 -12
  3. package/apple/RNSkApplePlatformContext.h +0 -3
  4. package/apple/RNSkApplePlatformContext.mm +0 -11
  5. package/cpp/api/JsiSkApi.h +0 -6
  6. package/cpp/api/JsiSkFont.h +2 -8
  7. package/cpp/api/JsiSkMatrix.h +4 -2
  8. package/cpp/api/recorder/Convertor.h +62 -11
  9. package/cpp/api/recorder/Drawings.h +13 -3
  10. package/cpp/api/recorder/ImageFilters.h +15 -1
  11. package/cpp/api/recorder/Paint.h +5 -2
  12. package/cpp/api/third_party/SkottieUtils.cpp +1 -1
  13. package/cpp/rnskia/RNSkPlatformContext.h +0 -3
  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/lib/commonjs/renderer/components/Mask.js +3 -9
  276. package/lib/commonjs/renderer/components/Mask.js.map +1 -1
  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/skia/types/Matrix4.js +7 -2
  281. package/lib/commonjs/skia/types/Matrix4.js.map +1 -1
  282. package/lib/commonjs/skia/types/Skia.d.ts +1 -6
  283. package/lib/commonjs/skia/types/Skia.js.map +1 -1
  284. package/lib/commonjs/skia/web/JsiSkia.js +0 -3
  285. package/lib/commonjs/skia/web/JsiSkia.js.map +1 -1
  286. package/lib/commonjs/sksg/Recorder/Core.js +8 -1
  287. package/lib/commonjs/sksg/Recorder/Core.js.map +1 -1
  288. package/lib/commonjs/sksg/Recorder/DrawingContext.d.ts +1 -0
  289. package/lib/commonjs/sksg/Recorder/DrawingContext.js +10 -0
  290. package/lib/commonjs/sksg/Recorder/DrawingContext.js.map +1 -1
  291. package/lib/commonjs/sksg/Recorder/Player.js +1 -1
  292. package/lib/commonjs/sksg/Recorder/Player.js.map +1 -1
  293. package/lib/commonjs/sksg/Recorder/ReanimatedRecorder.js +8 -0
  294. package/lib/commonjs/sksg/Recorder/ReanimatedRecorder.js.map +1 -1
  295. package/lib/commonjs/sksg/Recorder/Recorder.d.ts +1 -1
  296. package/lib/commonjs/sksg/Recorder/Recorder.js +4 -0
  297. package/lib/commonjs/sksg/Recorder/Recorder.js.map +1 -1
  298. package/lib/commonjs/sksg/Recorder/Visitor.js +6 -1
  299. package/lib/commonjs/sksg/Recorder/Visitor.js.map +1 -1
  300. package/lib/commonjs/sksg/Recorder/commands/Drawing.js +10 -8
  301. package/lib/commonjs/sksg/Recorder/commands/Drawing.js.map +1 -1
  302. package/lib/commonjs/sksg/Recorder/commands/ImageFilters.js +15 -1
  303. package/lib/commonjs/sksg/Recorder/commands/ImageFilters.js.map +1 -1
  304. package/lib/commonjs/sksg/Recorder/commands/Shaders.js +1 -1
  305. package/lib/commonjs/sksg/Recorder/commands/Shaders.js.map +1 -1
  306. package/lib/commonjs/sksg/utils.d.ts +4 -0
  307. package/lib/commonjs/sksg/utils.js +14 -1
  308. package/lib/commonjs/sksg/utils.js.map +1 -1
  309. package/lib/module/renderer/components/Mask.js +3 -9
  310. package/lib/module/renderer/components/Mask.js.map +1 -1
  311. package/lib/module/renderer/processors/Animations/Animations.d.ts +27 -1
  312. package/lib/module/renderer/processors/Animations/Animations.js +21 -0
  313. package/lib/module/renderer/processors/Animations/Animations.js.map +1 -1
  314. package/lib/module/skia/types/Matrix4.js +7 -2
  315. package/lib/module/skia/types/Matrix4.js.map +1 -1
  316. package/lib/module/skia/types/Skia.d.ts +1 -6
  317. package/lib/module/skia/types/Skia.js.map +1 -1
  318. package/lib/module/skia/web/JsiSkia.js +0 -3
  319. package/lib/module/skia/web/JsiSkia.js.map +1 -1
  320. package/lib/module/sksg/Recorder/Core.js +8 -1
  321. package/lib/module/sksg/Recorder/Core.js.map +1 -1
  322. package/lib/module/sksg/Recorder/DrawingContext.d.ts +1 -0
  323. package/lib/module/sksg/Recorder/DrawingContext.js +10 -0
  324. package/lib/module/sksg/Recorder/DrawingContext.js.map +1 -1
  325. package/lib/module/sksg/Recorder/Player.js +1 -1
  326. package/lib/module/sksg/Recorder/Player.js.map +1 -1
  327. package/lib/module/sksg/Recorder/ReanimatedRecorder.js +9 -1
  328. package/lib/module/sksg/Recorder/ReanimatedRecorder.js.map +1 -1
  329. package/lib/module/sksg/Recorder/Recorder.d.ts +1 -1
  330. package/lib/module/sksg/Recorder/Recorder.js +5 -1
  331. package/lib/module/sksg/Recorder/Recorder.js.map +1 -1
  332. package/lib/module/sksg/Recorder/Visitor.js +6 -1
  333. package/lib/module/sksg/Recorder/Visitor.js.map +1 -1
  334. package/lib/module/sksg/Recorder/commands/Drawing.js +10 -8
  335. package/lib/module/sksg/Recorder/commands/Drawing.js.map +1 -1
  336. package/lib/module/sksg/Recorder/commands/ImageFilters.js +15 -1
  337. package/lib/module/sksg/Recorder/commands/ImageFilters.js.map +1 -1
  338. package/lib/module/sksg/Recorder/commands/Shaders.js +1 -1
  339. package/lib/module/sksg/Recorder/commands/Shaders.js.map +1 -1
  340. package/lib/module/sksg/utils.d.ts +4 -0
  341. package/lib/module/sksg/utils.js +12 -0
  342. package/lib/module/sksg/utils.js.map +1 -1
  343. package/lib/typescript/lib/commonjs/renderer/processors/Animations/Animations.d.ts +22 -0
  344. package/lib/typescript/lib/commonjs/skia/web/JsiSkia.d.ts +0 -1
  345. package/lib/typescript/lib/commonjs/sksg/Recorder/DrawingContext.d.ts +1 -0
  346. package/lib/typescript/lib/commonjs/sksg/utils.d.ts +1 -0
  347. package/lib/typescript/lib/module/mock/index.d.ts +4 -0
  348. package/lib/typescript/lib/module/renderer/processors/Animations/Animations.d.ts +4 -0
  349. package/lib/typescript/lib/module/renderer/processors/Animations/index.d.ts +1 -1
  350. package/lib/typescript/lib/module/skia/Skia.web.d.ts +0 -1
  351. package/lib/typescript/lib/module/skia/web/JsiSkia.d.ts +0 -1
  352. package/lib/typescript/lib/module/sksg/Recorder/DrawingContext.d.ts +1 -0
  353. package/lib/typescript/lib/module/sksg/utils.d.ts +1 -0
  354. package/lib/typescript/src/renderer/processors/Animations/Animations.d.ts +27 -1
  355. package/lib/typescript/src/skia/types/Skia.d.ts +1 -6
  356. package/lib/typescript/src/sksg/Recorder/DrawingContext.d.ts +1 -0
  357. package/lib/typescript/src/sksg/Recorder/Recorder.d.ts +1 -1
  358. package/lib/typescript/src/sksg/utils.d.ts +4 -0
  359. package/package.json +9 -9
  360. package/src/renderer/components/Mask.tsx +10 -3
  361. package/src/renderer/processors/Animations/Animations.ts +34 -1
  362. package/src/skia/types/Matrix4.ts +6 -2
  363. package/src/skia/types/Skia.ts +1 -7
  364. package/src/skia/web/JsiSkia.ts +0 -4
  365. package/src/sksg/Recorder/Core.ts +11 -1
  366. package/src/sksg/Recorder/DrawingContext.ts +10 -0
  367. package/src/sksg/Recorder/Player.ts +1 -1
  368. package/src/sksg/Recorder/ReanimatedRecorder.ts +10 -1
  369. package/src/sksg/Recorder/Recorder.ts +7 -3
  370. package/src/sksg/Recorder/Visitor.ts +9 -6
  371. package/src/sksg/Recorder/commands/Drawing.ts +10 -8
  372. package/src/sksg/Recorder/commands/ImageFilters.ts +20 -1
  373. package/src/sksg/Recorder/commands/Shaders.ts +1 -1
  374. package/src/sksg/utils.ts +18 -0
  375. package/cpp/api/JsiSkiaContext.h +0 -94
  376. package/cpp/dawn/include/dawn/dawn_proc.h +0 -53
  377. package/cpp/dawn/include/dawn/dawn_proc_table.h +0 -330
  378. package/cpp/dawn/include/dawn/dawn_thread_dispatch_proc.h +0 -47
  379. package/cpp/dawn/include/dawn/dawn_version.h +0 -41
  380. package/cpp/dawn/include/dawn/native/D3D11Backend.h +0 -65
  381. package/cpp/dawn/include/dawn/native/D3D12Backend.h +0 -86
  382. package/cpp/dawn/include/dawn/native/D3DBackend.h +0 -56
  383. package/cpp/dawn/include/dawn/native/DawnNative.h +0 -369
  384. package/cpp/dawn/include/dawn/native/MetalBackend.h +0 -56
  385. package/cpp/dawn/include/dawn/native/NullBackend.h +0 -39
  386. package/cpp/dawn/include/dawn/native/OpenGLBackend.h +0 -89
  387. package/cpp/dawn/include/dawn/native/VulkanBackend.h +0 -183
  388. package/cpp/dawn/include/dawn/native/WebGPUBackend.h +0 -49
  389. package/cpp/dawn/include/dawn/native/dawn_native_export.h +0 -49
  390. package/cpp/dawn/include/dawn/platform/DawnPlatform.h +0 -210
  391. package/cpp/dawn/include/dawn/platform/dawn_platform_export.h +0 -49
  392. package/cpp/dawn/include/dawn/replay/Replay.h +0 -99
  393. package/cpp/dawn/include/dawn/replay/dawn_replay_export.h +0 -49
  394. package/cpp/dawn/include/dawn/webgpu_cpp_print.h +0 -2844
  395. package/cpp/dawn/include/tint/tint.h +0 -90
  396. package/cpp/dawn/include/webgpu/webgpu.h +0 -4987
  397. package/cpp/dawn/include/webgpu/webgpu_cpp.h +0 -10080
  398. package/cpp/dawn/include/webgpu/webgpu_cpp_chained_struct.h +0 -57
  399. package/cpp/dawn/include/webgpu/webgpu_enum_class_bitmasks.h +0 -161
  400. package/cpp/dawn/include/webgpu/webgpu_glfw.h +0 -88
  401. package/cpp/skia/include/gpu/graphite/vk/VulkanGraphiteUtils.h +0 -10
  402. package/cpp/skia/include/private/base/README.md +0 -4
  403. package/cpp/skia/include/private/base/SkPoint_impl.h +0 -560
  404. package/cpp/skia/include/private/base/SkSpan_impl.h +0 -158
  405. package/cpp/skia/src/gpu/graphite/ContextOptionsPriv.h +0 -45
  406. package/cpp/skia/src/gpu/graphite/ResourceTypes.h +0 -360
  407. package/cpp/skia/src/gpu/graphite/TextureProxyView.h +0 -105
  408. package/libs/.graphite +0 -1
  409. /package/cpp/skia/include/private/{base/SkASAN.h → SkASAN.h} +0 -0
  410. /package/cpp/skia/include/private/{base/SkAlignedStorage.h → SkAlignedStorage.h} +0 -0
  411. /package/cpp/skia/include/private/{base/SkCPUTypes.h → SkCPUTypes.h} +0 -0
  412. /package/cpp/skia/include/private/{base/SkFeatures.h → SkFeatures.h} +0 -0
  413. /package/cpp/skia/include/private/{base/SkLogPriority.h → SkLogPriority.h} +0 -0
  414. /package/cpp/skia/include/private/{base/SkTPin.h → SkTPin.h} +0 -0
@@ -63,16 +63,6 @@ public:
63
63
  #endif
64
64
  }
65
65
 
66
- std::shared_ptr<WindowContext>
67
- makeContextFromNativeSurface(void *surface, int width, int height) override {
68
- #if defined(SK_GRAPHITE)
69
- return DawnContext::getInstance().MakeWindow(surface, width, height);
70
- #else
71
- auto aWindow = reinterpret_cast<ANativeWindow *>(surface);
72
- return OpenGLContext::getInstance().MakeWindow(aWindow);
73
- #endif
74
- }
75
-
76
66
  sk_sp<SkImage> makeImageFromNativeBuffer(void *buffer) override {
77
67
  #if defined(SK_GRAPHITE)
78
68
  return DawnContext::getInstance().MakeImageFromBuffer(buffer);
@@ -19,10 +19,11 @@ import android.widget.ScrollView;
19
19
  import androidx.annotation.NonNull;
20
20
  import com.facebook.react.bridge.ReactContext;
21
21
  import com.facebook.react.bridge.UIManager;
22
+ import com.facebook.react.uimanager.BackgroundStyleApplicator;
22
23
  import com.facebook.react.uimanager.UIManagerHelper;
24
+ import com.facebook.react.uimanager.ViewProps;
23
25
  import com.facebook.react.views.view.ReactViewGroup;
24
26
 
25
- import java.lang.reflect.Method;
26
27
  import java.util.concurrent.CountDownLatch;
27
28
  import java.util.concurrent.TimeUnit;
28
29
 
@@ -118,17 +119,13 @@ public class ViewScreenshotService {
118
119
  }
119
120
 
120
121
  private static void drawChildren(Canvas canvas, ViewGroup group, Paint paint, float parentOpacity) {
121
- // Handle clipping for ReactViewGroup
122
- if (group instanceof ReactViewGroup) {
123
- try {
124
- Class[] cArg = new Class[1];
125
- cArg[0] = Canvas.class;
126
- Method method = ReactViewGroup.class.getDeclaredMethod("dispatchOverflowDraw", cArg);
127
- method.setAccessible(true);
128
- method.invoke(group, canvas);
129
- } catch (Exception e) {
130
- Log.e(TAG, "couldn't invoke dispatchOverflowDraw() on ReactViewGroup", e);
131
- }
122
+ // ReactViewGroup applies `overflow: hidden` / `overflow: scroll` clipping from its
123
+ // dispatchDraw() override. We never call dispatchDraw() here because children are
124
+ // walked manually (TextureView / SurfaceView need special handling), so the clip has
125
+ // to be replicated explicitly, exactly as ReactViewGroup.dispatchDraw() does it.
126
+ if (group instanceof ReactViewGroup
127
+ && !ViewProps.VISIBLE.equals(((ReactViewGroup) group).getOverflow())) {
128
+ BackgroundStyleApplicator.clipToPaddingBox(group, canvas);
132
129
  }
133
130
  for (int i = 0; i < group.getChildCount(); i++) {
134
131
  View child = group.getChildAt(i);
@@ -63,9 +63,6 @@ public:
63
63
 
64
64
  std::shared_ptr<RNSkVideo> createVideo(const std::string &url) override;
65
65
 
66
- std::shared_ptr<WindowContext>
67
- makeContextFromNativeSurface(void *surface, int width, int height) override;
68
-
69
66
  virtual void performStreamOperation(
70
67
  const std::string &sourceUri,
71
68
  const std::function<void(std::unique_ptr<SkStreamAsset>)> &op) override;
@@ -307,17 +307,6 @@ RNSkApplePlatformContext::createVideo(const std::string &url) {
307
307
  return std::make_shared<RNSkAppleVideo>(url, this);
308
308
  }
309
309
 
310
- std::shared_ptr<WindowContext>
311
- RNSkApplePlatformContext::makeContextFromNativeSurface(void *surface, int width,
312
- int height) {
313
- #if defined(SK_GRAPHITE)
314
- return DawnContext::getInstance().MakeWindow(surface, width, height);
315
- #else
316
- return MetalContext::getInstance().MakeWindow((__bridge CALayer *)surface,
317
- width, height);
318
- #endif
319
- }
320
-
321
310
  void RNSkApplePlatformContext::raiseError(const std::exception &err) {
322
311
  RCTFatal(RCTErrorWithMessage([NSString stringWithUTF8String:err.what()]));
323
312
  }
@@ -56,7 +56,6 @@
56
56
  #include "JsiSkTypefaceFactory.h"
57
57
  #include "JsiSkTypefaceFontProviderFactory.h"
58
58
  #include "JsiSkVertices.h"
59
- #include "JsiSkiaContext.h"
60
59
  #include "JsiSkottieFactory.h"
61
60
  #include "JsiVideo.h"
62
61
  #include "api/recorder/JsiRecorder.h"
@@ -116,10 +115,6 @@ public:
116
115
  return JsiVideo::createCtor(getContext())(runtime, thisValue, arguments,
117
116
  count);
118
117
  }
119
- JSI_HOST_FUNCTION(Context) {
120
- return JsiSkiaContext::createCtor(getContext())(runtime, thisValue,
121
- arguments, count);
122
- }
123
118
  JSI_HOST_FUNCTION(Font) {
124
119
  return JsiSkFont::createCtor(getContext())(runtime, thisValue, arguments,
125
120
  count);
@@ -256,7 +251,6 @@ public:
256
251
 
257
252
  static void definePrototype(jsi::Runtime &runtime, jsi::Object &prototype) {
258
253
  installHostMethod(runtime, prototype, "Video", &JsiSkApi::Video);
259
- installHostMethod(runtime, prototype, "Context", &JsiSkApi::Context);
260
254
  installHostMethod(runtime, prototype, "getNativeDevice",
261
255
  &JsiSkApi::getNativeDevice);
262
256
  installHostMethod(runtime, prototype, "Font", &JsiSkApi::Font);
@@ -161,15 +161,9 @@ public:
161
161
 
162
162
  void setSize(double size) { getObject()->setSize(size); }
163
163
 
164
- // The JS API declares booleans here, but the previous implementation read
165
- // the arguments with asNumber() — keep accepting numbers.
166
- void setEmbolden(double embolden) {
167
- getObject()->setEmbolden(static_cast<bool>(embolden));
168
- }
164
+ void setEmbolden(bool embolden) { getObject()->setEmbolden(embolden); }
169
165
 
170
- void setSubpixel(double subpixel) {
171
- getObject()->setSubpixel(static_cast<bool>(subpixel));
172
- }
166
+ void setSubpixel(bool subpixel) { getObject()->setSubpixel(subpixel); }
173
167
 
174
168
  void setTypeface(std::variant<std::nullptr_t, sk_sp<SkTypeface>> typeface) {
175
169
  getObject()->setTypeface(
@@ -69,12 +69,14 @@ public:
69
69
 
70
70
  void postTranslate(double x, double y) { getObject()->postTranslate(x, y); }
71
71
 
72
+ // A missing y means a uniform scale, matching the CanvasKit backend and the
73
+ // SkMatrix type, where y is optional rather than defaulted to 1.
72
74
  void scale(double x, JsiOptional<double> y) {
73
- getObject()->preScale(x, y.has_value() ? *y : 1);
75
+ getObject()->preScale(x, y.has_value() ? *y : x);
74
76
  }
75
77
 
76
78
  void postScale(double x, JsiOptional<double> y) {
77
- getObject()->postScale(x, y.has_value() ? *y : 1);
79
+ getObject()->postScale(x, y.has_value() ? *y : x);
78
80
  }
79
81
 
80
82
  void skew(double x, double y) { getObject()->preSkew(x, y); }
@@ -69,7 +69,51 @@ template <typename T> struct unwrap_optional<std::optional<T>> {
69
69
  template <typename T>
70
70
  T getPropertyValue(jsi::Runtime &runtime, const jsi::Value &value);
71
71
 
72
- // Base template for convertProperty
72
+ template <typename T, typename Target>
73
+ bool convertSelectorProperty(jsi::Runtime &runtime, const jsi::Value &prop,
74
+ Target &target, Variables &variables) {
75
+ if (!prop.isObject()) {
76
+ return false;
77
+ }
78
+ auto wrapper = prop.asObject(runtime);
79
+ if (!wrapper.hasProperty(runtime, "__sv") ||
80
+ !wrapper.hasProperty(runtime, "__key")) {
81
+ return false;
82
+ }
83
+ auto svVal = wrapper.getProperty(runtime, "__sv");
84
+ auto keyVal = wrapper.getProperty(runtime, "__key");
85
+ if (!isSharedValue(runtime, svVal) || !keyVal.isString()) {
86
+ return false;
87
+ }
88
+ auto sharedValue = svVal.asObject(runtime);
89
+ auto key = keyVal.asString(runtime).utf8(runtime);
90
+ auto name =
91
+ sharedValue.getProperty(runtime, "name").asString(runtime).utf8(runtime);
92
+
93
+ auto conv = [target = &target, key](jsi::Runtime &runtime,
94
+ const jsi::Object &val) {
95
+ auto value = val.getProperty(runtime, "value");
96
+ if (!value.isObject()) {
97
+ return;
98
+ }
99
+ auto values = value.asObject(runtime);
100
+ if (!values.hasProperty(runtime, key.c_str())) {
101
+ return;
102
+ }
103
+
104
+ auto selected = values.getProperty(runtime, key.c_str());
105
+ if (selected.isUndefined() || selected.isNull() ||
106
+ (selected.isObject() && selected.asObject(runtime).isFunction(runtime))) {
107
+ return;
108
+ }
109
+ *target = getPropertyValue<T>(runtime, selected);
110
+ };
111
+
112
+ variables[name].push_back(conv);
113
+ conv(runtime, sharedValue);
114
+ return true;
115
+ }
116
+
73
117
  template <typename T, typename Target>
74
118
  void convertPropertyImpl(jsi::Runtime &runtime, const jsi::Object &object,
75
119
  const std::string &propertyName, Target &target,
@@ -78,13 +122,16 @@ void convertPropertyImpl(jsi::Runtime &runtime, const jsi::Object &object,
78
122
  return;
79
123
  }
80
124
 
81
- auto property = object.getProperty(runtime, propertyName.c_str());
125
+ auto prop = object.getProperty(runtime, propertyName.c_str());
126
+
127
+ if (convertSelectorProperty<T>(runtime, prop, target, variables)) {
128
+ return;
129
+ }
82
130
 
83
- if (isSharedValue(runtime, property)) {
84
- auto sharedValue = property.asObject(runtime);
85
- auto name = sharedValue.getProperty(runtime, "name")
86
- .asString(runtime)
87
- .utf8(runtime);
131
+ if (isSharedValue(runtime, prop)) {
132
+ auto sharedValue = prop.asObject(runtime);
133
+ auto name =
134
+ sharedValue.getProperty(runtime, "name").asString(runtime).utf8(runtime);
88
135
  auto conv = [target = &target](jsi::Runtime &runtime,
89
136
  const jsi::Object &val) {
90
137
  auto value = val.getProperty(runtime, "value");
@@ -92,9 +139,10 @@ void convertPropertyImpl(jsi::Runtime &runtime, const jsi::Object &object,
92
139
  };
93
140
  variables[name].push_back(conv);
94
141
  conv(runtime, sharedValue);
95
- } else {
96
- target = getPropertyValue<T>(runtime, property);
142
+ return;
97
143
  }
144
+
145
+ target = getPropertyValue<T>(runtime, prop);
98
146
  }
99
147
 
100
148
  // Main convertProperty template
@@ -313,13 +361,16 @@ SkM44 getPropertyValue(jsi::Runtime &runtime, const jsi::Value &value) {
313
361
  m4.preScale(1, s);
314
362
  } else if (key == "skewX") {
315
363
  auto angle = value.getProperty(runtime, key.c_str()).asNumber();
316
- SkM44 skewX(1, 0, 0, 0, std::tan(angle), 1, 0, 0, 0, 0, 1, 0, 0, 0, 0,
364
+ // The SkM44 constructor takes its arguments in row-major reading
365
+ // order, so the shear factor of a horizontal skew belongs in row 0,
366
+ // where it scales y into x.
367
+ SkM44 skewX(1, std::tan(angle), 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0,
317
368
  1);
318
369
  m4.preConcat(skewX);
319
370
 
320
371
  } else if (key == "skewY") {
321
372
  auto angle = value.getProperty(runtime, key.c_str()).asNumber();
322
- SkM44 skewY(1, std::tan(angle), 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0,
373
+ SkM44 skewY(1, 0, 0, 0, std::tan(angle), 1, 0, 0, 0, 0, 1, 0, 0, 0, 0,
323
374
  1);
324
375
  m4.preConcat(skewY);
325
376
  } else if (key == "rotate" || key == "rotateZ") {
@@ -149,6 +149,9 @@ public:
149
149
  if (hasStrokeOptions) {
150
150
  const auto &stroke = props.stroke.value();
151
151
  SkPaint strokePaint;
152
+ // A default SkPaint is fill-style, and FillPathWithPaint only
153
+ // outlines a paint that strokes.
154
+ strokePaint.setStyle(SkPaint::kStroke_Style);
152
155
 
153
156
  if (stroke.cap.has_value()) {
154
157
  strokePaint.setStrokeCap(stroke.cap.value());
@@ -166,11 +169,18 @@ public:
166
169
  strokePaint.setStrokeMiter(stroke.miter_limit.value());
167
170
  }
168
171
 
172
+ float precision = stroke.precision.value_or(1.0f);
173
+
169
174
  SkPathBuilder resultBuilder;
170
- if (!skpathutils::FillPathWithPaint(*p, strokePaint, &resultBuilder)) {
171
- throw std::runtime_error("Failed to apply stroke to path");
175
+ auto ctm = SkMatrix::Scale(precision, precision);
176
+ if (skpathutils::FillPathWithPaint(*p, strokePaint, &resultBuilder,
177
+ nullptr, ctm)) {
178
+ pathToUse = std::make_shared<const SkPath>(resultBuilder.snapshot());
179
+ } else {
180
+ // The JS player keeps the unstroked path when Path.Stroke returns
181
+ // null (e.g. a hairline width of 0).
182
+ pathToUse = std::const_pointer_cast<const SkPath>(p);
172
183
  }
173
- pathToUse = std::make_shared<const SkPath>(resultBuilder.snapshot());
174
184
  } else {
175
185
  pathToUse = std::const_pointer_cast<const SkPath>(p);
176
186
  }
@@ -135,8 +135,22 @@ private:
135
135
  auto sourceAlpha = SkImageFilters::ColorFilter(
136
136
  SkColorFilters::Blend(SK_ColorBLACK, SkBlendMode::kSrcIn), nullptr);
137
137
 
138
+ // The shadow is generated outside the shape and then clipped back into it,
139
+ // so "outside" has to be the complement of the shape's silhouette. Taking
140
+ // SrcOut against the source graphic itself makes it the complement of the
141
+ // source's *alpha*: inside a translucent shape 1 - alpha is non-zero, so
142
+ // the shadow is generated across the whole interior and tints it, no matter
143
+ // how small the blur and the offset are (issue #2990). Saturating alpha
144
+ // first keeps the shadow tied to the shape's outline instead of to its
145
+ // opacity. 255 is the saturation point of an 8-bit alpha channel, so one
146
+ // unit of coverage is enough to reach 1.
147
+ static constexpr float kAlphaSaturate[20] = {
148
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 0};
149
+ auto coverage = SkImageFilters::ColorFilter(
150
+ SkColorFilters::Matrix(kAlphaSaturate), nullptr);
151
+
138
152
  auto f1 = SkImageFilters::ColorFilter(
139
- SkColorFilters::Blend(color, SkBlendMode::kSrcOut), nullptr);
153
+ SkColorFilters::Blend(color, SkBlendMode::kSrcOut), coverage);
140
154
 
141
155
  auto f2 = SkImageFilters::Offset(dx, dy, f1);
142
156
  auto f3 = SkImageFilters::Blur(sigmaX, sigmaY, SkTileMode::kDecal, f2);
@@ -154,8 +154,11 @@ public:
154
154
  }
155
155
  ctx->savePaint();
156
156
  if (standalone) {
157
- SkPaint freshPaint;
158
- ctx->pushPaint(freshPaint);
157
+ // Reset the paint that savePaint() just pushed instead of pushing a
158
+ // second one: the matching RestorePaintDeclaration pops a single frame,
159
+ // so an extra push would leave the enclosing group's opacity on the
160
+ // stack and leak it onto every sibling drawn afterwards.
161
+ ctx->getPaint() = SkPaint();
159
162
  }
160
163
  auto &paint = ctx->getPaint();
161
164
  if (props.opacity.has_value()) {
@@ -10,7 +10,7 @@
10
10
  #include "include/core/SkData.h"
11
11
  #include "include/core/SkRect.h"
12
12
  #include "include/core/SkSize.h"
13
- #include "include/private/base/SkAssert.h"
13
+ #include "include/private/SkAssert.h"
14
14
  #include "modules/skottie/include/Skottie.h"
15
15
  #include "modules/skresources/include/SkResources.h"
16
16
 
@@ -96,9 +96,6 @@ public:
96
96
  virtual sk_sp<SkSurface>
97
97
  makeOffscreenSurface(int width, int height, bool useP3ColorSpace = false) = 0;
98
98
 
99
- virtual std::shared_ptr<WindowContext>
100
- makeContextFromNativeSurface(void *surface, int width, int height) = 0;
101
-
102
99
  /**
103
100
  * Creates an image from a native buffer.
104
101
  * - On iOS, this is a `CVPixelBufferRef`
@@ -39,8 +39,6 @@ public:
39
39
 
40
40
  static void SafetyNetLog(const char*);
41
41
 
42
- static sk_sp<SkSurface> getSurfaceFromCanvas(SkCanvas* canvas);
43
-
44
42
  static int SaveBehind(SkCanvas* canvas, const SkRect* subset);
45
43
 
46
44
  // Operating within the canvas' clip stack, this resets the geometry of the clip to be wide
@@ -9,7 +9,7 @@
9
9
  #define AndroidVulkanMemoryAllocator_DEFINED
10
10
 
11
11
  #include "include/core/SkRefCnt.h"
12
- #include "include/private/base/SkAPI.h"
12
+ #include "include/private/SkAPI.h"
13
13
 
14
14
  namespace skgpu {
15
15
  struct VulkanBackendContext;
@@ -15,7 +15,7 @@
15
15
  #include "include/core/SkSize.h"
16
16
  #include "include/core/SkTypes.h"
17
17
  #include "include/private/SkEncodedInfo.h"
18
- #include "include/private/base/SkNoncopyable.h"
18
+ #include "include/private/SkNoncopyable.h"
19
19
  #include "modules/skcms/skcms.h"
20
20
 
21
21
  // TODO(kjlubick, bungeman) Replace these includes with forward declares
@@ -9,7 +9,7 @@
9
9
 
10
10
  #include "include/codec/SkCodec.h"
11
11
  #include "include/core/SkRefCnt.h"
12
- #include "include/private/base/SkAPI.h"
12
+ #include "include/private/SkAPI.h"
13
13
 
14
14
  class SkData;
15
15
  class SkStream;
@@ -9,7 +9,7 @@
9
9
 
10
10
  #include "include/codec/SkCodec.h"
11
11
  #include "include/core/SkRefCnt.h"
12
- #include "include/private/base/SkAPI.h"
12
+ #include "include/private/SkAPI.h"
13
13
 
14
14
  class SkData;
15
15
  class SkStream;
@@ -0,0 +1,42 @@
1
+ /*
2
+ * Copyright 2025 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
+ #ifndef SkBmpRustDecoder_DEFINED
8
+ #define SkBmpRustDecoder_DEFINED
9
+
10
+ #include "include/codec/SkCodec.h"
11
+ #include "include/core/SkRefCnt.h"
12
+ #include "include/private/SkAPI.h"
13
+
14
+ class SkData;
15
+ class SkStream;
16
+
17
+ #include <memory>
18
+
19
+ namespace SkBmpRustDecoder {
20
+
21
+ /** Returns true if this data claims to be a BMP image. */
22
+ SK_API bool IsBmp(const void*, size_t);
23
+
24
+ /**
25
+ * Attempts to decode the given bytes as a BMP using Rust implementation.
26
+ *
27
+ * If the bytes are not a BMP, returns nullptr.
28
+ */
29
+ SK_API std::unique_ptr<SkCodec> Decode(std::unique_ptr<SkStream>,
30
+ SkCodec::Result*,
31
+ SkCodecs::DecodeContext = nullptr);
32
+ SK_API std::unique_ptr<SkCodec> Decode(sk_sp<const SkData>,
33
+ SkCodec::Result*,
34
+ SkCodecs::DecodeContext = nullptr);
35
+
36
+ inline constexpr SkCodecs::Decoder Decoder() {
37
+ return { "rust_bmp", IsBmp, Decode };
38
+ }
39
+
40
+ } // namespace SkBmpRustDecoder
41
+
42
+ #endif // SkBmpRustDecoder_DEFINED
@@ -19,7 +19,7 @@
19
19
  #include "include/core/SkYUVAPixmaps.h"
20
20
  #include "include/private/SkEncodedInfo.h"
21
21
  #include "include/private/SkHdrMetadata.h"
22
- #include "include/private/base/SkNoncopyable.h"
22
+ #include "include/private/SkNoncopyable.h"
23
23
  #include "modules/skcms/skcms.h"
24
24
 
25
25
  #include <cstddef>
@@ -1129,7 +1129,8 @@ private:
1129
1129
  friend class PNGCodecGM; // for fillIncompleteImage
1130
1130
  friend class SkSampledCodec;
1131
1131
  friend class SkIcoCodec;
1132
- friend class SkPngCodec; // for onGetGainmapCodec
1132
+ friend class SkIcoRustCodec; // for getEncodedInfo and getSampler
1133
+ friend class SkPngCodecBase; // for onGetGainmapCodec
1133
1134
  friend class SkAndroidCodec; // for handleFrameIndex
1134
1135
  friend class SkCodecPriv; // for fEncodedInfo
1135
1136
  };
@@ -9,7 +9,7 @@
9
9
 
10
10
  #include "include/codec/SkCodec.h"
11
11
  #include "include/core/SkRefCnt.h"
12
- #include "include/private/base/SkAPI.h"
12
+ #include "include/private/SkAPI.h"
13
13
 
14
14
  class SkData;
15
15
  class SkStream;
@@ -9,7 +9,7 @@
9
9
 
10
10
  #include "include/codec/SkCodec.h"
11
11
  #include "include/core/SkRefCnt.h"
12
- #include "include/private/base/SkAPI.h"
12
+ #include "include/private/SkAPI.h"
13
13
 
14
14
  class SkData;
15
15
  class SkStream;
@@ -9,7 +9,7 @@
9
9
 
10
10
  #include "include/codec/SkCodec.h"
11
11
  #include "include/core/SkRefCnt.h"
12
- #include "include/private/base/SkAPI.h"
12
+ #include "include/private/SkAPI.h"
13
13
 
14
14
  class SkData;
15
15
  class SkStream;
@@ -9,7 +9,7 @@
9
9
 
10
10
  #include "include/codec/SkCodec.h"
11
11
  #include "include/core/SkRefCnt.h"
12
- #include "include/private/base/SkAPI.h"
12
+ #include "include/private/SkAPI.h"
13
13
 
14
14
  class SkData;
15
15
  class SkStream;
@@ -10,7 +10,7 @@
10
10
 
11
11
  #include "include/codec/SkEncodedOrigin.h"
12
12
  #include "include/core/SkImageInfo.h"
13
- #include "include/private/base/SkAPI.h"
13
+ #include "include/private/SkAPI.h"
14
14
 
15
15
  class SkPixmap;
16
16
 
@@ -9,7 +9,7 @@
9
9
 
10
10
  #include "include/codec/SkCodec.h"
11
11
  #include "include/core/SkRefCnt.h"
12
- #include "include/private/base/SkAPI.h"
12
+ #include "include/private/SkAPI.h"
13
13
 
14
14
  class SkData;
15
15
  class SkStream;
@@ -10,7 +10,7 @@
10
10
  #include <memory>
11
11
 
12
12
  #include "include/codec/SkCodec.h"
13
- #include "include/private/base/SkAPI.h"
13
+ #include "include/private/SkAPI.h"
14
14
 
15
15
  class SkStream;
16
16
 
@@ -9,7 +9,7 @@
9
9
 
10
10
  #include "include/codec/SkCodec.h"
11
11
  #include "include/core/SkRefCnt.h"
12
- #include "include/private/base/SkAPI.h"
12
+ #include "include/private/SkAPI.h"
13
13
 
14
14
  class SkData;
15
15
  class SkStream;
@@ -9,7 +9,7 @@
9
9
 
10
10
  #include "include/codec/SkCodec.h"
11
11
  #include "include/core/SkRefCnt.h"
12
- #include "include/private/base/SkAPI.h"
12
+ #include "include/private/SkAPI.h"
13
13
 
14
14
  class SkData;
15
15
  class SkStream;
@@ -9,7 +9,7 @@
9
9
 
10
10
  #include "include/codec/SkCodec.h"
11
11
  #include "include/core/SkRefCnt.h"
12
- #include "include/private/base/SkAPI.h"
12
+ #include "include/private/SkAPI.h"
13
13
 
14
14
  class SkData;
15
15
  class SkStream;
@@ -18,8 +18,8 @@
18
18
  #include "include/core/SkSamplingOptions.h"
19
19
  #include "include/core/SkSize.h"
20
20
  #include "include/core/SkTypes.h"
21
- #include "include/private/base/SkCPUTypes.h"
22
- #include "include/private/base/SkDebug.h"
21
+ #include "include/private/SkCPUTypes.h"
22
+ #include "include/private/SkDebug.h"
23
23
 
24
24
  #include <cstddef>
25
25
  #include <cstdint>
@@ -205,7 +205,7 @@ public:
205
205
 
206
206
  @return true if dimensions do not enclose area
207
207
  */
208
- bool empty() const { return fPixmap.info().isEmpty(); }
208
+ bool empty() const { return fPixmap.isEmpty(); }
209
209
 
210
210
  /** Returns true if SkPixelRef is nullptr.
211
211
 
@@ -7,7 +7,7 @@
7
7
  #ifndef skcpu_Context_DEFINED
8
8
  #define skcpu_Context_DEFINED
9
9
 
10
- #include "include/private/base/SkAPI.h"
10
+ #include "include/private/SkAPI.h"
11
11
 
12
12
  #include <memory>
13
13
 
@@ -11,10 +11,9 @@
11
11
  #include <cstdint>
12
12
  #include "include/core/SkRecorder.h"
13
13
  #include "include/core/SkRefCnt.h"
14
- #include "include/private/base/SkAPI.h"
14
+ #include "include/private/SkAPI.h"
15
15
 
16
16
  class SkCanvas;
17
- class SkContentID;
18
17
  class SkSurface;
19
18
  class SkSurfaceProps;
20
19
  struct SkImageInfo;
@@ -59,7 +58,7 @@ public:
59
58
  private:
60
59
  // TODO (b/412351769): Implement this so we can capture from a CPU Recorder.
61
60
  SkCanvas* makeCaptureCanvas(SkCanvas*) final { return nullptr; }
62
- SkContentID createCaptureBreakpoint(SkSurface*) final;
61
+ void createCaptureBreakpoint(SkSurface*) final;
63
62
  };
64
63
 
65
64
  inline Recorder* AsRecorder(SkRecorder* recorder) {