@shopify/react-native-skia 0.1.192 → 0.1.194

Sign up to get free protection for your applications and to get access to all the features.
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
@@ -9,10 +9,13 @@
9
9
  #define SkColorSpace_DEFINED
10
10
 
11
11
  #include "include/core/SkRefCnt.h"
12
- #include "include/private/SkFixed.h"
13
- #include "include/private/SkOnce.h"
12
+ #include "include/core/SkTypes.h"
13
+ #include "include/private/base/SkFixed.h"
14
+ #include "include/private/base/SkOnce.h"
14
15
  #include "modules/skcms/skcms.h"
15
- #include <memory>
16
+
17
+ #include <cstddef>
18
+ #include <cstdint>
16
19
 
17
20
  class SkData;
18
21
 
@@ -147,8 +150,7 @@ public:
147
150
  bool isNumericalTransferFn(skcms_TransferFunction* fn) const;
148
151
 
149
152
  /**
150
- * Returns true and sets |toXYZD50| if the color gamut can be described as a matrix.
151
- * Returns false otherwise.
153
+ * Returns true and sets |toXYZD50|.
152
154
  */
153
155
  bool toXYZD50(skcms_Matrix3x3* toXYZD50) const;
154
156
 
@@ -160,23 +162,19 @@ public:
160
162
 
161
163
  /**
162
164
  * Returns a color space with the same gamut as this one, but with a linear gamma.
163
- * For color spaces whose gamut can not be described in terms of XYZ D50, returns
164
- * linear sRGB.
165
165
  */
166
166
  sk_sp<SkColorSpace> makeLinearGamma() const;
167
167
 
168
168
  /**
169
- * Returns a color space with the same gamut as this one, with with the sRGB transfer
170
- * function. For color spaces whose gamut can not be described in terms of XYZ D50, returns
171
- * sRGB.
169
+ * Returns a color space with the same gamut as this one, but with the sRGB transfer
170
+ * function.
172
171
  */
173
172
  sk_sp<SkColorSpace> makeSRGBGamma() const;
174
173
 
175
174
  /**
176
175
  * Returns a color space with the same transfer function as this one, but with the primary
177
- * colors rotated. For any XYZ space, this produces a new color space that maps RGB to GBR
178
- * (when applied to a source), and maps RGB to BRG (when applied to a destination). For other
179
- * types of color spaces, returns nullptr.
176
+ * colors rotated. In other words, this produces a new color space that maps RGB to GBR
177
+ * (when applied to a source), and maps RGB to BRG (when applied to a destination).
180
178
  *
181
179
  * This is used for testing, to construct color spaces that have severe and testable behavior.
182
180
  */
@@ -190,15 +188,14 @@ public:
190
188
  * in some cases: converting ICC fixed point to float, converting white point to D50,
191
189
  * rounding decisions on transfer function and matrix.
192
190
  *
193
- * This does not consider a 2.2f exponential transfer function to be sRGB. While these
191
+ * This does not consider a 2.2f exponential transfer function to be sRGB. While these
194
192
  * functions are similar (and it is sometimes useful to consider them together), this
195
193
  * function checks for logical equality.
196
194
  */
197
195
  bool isSRGB() const;
198
196
 
199
197
  /**
200
- * Returns nullptr on failure. Fails when we fallback to serializing ICC data and
201
- * the data is too large to serialize.
198
+ * Returns a serialized representation of this color space.
202
199
  */
203
200
  sk_sp<SkData> serialize() const;
204
201
 
@@ -211,7 +208,7 @@ public:
211
208
  static sk_sp<SkColorSpace> Deserialize(const void* data, size_t length);
212
209
 
213
210
  /**
214
- * If both are null, we return true. If one is null and the other is not, we return false.
211
+ * If both are null, we return true. If one is null and the other is not, we return false.
215
212
  * If both are non-null, we do a deeper compare.
216
213
  */
217
214
  static bool Equals(const SkColorSpace*, const SkColorSpace*);
@@ -28,6 +28,7 @@ enum SkColorType : int {
28
28
  kBGRA_1010102_SkColorType, //!< 10 bits for blue, green, red; 2 bits for alpha; in 32-bit word
29
29
  kRGB_101010x_SkColorType, //!< pixel with 10 bits each for red, green, blue; in 32-bit word
30
30
  kBGR_101010x_SkColorType, //!< pixel with 10 bits each for blue, green, red; in 32-bit word
31
+ kBGR_101010x_XR_SkColorType, //!< pixel with 10 bits each for blue, green, red; in 32-bit word, extended range
31
32
  kGray_8_SkColorType, //!< pixel with grayscale level in 8-bit byte
32
33
  kRGBA_F16Norm_SkColorType, //!< pixel with half floats in [0,1] for red, green, blue, alpha;
33
34
  // in 64-bit word
@@ -10,7 +10,7 @@
10
10
 
11
11
  #include "include/core/SkPath.h"
12
12
  #include "include/core/SkRefCnt.h"
13
- #include "include/private/SkTDArray.h"
13
+ #include "include/private/base/SkTDArray.h"
14
14
 
15
15
  struct SkConic;
16
16
 
@@ -8,8 +8,6 @@
8
8
  #ifndef SkCoverageMode_DEFINED
9
9
  #define SkCoverageMode_DEFINED
10
10
 
11
- #include "include/core/SkTypes.h"
12
-
13
11
  /**
14
12
  * Describes geometric operations (ala SkRegion::Op) that can be applied to coverage bytes.
15
13
  * These can be thought of as variants of porter-duff (SkBlendMode) modes, but only applied
@@ -9,6 +9,8 @@
9
9
  #define SkCubicMap_DEFINED
10
10
 
11
11
  #include "include/core/SkPoint.h"
12
+ #include "include/core/SkScalar.h"
13
+ #include "include/core/SkTypes.h"
12
14
 
13
15
  /**
14
16
  * Fast evaluation of a cubic ease-in / ease-out curve. This is defined as a parametric cubic
@@ -8,9 +8,12 @@
8
8
  #ifndef SkData_DEFINED
9
9
  #define SkData_DEFINED
10
10
 
11
- #include <stdio.h>
12
-
13
11
  #include "include/core/SkRefCnt.h"
12
+ #include "include/private/base/SkAPI.h"
13
+ #include "include/private/base/SkAssert.h"
14
+
15
+ #include <cstdint>
16
+ #include <cstdio>
14
17
 
15
18
  class SkStream;
16
19
 
@@ -8,8 +8,12 @@
8
8
  #ifndef SkDataTable_DEFINED
9
9
  #define SkDataTable_DEFINED
10
10
 
11
- #include "include/core/SkData.h"
12
- #include "include/private/SkTDArray.h"
11
+ #include "include/core/SkRefCnt.h"
12
+ #include "include/private/base/SkAPI.h"
13
+ #include "include/private/base/SkAssert.h"
14
+
15
+ #include <cstdint>
16
+ #include <cstring>
13
17
 
14
18
  /**
15
19
  * Like SkData, SkDataTable holds an immutable data buffer. The data buffer is
@@ -13,10 +13,11 @@
13
13
  #include "include/core/SkTypes.h"
14
14
 
15
15
  class SkDeferredDisplayListPriv;
16
+ class SkPromiseImageTexture;
16
17
 
17
- #if SK_SUPPORT_GPU
18
+ #if defined(SK_GANESH)
18
19
  #include "include/gpu/GrRecordingContext.h"
19
- #include "include/private/SkTArray.h"
20
+ #include "include/private/base/SkTArray.h"
20
21
  #include <map>
21
22
  class GrRenderTask;
22
23
  class GrRenderTargetProxy;
@@ -36,7 +37,7 @@ public:
36
37
  return fCharacterization;
37
38
  }
38
39
 
39
- #if SK_SUPPORT_GPU
40
+ #if defined(SK_GANESH)
40
41
  /**
41
42
  * Iterate through the programs required by the DDL.
42
43
  */
@@ -52,7 +53,7 @@ public:
52
53
 
53
54
  private:
54
55
  GrDirectContext* fDContext;
55
- const SkTArray<GrRecordingContext::ProgramData>& fProgramData;
56
+ const skia_private::TArray<GrRecordingContext::ProgramData>& fProgramData;
56
57
  int fIndex;
57
58
  };
58
59
  #endif
@@ -70,7 +71,7 @@ private:
70
71
  // texture when the DDL is replayed. It has to be separately ref counted bc the lazy proxy
71
72
  // can outlive the DDL.
72
73
  class LazyProxyData : public SkRefCnt {
73
- #if SK_SUPPORT_GPU
74
+ #if defined(SK_GANESH)
74
75
  public:
75
76
  // Upon being replayed - this field will be filled in (by the DrawingManager) with the
76
77
  // proxy backing the destination SkSurface. Note that, since there is no good place to
@@ -87,21 +88,21 @@ private:
87
88
  sk_sp<GrRenderTargetProxy> fTargetProxy,
88
89
  sk_sp<LazyProxyData>);
89
90
 
90
- #if SK_SUPPORT_GPU
91
- const SkTArray<GrRecordingContext::ProgramData>& programData() const {
91
+ #if defined(SK_GANESH)
92
+ const skia_private::TArray<GrRecordingContext::ProgramData>& programData() const {
92
93
  return fProgramData;
93
94
  }
94
95
  #endif
95
96
 
96
97
  const SkSurfaceCharacterization fCharacterization;
97
98
 
98
- #if SK_SUPPORT_GPU
99
+ #if defined(SK_GANESH)
99
100
  // These are ordered such that the destructor cleans op tasks up first (which may refer back
100
101
  // to the arena and memory pool in their destructors).
101
102
  GrRecordingContext::OwnedArenas fArenas;
102
- SkTArray<sk_sp<GrRenderTask>> fRenderTasks;
103
+ skia_private::TArray<sk_sp<GrRenderTask>> fRenderTasks;
103
104
 
104
- SkTArray<GrRecordingContext::ProgramData> fProgramData;
105
+ skia_private::TArray<GrRecordingContext::ProgramData> fProgramData;
105
106
  sk_sp<GrRenderTargetProxy> fTargetProxy;
106
107
  sk_sp<LazyProxyData> fLazyProxyData;
107
108
  #endif
@@ -50,13 +50,14 @@ public:
50
50
 
51
51
  sk_sp<SkDeferredDisplayList> detach();
52
52
 
53
- #if SK_SUPPORT_GPU
54
- using PromiseImageTextureContext = SkImage::PromiseImageTextureContext;
55
- using PromiseImageTextureFulfillProc = SkImage::PromiseImageTextureFulfillProc;
56
- using PromiseImageTextureReleaseProc = SkImage::PromiseImageTextureReleaseProc;
53
+ #if defined(SK_GANESH)
54
+ using PromiseImageTextureContext = void*;
55
+ using PromiseImageTextureFulfillProc =
56
+ sk_sp<SkPromiseImageTexture> (*)(PromiseImageTextureContext);
57
+ using PromiseImageTextureReleaseProc = void (*)(PromiseImageTextureContext);
57
58
 
58
59
  #ifndef SK_MAKE_PROMISE_TEXTURE_DISABLE_LEGACY_API
59
- /** Deprecated: Use SkImage::MakePromiseTexture instead. */
60
+ /** Deprecated: Use SkImages::PromiseTextureFrom instead. */
60
61
  sk_sp<SkImage> makePromiseTexture(const GrBackendFormat& backendFormat,
61
62
  int width,
62
63
  int height,
@@ -69,14 +70,14 @@ public:
69
70
  PromiseImageTextureReleaseProc textureReleaseProc,
70
71
  PromiseImageTextureContext textureContext);
71
72
 
72
- /** Deprecated: Use SkImage::MakePromiseYUVATexture instead. */
73
+ /** Deprecated: Use SkImages::PromiseTextureFromYUVA instead. */
73
74
  sk_sp<SkImage> makeYUVAPromiseTexture(const GrYUVABackendTextureInfo& yuvaBackendTextureInfo,
74
75
  sk_sp<SkColorSpace> imageColorSpace,
75
76
  PromiseImageTextureFulfillProc textureFulfillProc,
76
77
  PromiseImageTextureReleaseProc textureReleaseProc,
77
78
  PromiseImageTextureContext textureContexts[]);
78
79
  #endif // SK_MAKE_PROMISE_TEXTURE_DISABLE_LEGACY_API
79
- #endif // SK_SUPPORT_GPU
80
+ #endif // defined(SK_GANESH)
80
81
 
81
82
  private:
82
83
  SkDeferredDisplayListRecorder(const SkDeferredDisplayListRecorder&) = delete;
@@ -86,7 +87,7 @@ private:
86
87
 
87
88
  const SkSurfaceCharacterization fCharacterization;
88
89
 
89
- #if SK_SUPPORT_GPU
90
+ #if defined(SK_GANESH)
90
91
  sk_sp<GrRecordingContext> fContext;
91
92
  sk_sp<GrRenderTargetProxy> fTargetProxy;
92
93
  sk_sp<SkDeferredDisplayList::LazyProxyData> fLazyProxyData;
@@ -9,14 +9,22 @@
9
9
  #define SkDrawable_DEFINED
10
10
 
11
11
  #include "include/core/SkFlattenable.h"
12
- #include "include/core/SkImageInfo.h"
12
+ #include "include/core/SkRefCnt.h"
13
13
  #include "include/core/SkScalar.h"
14
+ #include "include/private/base/SkAPI.h"
15
+
16
+ #include <cstddef>
17
+ #include <cstdint>
18
+ #include <memory>
14
19
 
15
20
  class GrBackendDrawableInfo;
16
21
  class SkCanvas;
17
22
  class SkMatrix;
18
23
  class SkPicture;
19
- enum class GrBackendApi : unsigned;
24
+ enum class GrBackendApi : unsigned int;
25
+ struct SkDeserialProcs;
26
+ struct SkIRect;
27
+ struct SkImageInfo;
20
28
  struct SkRect;
21
29
 
22
30
  /**
@@ -1,36 +1,9 @@
1
1
  /*
2
- * Copyright 2015 Google Inc.
2
+ * Copyright 2023 Google LLC
3
3
  *
4
4
  * Use of this source code is governed by a BSD-style license that can be
5
5
  * found in the LICENSE file.
6
6
  */
7
7
 
8
- #ifndef SkEncodedImageFormat_DEFINED
9
- #define SkEncodedImageFormat_DEFINED
10
-
11
- #include <stdint.h>
12
-
13
- /**
14
- * Enum describing format of encoded data.
15
- */
16
- enum class SkEncodedImageFormat {
17
- #ifdef SK_BUILD_FOR_GOOGLE3
18
- kUnknown,
19
- #endif
20
- kBMP,
21
- kGIF,
22
- kICO,
23
- kJPEG,
24
- kPNG,
25
- kWBMP,
26
- kWEBP,
27
- kPKM,
28
- kKTX,
29
- kASTC,
30
- kDNG,
31
- kHEIF,
32
- kAVIF,
33
- kJPEGXL,
34
- };
35
-
36
- #endif // SkEncodedImageFormat_DEFINED
8
+ // TODO(kjlubick) remove this shim after clients have been moved to the new location
9
+ #include "include/codec/SkEncodedImageFormat.h" // IWYU pragma: export
@@ -9,13 +9,15 @@
9
9
  #define SkFlattenable_DEFINED
10
10
 
11
11
  #include "include/core/SkRefCnt.h"
12
+ #include "include/core/SkTypes.h"
13
+
14
+ #include <cstddef>
12
15
 
13
16
  class SkData;
14
17
  class SkReadBuffer;
15
18
  class SkWriteBuffer;
16
-
17
- struct SkSerialProcs;
18
19
  struct SkDeserialProcs;
20
+ struct SkSerialProcs;
19
21
 
20
22
  /** \class SkFlattenable
21
23
 
@@ -11,6 +11,7 @@
11
11
  #include "include/core/SkFontTypes.h"
12
12
  #include "include/core/SkScalar.h"
13
13
  #include "include/core/SkTypeface.h"
14
+ #include "include/private/base/SkTemplates.h"
14
15
 
15
16
  #include <vector>
16
17
 
@@ -9,6 +9,7 @@
9
9
  #define SkFontMetrics_DEFINED
10
10
 
11
11
  #include "include/core/SkScalar.h"
12
+ #include "include/private/base/SkTo.h"
12
13
 
13
14
  /** \class SkFontMetrics
14
15
  The metrics of an SkFont.
@@ -13,6 +13,8 @@
13
13
  #include "include/core/SkRefCnt.h"
14
14
  #include "include/core/SkTypes.h"
15
15
 
16
+ #include <memory>
17
+
16
18
  class SkData;
17
19
  class SkFontData;
18
20
  class SkStreamAsset;
@@ -23,23 +25,20 @@ class SK_API SkFontStyleSet : public SkRefCnt {
23
25
  public:
24
26
  virtual int count() = 0;
25
27
  virtual void getStyle(int index, SkFontStyle*, SkString* style) = 0;
26
- virtual SkTypeface* createTypeface(int index) = 0;
27
- virtual SkTypeface* matchStyle(const SkFontStyle& pattern) = 0;
28
+ virtual sk_sp<SkTypeface> createTypeface(int index) = 0;
29
+ virtual sk_sp<SkTypeface> matchStyle(const SkFontStyle& pattern) = 0;
28
30
 
29
- static SkFontStyleSet* CreateEmpty();
31
+ static sk_sp<SkFontStyleSet> CreateEmpty();
30
32
 
31
33
  protected:
32
- SkTypeface* matchStyleCSS3(const SkFontStyle& pattern);
33
-
34
- private:
35
- using INHERITED = SkRefCnt;
34
+ sk_sp<SkTypeface> matchStyleCSS3(const SkFontStyle& pattern);
36
35
  };
37
36
 
38
37
  class SK_API SkFontMgr : public SkRefCnt {
39
38
  public:
40
39
  int countFamilies() const;
41
40
  void getFamilyName(int index, SkString* familyName) const;
42
- SkFontStyleSet* createStyleSet(int index) const;
41
+ sk_sp<SkFontStyleSet> createStyleSet(int index) const;
43
42
 
44
43
  /**
45
44
  * The caller must call unref() on the returned object.
@@ -52,7 +51,7 @@ public:
52
51
  * It is possible that this will return a style set not accessible from
53
52
  * createStyleSet(int) due to hidden or auto-activated fonts.
54
53
  */
55
- SkFontStyleSet* matchFamily(const char familyName[]) const;
54
+ sk_sp<SkFontStyleSet> matchFamily(const char familyName[]) const;
56
55
 
57
56
  /**
58
57
  * Find the closest matching typeface to the specified familyName and style
@@ -66,7 +65,7 @@ public:
66
65
  * createStyleSet(int) or matchFamily(const char[]) due to hidden or
67
66
  * auto-activated fonts.
68
67
  */
69
- SkTypeface* matchFamilyStyle(const char familyName[], const SkFontStyle&) const;
68
+ sk_sp<SkTypeface> matchFamilyStyle(const char familyName[], const SkFontStyle&) const;
70
69
 
71
70
  /**
72
71
  * Use the system fallback to find a typeface for the given character.
@@ -83,9 +82,9 @@ public:
83
82
  * most significant. If no specified bcp47 codes match, any font with the
84
83
  * requested character will be matched.
85
84
  */
86
- SkTypeface* matchFamilyStyleCharacter(const char familyName[], const SkFontStyle&,
87
- const char* bcp47[], int bcp47Count,
88
- SkUnichar character) const;
85
+ sk_sp<SkTypeface> matchFamilyStyleCharacter(const char familyName[], const SkFontStyle&,
86
+ const char* bcp47[], int bcp47Count,
87
+ SkUnichar character) const;
89
88
 
90
89
  /**
91
90
  * Create a typeface for the specified data and TTC index (pass 0 for none)
@@ -123,16 +122,17 @@ public:
123
122
  protected:
124
123
  virtual int onCountFamilies() const = 0;
125
124
  virtual void onGetFamilyName(int index, SkString* familyName) const = 0;
126
- virtual SkFontStyleSet* onCreateStyleSet(int index)const = 0;
125
+ virtual sk_sp<SkFontStyleSet> onCreateStyleSet(int index)const = 0;
127
126
 
128
127
  /** May return NULL if the name is not found. */
129
- virtual SkFontStyleSet* onMatchFamily(const char familyName[]) const = 0;
128
+ virtual sk_sp<SkFontStyleSet> onMatchFamily(const char familyName[]) const = 0;
130
129
 
131
- virtual SkTypeface* onMatchFamilyStyle(const char familyName[],
132
- const SkFontStyle&) const = 0;
133
- virtual SkTypeface* onMatchFamilyStyleCharacter(const char familyName[], const SkFontStyle&,
134
- const char* bcp47[], int bcp47Count,
135
- SkUnichar character) const = 0;
130
+ virtual sk_sp<SkTypeface> onMatchFamilyStyle(const char familyName[],
131
+ const SkFontStyle&) const = 0;
132
+ virtual sk_sp<SkTypeface> onMatchFamilyStyleCharacter(const char familyName[],
133
+ const SkFontStyle&,
134
+ const char* bcp47[], int bcp47Count,
135
+ SkUnichar character) const = 0;
136
136
 
137
137
  virtual sk_sp<SkTypeface> onMakeFromData(sk_sp<SkData>, int ttcIndex) const = 0;
138
138
  virtual sk_sp<SkTypeface> onMakeFromStreamIndex(std::unique_ptr<SkStreamAsset>,
@@ -143,18 +143,9 @@ protected:
143
143
 
144
144
  virtual sk_sp<SkTypeface> onLegacyMakeTypeface(const char familyName[], SkFontStyle) const = 0;
145
145
 
146
- // this method is never called -- will be removed
147
- virtual SkTypeface* onMatchFaceStyle(const SkTypeface*,
148
- const SkFontStyle&) const {
149
- return nullptr;
150
- }
151
-
152
146
  private:
153
-
154
147
  /** Implemented by porting layer to return the default factory. */
155
148
  static sk_sp<SkFontMgr> Factory();
156
-
157
- using INHERITED = SkRefCnt;
158
149
  };
159
150
 
160
151
  #endif
@@ -9,7 +9,9 @@
9
9
  #define SkFontStyle_DEFINED
10
10
 
11
11
  #include "include/core/SkTypes.h"
12
- #include "include/private/SkTPin.h"
12
+ #include "include/private/base/SkTPin.h"
13
+
14
+ #include <cstdint>
13
15
 
14
16
  class SK_API SkFontStyle {
15
17
  public:
@@ -75,6 +77,7 @@ public:
75
77
  }
76
78
 
77
79
  private:
80
+ friend class SkTypefaceProxyPrototype; // To serialize fValue
78
81
  int32_t fValue;
79
82
  };
80
83
 
@@ -10,9 +10,12 @@
10
10
 
11
11
  #include "include/core/SkRefCnt.h"
12
12
 
13
+ #include <memory>
14
+
13
15
  class SkData;
14
16
  class SkImageGenerator;
15
17
  class SkOpenTypeSVGDecoder;
18
+ class SkPath;
16
19
  class SkTraceMemoryDump;
17
20
 
18
21
  class SK_API SkGraphics {
@@ -115,16 +118,6 @@ public:
115
118
  */
116
119
  static void PurgeAllCaches();
117
120
 
118
- /**
119
- * Applications with command line options may pass optional state, such
120
- * as cache sizes, here, for instance:
121
- * font-cache-limit=12345678
122
- *
123
- * The flags format is name=value[;name=value...] with no spaces.
124
- * This format is subject to change.
125
- */
126
- static void SetFlags(const char* flags);
127
-
128
121
  typedef std::unique_ptr<SkImageGenerator>
129
122
  (*ImageGeneratorFromEncodedDataFactory)(sk_sp<SkData>);
130
123
 
@@ -151,18 +144,28 @@ public:
151
144
  static OpenTypeSVGDecoderFactory GetOpenTypeSVGDecoderFactory();
152
145
 
153
146
  /**
154
- * Temporarily (until variable COLRv1 is released) pass a feature switch function for whether
155
- * variable COLRv1 is enabled. Needed for initializing FreeType with a property setting so that
156
- * variable COLRv1 can be enabled in Chrome Canaries during development.
147
+ * Call early in main() to allow Skia to use a JIT to accelerate CPU-bound operations.
157
148
  */
158
- using VariableColrV1EnabledFunc = bool (*)();
159
- static VariableColrV1EnabledFunc SetVariableColrV1EnabledFunc(VariableColrV1EnabledFunc);
160
- static bool GetVariableColrV1Enabled();
149
+ static void AllowJIT();
161
150
 
162
151
  /**
163
- * Call early in main() to allow Skia to use a JIT to accelerate CPU-bound operations.
152
+ * To override the default AA algorithm choice in the CPU backend, provide a function that
153
+ * returns whether to use analytic (true) or supersampled (false) for a given path.
154
+ *
155
+ * NOTE: This is a temporary API, intended for migration of all clients to one algorithm,
156
+ * and should not be used.
164
157
  */
165
- static void AllowJIT();
158
+ typedef bool (*PathAnalyticAADeciderProc)(const SkPath&);
159
+ static void SetPathAnalyticAADecider(PathAnalyticAADeciderProc);
160
+
161
+ /*
162
+ * Similar to above, but simply forces the CPU backend to always use analytic AA.
163
+ *
164
+ * NOTE: This is a temporary API, intended for migration of all clients to one algorithm.
165
+ * If the PathAnalyticAADeciderProc is *also* set, this setting has no effect.
166
+ * Unlike that API, this function is thread-safe.
167
+ */
168
+ static void SetForceAnalyticAA(bool);
166
169
  };
167
170
 
168
171
  class SkAutoGraphics {
@@ -1,19 +1,9 @@
1
1
  /*
2
- * Copyright 2016 Google Inc.
2
+ * Copyright 2023 Google LLC
3
3
  *
4
4
  * Use of this source code is governed by a BSD-style license that can be
5
5
  * found in the LICENSE file.
6
6
  */
7
7
 
8
- #ifndef SkICC_DEFINED
9
- #define SkICC_DEFINED
10
-
11
- #include "include/core/SkData.h"
12
-
13
- struct skcms_Matrix3x3;
14
- struct skcms_TransferFunction;
15
-
16
- SK_API sk_sp<SkData> SkWriteICCProfile(const skcms_TransferFunction&,
17
- const skcms_Matrix3x3& toXYZD50);
18
-
19
- #endif//SkICC_DEFINED
8
+ // TODO(kjlubick) remove this shim after clients have been moved to the new location
9
+ #include "include/encode/SkICC.h" // IWYU pragma: export