@shopify/react-native-skia 0.1.192 → 0.1.193

Sign up to get free protection for your applications and to get access to all the features.
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,130 @@
1
+ /*
2
+ * Copyright 2019 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
+
8
+ #ifndef GrVkSecondaryCBDrawContext_DEFINED
9
+ #define GrVkSecondaryCBDrawContext_DEFINED
10
+
11
+ #include "include/core/SkRefCnt.h"
12
+ #include "include/core/SkSurfaceProps.h"
13
+ #include "include/core/SkTypes.h"
14
+
15
+ #include <memory>
16
+
17
+ class GrBackendSemaphore;
18
+ class GrRecordingContext;
19
+ struct GrVkDrawableInfo;
20
+ namespace skgpu::ganesh {
21
+ class Device;
22
+ }
23
+ class SkCanvas;
24
+ class SkDeferredDisplayList;
25
+ struct SkImageInfo;
26
+ class SkSurfaceCharacterization;
27
+ class SkSurfaceProps;
28
+
29
+ /**
30
+ * This class is a private header that is intended to only be used inside of Chromium. This requires
31
+ * Chromium to burrow in and include this specifically since it is not part of skia's public include
32
+ * directory.
33
+ */
34
+
35
+ /**
36
+ * This class is used to draw into an external Vulkan secondary command buffer that is imported
37
+ * by the client. The secondary command buffer that gets imported must already have had begin called
38
+ * on it with VK_COMMAND_BUFFER_USAGE_RENDER_PASS_CONTINUE_BIT. Thus any draws to the imported
39
+ * command buffer cannot require changing the render pass. This requirement means that certain types
40
+ * of draws will not be supported when using a GrVkSecondaryCBDrawContext. This includes:
41
+ * Draws that require a dst copy for blending will be dropped
42
+ * Text draws will be dropped (these may require intermediate uploads of text data)
43
+ * Read and Write pixels will not work
44
+ * Any other draw that requires a copy will fail (this includes using backdrop filter with save
45
+ * layer).
46
+ * Stenciling is also disabled, but that should not restrict any actual draws from working.
47
+ *
48
+ * While using a GrVkSecondaryCBDrawContext, the client can also draw into normal SkSurfaces and
49
+ * then draw those SkSufaces (as SkImages) into the GrVkSecondaryCBDrawContext. If any of the
50
+ * previously mentioned unsupported draws are needed by the client, they can draw them into an
51
+ * offscreen surface, and then draw that into the GrVkSecondaryCBDrawContext.
52
+ *
53
+ * After all drawing to the GrVkSecondaryCBDrawContext has been done, the client must call flush()
54
+ * on the GrVkSecondaryCBDrawContext to actually fill in the secondary VkCommandBuffer with the
55
+ * draws.
56
+ *
57
+ * Additionally, the client must keep the GrVkSecondaryCBDrawContext alive until the secondary
58
+ * VkCommandBuffer has been submitted and all work finished on the GPU. Before deleting the
59
+ * GrVkSecondaryCBDrawContext, the client must call releaseResources() so that Skia can cleanup
60
+ * any internal objects that were created for the draws into the secondary command buffer.
61
+ */
62
+ class SK_SPI GrVkSecondaryCBDrawContext : public SkRefCnt {
63
+ public:
64
+ static sk_sp<GrVkSecondaryCBDrawContext> Make(GrRecordingContext*,
65
+ const SkImageInfo&,
66
+ const GrVkDrawableInfo&,
67
+ const SkSurfaceProps* props);
68
+
69
+ ~GrVkSecondaryCBDrawContext() override;
70
+
71
+ SkCanvas* getCanvas();
72
+
73
+ // Records all the draws to the imported secondary command buffer and sets any dependent
74
+ // offscreen draws to the GPU.
75
+ void flush();
76
+
77
+ /** Inserts a list of GPU semaphores that Skia will have the driver wait on before executing
78
+ commands for this secondary CB. The wait semaphores will get added to the VkCommandBuffer
79
+ owned by this GrContext when flush() is called, and not the command buffer which the
80
+ Secondary CB is from. This will guarantee that the driver waits on the semaphores before
81
+ the secondary command buffer gets executed. If this call returns false, then the GPU
82
+ back end will not wait on any passed in semaphores, and the client will still own the
83
+ semaphores, regardless of the value of deleteSemaphoresAfterWait.
84
+
85
+ If deleteSemaphoresAfterWait is false then Skia will not delete the semaphores. In this case
86
+ it is the client's responsibility to not destroy or attempt to reuse the semaphores until it
87
+ knows that Skia has finished waiting on them. This can be done by using finishedProcs
88
+ on flush calls.
89
+
90
+ @param numSemaphores size of waitSemaphores array
91
+ @param waitSemaphores array of semaphore containers
92
+ @paramm deleteSemaphoresAfterWait who owns and should delete the semaphores
93
+ @return true if GPU is waiting on semaphores
94
+ */
95
+ bool wait(int numSemaphores,
96
+ const GrBackendSemaphore waitSemaphores[],
97
+ bool deleteSemaphoresAfterWait = true);
98
+
99
+ // This call will release all resources held by the draw context. The client must call
100
+ // releaseResources() before deleting the drawing context. However, the resources also include
101
+ // any Vulkan resources that were created and used for draws. Therefore the client must only
102
+ // call releaseResources() after submitting the secondary command buffer, and waiting for it to
103
+ // finish on the GPU. If it is called earlier then some vulkan objects may be deleted while they
104
+ // are still in use by the GPU.
105
+ void releaseResources();
106
+
107
+ const SkSurfaceProps& props() const { return fProps; }
108
+
109
+ // TODO: Fill out these calls to support DDL
110
+ bool characterize(SkSurfaceCharacterization* characterization) const;
111
+
112
+ #ifndef SK_DDL_IS_UNIQUE_POINTER
113
+ bool draw(sk_sp<const SkDeferredDisplayList> deferredDisplayList);
114
+ #else
115
+ bool draw(const SkDeferredDisplayList* deferredDisplayList);
116
+ #endif
117
+
118
+ bool isCompatible(const SkSurfaceCharacterization& characterization) const;
119
+
120
+ private:
121
+ explicit GrVkSecondaryCBDrawContext(sk_sp<skgpu::ganesh::Device>, const SkSurfaceProps*);
122
+
123
+ sk_sp<skgpu::ganesh::Device> fDevice;
124
+ std::unique_ptr<SkCanvas> fCachedCanvas;
125
+ const SkSurfaceProps fProps;
126
+
127
+ using INHERITED = SkRefCnt;
128
+ };
129
+
130
+ #endif
@@ -13,6 +13,7 @@
13
13
 
14
14
  #include "include/core/SkData.h"
15
15
  #include "include/core/SkRefCnt.h"
16
+ #include "include/core/SkTypeface.h"
16
17
  #include "include/utils/SkNoDrawCanvas.h"
17
18
 
18
19
  struct SkPackedGlyphID;
@@ -21,7 +22,6 @@ class SkStrikeCache;
21
22
  class SkStrikeClientImpl;
22
23
  class SkStrikeServer;
23
24
  class SkStrikeServerImpl;
24
- class SkTypeface;
25
25
  namespace sktext::gpu { class Slug; }
26
26
 
27
27
  using SkDiscardableHandleId = uint32_t;
@@ -62,9 +62,6 @@ public:
62
62
  bool DFTSupport,
63
63
  bool DFTPerspSupport = true);
64
64
 
65
- // Serializes the typeface to be transmitted using this server.
66
- SK_SPI sk_sp<SkData> serializeTypeface(SkTypeface*);
67
-
68
65
  // Serializes the strike data captured using a canvas returned by ::makeAnalysisCanvas. Any
69
66
  // handles locked using the DiscardableHandleManager will be assumed to be
70
67
  // unlocked after this call.
@@ -128,10 +125,6 @@ public:
128
125
  SkStrikeCache* strikeCache = nullptr);
129
126
  SK_SPI ~SkStrikeClient();
130
127
 
131
- // Deserializes the typeface previously serialized using the SkStrikeServer. Returns null if the
132
- // data is invalid.
133
- SK_SPI sk_sp<SkTypeface> deserializeTypeface(const void* data, size_t length);
134
-
135
128
  // Deserializes the strike data from a SkStrikeServer. All messages generated
136
129
  // from a server when serializing the ops must be deserialized before the op
137
130
  // is rasterized.
@@ -142,9 +135,12 @@ public:
142
135
  // corresponding typefaceID on the GPU.
143
136
  SK_SPI bool translateTypefaceID(SkAutoDescriptor* descriptor) const;
144
137
 
138
+ // Testing helpers
139
+ sk_sp<SkTypeface> retrieveTypefaceUsingServerIDForTest(SkTypefaceID) const;
140
+
145
141
  // Given a buffer, unflatten into a slug making sure to do the typefaceID translation from
146
142
  // renderer to GPU. Returns nullptr if there was a problem.
147
- sk_sp<sktext::gpu::Slug> deserializeSlug(const void* data, size_t size) const;
143
+ sk_sp<sktext::gpu::Slug> deserializeSlugForTest(const void* data, size_t size) const;
148
144
 
149
145
  private:
150
146
  std::unique_ptr<SkStrikeClientImpl> fImpl;
@@ -0,0 +1,70 @@
1
+ /*
2
+ * Copyright 2013 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
+
8
+ #ifndef SkDiscardableMemory_DEFINED
9
+ #define SkDiscardableMemory_DEFINED
10
+
11
+ #include "include/core/SkRefCnt.h"
12
+ #include "include/core/SkTypes.h"
13
+
14
+ /**
15
+ * Interface for discardable memory. Implementation is provided by the
16
+ * embedder.
17
+ */
18
+ class SK_SPI SkDiscardableMemory {
19
+ public:
20
+ /**
21
+ * Factory method that creates, initializes and locks an SkDiscardableMemory
22
+ * object. If either of these steps fails, a nullptr pointer will be returned.
23
+ */
24
+ static SkDiscardableMemory* Create(size_t bytes);
25
+
26
+ /**
27
+ * Factory class that creates, initializes and locks an SkDiscardableMemory
28
+ * object. If either of these steps fails, a nullptr pointer will be returned.
29
+ */
30
+ class Factory : public SkRefCnt {
31
+ public:
32
+ virtual SkDiscardableMemory* create(size_t bytes) = 0;
33
+ private:
34
+ using INHERITED = SkRefCnt;
35
+ };
36
+
37
+ /** Must not be called while locked.
38
+ */
39
+ virtual ~SkDiscardableMemory() {}
40
+
41
+ /**
42
+ * Locks the memory, prevent it from being discarded. Once locked. you may
43
+ * obtain a pointer to that memory using the data() method.
44
+ *
45
+ * lock() may return false, indicating that the underlying memory was
46
+ * discarded and that the lock failed.
47
+ *
48
+ * Nested calls to lock are not allowed.
49
+ */
50
+ virtual bool SK_WARN_UNUSED_RESULT lock() = 0;
51
+
52
+ /**
53
+ * Returns the current pointer for the discardable memory. This call is ONLY
54
+ * valid when the discardable memory object is locked.
55
+ */
56
+ virtual void* data() = 0;
57
+
58
+ /**
59
+ * Unlock the memory so that it can be purged by the system. Must be called
60
+ * after every successful lock call.
61
+ */
62
+ virtual void unlock() = 0;
63
+
64
+ protected:
65
+ SkDiscardableMemory() = default;
66
+ SkDiscardableMemory(const SkDiscardableMemory&) = delete;
67
+ SkDiscardableMemory& operator=(const SkDiscardableMemory&) = delete;
68
+ };
69
+
70
+ #endif
@@ -21,14 +21,6 @@ class SkStrikeClient;
21
21
  class SkWriteBuffer;
22
22
 
23
23
  namespace sktext::gpu {
24
-
25
- // You can use Slug to simulate drawTextBlob by defining the following at compile time.
26
- // SK_EXPERIMENTAL_SIMULATE_DRAWGLYPHRUNLIST_WITH_SLUG
27
- // You can use Slug serialization to simulate drawTextBlob by defining the following:
28
- // SK_EXPERIMENTAL_SIMULATE_DRAWGLYPHRUNLIST_WITH_SLUG_SERIALIZE
29
- // For Skia, add this to your args.gn file.
30
- // extra_cflags = ["-D", "SK_EXPERIMENTAL_SIMULATE_DRAWGLYPHRUNLIST_WITH_SLUG"]
31
-
32
24
  // Slug encapsulates an SkTextBlob at a specific origin, using a specific paint. It can be
33
25
  // manipulated using matrix and clip changes to the canvas. If the canvas is transformed, then
34
26
  // the Slug will also transform with smaller glyphs using bi-linear interpolation to render. You
@@ -70,7 +62,6 @@ private:
70
62
  static uint32_t NextUniqueID();
71
63
  const uint32_t fUniqueID{NextUniqueID()};
72
64
  };
73
-
74
65
  } // namespace sktext::gpu
75
66
 
76
67
  #endif // sktext_gpu_Slug_DEFINED
@@ -19,6 +19,7 @@ class GrContextThreadSafeProxy;
19
19
  class GrDirectContext;
20
20
  class GrImageContext;
21
21
  class GrRecordingContext;
22
+ enum class SkTextureCompressionType;
22
23
 
23
24
  class GrContext_Base : public SkRefCnt {
24
25
  public:
@@ -43,7 +44,7 @@ public:
43
44
  */
44
45
  SK_API GrBackendFormat defaultBackendFormat(SkColorType, GrRenderable) const;
45
46
 
46
- SK_API GrBackendFormat compressedBackendFormat(SkImage::CompressionType) const;
47
+ SK_API GrBackendFormat compressedBackendFormat(SkTextureCompressionType) const;
47
48
 
48
49
  /**
49
50
  * Gets the maximum supported sample count for a color type. 1 is returned if only non-MSAA
@@ -65,7 +65,7 @@ public:
65
65
 
66
66
  GrD3DSurfaceInfo getSurfaceInfo(uint32_t sampleCount,
67
67
  uint32_t levelCount,
68
- GrProtected isProtected) const;
68
+ skgpu::Protected isProtected) const;
69
69
 
70
70
  private:
71
71
  GrD3DTextureResourceSpec* fSpec;
@@ -20,7 +20,7 @@ struct GrDawnTextureSpec {
20
20
  GrDawnSurfaceInfo GrDawnTextureSpecToSurfaceInfo(const GrDawnTextureSpec& dawnSpec,
21
21
  uint32_t sampleCount,
22
22
  uint32_t levelCount,
23
- GrProtected isProtected);
23
+ skgpu::Protected isProtected);
24
24
 
25
25
  #endif
26
26
 
@@ -103,6 +103,6 @@ struct GrGLTextureSpec {
103
103
  GrGLSurfaceInfo GrGLTextureSpecToSurfaceInfo(const GrGLTextureSpec& glSpec,
104
104
  uint32_t sampleCount,
105
105
  uint32_t levelCount,
106
- GrProtected isProtected);
106
+ skgpu::Protected isProtected);
107
107
 
108
108
  #endif
@@ -8,7 +8,7 @@
8
8
  #ifndef GrImageContext_DEFINED
9
9
  #define GrImageContext_DEFINED
10
10
 
11
- #include "include/private/SingleOwner.h"
11
+ #include "include/private/base/SingleOwner.h"
12
12
  #include "include/private/gpu/ganesh/GrContext_Base.h"
13
13
 
14
14
  class GrImageContextPriv;
@@ -8,18 +8,19 @@
8
8
  #ifndef GrMockTypesPriv_DEFINED
9
9
  #define GrMockTypesPriv_DEFINED
10
10
 
11
+ #include "include/core/SkTextureCompressionType.h"
11
12
  #include "include/gpu/mock/GrMockTypes.h"
12
13
 
13
14
  struct GrMockTextureSpec {
14
15
  GrMockTextureSpec()
15
16
  : fColorType(GrColorType::kUnknown)
16
- , fCompressionType(SkImage::CompressionType::kNone) {}
17
+ , fCompressionType(SkTextureCompressionType::kNone) {}
17
18
  GrMockTextureSpec(const GrMockSurfaceInfo& info)
18
19
  : fColorType(info.fColorType)
19
20
  , fCompressionType(info.fCompressionType) {}
20
21
 
21
22
  GrColorType fColorType = GrColorType::kUnknown;
22
- SkImage::CompressionType fCompressionType = SkImage::CompressionType::kNone;
23
+ SkTextureCompressionType fCompressionType = SkTextureCompressionType::kNone;
23
24
  };
24
25
 
25
26
  GrMockSurfaceInfo GrMockTextureSpecToSurfaceInfo(const GrMockTextureSpec& mockSpec,
@@ -68,7 +68,7 @@ struct GrMtlTextureSpec {
68
68
  GrMtlSurfaceInfo GrMtlTextureSpecToSurfaceInfo(const GrMtlTextureSpec& mtlSpec,
69
69
  uint32_t sampleCount,
70
70
  uint32_t levelCount,
71
- GrProtected isProtected);
71
+ skgpu::Protected isProtected);
72
72
 
73
73
  #endif // __APPLE__
74
74
 
@@ -8,28 +8,21 @@
8
8
  #ifndef GrTypesPriv_DEFINED
9
9
  #define GrTypesPriv_DEFINED
10
10
 
11
- #include <chrono>
12
- #include "include/core/SkImage.h"
11
+ #include "include/core/SkColor.h"
13
12
  #include "include/core/SkImageInfo.h"
14
13
  #include "include/core/SkPath.h"
15
14
  #include "include/core/SkRefCnt.h"
15
+ #include "include/core/SkTextureCompressionType.h"
16
16
  #include "include/gpu/GrTypes.h"
17
- #include "include/private/SkImageInfoPriv.h"
18
- #include "include/private/SkMacros.h"
17
+ #include "include/private/base/SkMacros.h"
18
+ #include "include/private/base/SkTypeTraits.h"
19
+
20
+ #include <functional>
19
21
 
20
22
  class GrBackendFormat;
21
23
  class GrCaps;
22
24
  class GrSurfaceProxy;
23
25
 
24
- // The old libstdc++ uses the draft name "monotonic_clock" rather than "steady_clock". This might
25
- // not actually be monotonic, depending on how libstdc++ was built. However, this is only currently
26
- // used for idle resource purging so it shouldn't cause a correctness problem.
27
- #if defined(__GLIBCXX__) && (__GLIBCXX__ < 20130000)
28
- using GrStdSteadyClock = std::chrono::monotonic_clock;
29
- #else
30
- using GrStdSteadyClock = std::chrono::steady_clock;
31
- #endif
32
-
33
26
  /**
34
27
  * divide, rounding up
35
28
  */
@@ -643,6 +636,7 @@ static constexpr GrColorType SkColorTypeToGrColorType(SkColorType ct) {
643
636
  case kRGB_101010x_SkColorType: return GrColorType::kUnknown;
644
637
  case kBGRA_1010102_SkColorType: return GrColorType::kBGRA_1010102;
645
638
  case kBGR_101010x_SkColorType: return GrColorType::kUnknown;
639
+ case kBGR_101010x_XR_SkColorType: return GrColorType::kUnknown;
646
640
  case kRGBA_F32_SkColorType: return GrColorType::kRGBA_F32;
647
641
  case kR8G8_unorm_SkColorType: return GrColorType::kRG_88;
648
642
  case kA16_unorm_SkColorType: return GrColorType::kAlpha_16;
@@ -924,12 +918,12 @@ static constexpr size_t GrColorTypeBytesPerPixel(GrColorType ct) {
924
918
 
925
919
  // In general we try to not mix CompressionType and ColorType, but currently SkImage still requires
926
920
  // an SkColorType even for CompressedTypes so we need some conversion.
927
- static constexpr SkColorType GrCompressionTypeToSkColorType(SkImage::CompressionType compression) {
921
+ static constexpr SkColorType GrCompressionTypeToSkColorType(SkTextureCompressionType compression) {
928
922
  switch (compression) {
929
- case SkImage::CompressionType::kNone: return kUnknown_SkColorType;
930
- case SkImage::CompressionType::kETC2_RGB8_UNORM: return kRGB_888x_SkColorType;
931
- case SkImage::CompressionType::kBC1_RGB8_UNORM: return kRGB_888x_SkColorType;
932
- case SkImage::CompressionType::kBC1_RGBA8_UNORM: return kRGBA_8888_SkColorType;
923
+ case SkTextureCompressionType::kNone: return kUnknown_SkColorType;
924
+ case SkTextureCompressionType::kETC2_RGB8_UNORM: return kRGB_888x_SkColorType;
925
+ case SkTextureCompressionType::kBC1_RGB8_UNORM: return kRGB_888x_SkColorType;
926
+ case SkTextureCompressionType::kBC1_RGBA8_UNORM: return kRGBA_8888_SkColorType;
933
927
  }
934
928
 
935
929
  SkUNREACHABLE;
@@ -995,12 +989,12 @@ static constexpr const char* GrColorTypeToStr(GrColorType ct) {
995
989
  SkUNREACHABLE;
996
990
  }
997
991
 
998
- static constexpr const char* GrCompressionTypeToStr(SkImage::CompressionType compression) {
992
+ static constexpr const char* GrCompressionTypeToStr(SkTextureCompressionType compression) {
999
993
  switch (compression) {
1000
- case SkImage::CompressionType::kNone: return "kNone";
1001
- case SkImage::CompressionType::kETC2_RGB8_UNORM: return "kETC2_RGB8_UNORM";
1002
- case SkImage::CompressionType::kBC1_RGB8_UNORM: return "kBC1_RGB8_UNORM";
1003
- case SkImage::CompressionType::kBC1_RGBA8_UNORM: return "kBC1_RGBA8_UNORM";
994
+ case SkTextureCompressionType::kNone: return "kNone";
995
+ case SkTextureCompressionType::kETC2_RGB8_UNORM: return "kETC2_RGB8_UNORM";
996
+ case SkTextureCompressionType::kBC1_RGB8_UNORM: return "kBC1_RGB8_UNORM";
997
+ case SkTextureCompressionType::kBC1_RGBA8_UNORM: return "kBC1_RGBA8_UNORM";
1004
998
  }
1005
999
  SkUNREACHABLE;
1006
1000
  }
@@ -35,7 +35,7 @@ struct GrVkBackendSurfaceInfo {
35
35
 
36
36
  GrVkImageInfo snapImageInfo(const skgpu::MutableTextureStateRef*) const;
37
37
 
38
- bool isProtected() const { return fImageInfo.fProtected == GrProtected::kYes; }
38
+ bool isProtected() const { return fImageInfo.fProtected == skgpu::Protected::kYes; }
39
39
  #if GR_TEST_UTILS
40
40
  bool operator==(const GrVkBackendSurfaceInfo& that) const;
41
41
  #endif
@@ -68,6 +68,6 @@ struct GrVkImageSpec {
68
68
  GrVkSurfaceInfo GrVkImageSpecToSurfaceInfo(const GrVkImageSpec& vkSpec,
69
69
  uint32_t sampleCount,
70
70
  uint32_t levelCount,
71
- GrProtected isProtected);
71
+ skgpu::Protected isProtected);
72
72
 
73
73
  #endif
@@ -0,0 +1,38 @@
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_DawnTypesPriv_DEFINED
9
+ #define skgpu_graphite_DawnTypesPriv_DEFINED
10
+
11
+ #include "include/gpu/graphite/dawn/DawnTypes.h"
12
+
13
+ namespace skgpu::graphite {
14
+
15
+ struct DawnTextureSpec {
16
+ DawnTextureSpec()
17
+ : fFormat(wgpu::TextureFormat::Undefined)
18
+ , fUsage(wgpu::TextureUsage::None) {}
19
+ DawnTextureSpec(const DawnTextureInfo& info)
20
+ : fFormat(info.fFormat)
21
+ , fUsage(info.fUsage) {}
22
+
23
+ bool operator==(const DawnTextureSpec& that) const {
24
+ return fUsage == that.fUsage &&
25
+ fFormat == that.fFormat;
26
+ }
27
+
28
+ wgpu::TextureFormat fFormat;
29
+ wgpu::TextureUsage fUsage;
30
+ };
31
+
32
+ DawnTextureInfo DawnTextureSpecToTextureInfo(const DawnTextureSpec& dawnSpec,
33
+ uint32_t sampleCount,
34
+ Mipmapped mipmapped);
35
+
36
+ } // namespace skgpu::graphite
37
+
38
+ #endif // skgpu_graphite_DawnTypesPriv_DEFINED
@@ -5,11 +5,11 @@
5
5
  * found in the LICENSE file.
6
6
  */
7
7
 
8
- #ifndef skgpu_graphite_MtlTypesPriv_DEFINED
9
- #define skgpu_graphite_MtlTypesPriv_DEFINED
8
+ #ifndef skgpu_graphite_MtlGraphiteTypesPriv_DEFINED
9
+ #define skgpu_graphite_MtlGraphiteTypesPriv_DEFINED
10
10
 
11
11
  #include "include/gpu/graphite/GraphiteTypes.h"
12
- #include "include/gpu/graphite/mtl/MtlTypes.h"
12
+ #include "include/gpu/graphite/mtl/MtlGraphiteTypes.h"
13
13
 
14
14
  ///////////////////////////////////////////////////////////////////////////////
15
15
 
@@ -67,8 +67,8 @@ struct MtlTextureSpec {
67
67
 
68
68
  MtlTextureInfo MtlTextureSpecToTextureInfo(const MtlTextureSpec& mtlSpec,
69
69
  uint32_t sampleCount,
70
- uint32_t levelCount);
70
+ Mipmapped mipmapped);
71
71
 
72
72
  } // namespace skgpu::graphite
73
73
 
74
- #endif // skgpu_graphite_MtlTypesPriv_DEFINED
74
+ #endif // skgpu_graphite_MtlGraphiteTypesPriv_DEFINED
@@ -19,8 +19,6 @@ struct VulkanTextureSpec {
19
19
  , fImageTiling(VK_IMAGE_TILING_OPTIMAL)
20
20
  , fImageUsageFlags(0)
21
21
  , fSharingMode(VK_SHARING_MODE_EXCLUSIVE)
22
- , fCurrentQueueFamily(VK_QUEUE_FAMILY_IGNORED)
23
- , fImageLayout(VK_IMAGE_LAYOUT_UNDEFINED)
24
22
  , fAspectMask(VK_IMAGE_ASPECT_COLOR_BIT) {}
25
23
  VulkanTextureSpec(const VulkanTextureInfo& info)
26
24
  : fFlags(info.fFlags)
@@ -28,8 +26,6 @@ struct VulkanTextureSpec {
28
26
  , fImageTiling(info.fImageTiling)
29
27
  , fImageUsageFlags(info.fImageUsageFlags)
30
28
  , fSharingMode(info.fSharingMode)
31
- , fCurrentQueueFamily(info.fCurrentQueueFamily)
32
- , fImageLayout(info.fImageLayout)
33
29
  , fAspectMask(info.fAspectMask) {}
34
30
 
35
31
  bool operator==(const VulkanTextureSpec& that) const {
@@ -38,8 +34,6 @@ struct VulkanTextureSpec {
38
34
  fImageTiling == that.fImageTiling &&
39
35
  fImageUsageFlags == that.fImageUsageFlags &&
40
36
  fSharingMode == that.fSharingMode &&
41
- fCurrentQueueFamily == that.fCurrentQueueFamily &&
42
- fImageLayout == that.fImageLayout &&
43
37
  fAspectMask == that.fAspectMask;
44
38
  }
45
39
 
@@ -48,15 +42,13 @@ struct VulkanTextureSpec {
48
42
  VkImageTiling fImageTiling;
49
43
  VkImageUsageFlags fImageUsageFlags;
50
44
  VkSharingMode fSharingMode;
51
- uint32_t fCurrentQueueFamily;
52
- VkImageLayout fImageLayout;
53
45
  VkImageAspectFlags fAspectMask;
54
46
  // GrVkYcbcrConversionInfo fYcbcrConversionInfo;
55
47
  };
56
48
 
57
49
  VulkanTextureInfo VulkanTextureSpecToTextureInfo(const VulkanTextureSpec& vkSpec,
58
50
  uint32_t sampleCount,
59
- uint32_t levelCount);
51
+ Mipmapped mipmapped);
60
52
 
61
53
  } // namespace skgpu::graphite
62
54
 
@@ -10,6 +10,8 @@
10
10
 
11
11
  #include "include/core/SkTypes.h"
12
12
 
13
+ // IWYU pragma: begin_exports
14
+
13
15
  #if SKIA_IMPLEMENTATION || !defined(SK_VULKAN)
14
16
  #include "include/third_party/vulkan/vulkan/vulkan_core.h"
15
17
  #else
@@ -29,4 +31,6 @@
29
31
  #endif
30
32
  #endif
31
33
 
34
+ // IWYU pragma: end_exports
35
+
32
36
  #endif
@@ -14,7 +14,7 @@
14
14
  #include "include/core/SkMatrix.h"
15
15
  #include "include/core/SkScalar.h"
16
16
  #include "include/core/SkTypes.h"
17
- #include "include/private/SkNoncopyable.h"
17
+ #include "include/private/base/SkNoncopyable.h"
18
18
 
19
19
  // NOTE -- This entire header / impl is deprecated, and will be removed from Skia soon.
20
20
  //
@@ -14,12 +14,15 @@
14
14
  #include "include/core/SkPath.h"
15
15
  #include "include/core/SkRect.h"
16
16
  #include "include/core/SkRefCnt.h"
17
+ #include "include/core/SkTypeface.h"
17
18
  #include "include/core/SkTypes.h"
18
19
 
20
+ #include <memory>
19
21
  #include <vector>
20
22
 
21
23
  class SkStream;
22
- class SkTypeface;
24
+ class SkStreamAsset;
25
+ struct SkFontArguments;
23
26
 
24
27
  class SK_API SkCustomTypefaceBuilder {
25
28
  public:
@@ -33,6 +36,9 @@ public:
33
36
 
34
37
  sk_sp<SkTypeface> detach();
35
38
 
39
+ static constexpr SkTypeface::FactoryId FactoryId = SkSetFourByteTag('u','s','e','r');
40
+ static sk_sp<SkTypeface> MakeFromStream(std::unique_ptr<SkStreamAsset>, const SkFontArguments&);
41
+
36
42
  private:
37
43
  struct GlyphRec {
38
44
  // logical union