@shopify/react-native-skia 0.1.192 → 0.1.193

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 (301) 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/cpp/api/JsiSkImage.h +25 -4
  5. package/cpp/api/JsiSkImageFactory.h +2 -2
  6. package/cpp/api/JsiSkPath.h +8 -6
  7. package/cpp/rnskia/dom/base/Declaration.h +5 -7
  8. package/cpp/rnskia/dom/nodes/JsiBlurMaskNode.h +1 -0
  9. package/cpp/rnskia/dom/nodes/JsiPathNode.h +2 -2
  10. package/cpp/rnskia/dom/props/BoxShadowProps.h +2 -0
  11. package/cpp/skia/include/android/SkAndroidFrameworkUtils.h +2 -8
  12. package/cpp/skia/include/android/SkImageAndroid.h +101 -0
  13. package/cpp/skia/include/codec/SkAndroidCodec.h +26 -8
  14. package/cpp/skia/include/codec/SkCodec.h +31 -17
  15. package/cpp/skia/include/codec/SkEncodedImageFormat.h +36 -0
  16. package/cpp/skia/include/codec/SkPixmapUtils.h +31 -0
  17. package/cpp/skia/include/config/SkUserConfig.h +61 -29
  18. package/cpp/skia/include/core/SkBitmap.h +25 -25
  19. package/cpp/skia/include/core/SkBlurTypes.h +0 -2
  20. package/cpp/skia/include/core/SkCanvas.h +32 -15
  21. package/cpp/skia/include/core/SkCapabilities.h +2 -2
  22. package/cpp/skia/include/core/SkColor.h +2 -0
  23. package/cpp/skia/include/core/SkColorPriv.h +19 -4
  24. package/cpp/skia/include/core/SkColorSpace.h +14 -17
  25. package/cpp/skia/include/core/SkColorType.h +1 -0
  26. package/cpp/skia/include/core/SkContourMeasure.h +1 -1
  27. package/cpp/skia/include/core/SkCoverageMode.h +0 -2
  28. package/cpp/skia/include/core/SkCubicMap.h +2 -0
  29. package/cpp/skia/include/core/SkData.h +5 -2
  30. package/cpp/skia/include/core/SkDataTable.h +6 -2
  31. package/cpp/skia/include/core/SkDeferredDisplayList.h +11 -10
  32. package/cpp/skia/include/core/SkDeferredDisplayListRecorder.h +9 -8
  33. package/cpp/skia/include/core/SkDrawable.h +10 -2
  34. package/cpp/skia/include/core/SkEncodedImageFormat.h +3 -30
  35. package/cpp/skia/include/core/SkFlattenable.h +4 -2
  36. package/cpp/skia/include/core/SkFont.h +1 -0
  37. package/cpp/skia/include/core/SkFontMetrics.h +1 -0
  38. package/cpp/skia/include/core/SkFontMgr.h +20 -29
  39. package/cpp/skia/include/core/SkFontStyle.h +4 -1
  40. package/cpp/skia/include/core/SkGraphics.h +21 -18
  41. package/cpp/skia/include/core/SkICC.h +3 -13
  42. package/cpp/skia/include/core/SkImage.h +395 -717
  43. package/cpp/skia/include/core/SkImageGenerator.h +19 -74
  44. package/cpp/skia/include/core/SkImageInfo.h +7 -5
  45. package/cpp/skia/include/core/SkM44.h +11 -0
  46. package/cpp/skia/include/core/SkMaskFilter.h +6 -3
  47. package/cpp/skia/include/core/SkMatrix.h +14 -4
  48. package/cpp/skia/include/core/SkMesh.h +52 -18
  49. package/cpp/skia/include/core/SkMilestone.h +1 -1
  50. package/cpp/skia/include/core/SkPaint.h +11 -34
  51. package/cpp/skia/include/core/SkPath.h +23 -4
  52. package/cpp/skia/include/core/SkPathBuilder.h +13 -5
  53. package/cpp/skia/include/core/SkPathMeasure.h +1 -1
  54. package/cpp/skia/include/core/SkPathTypes.h +0 -2
  55. package/cpp/skia/include/core/SkPathUtils.h +42 -0
  56. package/cpp/skia/include/core/SkPicture.h +3 -2
  57. package/cpp/skia/include/core/SkPictureRecorder.h +2 -0
  58. package/cpp/skia/include/core/SkPixelRef.h +4 -8
  59. package/cpp/skia/include/core/SkPixmap.h +12 -20
  60. package/cpp/skia/include/core/SkPoint.h +4 -2
  61. package/cpp/skia/include/core/SkPromiseImageTexture.h +2 -2
  62. package/cpp/skia/include/core/SkRRect.h +5 -1
  63. package/cpp/skia/include/core/SkRect.h +6 -3
  64. package/cpp/skia/include/core/SkRefCnt.h +9 -14
  65. package/cpp/skia/include/core/SkRegion.h +1 -1
  66. package/cpp/skia/include/core/SkScalar.h +2 -4
  67. package/cpp/skia/include/core/SkSerialProcs.h +18 -10
  68. package/cpp/skia/include/core/SkShader.h +1 -64
  69. package/cpp/skia/include/core/SkSize.h +2 -0
  70. package/cpp/skia/include/core/SkSpan.h +4 -112
  71. package/cpp/skia/include/core/SkStream.h +11 -12
  72. package/cpp/skia/include/core/SkString.h +9 -25
  73. package/cpp/skia/include/core/SkStrokeRec.h +1 -1
  74. package/cpp/skia/include/core/SkSurface.h +83 -61
  75. package/cpp/skia/include/core/SkSurfaceCharacterization.h +3 -3
  76. package/cpp/skia/include/core/SkSurfaceProps.h +9 -1
  77. package/cpp/skia/include/core/SkTextBlob.h +2 -2
  78. package/cpp/skia/include/core/SkTextureCompressionType.h +30 -0
  79. package/cpp/skia/include/core/SkTime.h +1 -1
  80. package/cpp/skia/include/core/SkTypeface.h +9 -2
  81. package/cpp/skia/include/core/SkTypes.h +37 -466
  82. package/cpp/skia/include/core/SkVertices.h +2 -0
  83. package/cpp/skia/include/core/SkYUVAInfo.h +4 -0
  84. package/cpp/skia/include/core/SkYUVAPixmaps.h +7 -1
  85. package/cpp/skia/include/docs/SkPDFDocument.h +12 -1
  86. package/cpp/skia/include/effects/SkColorMatrix.h +2 -1
  87. package/cpp/skia/include/effects/SkGradientShader.h +65 -14
  88. package/cpp/skia/include/effects/SkImageFilters.h +0 -11
  89. package/cpp/skia/include/effects/SkRuntimeEffect.h +41 -11
  90. package/cpp/skia/include/encode/SkEncoder.h +7 -3
  91. package/cpp/skia/include/encode/SkICC.h +36 -0
  92. package/cpp/skia/include/encode/SkJpegEncoder.h +102 -71
  93. package/cpp/skia/include/encode/SkPngEncoder.h +89 -71
  94. package/cpp/skia/include/encode/SkWebpEncoder.h +65 -38
  95. package/cpp/skia/include/gpu/GpuTypes.h +23 -1
  96. package/cpp/skia/include/gpu/GrBackendSurface.h +9 -7
  97. package/cpp/skia/include/gpu/GrContextOptions.h +28 -9
  98. package/cpp/skia/include/gpu/GrContextThreadSafeProxy.h +6 -4
  99. package/cpp/skia/include/gpu/GrDirectContext.h +84 -63
  100. package/cpp/skia/include/gpu/GrDriverBugWorkarounds.h +2 -1
  101. package/cpp/skia/include/gpu/GrRecordingContext.h +9 -5
  102. package/cpp/skia/include/gpu/GrTypes.h +18 -18
  103. package/cpp/skia/include/gpu/d3d/GrD3DTypes.h +4 -4
  104. package/cpp/skia/include/gpu/dawn/GrDawnTypes.h +3 -3
  105. package/cpp/skia/include/gpu/ganesh/GrTextureGenerator.h +77 -0
  106. package/cpp/skia/include/gpu/ganesh/SkImageGanesh.h +385 -0
  107. package/cpp/skia/include/gpu/gl/GrGLExtensions.h +3 -3
  108. package/cpp/skia/include/gpu/gl/GrGLFunctions.h +1 -1
  109. package/cpp/skia/include/gpu/gl/GrGLInterface.h +0 -3
  110. package/cpp/skia/include/gpu/gl/GrGLTypes.h +2 -1
  111. package/cpp/skia/include/gpu/graphite/BackendTexture.h +72 -3
  112. package/cpp/skia/include/gpu/graphite/Context.h +85 -32
  113. package/cpp/skia/include/gpu/graphite/ContextOptions.h +15 -11
  114. package/cpp/skia/include/gpu/graphite/GraphiteTypes.h +55 -5
  115. package/cpp/skia/include/gpu/graphite/ImageProvider.h +6 -4
  116. package/cpp/skia/include/gpu/graphite/Recorder.h +41 -11
  117. package/cpp/skia/include/gpu/graphite/Recording.h +50 -3
  118. package/cpp/skia/include/gpu/graphite/TextureInfo.h +47 -8
  119. package/cpp/skia/include/gpu/graphite/YUVABackendTextures.h +139 -0
  120. package/cpp/skia/include/gpu/graphite/dawn/DawnTypes.h +40 -0
  121. package/cpp/skia/include/gpu/graphite/dawn/DawnUtils.h +28 -0
  122. package/cpp/skia/include/gpu/graphite/mtl/MtlBackendContext.h +1 -1
  123. package/cpp/skia/include/gpu/graphite/mtl/{MtlTypes.h → MtlGraphiteTypes.h} +7 -6
  124. package/cpp/skia/include/gpu/graphite/mtl/MtlGraphiteUtils.h +27 -0
  125. package/cpp/skia/include/gpu/graphite/vk/VulkanGraphiteTypes.h +4 -9
  126. package/cpp/skia/include/gpu/graphite/vk/VulkanGraphiteUtils.h +28 -0
  127. package/cpp/skia/include/gpu/mock/GrMockTypes.h +17 -13
  128. package/cpp/skia/include/gpu/mtl/GrMtlTypes.h +2 -2
  129. package/cpp/skia/include/gpu/vk/GrVkBackendContext.h +1 -1
  130. package/cpp/skia/include/gpu/vk/GrVkTypes.h +3 -3
  131. package/cpp/skia/include/gpu/vk/VulkanExtensions.h +3 -3
  132. package/cpp/skia/include/gpu/vk/VulkanMemoryAllocator.h +5 -7
  133. package/cpp/skia/include/pathops/SkPathOps.h +3 -3
  134. package/cpp/skia/include/ports/SkFontMgr_data.h +22 -0
  135. package/cpp/skia/include/ports/SkFontMgr_indirect.h +14 -14
  136. package/cpp/skia/include/ports/SkRemotableFontMgr.h +2 -2
  137. package/cpp/skia/include/ports/SkTypeface_win.h +2 -1
  138. package/cpp/skia/include/private/SkChecksum.h +32 -7
  139. package/cpp/skia/include/private/SkColorData.h +1 -26
  140. package/cpp/skia/include/private/SkGainmapInfo.h +97 -0
  141. package/cpp/skia/include/private/SkGainmapShader.h +53 -0
  142. package/cpp/skia/include/private/SkIDChangeListener.h +4 -3
  143. package/cpp/skia/include/private/SkJpegGainmapEncoder.h +71 -0
  144. package/cpp/skia/include/private/SkJpegMetadataDecoder.h +61 -0
  145. package/cpp/skia/include/private/SkOpts_spi.h +3 -1
  146. package/cpp/skia/include/private/SkPathRef.h +64 -47
  147. package/cpp/skia/include/private/SkSLDefines.h +5 -5
  148. package/cpp/skia/include/private/SkSLSampleUsage.h +0 -4
  149. package/cpp/skia/include/private/SkSpinlock.h +1 -1
  150. package/cpp/skia/include/private/SkWeakRefCnt.h +3 -0
  151. package/cpp/skia/include/private/{SingleOwner.h → base/SingleOwner.h} +8 -5
  152. package/cpp/skia/include/private/base/SkAPI.h +52 -0
  153. package/cpp/skia/include/private/base/SkAlign.h +39 -0
  154. package/cpp/skia/include/private/base/SkAlignedStorage.h +32 -0
  155. package/cpp/skia/include/private/base/SkAssert.h +92 -0
  156. package/cpp/skia/include/private/base/SkAttributes.h +102 -0
  157. package/cpp/skia/include/private/base/SkCPUTypes.h +25 -0
  158. package/cpp/skia/include/private/base/SkContainers.h +46 -0
  159. package/cpp/skia/include/private/base/SkDebug.h +27 -0
  160. package/cpp/skia/include/private/{SkDeque.h → base/SkDeque.h} +3 -1
  161. package/cpp/skia/include/private/base/SkFeatures.h +151 -0
  162. package/cpp/skia/include/private/{SkFixed.h → base/SkFixed.h} +9 -7
  163. package/cpp/skia/include/private/{SkFloatBits.h → base/SkFloatBits.h} +2 -3
  164. package/cpp/skia/include/private/{SkFloatingPoint.h → base/SkFloatingPoint.h} +18 -9
  165. package/cpp/skia/include/private/base/SkLoadUserConfig.h +63 -0
  166. package/cpp/skia/include/private/{SkMacros.h → base/SkMacros.h} +17 -2
  167. package/cpp/skia/include/private/{SkMalloc.h → base/SkMalloc.h} +4 -7
  168. package/cpp/skia/include/{core → private/base}/SkMath.h +25 -2
  169. package/cpp/skia/include/private/{SkMutex.h → base/SkMutex.h} +5 -5
  170. package/cpp/skia/include/private/{SkNoncopyable.h → base/SkNoncopyable.h} +2 -2
  171. package/cpp/skia/include/private/{SkOnce.h → base/SkOnce.h} +3 -1
  172. package/cpp/skia/include/private/base/SkPathEnums.h +25 -0
  173. package/cpp/skia/include/private/{SkSafe32.h → base/SkSafe32.h} +16 -1
  174. package/cpp/skia/include/private/{SkSemaphore.h → base/SkSemaphore.h} +4 -3
  175. package/cpp/skia/include/private/base/SkSpan_impl.h +129 -0
  176. package/cpp/skia/include/private/base/SkTArray.h +694 -0
  177. package/cpp/skia/include/private/{SkTDArray.h → base/SkTDArray.h} +17 -54
  178. package/cpp/skia/include/private/{SkTFitsIn.h → base/SkTFitsIn.h} +14 -8
  179. package/cpp/skia/include/private/{SkTLogic.h → base/SkTLogic.h} +1 -1
  180. package/cpp/skia/include/private/{SkTemplates.h → base/SkTemplates.h} +63 -88
  181. package/cpp/skia/include/private/{SkThreadID.h → base/SkThreadID.h} +5 -2
  182. package/cpp/skia/include/private/{SkTo.h → base/SkTo.h} +13 -2
  183. package/cpp/skia/include/private/base/SkTypeTraits.h +33 -0
  184. package/cpp/skia/include/private/chromium/GrVkSecondaryCBDrawContext.h +130 -0
  185. package/cpp/skia/include/private/chromium/SkChromeRemoteGlyphCache.h +5 -9
  186. package/cpp/skia/include/private/chromium/SkDiscardableMemory.h +70 -0
  187. package/cpp/skia/include/private/chromium/Slug.h +0 -9
  188. package/cpp/skia/include/private/gpu/ganesh/GrContext_Base.h +2 -1
  189. package/cpp/skia/include/private/gpu/ganesh/GrD3DTypesMinimal.h +1 -1
  190. package/cpp/skia/include/private/gpu/ganesh/GrDawnTypesPriv.h +1 -1
  191. package/cpp/skia/include/private/gpu/ganesh/GrGLTypesPriv.h +1 -1
  192. package/cpp/skia/include/private/gpu/ganesh/GrImageContext.h +1 -1
  193. package/cpp/skia/include/private/gpu/ganesh/GrMockTypesPriv.h +3 -2
  194. package/cpp/skia/include/private/gpu/ganesh/GrMtlTypesPriv.h +1 -1
  195. package/cpp/skia/include/private/gpu/ganesh/GrTypesPriv.h +17 -23
  196. package/cpp/skia/include/private/gpu/ganesh/GrVkTypesPriv.h +2 -2
  197. package/cpp/skia/include/private/gpu/graphite/DawnTypesPriv.h +38 -0
  198. package/cpp/skia/include/private/gpu/graphite/{MtlTypesPriv.h → MtlGraphiteTypesPriv.h} +5 -5
  199. package/cpp/skia/include/private/gpu/graphite/VulkanGraphiteTypesPriv.h +1 -9
  200. package/cpp/skia/include/private/gpu/vk/SkiaVulkan.h +4 -0
  201. package/cpp/skia/include/utils/SkCamera.h +1 -1
  202. package/cpp/skia/include/utils/SkCustomTypeface.h +7 -1
  203. package/cpp/skia/include/utils/SkNWayCanvas.h +6 -6
  204. package/cpp/skia/include/utils/SkOrderedFontMgr.h +7 -6
  205. package/cpp/skia/include/utils/SkPaintFilterCanvas.h +2 -2
  206. package/cpp/skia/include/utils/SkParsePath.h +1 -1
  207. package/cpp/skia/modules/skcms/skcms.h +14 -0
  208. package/cpp/skia/modules/skcms/src/Transform_inl.h +19 -0
  209. package/cpp/skia/modules/skparagraph/include/FontCollection.h +2 -2
  210. package/cpp/skia/modules/skparagraph/include/Paragraph.h +72 -2
  211. package/cpp/skia/modules/skparagraph/include/ParagraphCache.h +1 -11
  212. package/cpp/skia/modules/skparagraph/include/ParagraphPainter.h +63 -0
  213. package/cpp/skia/modules/skparagraph/include/TextStyle.h +27 -4
  214. package/cpp/skia/modules/skparagraph/include/TypefaceFontProvider.h +13 -13
  215. package/cpp/skia/modules/skresources/include/SkResources.h +18 -4
  216. package/cpp/skia/modules/svg/include/SkSVGAttribute.h +1 -1
  217. package/cpp/skia/modules/svg/include/SkSVGAttributeParser.h +2 -2
  218. package/cpp/skia/modules/svg/include/SkSVGContainer.h +2 -2
  219. package/cpp/skia/modules/svg/include/SkSVGDOM.h +1 -1
  220. package/cpp/skia/modules/svg/include/SkSVGFilterContext.h +2 -2
  221. package/cpp/skia/modules/svg/include/SkSVGGradient.h +2 -2
  222. package/cpp/skia/modules/svg/include/SkSVGIDMapper.h +2 -2
  223. package/cpp/skia/modules/svg/include/SkSVGRenderContext.h +3 -3
  224. package/cpp/skia/modules/svg/include/SkSVGSVG.h +1 -1
  225. package/cpp/skia/modules/svg/include/SkSVGTypes.h +22 -21
  226. package/cpp/skia/modules/svg/include/SkSVGValue.h +1 -1
  227. package/cpp/skia/{include/private → src/core}/SkTHash.h +41 -37
  228. package/ios/RNSkia-iOS/ViewScreenshotService.mm +1 -1
  229. package/libs/android/arm64-v8a/libskia.a +0 -0
  230. package/libs/android/arm64-v8a/libskottie.a +0 -0
  231. package/libs/android/arm64-v8a/libsksg.a +0 -0
  232. package/libs/android/arm64-v8a/libskshaper.a +0 -0
  233. package/libs/android/arm64-v8a/libsvg.a +0 -0
  234. package/libs/android/armeabi-v7a/libskia.a +0 -0
  235. package/libs/android/armeabi-v7a/libskottie.a +0 -0
  236. package/libs/android/armeabi-v7a/libsksg.a +0 -0
  237. package/libs/android/armeabi-v7a/libskshaper.a +0 -0
  238. package/libs/android/armeabi-v7a/libsvg.a +0 -0
  239. package/libs/android/x86/libskia.a +0 -0
  240. package/libs/android/x86/libskottie.a +0 -0
  241. package/libs/android/x86/libsksg.a +0 -0
  242. package/libs/android/x86/libskshaper.a +0 -0
  243. package/libs/android/x86/libsvg.a +0 -0
  244. package/libs/android/x86_64/libskia.a +0 -0
  245. package/libs/android/x86_64/libskottie.a +0 -0
  246. package/libs/android/x86_64/libsksg.a +0 -0
  247. package/libs/android/x86_64/libskshaper.a +0 -0
  248. package/libs/android/x86_64/libsvg.a +0 -0
  249. package/libs/ios/libskia.xcframework/Info.plist +5 -5
  250. package/libs/ios/libskia.xcframework/ios-arm64_arm64e/libskia.a +0 -0
  251. package/libs/ios/libskia.xcframework/ios-arm64_arm64e_x86_64-simulator/libskia.a +0 -0
  252. package/libs/ios/libskottie.xcframework/ios-arm64_arm64e/libskottie.a +0 -0
  253. package/libs/ios/libskottie.xcframework/ios-arm64_arm64e_x86_64-simulator/libskottie.a +0 -0
  254. package/libs/ios/libsksg.xcframework/ios-arm64_arm64e/libsksg.a +0 -0
  255. package/libs/ios/libsksg.xcframework/ios-arm64_arm64e_x86_64-simulator/libsksg.a +0 -0
  256. package/libs/ios/libskshaper.xcframework/ios-arm64_arm64e/libskshaper.a +0 -0
  257. package/libs/ios/libskshaper.xcframework/ios-arm64_arm64e_x86_64-simulator/libskshaper.a +0 -0
  258. package/libs/ios/libsvg.xcframework/ios-arm64_arm64e/libsvg.a +0 -0
  259. package/libs/ios/libsvg.xcframework/ios-arm64_arm64e_x86_64-simulator/libsvg.a +0 -0
  260. package/package.json +1 -1
  261. package/react-native-skia.podspec +1 -1
  262. package/scripts/install-npm.js +11 -1
  263. package/cpp/skia/include/core/SkImageEncoder.h +0 -71
  264. package/cpp/skia/include/gpu/GrConfig.h +0 -53
  265. package/cpp/skia/include/gpu/graphite/CombinationBuilder.h +0 -195
  266. package/cpp/skia/include/private/SkHalf.h +0 -38
  267. package/cpp/skia/include/private/SkImageInfoPriv.h +0 -199
  268. package/cpp/skia/include/private/SkSLIRNode.h +0 -64
  269. package/cpp/skia/include/private/SkSLLayout.h +0 -144
  270. package/cpp/skia/include/private/SkSLModifiers.h +0 -178
  271. package/cpp/skia/include/private/SkSLProgramElement.h +0 -77
  272. package/cpp/skia/include/private/SkSLProgramKind.h +0 -35
  273. package/cpp/skia/include/private/SkSLStatement.h +0 -86
  274. package/cpp/skia/include/private/SkSLString.h +0 -41
  275. package/cpp/skia/include/private/SkSLSymbol.h +0 -94
  276. package/cpp/skia/include/private/SkSafe_math.h +0 -52
  277. package/cpp/skia/include/private/SkStringView.h +0 -51
  278. package/cpp/skia/include/private/SkTArray.h +0 -655
  279. package/cpp/skia/include/private/SkUniquePaintParamsID.h +0 -35
  280. package/cpp/skia/include/private/SkVx.h +0 -1026
  281. package/cpp/skia/include/sksl/DSL.h +0 -37
  282. package/cpp/skia/include/sksl/DSLBlock.h +0 -58
  283. package/cpp/skia/include/sksl/DSLCase.h +0 -62
  284. package/cpp/skia/include/sksl/DSLCore.h +0 -492
  285. package/cpp/skia/include/sksl/DSLExpression.h +0 -241
  286. package/cpp/skia/include/sksl/DSLFunction.h +0 -113
  287. package/cpp/skia/include/sksl/DSLLayout.h +0 -92
  288. package/cpp/skia/include/sksl/DSLModifiers.h +0 -69
  289. package/cpp/skia/include/sksl/DSLStatement.h +0 -82
  290. package/cpp/skia/include/sksl/DSLSymbols.h +0 -61
  291. package/cpp/skia/include/sksl/DSLType.h +0 -271
  292. package/cpp/skia/include/sksl/DSLVar.h +0 -231
  293. package/cpp/skia/include/sksl/SkSLErrorReporter.h +0 -65
  294. package/cpp/skia/include/sksl/SkSLOperator.h +0 -154
  295. package/cpp/skia/include/sksl/SkSLPosition.h +0 -104
  296. package/cpp/skia/include/utils/SkRandom.h +0 -169
  297. package/cpp/skia/src/core/SkLRUCache.h +0 -126
  298. package/cpp/skia/src/core/SkTInternalLList.h +0 -302
  299. /package/cpp/skia/include/{core → codec}/SkPngChunkReader.h +0 -0
  300. /package/cpp/skia/include/private/{SkTPin.h → base/SkTPin.h} +0 -0
  301. /package/cpp/skia/include/private/{SkThreadAnnotations.h → base/SkThreadAnnotations.h} +0 -0
@@ -0,0 +1,139 @@
1
+ /*
2
+ * Copyright 2023 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 skgpu_graphite_YUVABackendTextures_DEFINED
9
+ #define skgpu_graphite_YUVABackendTextures_DEFINED
10
+
11
+ #include "include/core/SkSpan.h"
12
+ #include "include/core/SkYUVAInfo.h"
13
+ #include "include/gpu/graphite/BackendTexture.h"
14
+
15
+ #include <tuple>
16
+
17
+ namespace skgpu::graphite {
18
+ class Recorder;
19
+
20
+ /**
21
+ * A description of a set of BackendTextures that hold the planar data described by a SkYUVAInfo.
22
+ */
23
+ class SK_API YUVABackendTextureInfo {
24
+ public:
25
+ static constexpr auto kMaxPlanes = SkYUVAInfo::kMaxPlanes;
26
+
27
+ /** Default YUVABackendTextureInfo is invalid. */
28
+ YUVABackendTextureInfo() = default;
29
+ YUVABackendTextureInfo(const YUVABackendTextureInfo&) = default;
30
+ YUVABackendTextureInfo& operator=(const YUVABackendTextureInfo&) = default;
31
+
32
+ /**
33
+ * Initializes a YUVABackendTextureInfo to describe a set of textures that can store the
34
+ * planes indicated by the SkYUVAInfo. The texture dimensions are taken from the SkYUVAInfo's
35
+ * plane dimensions. All the described textures share a common origin. The planar image this
36
+ * describes will be mip mapped if all the textures are individually mip mapped as indicated
37
+ * by Mipmapped. This will produce an invalid result (return false from isValid()) if the
38
+ * passed formats' channels don't agree with SkYUVAInfo.
39
+ */
40
+ YUVABackendTextureInfo(const Recorder*,
41
+ const SkYUVAInfo&,
42
+ const TextureInfo[kMaxPlanes],
43
+ Mipmapped);
44
+
45
+ bool operator==(const YUVABackendTextureInfo&) const;
46
+ bool operator!=(const YUVABackendTextureInfo& that) const { return !(*this == that); }
47
+
48
+ /** TextureInfo for the ith plane, or invalid if i >= numPlanes() */
49
+ const TextureInfo& planeTextureInfo(int i) const {
50
+ SkASSERT(i >= 0);
51
+ return fPlaneTextureInfos[static_cast<size_t>(i)];
52
+ }
53
+
54
+ const SkYUVAInfo& yuvaInfo() const { return fYUVAInfo; }
55
+
56
+ SkYUVColorSpace yuvColorSpace() const { return fYUVAInfo.yuvColorSpace(); }
57
+
58
+ Mipmapped mipmapped() const { return fMipmapped; }
59
+
60
+ /** The number of planes, 0 if this YUVABackendTextureInfo is invalid. */
61
+ int numPlanes() const { return fYUVAInfo.numPlanes(); }
62
+
63
+ /**
64
+ * Returns true if this has been configured with a valid SkYUVAInfo with compatible texture
65
+ * formats.
66
+ */
67
+ bool isValid() const { return fYUVAInfo.isValid(); }
68
+
69
+ /**
70
+ * Computes a YUVALocations representation of the planar layout. The result is guaranteed to be
71
+ * valid if this->isValid().
72
+ */
73
+ SkYUVAInfo::YUVALocations toYUVALocations() const;
74
+
75
+ private:
76
+ SkYUVAInfo fYUVAInfo;
77
+ std::array<TextureInfo, kMaxPlanes> fPlaneTextureInfos;
78
+ std::array<uint32_t, kMaxPlanes> fPlaneChannelMasks;
79
+ Mipmapped fMipmapped = Mipmapped::kNo;
80
+ };
81
+
82
+ /**
83
+ * A set of BackendTextures that hold the planar data for an image described a SkYUVAInfo.
84
+ */
85
+ class SK_API YUVABackendTextures {
86
+ public:
87
+ static constexpr auto kMaxPlanes = SkYUVAInfo::kMaxPlanes;
88
+
89
+ YUVABackendTextures() = default;
90
+ YUVABackendTextures(const YUVABackendTextures&) = delete;
91
+ YUVABackendTextures& operator=(const YUVABackendTextures&) = delete;
92
+
93
+ /**
94
+ * Initializes a YUVABackendTextures object from a set of textures that store the planes
95
+ * indicated by the SkYUVAInfo. This will produce an invalid result (return false from
96
+ * isValid()) if the passed texture formats' channels don't agree with SkYUVAInfo.
97
+ */
98
+ YUVABackendTextures(const Recorder*,
99
+ const SkYUVAInfo&,
100
+ const BackendTexture[kMaxPlanes]);
101
+
102
+ SkSpan<const BackendTexture> planeTextures() const {
103
+ return SkSpan<const BackendTexture>(fPlaneTextures);
104
+ }
105
+
106
+ /** BackendTexture for the ith plane, or invalid if i >= numPlanes() */
107
+ BackendTexture planeTexture(int i) const {
108
+ SkASSERT(i >= 0);
109
+ return fPlaneTextures[static_cast<size_t>(i)];
110
+ }
111
+
112
+ const SkYUVAInfo& yuvaInfo() const { return fYUVAInfo; }
113
+
114
+ SkYUVColorSpace yuvColorSpace() const { return fYUVAInfo.yuvColorSpace(); }
115
+
116
+ /** The number of planes, 0 if this YUVABackendTextureInfo is invalid. */
117
+ int numPlanes() const { return fYUVAInfo.numPlanes(); }
118
+
119
+ /**
120
+ * Returns true if this has been configured with a valid SkYUVAInfo with compatible texture
121
+ * formats.
122
+ */
123
+ bool isValid() const { return fYUVAInfo.isValid(); }
124
+
125
+ /**
126
+ * Computes a YUVALocations representation of the planar layout. The result is guaranteed to be
127
+ * valid if this->isValid().
128
+ */
129
+ SkYUVAInfo::YUVALocations toYUVALocations() const;
130
+
131
+ private:
132
+ SkYUVAInfo fYUVAInfo;
133
+ std::array<BackendTexture, kMaxPlanes> fPlaneTextures;
134
+ std::array<uint32_t, kMaxPlanes> fPlaneChannelMasks;
135
+ };
136
+
137
+ } // End of namespace skgpu::graphite
138
+
139
+ #endif // skgpu_graphite_YUVABackendTextures_DEFINED
@@ -0,0 +1,40 @@
1
+ /*
2
+ * Copyright 2022 Google LLC.
3
+ *
4
+ * Use of this source code is governed by a BSD-style license that can be
5
+ * found in the LICENSE file.
6
+ */
7
+
8
+ #ifndef skgpu_graphite_DawnTypes_DEFINED
9
+ #define skgpu_graphite_DawnTypes_DEFINED
10
+
11
+ #include "include/gpu/graphite/GraphiteTypes.h"
12
+ #include "webgpu/webgpu_cpp.h"
13
+
14
+ namespace skgpu::graphite {
15
+
16
+ struct DawnTextureInfo {
17
+ uint32_t fSampleCount = 1;
18
+ Mipmapped fMipmapped = Mipmapped::kNo;
19
+
20
+ // wgpu::TextureDescriptor properties
21
+ wgpu::TextureFormat fFormat = wgpu::TextureFormat::Undefined;
22
+ wgpu::TextureUsage fUsage = wgpu::TextureUsage::None;
23
+
24
+ DawnTextureInfo() = default;
25
+ DawnTextureInfo(const wgpu::Texture& texture);
26
+ DawnTextureInfo(uint32_t sampleCount,
27
+ Mipmapped mipmapped,
28
+ wgpu::TextureFormat format,
29
+ wgpu::TextureUsage usage)
30
+ : fSampleCount(sampleCount)
31
+ , fMipmapped(mipmapped)
32
+ , fFormat(format)
33
+ , fUsage(usage) {}
34
+ };
35
+
36
+ } // namespace skgpu::graphite
37
+
38
+ #endif // skgpu_graphite_DawnTypes_DEFINED
39
+
40
+
@@ -0,0 +1,28 @@
1
+ /*
2
+ * Copyright 2022 Google LLC
3
+ *
4
+ * Use of this source code is governed by a BSD-style license that can be
5
+ * found in the LICENSE file.
6
+ */
7
+
8
+ #ifndef skgpu_graphite_DawnUtils_DEFINED
9
+ #define skgpu_graphite_DawnUtils_DEFINED
10
+
11
+ #include <memory>
12
+
13
+ #include "include/private/base/SkAPI.h"
14
+
15
+ namespace skgpu::graphite {
16
+
17
+ class Context;
18
+ struct ContextOptions;
19
+ struct DawnBackendContext;
20
+
21
+ namespace ContextFactory {
22
+ SK_API std::unique_ptr<Context> MakeDawn(const DawnBackendContext&, const ContextOptions&);
23
+ } // namespace ContextFactory
24
+
25
+ } // namespace skgpu::graphite
26
+
27
+
28
+ #endif // skgpu_graphite_DawnUtils_DEFINED
@@ -8,7 +8,7 @@
8
8
  #ifndef skgpu_graphite_MtlBackendContext_DEFINED
9
9
  #define skgpu_graphite_MtlBackendContext_DEFINED
10
10
 
11
- #include "include/gpu/graphite/mtl/MtlTypes.h"
11
+ #include "include/gpu/graphite/mtl/MtlGraphiteTypes.h"
12
12
 
13
13
  namespace skgpu::graphite {
14
14
 
@@ -5,9 +5,10 @@
5
5
  * found in the LICENSE file.
6
6
  */
7
7
 
8
- #ifndef skgpu_graphite_MtlTypes_DEFINED
9
- #define skgpu_graphite_MtlTypes_DEFINED
8
+ #ifndef skgpu_graphite_MtlGraphiteTypes_DEFINED
9
+ #define skgpu_graphite_MtlGraphiteTypes_DEFINED
10
10
 
11
+ #include "include/gpu/graphite/GraphiteTypes.h"
11
12
  #include "include/ports/SkCFObject.h"
12
13
 
13
14
  ///////////////////////////////////////////////////////////////////////////////
@@ -38,7 +39,7 @@ using MtlHandle = const void*;
38
39
 
39
40
  struct MtlTextureInfo {
40
41
  uint32_t fSampleCount = 1;
41
- uint32_t fLevelCount = 0;
42
+ skgpu::Mipmapped fMipmapped = skgpu::Mipmapped::kNo;
42
43
 
43
44
  // Since we aren't in an Obj-C header we can't directly use Mtl types here. Each of these can
44
45
  // cast to their mapped Mtl types list below.
@@ -50,13 +51,13 @@ struct MtlTextureInfo {
50
51
  MtlTextureInfo() = default;
51
52
  MtlTextureInfo(MtlHandle mtlTexture);
52
53
  MtlTextureInfo(uint32_t sampleCount,
53
- uint32_t levelCount,
54
+ skgpu::Mipmapped mipmapped,
54
55
  MtlPixelFormat format,
55
56
  MtlTextureUsage usage,
56
57
  MtlStorageMode storageMode,
57
58
  bool framebufferOnly)
58
59
  : fSampleCount(sampleCount)
59
- , fLevelCount(levelCount)
60
+ , fMipmapped(mipmapped)
60
61
  , fFormat(format)
61
62
  , fUsage(usage)
62
63
  , fStorageMode(storageMode)
@@ -65,4 +66,4 @@ struct MtlTextureInfo {
65
66
 
66
67
  } // namespace skgpu::graphite
67
68
 
68
- #endif // skgpu_graphite_MtlTypes_DEFINED
69
+ #endif // skgpu_graphite_MtlGraphiteTypes_DEFINED
@@ -0,0 +1,27 @@
1
+ /*
2
+ * Copyright 2022 Google LLC
3
+ *
4
+ * Use of this source code is governed by a BSD-style license that can be
5
+ * found in the LICENSE file.
6
+ */
7
+
8
+ #ifndef skgpu_graphite_MtlGraphiteUtils_DEFINED
9
+ #define skgpu_graphite_MtlGraphiteUtils_DEFINED
10
+
11
+ #include <memory>
12
+
13
+ #include "include/private/base/SkAPI.h"
14
+
15
+ namespace skgpu::graphite {
16
+
17
+ class Context;
18
+ struct ContextOptions;
19
+ struct MtlBackendContext;
20
+
21
+ namespace ContextFactory {
22
+ SK_API std::unique_ptr<Context> MakeMetal(const MtlBackendContext&, const ContextOptions&);
23
+ } // namespace ContextFactory
24
+
25
+ } // namespace skgpu::graphite
26
+
27
+ #endif // skgpu_graphite_MtlGraphiteUtils_DEFINED
@@ -8,13 +8,14 @@
8
8
  #ifndef skgpu_graphite_VulkanGraphiteTypes_DEFINED
9
9
  #define skgpu_graphite_VulkanGraphiteTypes_DEFINED
10
10
 
11
+ #include "include/gpu/graphite/GraphiteTypes.h"
11
12
  #include "include/gpu/vk/VulkanTypes.h"
12
13
 
13
14
  namespace skgpu::graphite {
14
15
 
15
16
  struct VulkanTextureInfo {
16
17
  uint32_t fSampleCount = 1;
17
- uint32_t fLevelCount = 0;
18
+ Mipmapped fMipmapped = Mipmapped::kNo;
18
19
 
19
20
  // VkImageCreateInfo properties
20
21
  // Currently the only supported flag is VK_IMAGE_CREATE_PROTECTED_BIT. Any other flag will not
@@ -24,8 +25,6 @@ struct VulkanTextureInfo {
24
25
  VkImageTiling fImageTiling = VK_IMAGE_TILING_OPTIMAL;
25
26
  VkImageUsageFlags fImageUsageFlags = 0;
26
27
  VkSharingMode fSharingMode = VK_SHARING_MODE_EXCLUSIVE;
27
- uint32_t fCurrentQueueFamily = VK_QUEUE_FAMILY_IGNORED;
28
- VkImageLayout fImageLayout = VK_IMAGE_LAYOUT_UNDEFINED;
29
28
 
30
29
  // Properties related to the image view and sampling. These are less inherent properties of the
31
30
  // VkImage but describe how the VkImage should be used within Skia.
@@ -41,24 +40,20 @@ struct VulkanTextureInfo {
41
40
 
42
41
  VulkanTextureInfo() = default;
43
42
  VulkanTextureInfo(uint32_t sampleCount,
44
- uint32_t levelCount,
43
+ Mipmapped mipmapped,
45
44
  VkImageCreateFlags flags,
46
45
  VkFormat format,
47
46
  VkImageTiling imageTiling,
48
47
  VkImageUsageFlags imageUsageFlags,
49
48
  VkSharingMode sharingMode,
50
- uint32_t currentQueueFamily,
51
- VkImageLayout imageLayout,
52
49
  VkImageAspectFlags aspectMask)
53
50
  : fSampleCount(sampleCount)
54
- , fLevelCount(levelCount)
51
+ , fMipmapped(mipmapped)
55
52
  , fFlags(flags)
56
53
  , fFormat(format)
57
54
  , fImageTiling(imageTiling)
58
55
  , fImageUsageFlags(imageUsageFlags)
59
56
  , fSharingMode(sharingMode)
60
- , fCurrentQueueFamily(currentQueueFamily)
61
- , fImageLayout(imageLayout)
62
57
  , fAspectMask(aspectMask) {}
63
58
  };
64
59
 
@@ -0,0 +1,28 @@
1
+ /*
2
+ * Copyright 2022 Google LLC
3
+ *
4
+ * Use of this source code is governed by a BSD-style license that can be
5
+ * found in the LICENSE file.
6
+ */
7
+
8
+ #ifndef skgpu_graphite_VulkanGraphiteUtils_DEFINED
9
+ #define skgpu_graphite_VulkanGraphiteUtils_DEFINED
10
+
11
+ #include <memory>
12
+
13
+ #include "include/private/base/SkAPI.h"
14
+
15
+ namespace skgpu { struct VulkanBackendContext; }
16
+
17
+ namespace skgpu::graphite {
18
+
19
+ class Context;
20
+ struct ContextOptions;
21
+
22
+ namespace ContextFactory {
23
+ SK_API std::unique_ptr<Context> MakeVulkan(const VulkanBackendContext&, const ContextOptions&);
24
+ } // namespace ContextFactory
25
+
26
+ } // namespace skgpu::graphite
27
+
28
+ #endif // skgpu_graphite_VulkanGraphiteUtils_DEFINED
@@ -8,7 +8,8 @@
8
8
  #ifndef GrMockOptions_DEFINED
9
9
  #define GrMockOptions_DEFINED
10
10
 
11
- #include "include/gpu/GrTypes.h"
11
+ #include "include/core/SkTextureCompressionType.h"
12
+ #include "include/gpu/GpuTypes.h"
12
13
  #include "include/private/gpu/ganesh/GrTypesPriv.h"
13
14
 
14
15
  class GrBackendFormat;
@@ -16,17 +17,17 @@ class GrBackendFormat;
16
17
  struct GrMockTextureInfo {
17
18
  GrMockTextureInfo()
18
19
  : fColorType(GrColorType::kUnknown)
19
- , fCompressionType(SkImage::CompressionType::kNone)
20
+ , fCompressionType(SkTextureCompressionType::kNone)
20
21
  , fID(0) {}
21
22
 
22
23
  GrMockTextureInfo(GrColorType colorType,
23
- SkImage::CompressionType compressionType,
24
+ SkTextureCompressionType compressionType,
24
25
  int id)
25
26
  : fColorType(colorType)
26
27
  , fCompressionType(compressionType)
27
28
  , fID(id) {
28
29
  SkASSERT(fID);
29
- if (fCompressionType != SkImage::CompressionType::kNone) {
30
+ if (fCompressionType != SkTextureCompressionType::kNone) {
30
31
  SkASSERT(colorType == GrColorType::kUnknown);
31
32
  }
32
33
  }
@@ -39,10 +40,10 @@ struct GrMockTextureInfo {
39
40
 
40
41
  GrBackendFormat getBackendFormat() const;
41
42
 
42
- SkImage::CompressionType compressionType() const { return fCompressionType; }
43
+ SkTextureCompressionType compressionType() const { return fCompressionType; }
43
44
 
44
45
  GrColorType colorType() const {
45
- SkASSERT(fCompressionType == SkImage::CompressionType::kNone);
46
+ SkASSERT(fCompressionType == SkTextureCompressionType::kNone);
46
47
  return fColorType;
47
48
  }
48
49
 
@@ -50,7 +51,7 @@ struct GrMockTextureInfo {
50
51
 
51
52
  private:
52
53
  GrColorType fColorType;
53
- SkImage::CompressionType fCompressionType;
54
+ SkTextureCompressionType fCompressionType;
54
55
  int fID;
55
56
  };
56
57
 
@@ -82,12 +83,15 @@ private:
82
83
  struct GrMockSurfaceInfo {
83
84
  uint32_t fSampleCount = 1;
84
85
  uint32_t fLevelCount = 0;
85
- GrProtected fProtected = GrProtected::kNo;
86
+ skgpu::Protected fProtected = skgpu::Protected::kNo;
86
87
 
87
88
  GrColorType fColorType = GrColorType::kUnknown;
88
- SkImage::CompressionType fCompressionType = SkImage::CompressionType::kNone;
89
+ SkTextureCompressionType fCompressionType = SkTextureCompressionType::kNone;
89
90
  };
90
91
 
92
+ static constexpr int kSkTextureCompressionTypeCount =
93
+ static_cast<int>(SkTextureCompressionType::kLast) + 1;
94
+
91
95
  /**
92
96
  * A pointer to this type is used as the GrBackendContext when creating a Mock GrContext. It can be
93
97
  * used to specify capability options for the mock context. If nullptr is used a default constructed
@@ -105,9 +109,9 @@ struct GrMockOptions {
105
109
 
106
110
  fConfigOptions[(int)GrColorType::kBGRA_8888] = fConfigOptions[(int)GrColorType::kRGBA_8888];
107
111
 
108
- fCompressedOptions[(int)SkImage::CompressionType::kETC2_RGB8_UNORM].fTexturable = true;
109
- fCompressedOptions[(int)SkImage::CompressionType::kBC1_RGB8_UNORM].fTexturable = true;
110
- fCompressedOptions[(int)SkImage::CompressionType::kBC1_RGBA8_UNORM].fTexturable = true;
112
+ fCompressedOptions[(int)SkTextureCompressionType::kETC2_RGB8_UNORM].fTexturable = true;
113
+ fCompressedOptions[(int)SkTextureCompressionType::kBC1_RGB8_UNORM].fTexturable = true;
114
+ fCompressedOptions[(int)SkTextureCompressionType::kBC1_RGBA8_UNORM].fTexturable = true;
111
115
  }
112
116
 
113
117
  struct ConfigOptions {
@@ -126,7 +130,7 @@ struct GrMockOptions {
126
130
  int fMaxWindowRectangles = 0;
127
131
  int fMaxVertexAttributes = 16;
128
132
  ConfigOptions fConfigOptions[kGrColorTypeCnt];
129
- ConfigOptions fCompressedOptions[SkImage::kCompressionTypeCount];
133
+ ConfigOptions fCompressedOptions[kSkTextureCompressionTypeCount];
130
134
 
131
135
  // GrShaderCaps options.
132
136
  bool fIntegerSupport = false;
@@ -8,7 +8,7 @@
8
8
  #ifndef GrMtlTypes_DEFINED
9
9
  #define GrMtlTypes_DEFINED
10
10
 
11
- #include "include/gpu/GrTypes.h"
11
+ #include "include/gpu/GpuTypes.h"
12
12
  #include "include/ports/SkCFObject.h"
13
13
 
14
14
  /**
@@ -49,7 +49,7 @@ public:
49
49
  struct GrMtlSurfaceInfo {
50
50
  uint32_t fSampleCount = 1;
51
51
  uint32_t fLevelCount = 0;
52
- GrProtected fProtected = GrProtected::kNo;
52
+ skgpu::Protected fProtected = skgpu::Protected::kNo;
53
53
 
54
54
  // Since we aren't in an Obj-C header we can't directly use Mtl types here. Each of these can
55
55
  // cast to their mapped Mtl types list below.
@@ -72,7 +72,7 @@ struct SK_API GrVkBackendContext {
72
72
  bool fOwnsInstanceAndDevice = false;
73
73
  // Indicates that we are working with protected content and all CommandPool and Queue operations
74
74
  // should be done in a protected context.
75
- GrProtected fProtectedContext = GrProtected::kNo;
75
+ skgpu::Protected fProtectedContext = skgpu::Protected::kNo;
76
76
  };
77
77
 
78
78
  #endif
@@ -9,7 +9,7 @@
9
9
  #ifndef GrVkTypes_DEFINED
10
10
  #define GrVkTypes_DEFINED
11
11
 
12
- #include "include/gpu/GrTypes.h"
12
+ #include "include/gpu/GpuTypes.h"
13
13
  #include "include/gpu/vk/VulkanTypes.h"
14
14
 
15
15
  using GrVkBackendMemory = skgpu::VulkanBackendMemory;
@@ -72,7 +72,7 @@ struct GrVkImageInfo {
72
72
  uint32_t fSampleCount = 1;
73
73
  uint32_t fLevelCount = 0;
74
74
  uint32_t fCurrentQueueFamily = VK_QUEUE_FAMILY_IGNORED;
75
- GrProtected fProtected = GrProtected::kNo;
75
+ skgpu::Protected fProtected = skgpu::Protected::kNo;
76
76
  GrVkYcbcrConversionInfo fYcbcrConversionInfo;
77
77
  VkSharingMode fSharingMode = VK_SHARING_MODE_EXCLUSIVE;
78
78
  #ifdef SK_BUILD_FOR_ANDROID_FRAMEWORK
@@ -137,7 +137,7 @@ struct GrVkDrawableInfo {
137
137
  struct GrVkSurfaceInfo {
138
138
  uint32_t fSampleCount = 1;
139
139
  uint32_t fLevelCount = 0;
140
- GrProtected fProtected = GrProtected::kNo;
140
+ skgpu::Protected fProtected = skgpu::Protected::kNo;
141
141
 
142
142
  VkImageTiling fImageTiling = VK_IMAGE_TILING_OPTIMAL;
143
143
  VkFormat fFormat = VK_FORMAT_UNDEFINED;
@@ -10,7 +10,7 @@
10
10
 
11
11
  #include "include/core/SkString.h"
12
12
  #include "include/gpu/vk/VulkanTypes.h"
13
- #include "include/private/SkTArray.h"
13
+ #include "include/private/base/SkTArray.h"
14
14
 
15
15
  namespace skgpu {
16
16
 
@@ -48,7 +48,7 @@ public:
48
48
  #ifdef SK_DEBUG
49
49
  void dump() const {
50
50
  SkDebugf("**Vulkan Extensions**\n");
51
- for (int i = 0; i < fExtensions.count(); ++i) {
51
+ for (int i = 0; i < fExtensions.size(); ++i) {
52
52
  SkDebugf("%s. Version: %d\n",
53
53
  fExtensions[i].fName.c_str(), fExtensions[i].fSpecVersion);
54
54
  }
@@ -59,7 +59,7 @@ public:
59
59
  private:
60
60
  void getSpecVersions(VulkanGetProc getProc, VkInstance, VkPhysicalDevice);
61
61
 
62
- SkTArray<Info> fExtensions;
62
+ skia_private::TArray<Info> fExtensions;
63
63
  };
64
64
 
65
65
  } // namespace skgpu
@@ -35,7 +35,7 @@ public:
35
35
  };
36
36
 
37
37
  enum class BufferUsage {
38
- // Buffers that will only be accessed from the device (large const buffers). Will always be
38
+ // Buffers that will only be accessed from the device (large const buffers) will always be
39
39
  // in device local memory.
40
40
  kGpuOnly,
41
41
  // Buffers that typically will be updated multiple times by the host and read on the gpu
@@ -103,12 +103,10 @@ public:
103
103
 
104
104
  virtual void freeMemory(const skgpu::VulkanBackendMemory&) = 0;
105
105
 
106
- // Returns the total amount of memory that is allocated and in use by an allocation for this
107
- // allocator.
108
- virtual uint64_t totalUsedMemory() const = 0;
109
-
110
- // Returns the total amount of memory that is allocated by this allocator.
111
- virtual uint64_t totalAllocatedMemory() const = 0;
106
+ // Returns the total amount of memory that is allocated as well as total
107
+ // amount of memory in use by an allocation from this allocator.
108
+ // Return 1st param is total allocated memory, 2nd is total used memory.
109
+ virtual std::pair<uint64_t, uint64_t> totalAllocatedAndUsedMemory() const = 0;
112
110
  };
113
111
 
114
112
  } // namespace skgpu
@@ -9,8 +9,8 @@
9
9
 
10
10
  #include "include/core/SkPath.h"
11
11
  #include "include/core/SkTypes.h"
12
- #include "include/private/SkTArray.h"
13
- #include "include/private/SkTDArray.h"
12
+ #include "include/private/base/SkTArray.h"
13
+ #include "include/private/base/SkTDArray.h"
14
14
 
15
15
  struct SkRect;
16
16
 
@@ -102,7 +102,7 @@ public:
102
102
  bool resolve(SkPath* result);
103
103
 
104
104
  private:
105
- SkTArray<SkPath> fPathRefs;
105
+ skia_private::TArray<SkPath> fPathRefs;
106
106
  SkTDArray<SkPathOp> fOps;
107
107
 
108
108
  static bool FixWinding(SkPath* path);
@@ -0,0 +1,22 @@
1
+ /*
2
+ * Copyright 2023 Google Inc.
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 SkFontMgr_data_DEFINED
8
+ #define SkFontMgr_data_DEFINED
9
+
10
+ #include "include/core/SkData.h"
11
+ #include "include/core/SkRefCnt.h"
12
+ #include "include/core/SkSpan.h"
13
+ #include "include/core/SkTypes.h"
14
+
15
+ class SkFontMgr;
16
+
17
+ /** Create a custom font manager which wraps a collection of SkData-stored fonts.
18
+ * This font manager uses FreeType for rendering.
19
+ */
20
+ SK_API sk_sp<SkFontMgr> SkFontMgr_New_Custom_Data(SkSpan<sk_sp<SkData>>);
21
+
22
+ #endif // SkFontMgr_data_DEFINED