@shopify/react-native-skia 0.1.192 → 0.1.194

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 +1 -1
  2. package/android/build.gradle +1 -0
  3. package/android/cpp/jni/JniPlatformContext.cpp +1 -1
  4. package/android/src/main/java/com/shopify/reactnative/skia/ViewScreenshotService.java +104 -103
  5. package/cpp/api/JsiSkImage.h +25 -4
  6. package/cpp/api/JsiSkImageFactory.h +2 -2
  7. package/cpp/api/JsiSkPath.h +8 -6
  8. package/cpp/rnskia/dom/base/Declaration.h +5 -7
  9. package/cpp/rnskia/dom/base/JsiDomDrawingNode.h +3 -1
  10. package/cpp/rnskia/dom/nodes/JsiBlurMaskNode.h +1 -0
  11. package/cpp/rnskia/dom/nodes/JsiPathNode.h +2 -2
  12. package/cpp/rnskia/dom/props/BoxShadowProps.h +2 -0
  13. package/cpp/skia/include/android/SkAndroidFrameworkUtils.h +2 -8
  14. package/cpp/skia/include/android/SkImageAndroid.h +101 -0
  15. package/cpp/skia/include/codec/SkAndroidCodec.h +26 -8
  16. package/cpp/skia/include/codec/SkCodec.h +31 -17
  17. package/cpp/skia/include/codec/SkEncodedImageFormat.h +36 -0
  18. package/cpp/skia/include/codec/SkPixmapUtils.h +31 -0
  19. package/cpp/skia/include/config/SkUserConfig.h +61 -29
  20. package/cpp/skia/include/core/SkBitmap.h +25 -25
  21. package/cpp/skia/include/core/SkBlurTypes.h +0 -2
  22. package/cpp/skia/include/core/SkCanvas.h +32 -15
  23. package/cpp/skia/include/core/SkCapabilities.h +2 -2
  24. package/cpp/skia/include/core/SkColor.h +2 -0
  25. package/cpp/skia/include/core/SkColorPriv.h +19 -4
  26. package/cpp/skia/include/core/SkColorSpace.h +14 -17
  27. package/cpp/skia/include/core/SkColorType.h +1 -0
  28. package/cpp/skia/include/core/SkContourMeasure.h +1 -1
  29. package/cpp/skia/include/core/SkCoverageMode.h +0 -2
  30. package/cpp/skia/include/core/SkCubicMap.h +2 -0
  31. package/cpp/skia/include/core/SkData.h +5 -2
  32. package/cpp/skia/include/core/SkDataTable.h +6 -2
  33. package/cpp/skia/include/core/SkDeferredDisplayList.h +11 -10
  34. package/cpp/skia/include/core/SkDeferredDisplayListRecorder.h +9 -8
  35. package/cpp/skia/include/core/SkDrawable.h +10 -2
  36. package/cpp/skia/include/core/SkEncodedImageFormat.h +3 -30
  37. package/cpp/skia/include/core/SkFlattenable.h +4 -2
  38. package/cpp/skia/include/core/SkFont.h +1 -0
  39. package/cpp/skia/include/core/SkFontMetrics.h +1 -0
  40. package/cpp/skia/include/core/SkFontMgr.h +20 -29
  41. package/cpp/skia/include/core/SkFontStyle.h +4 -1
  42. package/cpp/skia/include/core/SkGraphics.h +21 -18
  43. package/cpp/skia/include/core/SkICC.h +3 -13
  44. package/cpp/skia/include/core/SkImage.h +395 -717
  45. package/cpp/skia/include/core/SkImageGenerator.h +19 -74
  46. package/cpp/skia/include/core/SkImageInfo.h +7 -5
  47. package/cpp/skia/include/core/SkM44.h +11 -0
  48. package/cpp/skia/include/core/SkMaskFilter.h +6 -3
  49. package/cpp/skia/include/core/SkMatrix.h +14 -4
  50. package/cpp/skia/include/core/SkMesh.h +52 -18
  51. package/cpp/skia/include/core/SkMilestone.h +1 -1
  52. package/cpp/skia/include/core/SkPaint.h +11 -34
  53. package/cpp/skia/include/core/SkPath.h +23 -4
  54. package/cpp/skia/include/core/SkPathBuilder.h +13 -5
  55. package/cpp/skia/include/core/SkPathMeasure.h +1 -1
  56. package/cpp/skia/include/core/SkPathTypes.h +0 -2
  57. package/cpp/skia/include/core/SkPathUtils.h +42 -0
  58. package/cpp/skia/include/core/SkPicture.h +3 -2
  59. package/cpp/skia/include/core/SkPictureRecorder.h +2 -0
  60. package/cpp/skia/include/core/SkPixelRef.h +4 -8
  61. package/cpp/skia/include/core/SkPixmap.h +12 -20
  62. package/cpp/skia/include/core/SkPoint.h +4 -2
  63. package/cpp/skia/include/core/SkPromiseImageTexture.h +2 -2
  64. package/cpp/skia/include/core/SkRRect.h +5 -1
  65. package/cpp/skia/include/core/SkRect.h +6 -3
  66. package/cpp/skia/include/core/SkRefCnt.h +9 -14
  67. package/cpp/skia/include/core/SkRegion.h +1 -1
  68. package/cpp/skia/include/core/SkScalar.h +2 -4
  69. package/cpp/skia/include/core/SkSerialProcs.h +18 -10
  70. package/cpp/skia/include/core/SkShader.h +1 -64
  71. package/cpp/skia/include/core/SkSize.h +2 -0
  72. package/cpp/skia/include/core/SkSpan.h +4 -112
  73. package/cpp/skia/include/core/SkStream.h +11 -12
  74. package/cpp/skia/include/core/SkString.h +9 -25
  75. package/cpp/skia/include/core/SkStrokeRec.h +1 -1
  76. package/cpp/skia/include/core/SkSurface.h +83 -61
  77. package/cpp/skia/include/core/SkSurfaceCharacterization.h +3 -3
  78. package/cpp/skia/include/core/SkSurfaceProps.h +9 -1
  79. package/cpp/skia/include/core/SkTextBlob.h +2 -2
  80. package/cpp/skia/include/core/SkTextureCompressionType.h +30 -0
  81. package/cpp/skia/include/core/SkTime.h +1 -1
  82. package/cpp/skia/include/core/SkTypeface.h +9 -2
  83. package/cpp/skia/include/core/SkTypes.h +37 -466
  84. package/cpp/skia/include/core/SkVertices.h +2 -0
  85. package/cpp/skia/include/core/SkYUVAInfo.h +4 -0
  86. package/cpp/skia/include/core/SkYUVAPixmaps.h +7 -1
  87. package/cpp/skia/include/docs/SkPDFDocument.h +12 -1
  88. package/cpp/skia/include/effects/SkColorMatrix.h +2 -1
  89. package/cpp/skia/include/effects/SkGradientShader.h +65 -14
  90. package/cpp/skia/include/effects/SkImageFilters.h +0 -11
  91. package/cpp/skia/include/effects/SkRuntimeEffect.h +41 -11
  92. package/cpp/skia/include/encode/SkEncoder.h +7 -3
  93. package/cpp/skia/include/encode/SkICC.h +36 -0
  94. package/cpp/skia/include/encode/SkJpegEncoder.h +102 -71
  95. package/cpp/skia/include/encode/SkPngEncoder.h +89 -71
  96. package/cpp/skia/include/encode/SkWebpEncoder.h +65 -38
  97. package/cpp/skia/include/gpu/GpuTypes.h +23 -1
  98. package/cpp/skia/include/gpu/GrBackendSurface.h +9 -7
  99. package/cpp/skia/include/gpu/GrContextOptions.h +28 -9
  100. package/cpp/skia/include/gpu/GrContextThreadSafeProxy.h +6 -4
  101. package/cpp/skia/include/gpu/GrDirectContext.h +84 -63
  102. package/cpp/skia/include/gpu/GrDriverBugWorkarounds.h +2 -1
  103. package/cpp/skia/include/gpu/GrRecordingContext.h +9 -5
  104. package/cpp/skia/include/gpu/GrTypes.h +18 -18
  105. package/cpp/skia/include/gpu/d3d/GrD3DTypes.h +4 -4
  106. package/cpp/skia/include/gpu/dawn/GrDawnTypes.h +3 -3
  107. package/cpp/skia/include/gpu/ganesh/GrTextureGenerator.h +77 -0
  108. package/cpp/skia/include/gpu/ganesh/SkImageGanesh.h +385 -0
  109. package/cpp/skia/include/gpu/gl/GrGLExtensions.h +3 -3
  110. package/cpp/skia/include/gpu/gl/GrGLFunctions.h +1 -1
  111. package/cpp/skia/include/gpu/gl/GrGLInterface.h +0 -3
  112. package/cpp/skia/include/gpu/gl/GrGLTypes.h +2 -1
  113. package/cpp/skia/include/gpu/graphite/BackendTexture.h +72 -3
  114. package/cpp/skia/include/gpu/graphite/Context.h +85 -32
  115. package/cpp/skia/include/gpu/graphite/ContextOptions.h +15 -11
  116. package/cpp/skia/include/gpu/graphite/GraphiteTypes.h +55 -5
  117. package/cpp/skia/include/gpu/graphite/ImageProvider.h +6 -4
  118. package/cpp/skia/include/gpu/graphite/Recorder.h +41 -11
  119. package/cpp/skia/include/gpu/graphite/Recording.h +50 -3
  120. package/cpp/skia/include/gpu/graphite/TextureInfo.h +47 -8
  121. package/cpp/skia/include/gpu/graphite/YUVABackendTextures.h +139 -0
  122. package/cpp/skia/include/gpu/graphite/dawn/DawnTypes.h +40 -0
  123. package/cpp/skia/include/gpu/graphite/dawn/DawnUtils.h +28 -0
  124. package/cpp/skia/include/gpu/graphite/mtl/MtlBackendContext.h +1 -1
  125. package/cpp/skia/include/gpu/graphite/mtl/{MtlTypes.h → MtlGraphiteTypes.h} +7 -6
  126. package/cpp/skia/include/gpu/graphite/mtl/MtlGraphiteUtils.h +27 -0
  127. package/cpp/skia/include/gpu/graphite/vk/VulkanGraphiteTypes.h +4 -9
  128. package/cpp/skia/include/gpu/graphite/vk/VulkanGraphiteUtils.h +28 -0
  129. package/cpp/skia/include/gpu/mock/GrMockTypes.h +17 -13
  130. package/cpp/skia/include/gpu/mtl/GrMtlTypes.h +2 -2
  131. package/cpp/skia/include/gpu/vk/GrVkBackendContext.h +1 -1
  132. package/cpp/skia/include/gpu/vk/GrVkTypes.h +3 -3
  133. package/cpp/skia/include/gpu/vk/VulkanExtensions.h +3 -3
  134. package/cpp/skia/include/gpu/vk/VulkanMemoryAllocator.h +5 -7
  135. package/cpp/skia/include/pathops/SkPathOps.h +3 -3
  136. package/cpp/skia/include/ports/SkFontMgr_data.h +22 -0
  137. package/cpp/skia/include/ports/SkFontMgr_indirect.h +14 -14
  138. package/cpp/skia/include/ports/SkRemotableFontMgr.h +2 -2
  139. package/cpp/skia/include/ports/SkTypeface_win.h +2 -1
  140. package/cpp/skia/include/private/SkChecksum.h +32 -7
  141. package/cpp/skia/include/private/SkColorData.h +1 -26
  142. package/cpp/skia/include/private/SkGainmapInfo.h +97 -0
  143. package/cpp/skia/include/private/SkGainmapShader.h +53 -0
  144. package/cpp/skia/include/private/SkIDChangeListener.h +4 -3
  145. package/cpp/skia/include/private/SkJpegGainmapEncoder.h +71 -0
  146. package/cpp/skia/include/private/SkJpegMetadataDecoder.h +61 -0
  147. package/cpp/skia/include/private/SkOpts_spi.h +3 -1
  148. package/cpp/skia/include/private/SkPathRef.h +64 -47
  149. package/cpp/skia/include/private/SkSLDefines.h +5 -5
  150. package/cpp/skia/include/private/SkSLSampleUsage.h +0 -4
  151. package/cpp/skia/include/private/SkSpinlock.h +1 -1
  152. package/cpp/skia/include/private/SkWeakRefCnt.h +3 -0
  153. package/cpp/skia/include/private/{SingleOwner.h → base/SingleOwner.h} +8 -5
  154. package/cpp/skia/include/private/base/SkAPI.h +52 -0
  155. package/cpp/skia/include/private/base/SkAlign.h +39 -0
  156. package/cpp/skia/include/private/base/SkAlignedStorage.h +32 -0
  157. package/cpp/skia/include/private/base/SkAssert.h +92 -0
  158. package/cpp/skia/include/private/base/SkAttributes.h +102 -0
  159. package/cpp/skia/include/private/base/SkCPUTypes.h +25 -0
  160. package/cpp/skia/include/private/base/SkContainers.h +46 -0
  161. package/cpp/skia/include/private/base/SkDebug.h +27 -0
  162. package/cpp/skia/include/private/{SkDeque.h → base/SkDeque.h} +3 -1
  163. package/cpp/skia/include/private/base/SkFeatures.h +151 -0
  164. package/cpp/skia/include/private/{SkFixed.h → base/SkFixed.h} +9 -7
  165. package/cpp/skia/include/private/{SkFloatBits.h → base/SkFloatBits.h} +2 -3
  166. package/cpp/skia/include/private/{SkFloatingPoint.h → base/SkFloatingPoint.h} +18 -9
  167. package/cpp/skia/include/private/base/SkLoadUserConfig.h +63 -0
  168. package/cpp/skia/include/private/{SkMacros.h → base/SkMacros.h} +17 -2
  169. package/cpp/skia/include/private/{SkMalloc.h → base/SkMalloc.h} +4 -7
  170. package/cpp/skia/include/{core → private/base}/SkMath.h +25 -2
  171. package/cpp/skia/include/private/{SkMutex.h → base/SkMutex.h} +5 -5
  172. package/cpp/skia/include/private/{SkNoncopyable.h → base/SkNoncopyable.h} +2 -2
  173. package/cpp/skia/include/private/{SkOnce.h → base/SkOnce.h} +3 -1
  174. package/cpp/skia/include/private/base/SkPathEnums.h +25 -0
  175. package/cpp/skia/include/private/{SkSafe32.h → base/SkSafe32.h} +16 -1
  176. package/cpp/skia/include/private/{SkSemaphore.h → base/SkSemaphore.h} +4 -3
  177. package/cpp/skia/include/private/base/SkSpan_impl.h +129 -0
  178. package/cpp/skia/include/private/base/SkTArray.h +694 -0
  179. package/cpp/skia/include/private/{SkTDArray.h → base/SkTDArray.h} +17 -54
  180. package/cpp/skia/include/private/{SkTFitsIn.h → base/SkTFitsIn.h} +14 -8
  181. package/cpp/skia/include/private/{SkTLogic.h → base/SkTLogic.h} +1 -1
  182. package/cpp/skia/include/private/{SkTemplates.h → base/SkTemplates.h} +63 -88
  183. package/cpp/skia/include/private/{SkThreadID.h → base/SkThreadID.h} +5 -2
  184. package/cpp/skia/include/private/{SkTo.h → base/SkTo.h} +13 -2
  185. package/cpp/skia/include/private/base/SkTypeTraits.h +33 -0
  186. package/cpp/skia/include/private/chromium/GrVkSecondaryCBDrawContext.h +130 -0
  187. package/cpp/skia/include/private/chromium/SkChromeRemoteGlyphCache.h +5 -9
  188. package/cpp/skia/include/private/chromium/SkDiscardableMemory.h +70 -0
  189. package/cpp/skia/include/private/chromium/Slug.h +0 -9
  190. package/cpp/skia/include/private/gpu/ganesh/GrContext_Base.h +2 -1
  191. package/cpp/skia/include/private/gpu/ganesh/GrD3DTypesMinimal.h +1 -1
  192. package/cpp/skia/include/private/gpu/ganesh/GrDawnTypesPriv.h +1 -1
  193. package/cpp/skia/include/private/gpu/ganesh/GrGLTypesPriv.h +1 -1
  194. package/cpp/skia/include/private/gpu/ganesh/GrImageContext.h +1 -1
  195. package/cpp/skia/include/private/gpu/ganesh/GrMockTypesPriv.h +3 -2
  196. package/cpp/skia/include/private/gpu/ganesh/GrMtlTypesPriv.h +1 -1
  197. package/cpp/skia/include/private/gpu/ganesh/GrTypesPriv.h +17 -23
  198. package/cpp/skia/include/private/gpu/ganesh/GrVkTypesPriv.h +2 -2
  199. package/cpp/skia/include/private/gpu/graphite/DawnTypesPriv.h +38 -0
  200. package/cpp/skia/include/private/gpu/graphite/{MtlTypesPriv.h → MtlGraphiteTypesPriv.h} +5 -5
  201. package/cpp/skia/include/private/gpu/graphite/VulkanGraphiteTypesPriv.h +1 -9
  202. package/cpp/skia/include/private/gpu/vk/SkiaVulkan.h +4 -0
  203. package/cpp/skia/include/utils/SkCamera.h +1 -1
  204. package/cpp/skia/include/utils/SkCustomTypeface.h +7 -1
  205. package/cpp/skia/include/utils/SkNWayCanvas.h +6 -6
  206. package/cpp/skia/include/utils/SkOrderedFontMgr.h +7 -6
  207. package/cpp/skia/include/utils/SkPaintFilterCanvas.h +2 -2
  208. package/cpp/skia/include/utils/SkParsePath.h +1 -1
  209. package/cpp/skia/modules/skcms/skcms.h +14 -0
  210. package/cpp/skia/modules/skcms/src/Transform_inl.h +19 -0
  211. package/cpp/skia/modules/skparagraph/include/FontCollection.h +2 -2
  212. package/cpp/skia/modules/skparagraph/include/Paragraph.h +72 -2
  213. package/cpp/skia/modules/skparagraph/include/ParagraphCache.h +1 -11
  214. package/cpp/skia/modules/skparagraph/include/ParagraphPainter.h +63 -0
  215. package/cpp/skia/modules/skparagraph/include/TextStyle.h +27 -4
  216. package/cpp/skia/modules/skparagraph/include/TypefaceFontProvider.h +13 -13
  217. package/cpp/skia/modules/skresources/include/SkResources.h +18 -4
  218. package/cpp/skia/modules/svg/include/SkSVGAttribute.h +1 -1
  219. package/cpp/skia/modules/svg/include/SkSVGAttributeParser.h +2 -2
  220. package/cpp/skia/modules/svg/include/SkSVGContainer.h +2 -2
  221. package/cpp/skia/modules/svg/include/SkSVGDOM.h +1 -1
  222. package/cpp/skia/modules/svg/include/SkSVGFilterContext.h +2 -2
  223. package/cpp/skia/modules/svg/include/SkSVGGradient.h +2 -2
  224. package/cpp/skia/modules/svg/include/SkSVGIDMapper.h +2 -2
  225. package/cpp/skia/modules/svg/include/SkSVGRenderContext.h +3 -3
  226. package/cpp/skia/modules/svg/include/SkSVGSVG.h +1 -1
  227. package/cpp/skia/modules/svg/include/SkSVGTypes.h +22 -21
  228. package/cpp/skia/modules/svg/include/SkSVGValue.h +1 -1
  229. package/cpp/skia/{include/private → src/core}/SkTHash.h +41 -37
  230. package/ios/RNSkia-iOS/RNSkMetalCanvasProvider.mm +1 -2
  231. package/ios/RNSkia-iOS/ViewScreenshotService.mm +1 -1
  232. package/libs/android/arm64-v8a/libskia.a +0 -0
  233. package/libs/android/arm64-v8a/libskottie.a +0 -0
  234. package/libs/android/arm64-v8a/libsksg.a +0 -0
  235. package/libs/android/arm64-v8a/libskshaper.a +0 -0
  236. package/libs/android/arm64-v8a/libsvg.a +0 -0
  237. package/libs/android/armeabi-v7a/libskia.a +0 -0
  238. package/libs/android/armeabi-v7a/libskottie.a +0 -0
  239. package/libs/android/armeabi-v7a/libsksg.a +0 -0
  240. package/libs/android/armeabi-v7a/libskshaper.a +0 -0
  241. package/libs/android/armeabi-v7a/libsvg.a +0 -0
  242. package/libs/android/x86/libskia.a +0 -0
  243. package/libs/android/x86/libskottie.a +0 -0
  244. package/libs/android/x86/libsksg.a +0 -0
  245. package/libs/android/x86/libskshaper.a +0 -0
  246. package/libs/android/x86/libsvg.a +0 -0
  247. package/libs/android/x86_64/libskia.a +0 -0
  248. package/libs/android/x86_64/libskottie.a +0 -0
  249. package/libs/android/x86_64/libsksg.a +0 -0
  250. package/libs/android/x86_64/libskshaper.a +0 -0
  251. package/libs/android/x86_64/libsvg.a +0 -0
  252. package/libs/ios/libskia.xcframework/Info.plist +5 -5
  253. package/libs/ios/libskia.xcframework/ios-arm64_arm64e/libskia.a +0 -0
  254. package/libs/ios/libskia.xcframework/ios-arm64_arm64e_x86_64-simulator/libskia.a +0 -0
  255. package/libs/ios/libskottie.xcframework/ios-arm64_arm64e/libskottie.a +0 -0
  256. package/libs/ios/libskottie.xcframework/ios-arm64_arm64e_x86_64-simulator/libskottie.a +0 -0
  257. package/libs/ios/libsksg.xcframework/ios-arm64_arm64e/libsksg.a +0 -0
  258. package/libs/ios/libsksg.xcframework/ios-arm64_arm64e_x86_64-simulator/libsksg.a +0 -0
  259. package/libs/ios/libskshaper.xcframework/ios-arm64_arm64e/libskshaper.a +0 -0
  260. package/libs/ios/libskshaper.xcframework/ios-arm64_arm64e_x86_64-simulator/libskshaper.a +0 -0
  261. package/libs/ios/libsvg.xcframework/ios-arm64_arm64e/libsvg.a +0 -0
  262. package/libs/ios/libsvg.xcframework/ios-arm64_arm64e_x86_64-simulator/libsvg.a +0 -0
  263. package/package.json +1 -1
  264. package/react-native-skia.podspec +1 -1
  265. package/scripts/install-npm.js +11 -1
  266. package/cpp/skia/include/core/SkImageEncoder.h +0 -71
  267. package/cpp/skia/include/gpu/GrConfig.h +0 -53
  268. package/cpp/skia/include/gpu/graphite/CombinationBuilder.h +0 -195
  269. package/cpp/skia/include/private/SkHalf.h +0 -38
  270. package/cpp/skia/include/private/SkImageInfoPriv.h +0 -199
  271. package/cpp/skia/include/private/SkSLIRNode.h +0 -64
  272. package/cpp/skia/include/private/SkSLLayout.h +0 -144
  273. package/cpp/skia/include/private/SkSLModifiers.h +0 -178
  274. package/cpp/skia/include/private/SkSLProgramElement.h +0 -77
  275. package/cpp/skia/include/private/SkSLProgramKind.h +0 -35
  276. package/cpp/skia/include/private/SkSLStatement.h +0 -86
  277. package/cpp/skia/include/private/SkSLString.h +0 -41
  278. package/cpp/skia/include/private/SkSLSymbol.h +0 -94
  279. package/cpp/skia/include/private/SkSafe_math.h +0 -52
  280. package/cpp/skia/include/private/SkStringView.h +0 -51
  281. package/cpp/skia/include/private/SkTArray.h +0 -655
  282. package/cpp/skia/include/private/SkUniquePaintParamsID.h +0 -35
  283. package/cpp/skia/include/private/SkVx.h +0 -1026
  284. package/cpp/skia/include/sksl/DSL.h +0 -37
  285. package/cpp/skia/include/sksl/DSLBlock.h +0 -58
  286. package/cpp/skia/include/sksl/DSLCase.h +0 -62
  287. package/cpp/skia/include/sksl/DSLCore.h +0 -492
  288. package/cpp/skia/include/sksl/DSLExpression.h +0 -241
  289. package/cpp/skia/include/sksl/DSLFunction.h +0 -113
  290. package/cpp/skia/include/sksl/DSLLayout.h +0 -92
  291. package/cpp/skia/include/sksl/DSLModifiers.h +0 -69
  292. package/cpp/skia/include/sksl/DSLStatement.h +0 -82
  293. package/cpp/skia/include/sksl/DSLSymbols.h +0 -61
  294. package/cpp/skia/include/sksl/DSLType.h +0 -271
  295. package/cpp/skia/include/sksl/DSLVar.h +0 -231
  296. package/cpp/skia/include/sksl/SkSLErrorReporter.h +0 -65
  297. package/cpp/skia/include/sksl/SkSLOperator.h +0 -154
  298. package/cpp/skia/include/sksl/SkSLPosition.h +0 -104
  299. package/cpp/skia/include/utils/SkRandom.h +0 -169
  300. package/cpp/skia/src/core/SkLRUCache.h +0 -126
  301. package/cpp/skia/src/core/SkTInternalLList.h +0 -302
  302. /package/cpp/skia/include/{core → codec}/SkPngChunkReader.h +0 -0
  303. /package/cpp/skia/include/private/{SkTPin.h → base/SkTPin.h} +0 -0
  304. /package/cpp/skia/include/private/{SkThreadAnnotations.h → base/SkThreadAnnotations.h} +0 -0
@@ -1,37 +0,0 @@
1
- /*
2
- * Copyright 2020 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
- #ifndef SKSL_DSL
9
- #define SKSL_DSL
10
-
11
- #include "include/sksl/DSLBlock.h"
12
- #include "include/sksl/DSLCore.h"
13
- #include "include/sksl/DSLExpression.h"
14
- #include "include/sksl/DSLFunction.h"
15
- #include "include/sksl/DSLType.h"
16
-
17
- namespace SkSL {
18
-
19
- namespace dsl {
20
-
21
- using Block = DSLBlock;
22
- using Case = DSLCase;
23
- using Expression = DSLExpression;
24
- using Field = DSLField;
25
- using Function = DSLFunction;
26
- using GlobalVar = DSLGlobalVar;
27
- using Layout = DSLLayout;
28
- using Modifiers = DSLModifiers;
29
- using Parameter = DSLParameter;
30
- using Statement = DSLStatement;
31
- using Var = DSLVar;
32
-
33
- } // namespace dsl
34
-
35
- } // namespace SkSL
36
-
37
- #endif
@@ -1,58 +0,0 @@
1
- /*
2
- * Copyright 2021 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
- #ifndef SKSL_DSL_BLOCK
9
- #define SKSL_DSL_BLOCK
10
-
11
- #include "include/private/SkSLDefines.h"
12
- #include "include/private/SkTArray.h"
13
- #include "include/sksl/DSLStatement.h"
14
- #include "include/sksl/SkSLPosition.h"
15
-
16
- #include <memory>
17
-
18
- namespace SkSL {
19
-
20
- class Block;
21
- class SymbolTable;
22
-
23
- namespace dsl {
24
-
25
- class DSLBlock {
26
- public:
27
- template<class... Statements>
28
- DSLBlock(Statements... statements) {
29
- fStatements.reserve_back(sizeof...(statements));
30
- ((void)fStatements.push_back(DSLStatement(statements.release()).release()), ...);
31
- }
32
-
33
- DSLBlock(SkSL::StatementArray statements, std::shared_ptr<SymbolTable> symbols = nullptr,
34
- Position pos = {});
35
-
36
- DSLBlock(SkTArray<DSLStatement> statements, std::shared_ptr<SymbolTable> symbols = nullptr,
37
- Position pos = {});
38
-
39
- DSLBlock(DSLBlock&& other) = default;
40
- DSLBlock& operator=(DSLBlock&& other) = default;
41
-
42
- ~DSLBlock() = default;
43
-
44
- void append(DSLStatement stmt);
45
-
46
- std::unique_ptr<SkSL::Block> release();
47
-
48
- private:
49
- SkSL::StatementArray fStatements;
50
- std::shared_ptr<SkSL::SymbolTable> fSymbols;
51
- Position fPosition;
52
- };
53
-
54
- } // namespace dsl
55
-
56
- } // namespace SkSL
57
-
58
- #endif
@@ -1,62 +0,0 @@
1
- /*
2
- * Copyright 2021 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
- #ifndef SKSL_DSL_CASE
9
- #define SKSL_DSL_CASE
10
-
11
- #include "include/private/SkSLDefines.h"
12
- #include "include/private/SkTArray.h"
13
- #include "include/sksl/DSLExpression.h"
14
- #include "include/sksl/DSLStatement.h"
15
- #include "include/sksl/SkSLPosition.h"
16
-
17
- #include <utility>
18
-
19
- namespace SkSL {
20
-
21
- namespace dsl {
22
-
23
- class DSLCase {
24
- public:
25
- // An empty expression means 'default:'.
26
- template<class... Statements>
27
- DSLCase(DSLExpression value, Statements... statements)
28
- : fValue(std::move(value)) {
29
- fStatements.reserve_back(sizeof...(statements));
30
- ((void)fStatements.push_back(DSLStatement(std::move(statements)).release()), ...);
31
- }
32
-
33
- DSLCase(DSLExpression value, SkTArray<DSLStatement> statements,
34
- Position pos = {});
35
-
36
- DSLCase(DSLExpression value, SkSL::StatementArray statements,
37
- Position pos = {});
38
-
39
- DSLCase(DSLCase&&);
40
-
41
- ~DSLCase();
42
-
43
- DSLCase& operator=(DSLCase&&);
44
-
45
- void append(DSLStatement stmt);
46
-
47
- private:
48
- DSLExpression fValue;
49
- SkSL::StatementArray fStatements;
50
- Position fPosition;
51
-
52
- friend class DSLCore;
53
-
54
- template<class... Cases>
55
- friend DSLStatement Switch(DSLExpression value, Cases... cases);
56
- };
57
-
58
- } // namespace dsl
59
-
60
- } // namespace SkSL
61
-
62
- #endif
@@ -1,492 +0,0 @@
1
- /*
2
- * Copyright 2020 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
- #ifndef SKSL_DSL_CORE
9
- #define SKSL_DSL_CORE
10
-
11
- #include "include/private/SkSLDefines.h"
12
- #include "include/private/SkSLProgramKind.h"
13
- #include "include/private/SkTArray.h"
14
- #include "include/sksl/DSLCase.h"
15
- #include "include/sksl/DSLExpression.h"
16
- #include "include/sksl/DSLStatement.h"
17
- #include "include/sksl/DSLVar.h"
18
- #include "include/sksl/SkSLPosition.h"
19
-
20
- #include <memory>
21
- #include <string>
22
- #include <string_view>
23
- #include <utility>
24
-
25
- namespace SkSL {
26
-
27
- class Compiler;
28
- class ErrorReporter;
29
- struct Program;
30
- struct ProgramSettings;
31
-
32
- namespace dsl {
33
-
34
- class DSLField;
35
- class DSLModifiers;
36
-
37
- // When users import the DSL namespace via `using namespace SkSL::dsl`, we want the SwizzleComponent
38
- // Type enum to come into scope as well, so `Swizzle(var, X, Y, ONE)` can work as expected.
39
- // `namespace SkSL::SwizzleComponent` contains only an `enum Type`; this `using namespace` directive
40
- // shouldn't pollute the SkSL::dsl namespace with anything else.
41
- using namespace SkSL::SwizzleComponent;
42
-
43
- /**
44
- * Starts DSL output on the current thread using the specified compiler. This must be called
45
- * prior to any other DSL functions.
46
- */
47
- void Start(SkSL::Compiler* compiler, SkSL::ProgramKind kind = SkSL::ProgramKind::kFragment);
48
-
49
- void Start(SkSL::Compiler* compiler, SkSL::ProgramKind kind, const SkSL::ProgramSettings& settings);
50
-
51
- /**
52
- * Signals the end of DSL output. This must be called sometime between a call to Start() and the
53
- * termination of the thread.
54
- */
55
- void End();
56
-
57
- /**
58
- * Returns all global elements (functions and global variables) as a self-contained Program. The
59
- * optional source string is retained as the program's source. DSL programs do not normally have
60
- * sources, but when a DSL program is produced from parsed program text (as in Parser), it may be
61
- * important to retain it so that any std::string_views derived from it remain valid.
62
- */
63
- std::unique_ptr<SkSL::Program> ReleaseProgram(std::unique_ptr<std::string> source = nullptr);
64
-
65
- /**
66
- * Returns the ErrorReporter which will be notified of any errors that occur during DSL calls. The
67
- * default error reporter aborts on any error.
68
- */
69
- ErrorReporter& GetErrorReporter();
70
-
71
- /**
72
- * Installs an ErrorReporter which will be notified of any errors that occur during DSL calls.
73
- */
74
- void SetErrorReporter(ErrorReporter* errorReporter);
75
-
76
- DSLGlobalVar sk_FragColor();
77
-
78
- DSLGlobalVar sk_FragCoord();
79
-
80
- DSLExpression sk_Position();
81
-
82
- /**
83
- * #extension <name> : enable
84
- */
85
- void AddExtension(std::string_view name, Position pos = {});
86
-
87
- /**
88
- * break;
89
- */
90
- DSLStatement Break(Position pos = {});
91
-
92
- /**
93
- * continue;
94
- */
95
- DSLStatement Continue(Position pos = {});
96
-
97
- /**
98
- * Adds a modifiers declaration to the current program.
99
- */
100
- void Declare(const DSLModifiers& modifiers, Position pos = {});
101
-
102
- /**
103
- * Creates a local variable declaration statement.
104
- */
105
- DSLStatement Declare(DSLVar& var, Position pos = {});
106
-
107
- /**
108
- * Creates a local variable declaration statement containing multiple variables.
109
- */
110
- DSLStatement Declare(SkTArray<DSLVar>& vars, Position pos = {});
111
-
112
- /**
113
- * Declares a global variable.
114
- */
115
- void Declare(DSLGlobalVar& var, Position pos = {});
116
-
117
- /**
118
- * Declares a set of global variables.
119
- */
120
- void Declare(SkTArray<DSLGlobalVar>& vars, Position pos = {});
121
-
122
- /**
123
- * default: statements
124
- */
125
- template<class... Statements>
126
- DSLCase Default(Statements... statements) {
127
- return DSLCase(DSLExpression(), std::move(statements)...);
128
- }
129
-
130
- /**
131
- * discard;
132
- */
133
- DSLStatement Discard(Position pos = {});
134
-
135
- /**
136
- * do stmt; while (test);
137
- */
138
- DSLStatement Do(DSLStatement stmt, DSLExpression test, Position pos = {});
139
-
140
- /**
141
- * for (initializer; test; next) stmt;
142
- */
143
- DSLStatement For(DSLStatement initializer, DSLExpression test, DSLExpression next,
144
- DSLStatement stmt, Position pos = {}, ForLoopPositions positions = {});
145
-
146
- /**
147
- * if (test) ifTrue; [else ifFalse;]
148
- */
149
- DSLStatement If(DSLExpression test, DSLStatement ifTrue, DSLStatement ifFalse = DSLStatement(),
150
- Position pos = {});
151
-
152
- DSLGlobalVar InterfaceBlock(const DSLModifiers& modifiers, std::string_view typeName,
153
- SkTArray<DSLField> fields, std::string_view varName = "",
154
- int arraySize = 0, Position pos = {});
155
-
156
- /**
157
- * return [value];
158
- */
159
- DSLStatement Return(DSLExpression value = DSLExpression(),
160
- Position pos = {});
161
-
162
- /**
163
- * test ? ifTrue : ifFalse
164
- */
165
- DSLExpression Select(DSLExpression test, DSLExpression ifTrue, DSLExpression ifFalse,
166
- Position = {});
167
-
168
- DSLStatement StaticIf(DSLExpression test, DSLStatement ifTrue,
169
- DSLStatement ifFalse = DSLStatement(),
170
- Position pos = {});
171
-
172
- // Internal use only
173
- DSLStatement StaticSwitch(DSLExpression value, SkTArray<DSLCase> cases, Position pos = {});
174
-
175
- /**
176
- * @switch (value) { cases }
177
- */
178
- template<class... Cases>
179
- DSLStatement StaticSwitch(DSLExpression value, Cases... cases) {
180
- SkTArray<DSLCase> caseArray;
181
- caseArray.reserve_back(sizeof...(cases));
182
- (caseArray.push_back(std::move(cases)), ...);
183
- return StaticSwitch(std::move(value), std::move(caseArray), Position{});
184
- }
185
-
186
- // Internal use only
187
- DSLStatement Switch(DSLExpression value, SkTArray<DSLCase> cases, Position pos = {});
188
-
189
- /**
190
- * switch (value) { cases }
191
- */
192
- template<class... Cases>
193
- DSLStatement Switch(DSLExpression value, Cases... cases) {
194
- SkTArray<DSLCase> caseArray;
195
- caseArray.reserve_back(sizeof...(cases));
196
- (caseArray.push_back(std::move(cases)), ...);
197
- return Switch(std::move(value), std::move(caseArray), Position{});
198
- }
199
-
200
- /**
201
- * while (test) stmt;
202
- */
203
- DSLStatement While(DSLExpression test, DSLStatement stmt,
204
- Position pos = {});
205
-
206
- /**
207
- * expression.xyz1
208
- */
209
- DSLExpression Swizzle(DSLExpression base,
210
- SkSL::SwizzleComponent::Type a,
211
- Position pos = {},
212
- Position maskPos = {});
213
-
214
- DSLExpression Swizzle(DSLExpression base,
215
- SkSL::SwizzleComponent::Type a,
216
- SkSL::SwizzleComponent::Type b,
217
- Position pos = {},
218
- Position maskPos = {});
219
-
220
- DSLExpression Swizzle(DSLExpression base,
221
- SkSL::SwizzleComponent::Type a,
222
- SkSL::SwizzleComponent::Type b,
223
- SkSL::SwizzleComponent::Type c,
224
- Position pos = {},
225
- Position maskPos = {});
226
-
227
- DSLExpression Swizzle(DSLExpression base,
228
- SkSL::SwizzleComponent::Type a,
229
- SkSL::SwizzleComponent::Type b,
230
- SkSL::SwizzleComponent::Type c,
231
- SkSL::SwizzleComponent::Type d,
232
- Position pos = {},
233
- Position maskPos = {});
234
-
235
- /**
236
- * Returns the absolute value of x. If x is a vector, operates componentwise.
237
- */
238
- DSLExpression Abs(DSLExpression x, Position pos = {});
239
-
240
- /**
241
- * Returns true if all of the components of boolean vector x are true.
242
- */
243
- DSLExpression All(DSLExpression x, Position pos = {});
244
-
245
- /**
246
- * Returns true if any of the components of boolean vector x are true.
247
- */
248
- DSLExpression Any(DSLExpression x, Position pos = {});
249
-
250
- /**
251
- * Returns the arctangent of y over x. Operates componentwise on vectors.
252
- */
253
- DSLExpression Atan(DSLExpression y_over_x, Position pos = {});
254
- DSLExpression Atan(DSLExpression y, DSLExpression x, Position pos = {});
255
-
256
- /**
257
- * Returns x rounded towards positive infinity. If x is a vector, operates componentwise.
258
- */
259
- DSLExpression Ceil(DSLExpression x, Position pos = {});
260
-
261
- /**
262
- * Returns x clamped to between min and max. If x is a vector, operates componentwise.
263
- */
264
- DSLExpression Clamp(DSLExpression x, DSLExpression min, DSLExpression max,
265
- Position pos = {});
266
-
267
- /**
268
- * Returns the cosine of x. If x is a vector, operates componentwise.
269
- */
270
- DSLExpression Cos(DSLExpression x, Position pos = {});
271
-
272
- /**
273
- * Returns the cross product of x and y.
274
- */
275
- DSLExpression Cross(DSLExpression x, DSLExpression y, Position pos = {});
276
-
277
- /**
278
- * Returns x converted from radians to degrees. If x is a vector, operates componentwise.
279
- */
280
- DSLExpression Degrees(DSLExpression x, Position pos = {});
281
-
282
- /**
283
- * Returns the distance between x and y.
284
- */
285
- DSLExpression Distance(DSLExpression x, DSLExpression y,
286
- Position pos = {});
287
-
288
- /**
289
- * Returns the dot product of x and y.
290
- */
291
- DSLExpression Dot(DSLExpression x, DSLExpression y, Position pos = {});
292
-
293
- /**
294
- * Returns a boolean vector indicating whether components of x are equal to the corresponding
295
- * components of y.
296
- */
297
- DSLExpression Equal(DSLExpression x, DSLExpression y, Position pos = {});
298
-
299
- /**
300
- * Returns e^x. If x is a vector, operates componentwise.
301
- */
302
- DSLExpression Exp(DSLExpression x, Position pos = {});
303
-
304
- /**
305
- * Returns 2^x. If x is a vector, operates componentwise.
306
- */
307
- DSLExpression Exp2(DSLExpression x, Position pos = {});
308
-
309
- /**
310
- * If dot(i, nref) >= 0, returns n, otherwise returns -n.
311
- */
312
- DSLExpression Faceforward(DSLExpression n, DSLExpression i, DSLExpression nref,
313
- Position pos = {});
314
-
315
- /**
316
- * Returns x rounded towards negative infinity. If x is a vector, operates componentwise.
317
- */
318
- DSLExpression Floor(DSLExpression x, Position pos = {});
319
-
320
- /**
321
- * Returns the fractional part of x. If x is a vector, operates componentwise.
322
- */
323
- DSLExpression Fract(DSLExpression x, Position pos = {});
324
-
325
- /**
326
- * Returns a boolean vector indicating whether components of x are greater than the corresponding
327
- * components of y.
328
- */
329
- DSLExpression GreaterThan(DSLExpression x, DSLExpression y,
330
- Position pos = {});
331
-
332
- /**
333
- * Returns a boolean vector indicating whether components of x are greater than or equal to the
334
- * corresponding components of y.
335
- */
336
- DSLExpression GreaterThanEqual(DSLExpression x, DSLExpression y,
337
- Position pos = {});
338
-
339
- /**
340
- * Returns the 1/sqrt(x). If x is a vector, operates componentwise.
341
- */
342
- DSLExpression Inversesqrt(DSLExpression x, Position pos = {});
343
-
344
- /**
345
- * Returns the inverse of the matrix x.
346
- */
347
- DSLExpression Inverse(DSLExpression x, Position pos = {});
348
-
349
- /**
350
- * Returns the length of the vector x.
351
- */
352
- DSLExpression Length(DSLExpression x, Position pos = {});
353
-
354
- /**
355
- * Returns a boolean vector indicating whether components of x are less than the corresponding
356
- * components of y.
357
- */
358
- DSLExpression LessThan(DSLExpression x, DSLExpression y,
359
- Position pos = {});
360
-
361
- /**
362
- * Returns a boolean vector indicating whether components of x are less than or equal to the
363
- * corresponding components of y.
364
- */
365
- DSLExpression LessThanEqual(DSLExpression x, DSLExpression y,
366
- Position pos = {});
367
-
368
- /**
369
- * Returns the log base e of x. If x is a vector, operates componentwise.
370
- */
371
- DSLExpression Log(DSLExpression x, Position pos = {});
372
-
373
- /**
374
- * Returns the log base 2 of x. If x is a vector, operates componentwise.
375
- */
376
- DSLExpression Log2(DSLExpression x, Position pos = {});
377
-
378
- /**
379
- * Returns the larger (closer to positive infinity) of x and y. If x is a vector, operates
380
- * componentwise. y may be either a vector of the same dimensions as x, or a scalar.
381
- */
382
- DSLExpression Max(DSLExpression x, DSLExpression y, Position pos = {});
383
-
384
- /**
385
- * Returns the smaller (closer to negative infinity) of x and y. If x is a vector, operates
386
- * componentwise. y may be either a vector of the same dimensions as x, or a scalar.
387
- */
388
- DSLExpression Min(DSLExpression x, DSLExpression y, Position pos = {});
389
-
390
- /**
391
- * Returns a linear intepolation between x and y at position a, where a=0 results in x and a=1
392
- * results in y. If x and y are vectors, operates componentwise. a may be either a vector of the
393
- * same dimensions as x and y, or a scalar.
394
- */
395
- DSLExpression Mix(DSLExpression x, DSLExpression y, DSLExpression a,
396
- Position pos = {});
397
-
398
- /**
399
- * Returns x modulo y. If x is a vector, operates componentwise. y may be either a vector of the
400
- * same dimensions as x, or a scalar.
401
- */
402
- DSLExpression Mod(DSLExpression x, DSLExpression y, Position pos = {});
403
-
404
- /**
405
- * Returns the vector x normalized to a length of 1.
406
- */
407
- DSLExpression Normalize(DSLExpression x, Position pos = {});
408
-
409
- /**
410
- * Returns a boolean vector indicating whether components of x are not equal to the corresponding
411
- * components of y.
412
- */
413
- DSLExpression NotEqual(DSLExpression x, DSLExpression y,
414
- Position pos = {});
415
-
416
- /**
417
- * Returns x raised to the power y. If x is a vector, operates componentwise. y may be either a
418
- * vector of the same dimensions as x, or a scalar.
419
- */
420
- DSLExpression Pow(DSLExpression x, DSLExpression y, Position pos = {});
421
-
422
- /**
423
- * Returns x converted from degrees to radians. If x is a vector, operates componentwise.
424
- */
425
- DSLExpression Radians(DSLExpression x, Position pos = {});
426
-
427
- /**
428
- * Returns i reflected from a surface with normal n.
429
- */
430
- DSLExpression Reflect(DSLExpression i, DSLExpression n, Position pos = {});
431
-
432
- /**
433
- * Returns i refracted across a surface with normal n and ratio of indices of refraction eta.
434
- */
435
- DSLExpression Refract(DSLExpression i, DSLExpression n, DSLExpression eta,
436
- Position pos = {});
437
-
438
- /**
439
- * Returns x, rounded to the nearest integer. If x is a vector, operates componentwise.
440
- */
441
- DSLExpression Round(DSLExpression x, Position pos = {});
442
-
443
- /**
444
- * Returns x clamped to the range [0, 1]. If x is a vector, operates componentwise.
445
- */
446
- DSLExpression Saturate(DSLExpression x, Position pos = {});
447
-
448
- /**
449
- * Returns -1, 0, or 1 depending on whether x is negative, zero, or positive, respectively. If x is
450
- * a vector, operates componentwise.
451
- */
452
- DSLExpression Sign(DSLExpression x, Position pos = {});
453
-
454
- /**
455
- * Returns the sine of x. If x is a vector, operates componentwise.
456
- */
457
- DSLExpression Sin(DSLExpression x, Position pos = {});
458
-
459
- /**
460
- * Returns a smooth interpolation between 0 (at x=edge1) and 1 (at x=edge2). If x is a vector,
461
- * operates componentwise. edge1 and edge2 may either be both vectors of the same dimensions as x or
462
- * scalars.
463
- */
464
- DSLExpression Smoothstep(DSLExpression edge1, DSLExpression edge2, DSLExpression x,
465
- Position pos = {});
466
-
467
- /**
468
- * Returns the square root of x. If x is a vector, operates componentwise.
469
- */
470
- DSLExpression Sqrt(DSLExpression x, Position pos = {});
471
-
472
- /**
473
- * Returns 0 if x < edge or 1 if x >= edge. If x is a vector, operates componentwise. edge may be
474
- * either a vector of the same dimensions as x, or a scalar.
475
- */
476
- DSLExpression Step(DSLExpression edge, DSLExpression x, Position pos = {});
477
-
478
- /**
479
- * Returns the tangent of x. If x is a vector, operates componentwise.
480
- */
481
- DSLExpression Tan(DSLExpression x, Position pos = {});
482
-
483
- /**
484
- * Returns x converted from premultipled to unpremultiplied alpha.
485
- */
486
- DSLExpression Unpremul(DSLExpression x, Position pos = {});
487
-
488
- } // namespace dsl
489
-
490
- } // namespace SkSL
491
-
492
- #endif