@shopify/react-native-skia 2.6.5 → 2.6.7

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 (279) hide show
  1. package/android/CMakeLists.txt +2 -2
  2. package/android/src/paper/java/com/facebook/react/viewmanagers/SkiaWebGPUViewManagerDelegate.java +35 -0
  3. package/android/src/paper/java/com/facebook/react/viewmanagers/SkiaWebGPUViewManagerInterface.java +17 -0
  4. package/apple/RNSkiaModule.mm +8 -2
  5. package/apple/SkiaManager.mm +10 -5
  6. package/cpp/api/JsiSkApi.h +6 -6
  7. package/cpp/api/JsiSkCanvas.h +33 -0
  8. package/cpp/api/JsiSkImage.h +12 -4
  9. package/cpp/api/JsiSkMaskFilter.h +1 -0
  10. package/cpp/api/JsiSkSurface.h +5 -1
  11. package/cpp/jsi2/NativeObject.h +39 -0
  12. package/cpp/rnskia/RNSkManager.cpp +27 -11
  13. package/cpp/rnwgpu/SurfaceRegistry.h +33 -1
  14. package/cpp/rnwgpu/api/GPU.cpp +15 -15
  15. package/cpp/rnwgpu/api/GPU.h +6 -3
  16. package/cpp/rnwgpu/api/GPUAdapter.cpp +11 -7
  17. package/cpp/rnwgpu/api/GPUAdapter.h +3 -3
  18. package/cpp/rnwgpu/api/GPUBuffer.h +3 -3
  19. package/cpp/rnwgpu/api/GPUCanvasContext.cpp +13 -16
  20. package/cpp/rnwgpu/api/GPUCanvasContext.h +3 -0
  21. package/cpp/rnwgpu/api/GPUDevice.cpp +103 -17
  22. package/cpp/rnwgpu/api/GPUDevice.h +18 -3
  23. package/cpp/rnwgpu/api/GPUQueue.h +3 -3
  24. package/cpp/rnwgpu/api/GPUShaderModule.cpp +1 -1
  25. package/cpp/rnwgpu/api/GPUShaderModule.h +3 -3
  26. package/cpp/rnwgpu/api/GPUSharedFence.cpp +80 -0
  27. package/cpp/rnwgpu/api/GPUSharedFence.h +53 -0
  28. package/cpp/rnwgpu/api/GPUSharedTextureMemory.cpp +64 -11
  29. package/cpp/rnwgpu/api/GPUSharedTextureMemory.h +13 -8
  30. package/cpp/rnwgpu/api/WebGPUConstants.h +36 -0
  31. package/cpp/rnwgpu/api/descriptors/GPUSharedFenceDescriptor.h +58 -0
  32. package/cpp/rnwgpu/api/descriptors/GPUSharedFenceState.h +51 -0
  33. package/cpp/rnwgpu/async/AsyncTaskHandle.cpp +55 -22
  34. package/cpp/rnwgpu/async/AsyncTaskHandle.h +8 -5
  35. package/cpp/rnwgpu/async/RuntimeContext.cpp +194 -0
  36. package/cpp/rnwgpu/async/RuntimeContext.h +121 -0
  37. package/cpp/skia/include/android/GrAHardwareBufferUtils.h +1 -1
  38. package/cpp/skia/include/android/SkAndroidFrameworkUtils.h +1 -1
  39. package/cpp/skia/include/android/SkAnimatedImage.h +1 -1
  40. package/cpp/skia/include/codec/SkCodec.h +0 -8
  41. package/cpp/skia/include/codec/SkEncodedOrigin.h +1 -1
  42. package/cpp/skia/include/codec/SkPngRustDecoder.h +1 -1
  43. package/cpp/skia/include/core/SkBitmap.h +2 -8
  44. package/cpp/skia/include/core/SkCPURecorder.h +3 -1
  45. package/cpp/skia/include/core/SkCanvasVirtualEnforcer.h +1 -1
  46. package/cpp/skia/include/core/SkColorType.h +5 -3
  47. package/cpp/skia/include/core/SkContourMeasure.h +1 -1
  48. package/cpp/skia/include/core/SkCoverageMode.h +1 -1
  49. package/cpp/skia/include/core/SkCubicMap.h +1 -1
  50. package/cpp/skia/include/core/SkExecutor.h +1 -1
  51. package/cpp/skia/include/core/SkFont.h +15 -0
  52. package/cpp/skia/include/core/SkFontArguments.h +6 -1
  53. package/cpp/skia/include/core/SkFontMetrics.h +1 -1
  54. package/cpp/skia/include/core/SkFontMgr.h +36 -1
  55. package/cpp/skia/include/core/SkFontParameters.h +1 -1
  56. package/cpp/skia/include/core/SkFontScanner.h +1 -1
  57. package/cpp/skia/include/core/SkFontTypes.h +1 -1
  58. package/cpp/skia/include/core/SkM44.h +1 -1
  59. package/cpp/skia/include/core/SkMilestone.h +1 -1
  60. package/cpp/skia/include/core/SkOpenTypeSVGDecoder.h +1 -1
  61. package/cpp/skia/include/core/SkPathBuilder.h +10 -4
  62. package/cpp/skia/include/core/SkPathIter.h +1 -1
  63. package/cpp/skia/include/core/SkPathTypes.h +1 -1
  64. package/cpp/skia/include/core/SkPixelRef.h +4 -1
  65. package/cpp/skia/include/core/SkRecorder.h +2 -1
  66. package/cpp/skia/include/core/SkRegion.h +7 -1
  67. package/cpp/skia/include/core/SkSamplingOptions.h +1 -1
  68. package/cpp/skia/include/core/SkSerialProcs.h +8 -1
  69. package/cpp/skia/include/core/SkShader.h +3 -5
  70. package/cpp/skia/include/core/SkSpan.h +1 -1
  71. package/cpp/skia/include/core/SkStream.h +1 -1
  72. package/cpp/skia/include/core/SkStrikeRef.h +80 -0
  73. package/cpp/skia/include/core/SkTileMode.h +1 -1
  74. package/cpp/skia/include/core/SkVertices.h +1 -1
  75. package/cpp/skia/include/core/SkYUVAPixmaps.h +3 -5
  76. package/cpp/skia/include/docs/SkPDFDocument.h +1 -1
  77. package/cpp/skia/include/docs/SkXPSDocument.h +1 -1
  78. package/cpp/skia/include/effects/SkGradient.h +1 -1
  79. package/cpp/skia/include/effects/SkHighContrastFilter.h +1 -1
  80. package/cpp/skia/include/effects/SkShaderMaskFilter.h +1 -1
  81. package/cpp/skia/include/effects/SkTrimPathEffect.h +1 -1
  82. package/cpp/skia/include/encode/SkEncoder.h +1 -1
  83. package/cpp/skia/include/encode/SkJpegEncoder.h +1 -1
  84. package/cpp/skia/include/encode/SkPngEncoder.h +1 -1
  85. package/cpp/skia/include/encode/SkPngRustEncoder.h +1 -1
  86. package/cpp/skia/include/encode/SkWebpEncoder.h +1 -1
  87. package/cpp/skia/include/gpu/GpuTypes.h +2 -0
  88. package/cpp/skia/include/gpu/MutableTextureState.h +1 -1
  89. package/cpp/skia/include/gpu/ganesh/GrBackendSemaphore.h +1 -1
  90. package/cpp/skia/include/gpu/ganesh/GrBackendSurface.h +6 -62
  91. package/cpp/skia/include/gpu/ganesh/GrContextThreadSafeProxy.h +1 -1
  92. package/cpp/skia/include/gpu/ganesh/GrDirectContext.h +1 -1
  93. package/cpp/skia/include/gpu/ganesh/GrDriverBugWorkarounds.h +1 -1
  94. package/cpp/skia/include/gpu/ganesh/GrRecordingContext.h +2 -1
  95. package/cpp/skia/include/gpu/ganesh/mock/GrMockBackendSurface.h +59 -0
  96. package/cpp/skia/include/gpu/ganesh/mock/GrMockTypes.h +1 -1
  97. package/cpp/skia/include/gpu/ganesh/mtl/GrMtlBackendContext.h +1 -1
  98. package/cpp/skia/include/gpu/ganesh/mtl/GrMtlTypes.h +1 -1
  99. package/cpp/skia/include/gpu/ganesh/vk/GrBackendDrawableInfo.h +1 -1
  100. package/cpp/skia/include/gpu/graphite/Context.h +11 -4
  101. package/cpp/skia/include/gpu/graphite/GraphiteTypes.h +6 -0
  102. package/cpp/skia/include/gpu/graphite/Image.h +82 -9
  103. package/cpp/skia/include/gpu/graphite/PrecompileContext.h +7 -2
  104. package/cpp/skia/include/gpu/graphite/Recorder.h +6 -4
  105. package/cpp/skia/include/gpu/graphite/precompile/PrecompileColorFilter.h +11 -1
  106. package/cpp/skia/include/gpu/graphite/precompile/PrecompileShader.h +1 -0
  107. package/cpp/skia/include/gpu/graphite/vk/VulkanGraphiteTypes.h +1 -1
  108. package/cpp/skia/include/gpu/mtl/MtlMemoryAllocator.h +1 -1
  109. package/cpp/skia/include/gpu/vk/VulkanExtensions.h +1 -1
  110. package/cpp/skia/include/gpu/vk/VulkanMemoryAllocator.h +1 -1
  111. package/cpp/skia/include/gpu/vk/VulkanTypes.h +1 -1
  112. package/cpp/skia/include/ports/SkCFObject.h +1 -1
  113. package/cpp/skia/include/ports/SkFontMgr_Fontations.h +1 -1
  114. package/cpp/skia/include/ports/SkFontMgr_android_ndk.h +1 -1
  115. package/cpp/skia/include/ports/SkFontMgr_data.h +1 -1
  116. package/cpp/skia/include/ports/SkFontMgr_fuchsia.h +1 -1
  117. package/cpp/skia/include/ports/SkFontMgr_mac_ct.h +1 -1
  118. package/cpp/skia/include/ports/SkFontScanner_Fontations.h +1 -1
  119. package/cpp/skia/include/ports/SkFontScanner_FreeType.h +1 -1
  120. package/cpp/skia/include/ports/SkTypeface_fontations.h +1 -1
  121. package/cpp/skia/include/private/SkExif.h +1 -1
  122. package/cpp/skia/include/private/SkGainmapInfo.h +1 -1
  123. package/cpp/skia/include/private/SkGainmapShader.h +1 -1
  124. package/cpp/skia/include/private/SkHdrMetadata.h +21 -0
  125. package/cpp/skia/include/private/SkJpegGainmapEncoder.h +1 -1
  126. package/cpp/skia/include/private/SkPixelStorage.h +37 -0
  127. package/cpp/skia/include/private/SkXmp.h +1 -1
  128. package/cpp/skia/include/private/base/SkAssert.h +6 -5
  129. package/cpp/skia/include/private/base/SkContainers.h +1 -1
  130. package/cpp/skia/include/private/base/SkFeatures.h +30 -30
  131. package/cpp/skia/include/private/base/SkLog.h +1 -7
  132. package/cpp/skia/include/private/base/SkLogPriority.h +4 -5
  133. package/cpp/skia/include/private/base/SkMacros.h +1 -1
  134. package/cpp/skia/include/private/base/SkMalloc.h +1 -1
  135. package/cpp/skia/include/private/base/SkSafe32.h +1 -1
  136. package/cpp/skia/include/private/base/SkSpan_impl.h +1 -1
  137. package/cpp/skia/include/private/base/SkTDArray.h +13 -1
  138. package/cpp/skia/include/private/base/SkTPin.h +1 -1
  139. package/cpp/skia/include/private/base/SkTo.h +1 -1
  140. package/cpp/skia/include/private/chromium/GrVkSecondaryCBDrawContext.h +1 -1
  141. package/cpp/skia/include/private/chromium/SkChromeRemoteGlyphCache.h +1 -1
  142. package/cpp/skia/include/private/chromium/SkCodecsICCProfileChromium.h +52 -0
  143. package/cpp/skia/include/private/chromium/SkExifChromium.h +26 -0
  144. package/cpp/skia/include/private/gpu/ganesh/GrContext_Base.h +1 -1
  145. package/cpp/skia/include/private/gpu/ganesh/GrImageContext.h +1 -1
  146. package/cpp/skia/include/private/gpu/ganesh/GrTypesPriv.h +2 -1
  147. package/cpp/skia/include/private/gpu/vk/SkiaVulkan.h +1 -1
  148. package/cpp/skia/include/sksl/SkSLDebugTrace.h +1 -1
  149. package/cpp/skia/include/third_party/vulkan/vulkan/vk_icd.h +41 -51
  150. package/cpp/skia/include/third_party/vulkan/vulkan/vk_layer.h +42 -53
  151. package/cpp/skia/include/third_party/vulkan/vulkan/vk_platform.h +2 -1
  152. package/cpp/skia/include/third_party/vulkan/vulkan/vk_video/vulkan_video_codec_av1std.h +158 -154
  153. package/cpp/skia/include/third_party/vulkan/vulkan/vk_video/vulkan_video_codec_av1std_decode.h +68 -65
  154. package/cpp/skia/include/third_party/vulkan/vulkan/vk_video/vulkan_video_codec_av1std_encode.h +90 -87
  155. package/cpp/skia/include/third_party/vulkan/vulkan/vk_video/vulkan_video_codec_h264std.h +9 -9
  156. package/cpp/skia/include/third_party/vulkan/vulkan/vk_video/vulkan_video_codec_h264std_decode.h +2 -2
  157. package/cpp/skia/include/third_party/vulkan/vulkan/vk_video/vulkan_video_codec_h264std_encode.h +82 -79
  158. package/cpp/skia/include/third_party/vulkan/vulkan/vk_video/vulkan_video_codec_h265std.h +24 -24
  159. package/cpp/skia/include/third_party/vulkan/vulkan/vk_video/vulkan_video_codec_h265std_decode.h +2 -2
  160. package/cpp/skia/include/third_party/vulkan/vulkan/vk_video/vulkan_video_codec_h265std_encode.h +95 -96
  161. package/cpp/skia/include/third_party/vulkan/vulkan/vk_video/vulkan_video_codec_vp9std.h +151 -0
  162. package/cpp/skia/include/third_party/vulkan/vulkan/vk_video/vulkan_video_codec_vp9std_decode.h +68 -0
  163. package/cpp/skia/include/third_party/vulkan/vulkan/vk_video/vulkan_video_codecs_common.h +1 -1
  164. package/cpp/skia/include/third_party/vulkan/vulkan/vulkan.h +5 -1
  165. package/cpp/skia/include/third_party/vulkan/vulkan/vulkan_android.h +7 -1
  166. package/cpp/skia/include/third_party/vulkan/vulkan/vulkan_beta.h +291 -158
  167. package/cpp/skia/include/third_party/vulkan/vulkan/vulkan_core.h +13174 -10113
  168. package/cpp/skia/include/third_party/vulkan/vulkan/vulkan_directfb.h +23 -19
  169. package/cpp/skia/include/third_party/vulkan/vulkan/vulkan_fuchsia.h +159 -165
  170. package/cpp/skia/include/third_party/vulkan/vulkan/vulkan_ggp.h +22 -19
  171. package/cpp/skia/include/third_party/vulkan/vulkan/vulkan_ios.h +3 -1
  172. package/cpp/skia/include/third_party/vulkan/vulkan/vulkan_macos.h +3 -1
  173. package/cpp/skia/include/third_party/vulkan/vulkan/vulkan_metal.h +94 -88
  174. package/cpp/skia/include/third_party/vulkan/vulkan/vulkan_ohos.h +120 -0
  175. package/cpp/skia/include/third_party/vulkan/vulkan/vulkan_screen.h +55 -51
  176. package/cpp/skia/include/third_party/vulkan/vulkan/vulkan_vi.h +18 -15
  177. package/cpp/skia/include/third_party/vulkan/vulkan/vulkan_wayland.h +23 -19
  178. package/cpp/skia/include/third_party/vulkan/vulkan/vulkan_win32.h +31 -1
  179. package/cpp/skia/include/third_party/vulkan/vulkan/vulkan_xcb.h +5 -1
  180. package/cpp/skia/include/third_party/vulkan/vulkan/vulkan_xlib.h +27 -27
  181. package/cpp/skia/include/third_party/vulkan/vulkan/vulkan_xlib_xrandr.h +20 -16
  182. package/cpp/skia/include/utils/SkEventTracer.h +6 -1
  183. package/cpp/skia/include/utils/SkOrderedFontMgr.h +1 -1
  184. package/cpp/skia/include/utils/SkShadowUtils.h +1 -1
  185. package/cpp/skia/include/utils/SkTextUtils.h +1 -1
  186. package/cpp/skia/modules/jsonreader/SkJSONReader.cpp +20 -4
  187. package/cpp/skia/modules/skcms/src/Transform_inl.h +11 -15
  188. package/cpp/skia/modules/skcms/src/skcms_public.h +2 -0
  189. package/cpp/skia/modules/skottie/include/ExternalLayer.h +1 -1
  190. package/cpp/skia/modules/skottie/include/Skottie.h +1 -1
  191. package/cpp/skia/modules/skottie/include/SkottieProperty.h +1 -1
  192. package/cpp/skia/modules/skottie/include/SlotManager.h +1 -1
  193. package/cpp/skia/modules/skottie/include/TextShaper.h +1 -1
  194. package/cpp/skia/modules/skottie/src/SkottieValue.h +1 -1
  195. package/cpp/skia/modules/skottie/src/animator/Animator.h +1 -1
  196. package/cpp/skia/modules/skottie/src/text/Font.h +1 -1
  197. package/cpp/skia/modules/skottie/src/text/TextAdapter.h +1 -1
  198. package/cpp/skia/modules/skottie/src/text/TextAnimator.h +3 -2
  199. package/cpp/skia/modules/skottie/src/text/TextValue.h +1 -1
  200. package/cpp/skia/modules/skparagraph/include/DartTypes.h +1 -1
  201. package/cpp/skia/modules/skparagraph/include/FontArguments.h +1 -1
  202. package/cpp/skia/modules/skparagraph/include/FontCollection.h +5 -1
  203. package/cpp/skia/modules/skparagraph/include/Metrics.h +1 -1
  204. package/cpp/skia/modules/skparagraph/include/Paragraph.h +1 -1
  205. package/cpp/skia/modules/skparagraph/include/ParagraphBuilder.h +1 -1
  206. package/cpp/skia/modules/skparagraph/include/ParagraphCache.h +1 -1
  207. package/cpp/skia/modules/skparagraph/include/ParagraphPainter.h +1 -1
  208. package/cpp/skia/modules/skparagraph/include/ParagraphStyle.h +12 -5
  209. package/cpp/skia/modules/skparagraph/include/TextShadow.h +1 -1
  210. package/cpp/skia/modules/skparagraph/include/TextStyle.h +1 -1
  211. package/cpp/skia/modules/skparagraph/include/TypefaceFontProvider.h +1 -1
  212. package/cpp/skia/modules/sksg/include/SkSGClipEffect.h +1 -1
  213. package/cpp/skia/modules/sksg/include/SkSGColorFilter.h +1 -1
  214. package/cpp/skia/modules/sksg/include/SkSGDraw.h +1 -1
  215. package/cpp/skia/modules/sksg/include/SkSGEffectNode.h +1 -1
  216. package/cpp/skia/modules/sksg/include/SkSGGeometryEffect.h +1 -1
  217. package/cpp/skia/modules/sksg/include/SkSGGeometryNode.h +1 -1
  218. package/cpp/skia/modules/sksg/include/SkSGGradient.h +1 -1
  219. package/cpp/skia/modules/sksg/include/SkSGGroup.h +1 -1
  220. package/cpp/skia/modules/sksg/include/SkSGImage.h +1 -1
  221. package/cpp/skia/modules/sksg/include/SkSGInvalidationController.h +1 -1
  222. package/cpp/skia/modules/sksg/include/SkSGMaskEffect.h +1 -1
  223. package/cpp/skia/modules/sksg/include/SkSGMerge.h +1 -1
  224. package/cpp/skia/modules/sksg/include/SkSGNode.h +1 -1
  225. package/cpp/skia/modules/sksg/include/SkSGOpacityEffect.h +1 -1
  226. package/cpp/skia/modules/sksg/include/SkSGPaint.h +1 -1
  227. package/cpp/skia/modules/sksg/include/SkSGPath.h +1 -1
  228. package/cpp/skia/modules/sksg/include/SkSGPlane.h +1 -1
  229. package/cpp/skia/modules/sksg/include/SkSGRect.h +1 -1
  230. package/cpp/skia/modules/sksg/include/SkSGRenderEffect.h +1 -1
  231. package/cpp/skia/modules/sksg/include/SkSGRenderNode.h +1 -1
  232. package/cpp/skia/modules/sksg/include/SkSGScene.h +1 -1
  233. package/cpp/skia/modules/sksg/include/SkSGText.h +1 -1
  234. package/cpp/skia/modules/sksg/include/SkSGTransform.h +1 -1
  235. package/cpp/skia/modules/skshaper/include/SkShaper_coretext.h +8 -1
  236. package/cpp/skia/modules/svg/include/SkSVGFe.h +1 -1
  237. package/cpp/skia/modules/svg/include/SkSVGFeBlend.h +1 -1
  238. package/cpp/skia/modules/svg/include/SkSVGFeColorMatrix.h +1 -1
  239. package/cpp/skia/modules/svg/include/SkSVGFeComponentTransfer.h +1 -1
  240. package/cpp/skia/modules/svg/include/SkSVGFeComposite.h +1 -1
  241. package/cpp/skia/modules/svg/include/SkSVGFeDisplacementMap.h +1 -1
  242. package/cpp/skia/modules/svg/include/SkSVGFeFlood.h +1 -1
  243. package/cpp/skia/modules/svg/include/SkSVGFeGaussianBlur.h +1 -1
  244. package/cpp/skia/modules/svg/include/SkSVGFeImage.h +1 -1
  245. package/cpp/skia/modules/svg/include/SkSVGFeLightSource.h +1 -1
  246. package/cpp/skia/modules/svg/include/SkSVGFeLighting.h +1 -1
  247. package/cpp/skia/modules/svg/include/SkSVGFeMerge.h +1 -1
  248. package/cpp/skia/modules/svg/include/SkSVGFeMorphology.h +1 -1
  249. package/cpp/skia/modules/svg/include/SkSVGFeOffset.h +1 -1
  250. package/cpp/skia/modules/svg/include/SkSVGFeTurbulence.h +1 -1
  251. package/cpp/skia/modules/svg/include/SkSVGFilter.h +1 -1
  252. package/cpp/skia/modules/svg/include/SkSVGFilterContext.h +1 -1
  253. package/cpp/skia/modules/svg/include/SkSVGGradient.h +1 -1
  254. package/cpp/skia/modules/svg/include/SkSVGImage.h +1 -1
  255. package/cpp/skia/modules/svg/include/SkSVGMask.h +1 -1
  256. package/cpp/skia/modules/svg/include/SkSVGOpenTypeSVGDecoder.h +1 -1
  257. package/cpp/skia/modules/svg/include/SkSVGPattern.h +1 -1
  258. package/cpp/skia/modules/svg/include/SkSVGRadialGradient.h +1 -1
  259. package/cpp/skia/modules/svg/include/SkSVGText.h +1 -1
  260. package/cpp/skia/modules/svg/include/SkSVGUse.h +1 -1
  261. package/cpp/skia/src/base/SkAutoLocaleSetter.h +94 -0
  262. package/cpp/skia/src/base/SkUTF.h +1 -1
  263. package/lib/commonjs/skia/types/WebGPU.d.ts +101 -5
  264. package/lib/commonjs/skia/types/WebGPU.js +99 -0
  265. package/lib/commonjs/skia/types/WebGPU.js.map +1 -1
  266. package/lib/module/skia/types/WebGPU.d.ts +101 -5
  267. package/lib/module/skia/types/WebGPU.js +98 -1
  268. package/lib/module/skia/types/WebGPU.js.map +1 -1
  269. package/lib/typescript/lib/commonjs/skia/types/WebGPU.d.ts +1 -0
  270. package/lib/typescript/lib/module/mock/index.d.ts +1 -0
  271. package/lib/typescript/lib/module/skia/types/WebGPU.d.ts +31 -1
  272. package/lib/typescript/src/skia/types/WebGPU.d.ts +101 -5
  273. package/package.json +5 -5
  274. package/src/skia/types/WebGPU.ts +123 -5
  275. package/cpp/rnwgpu/async/AsyncDispatcher.h +0 -28
  276. package/cpp/rnwgpu/async/AsyncRunner.cpp +0 -182
  277. package/cpp/rnwgpu/async/AsyncRunner.h +0 -57
  278. package/cpp/rnwgpu/async/JSIMicrotaskDispatcher.cpp +0 -23
  279. package/cpp/rnwgpu/async/JSIMicrotaskDispatcher.h +0 -22
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Copyright 2019 Google Inc.
2
+ * Copyright 2019 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.
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Copyright 2017 Google Inc.
2
+ * Copyright 2017 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.
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Copyright 2018 Google Inc.
2
+ * Copyright 2018 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.
@@ -834,14 +834,6 @@ public:
834
834
  };
835
835
  IsAnimated isAnimated() { return this->onIsAnimated(); }
836
836
 
837
- // Register a decoder at runtime by passing two function pointers:
838
- // - peek() to return true if the span of bytes appears to be your encoded format;
839
- // - make() to attempt to create an SkCodec from the given stream.
840
- // Not thread safe.
841
- static void Register(
842
- bool (*peek)(const void*, size_t),
843
- std::unique_ptr<SkCodec> (*make)(std::unique_ptr<SkStream>, SkCodec::Result*));
844
-
845
837
  protected:
846
838
  const SkEncodedInfo& getEncodedInfo() const { return fEncodedInfo; }
847
839
 
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Copyright 2017 Google Inc.
2
+ * Copyright 2017 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.
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Copyright 2024 Google LLC.
2
+ * Copyright 2024 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.
@@ -27,7 +27,6 @@
27
27
  class SkColorSpace;
28
28
  class SkImage;
29
29
  class SkMatrix;
30
- class SkMipmap;
31
30
  class SkPaint;
32
31
  class SkPixelRef;
33
32
  class SkShader;
@@ -1241,13 +1240,8 @@ public:
1241
1240
  };
1242
1241
 
1243
1242
  private:
1244
- sk_sp<SkPixelRef> fPixelRef;
1245
- SkPixmap fPixmap;
1246
- sk_sp<SkMipmap> fMips;
1247
-
1248
- friend class SkImage_Raster;
1249
- friend class SkReadBuffer; // unflatten
1250
- friend class GrProxyProvider; // fMips
1243
+ sk_sp<SkPixelRef> fPixelRef;
1244
+ SkPixmap fPixmap;
1251
1245
  };
1252
1246
 
1253
1247
  ///////////////////////////////////////////////////////////////////////////////
@@ -8,11 +8,13 @@
8
8
  #ifndef skcpu_Recorder_DEFINED
9
9
  #define skcpu_Recorder_DEFINED
10
10
 
11
+ #include <cstdint>
11
12
  #include "include/core/SkRecorder.h"
12
13
  #include "include/core/SkRefCnt.h"
13
14
  #include "include/private/base/SkAPI.h"
14
15
 
15
16
  class SkCanvas;
17
+ class SkContentID;
16
18
  class SkSurface;
17
19
  class SkSurfaceProps;
18
20
  struct SkImageInfo;
@@ -57,7 +59,7 @@ public:
57
59
  private:
58
60
  // TODO (b/412351769): Implement this so we can capture from a CPU Recorder.
59
61
  SkCanvas* makeCaptureCanvas(SkCanvas*) final { return nullptr; }
60
- void createCaptureBreakpoint(SkSurface*) final {}
62
+ SkContentID createCaptureBreakpoint(SkSurface*) final;
61
63
  };
62
64
 
63
65
  inline Recorder* AsRecorder(SkRecorder* recorder) {
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Copyright 2018 Google Inc.
2
+ * Copyright 2018 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.
@@ -103,15 +103,17 @@ enum SkColorType : int {
103
103
  // Four channel RGBA data (32-bit float per channel) packed into a LE 128-bit word.
104
104
  // Bits: [A:127..96 B:95..64 G:63..32 R:31..0]
105
105
  kRGBA_F32_SkColorType,
106
-
107
- // The following 8 colortypes are just for reading from - not for rendering to
108
-
109
106
  // Two channel RG data (8 bits per channel). Blue is forced to 0, alpha is forced to opaque.
110
107
  // Bits: [G:15..8 R:7..0]
111
108
  kR8G8_unorm_SkColorType,
112
109
  // Single channel data (16-bit half-float) interpreted as alpha. RGB are 0.
113
110
  // Bits: [A:15..0]
114
111
  kA16_float_SkColorType,
112
+
113
+ // Single channel data (16 bits half-float) interpreted as red. G and B are forced to 0, alpha
114
+ // is forced to opaque.
115
+ // Bits: [R:15..0]
116
+ kR16_float_SkColorType,
115
117
  // Two channel RG data (16-bit half-float per channel) packed into a LE 32-bit word.
116
118
  // Blue is forced to 0, alpha is forced to opaque.
117
119
  // Bits: [G:31..16 R:15..0]
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Copyright 2018 Google Inc.
2
+ * Copyright 2018 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.
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Copyright 2018 Google Inc.
2
+ * Copyright 2018 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.
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Copyright 2018 Google Inc.
2
+ * Copyright 2018 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.
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Copyright 2017 Google Inc.
2
+ * Copyright 2017 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.
@@ -26,6 +26,7 @@
26
26
 
27
27
  class SkMatrix;
28
28
  class SkPaint;
29
+ class SkStrikeRef;
29
30
  enum class SkFontHinting;
30
31
  enum class SkTextEncoding;
31
32
  struct SkFontMetrics;
@@ -356,6 +357,20 @@ public:
356
357
  SkScalar measureText(const void* text, size_t byteLength, SkTextEncoding encoding,
357
358
  SkRect* bounds, const SkPaint* paint) const;
358
359
 
360
+ /** Returns an SkStrikeRef for this font's current settings.
361
+
362
+ An SkStrikeRef caches the resolved strike (font metrics engine), avoiding the overhead
363
+ of descriptor construction, hashing, and global cache lookup on each glyph query.
364
+ This is useful when making many glyph metric calls (e.g. getWidths) with the same
365
+ font configuration.
366
+
367
+ The returned SkStrikeRef is independent of this SkFont; subsequent changes to this
368
+ SkFont do not affect it. Create a new SkStrikeRef after changing font properties.
369
+
370
+ @return an SkStrikeRef for the current font settings
371
+ */
372
+ SkStrikeRef makeStrikeRef() const;
373
+
359
374
  /** Retrieves the advance and bounds for each glyph in glyphs.
360
375
  widths receives min(widths.size(), glyphs.size()) values.
361
376
  bounds receives min(bounds.size(), glyphs.size()) values.
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Copyright 2017 Google Inc.
2
+ * Copyright 2017 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.
@@ -19,6 +19,11 @@
19
19
  struct SkFontArguments {
20
20
  struct VariationPosition {
21
21
  struct Coordinate {
22
+ static constexpr SkFourByteTag wght = SkSetFourByteTag('w', 'g', 'h', 't');
23
+ static constexpr SkFourByteTag wdth = SkSetFourByteTag('w', 'd', 't', 'h');
24
+ static constexpr SkFourByteTag slnt = SkSetFourByteTag('s', 'l', 'n', 't');
25
+ static constexpr SkFourByteTag ital = SkSetFourByteTag('i', 't', 'a', 'l');
26
+ static constexpr SkFourByteTag opsz = SkSetFourByteTag('o', 'p', 's', 'z');
22
27
  SkFourByteTag axis;
23
28
  float value;
24
29
  };
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Copyright 2018 Google Inc.
2
+ * Copyright 2018 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.
@@ -8,7 +8,9 @@
8
8
  #ifndef SkFontMgr_DEFINED
9
9
  #define SkFontMgr_DEFINED
10
10
 
11
+ #include "include/core/SkFontArguments.h"
11
12
  #include "include/core/SkRefCnt.h"
13
+ #include "include/core/SkSpan.h"
12
14
  #include "include/core/SkTypes.h"
13
15
 
14
16
  #include <memory>
@@ -18,7 +20,6 @@ class SkFontStyle;
18
20
  class SkStreamAsset;
19
21
  class SkString;
20
22
  class SkTypeface;
21
- struct SkFontArguments;
22
23
 
23
24
  class SK_API SkFontStyleSet : public SkRefCnt {
24
25
  public:
@@ -85,6 +86,38 @@ public:
85
86
  const char* bcp47[], int bcp47Count,
86
87
  SkUnichar character) const;
87
88
 
89
+ struct Request {
90
+ struct CMapEntry {
91
+ SkUnichar character;
92
+ SkUnichar variation; // Zero for default variation.
93
+ };
94
+ SkSpan<const CMapEntry> cmapEntries;
95
+
96
+ /**
97
+ * bcp47[0] is the least significant fallback, bcp47[bcp47Count-1] is the most significant.
98
+ * If no specified bcp47 codes match any font with the requested character will be matched.
99
+ */
100
+ SkSpan<const char*> bcp47;
101
+
102
+ const char* familyName;
103
+
104
+ SkSpan<const SkFontArguments::VariationPosition::Coordinate> model;
105
+ SkFontStyle fontStyleFromModel() const;
106
+ static void SetModel(SkFontStyle s, SkFontArguments::VariationPosition::Coordinate(&m)[4]);
107
+
108
+ std::optional<bool> syntheticBold;
109
+ std::optional<bool> syntheticOblique;
110
+ };
111
+
112
+ /** The familyName must strongly match, everything else is tie breakers. */
113
+ sk_sp<SkTypeface> match(const Request&) const;
114
+
115
+ /**
116
+ * The first cmapEntry must match. Then matched by bcp47, then familyName,
117
+ * then model (italic, slant, width, weight), with synthetics allowed or not.
118
+ */
119
+ sk_sp<SkTypeface> fallback(const Request&) const;
120
+
88
121
  /**
89
122
  * Create a typeface for the specified data and TTC index (pass 0 for none)
90
123
  * or NULL if the data is not recognized. The caller must call unref() on
@@ -129,6 +162,8 @@ protected:
129
162
  const SkFontStyle&,
130
163
  const char* bcp47[], int bcp47Count,
131
164
  SkUnichar character) const = 0;
165
+ virtual sk_sp<SkTypeface> onMatch(const Request&) const; // TODO: pure virtual
166
+ virtual sk_sp<SkTypeface> onFallback(const Request&) const; // TODO: pure virtual
132
167
 
133
168
  virtual sk_sp<SkTypeface> onMakeFromData(sk_sp<SkData>, int ttcIndex) const = 0;
134
169
  virtual sk_sp<SkTypeface> onMakeFromStreamIndex(std::unique_ptr<SkStreamAsset>,
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Copyright 2018 Google Inc.
2
+ * Copyright 2018 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.
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Copyright 2024 Google Inc.
2
+ * Copyright 2024 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.
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Copyright 2018 Google Inc.
2
+ * Copyright 2018 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.
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Copyright 2020 Google Inc.
2
+ * Copyright 2020 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.
@@ -5,5 +5,5 @@
5
5
  * found in the LICENSE file.
6
6
  */
7
7
  #ifndef SK_MILESTONE
8
- #define SK_MILESTONE 147
8
+ #define SK_MILESTONE 150
9
9
  #endif
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Copyright 2022 Google Inc.
2
+ * Copyright 2022 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.
@@ -36,9 +36,9 @@ class SkString;
36
36
  #endif
37
37
 
38
38
  class SK_API SkPathBuilder {
39
- using PointsArray = skia_private::STArray<4, SkPoint>;
40
- using VerbsArray = skia_private::STArray<4, SkPathVerb>;
41
- using ConicWeightsArray = skia_private::STArray<2, float>;
39
+ using PointsArray = skia_private::STArray<32, SkPoint>;
40
+ using VerbsArray = skia_private::STArray<32, SkPathVerb>;
41
+ using ConicWeightsArray = skia_private::STArray<16, float>;
42
42
  public:
43
43
  /** Constructs an empty SkPathBuilder. By default, SkPathBuilder has no verbs, no SkPoint, and
44
44
  no weights. FillType is set to kWinding.
@@ -987,7 +987,13 @@ public:
987
987
  return fConicWeights;
988
988
  }
989
989
 
990
- SkPathBuilder& addRaw(const SkPathRaw&);
990
+ enum class Reserve {
991
+ // Reserves the exact amount of storage needed for pathraw (never overallocates).
992
+ kExact,
993
+ // Allows the storage buffers to overallocate, based on their internal growth policy.
994
+ kGrow
995
+ };
996
+ SkPathBuilder& addRaw(const SkPathRaw&, Reserve);
991
997
 
992
998
  SkPathIter iter() const;
993
999
 
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Copyright 2025 Google LLC.
2
+ * Copyright 2025 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.
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Copyright 2019 Google LLC.
2
+ * Copyright 2019 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.
@@ -11,6 +11,7 @@
11
11
  #include "include/core/SkRefCnt.h"
12
12
  #include "include/core/SkSize.h"
13
13
  #include "include/private/SkIDChangeListener.h"
14
+ #include "include/private/SkPixelStorage.h"
14
15
  #include "include/private/base/SkAPI.h"
15
16
  #include "include/private/base/SkTo.h"
16
17
 
@@ -25,11 +26,13 @@ class SkDiscardableMemory;
25
26
  This class is the smart container for pixel memory, and is used with SkBitmap.
26
27
  This class can be shared/accessed between multiple threads.
27
28
  */
28
- class SK_API SkPixelRef : public SkRefCnt {
29
+ class SK_API SkPixelRef : public SkPixelStorage, public SkRefCnt {
29
30
  public:
30
31
  SkPixelRef(int width, int height, void* addr, size_t rowBytes);
31
32
  ~SkPixelRef() override;
32
33
 
34
+ Type type() const override;
35
+
33
36
  SkISize dimensions() const { return {fWidth, fHeight}; }
34
37
  int width() const { return fWidth; }
35
38
  int height() const { return fHeight; }
@@ -10,6 +10,7 @@
10
10
  #include "include/private/base/SkAPI.h"
11
11
 
12
12
  class SkCanvas;
13
+ class SkContentID;
13
14
  class SkSurface;
14
15
 
15
16
  namespace skcpu {
@@ -41,7 +42,7 @@ private:
41
42
  * Returns nullptr if capture is not enabled.
42
43
  */
43
44
  virtual SkCanvas* makeCaptureCanvas(SkCanvas*) = 0;
44
- virtual void createCaptureBreakpoint(SkSurface*) = 0;
45
+ virtual SkContentID createCaptureBreakpoint(SkSurface*) = 0;
45
46
 
46
47
  friend class SkSurface_Base; // for capture functionality
47
48
  };
@@ -10,6 +10,7 @@
10
10
 
11
11
  #include "include/core/SkPath.h"
12
12
  #include "include/core/SkRect.h"
13
+ #include "include/core/SkSpan.h"
13
14
  #include "include/private/base/SkAPI.h"
14
15
  #include "include/private/base/SkAssert.h"
15
16
  #include "include/private/base/SkDebug.h"
@@ -224,7 +225,12 @@ public:
224
225
 
225
226
  example: https://fiddle.skia.org/c/@Region_setRects
226
227
  */
227
- bool setRects(const SkIRect rects[], int count);
228
+ bool setRects(SkSpan<const SkIRect> rects);
229
+ #if !defined(SK_DISABLE_LEGACY_SKREGION_UNSPANNED_APIS)
230
+ bool setRects(const SkIRect rects[], int count) {
231
+ return this->setRects({rects, count});
232
+ }
233
+ #endif
228
234
 
229
235
  /** Constructs a copy of an existing region.
230
236
  Makes two regions identical by value. Internally, region and
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Copyright 2020 Google Inc.
2
+ * Copyright 2020 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.
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Copyright 2017 Google Inc.
2
+ * Copyright 2017 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.
@@ -8,6 +8,7 @@
8
8
  #ifndef SkSerialProcs_DEFINED
9
9
  #define SkSerialProcs_DEFINED
10
10
 
11
+ #include "include/core/SkFourByteTag.h"
11
12
  #include "include/core/SkRefCnt.h"
12
13
  #include "include/private/base/SkAPI.h"
13
14
 
@@ -86,6 +87,8 @@ using SkSlugProc = sk_sp<sktext::gpu::Slug> (*)(SkReadBuffer&, void* ctx);
86
87
  using SkDeserialTypefaceStreamProc = sk_sp<SkTypeface> (*)(SkStream&, void* ctx);
87
88
  using SkDeserialTypefaceProc = sk_sp<SkTypeface> (*)(const void* data, size_t length, void* ctx);
88
89
 
90
+ using SkDeserialAllowTagsProc = bool(*)(SkFourByteTag, void* ctx);
91
+
89
92
  struct SK_API SkSerialProcs {
90
93
  SkSerialPictureProc fPictureProc = nullptr;
91
94
  void* fPictureCtx = nullptr;
@@ -115,6 +118,10 @@ struct SK_API SkDeserialProcs {
115
118
  // parameters and returns a bool). Given that there are only two valid implementations of that
116
119
  // proc, we just insert the bool directly.
117
120
  bool fAllowSkSL = true;
121
+
122
+ // Can be used to restrict the tags that will be deserialized from SkPictures.
123
+ SkDeserialAllowTagsProc fAllowTagsProc = nullptr;
124
+ void* fAllowTagsCtx = nullptr;
118
125
  };
119
126
 
120
127
  #endif
@@ -36,12 +36,10 @@ struct SkSamplingOptions;
36
36
  class SK_API SkShader : public SkFlattenable {
37
37
  public:
38
38
  /**
39
- * Returns true if the shader is guaranteed to produce only opaque
40
- * colors, subject to the SkPaint using the shader to apply an opaque
41
- * alpha value. Subclasses should override this to allow some
42
- * optimizations.
39
+ * Returns true if the shader is guaranteed to produce only opaque colors, subject to the
40
+ * SkPaint using the shader to apply an opaque alpha value.
43
41
  */
44
- virtual bool isOpaque() const { return false; }
42
+ virtual bool isOpaque() const = 0;
45
43
 
46
44
  /**
47
45
  * Iff this shader is backed by a single SkImage, return its ptr (the caller must ref this
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Copyright 2018 Google Inc.
2
+ * Copyright 2018 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.
@@ -319,7 +319,7 @@ public:
319
319
  ~SkFILEStream() override;
320
320
 
321
321
  static std::unique_ptr<SkFILEStream> Make(const char path[]) {
322
- std::unique_ptr<SkFILEStream> stream(new SkFILEStream(path));
322
+ auto stream = std::make_unique<SkFILEStream>(path);
323
323
  return stream->isValid() ? std::move(stream) : nullptr;
324
324
  }
325
325
 
@@ -0,0 +1,80 @@
1
+ /*
2
+ * Copyright 2026 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 SkStrikeRef_DEFINED
9
+ #define SkStrikeRef_DEFINED
10
+
11
+ #include "include/core/SkRefCnt.h"
12
+ #include "include/core/SkScalar.h"
13
+ #include "include/core/SkSpan.h"
14
+ #include "include/core/SkTypes.h"
15
+
16
+ class SkFont;
17
+ class SkStrike;
18
+ struct SkRect;
19
+
20
+ /** \class SkStrikeRef
21
+ SkStrikeRef is a lightweight, thread-safe handle to a resolved font strike.
22
+ It caches the result of looking up an SkStrike for a particular SkFont configuration,
23
+ allowing repeated glyph metric queries (advances, bounds) without the overhead of
24
+ descriptor construction, hashing, and global cache lookup on each call.
25
+
26
+ Obtain an SkStrikeRef from SkFont::makeStrikeRef(). The returned object remains valid
27
+ as long as it is held; the underlying SkStrike is atomically reference counted.
28
+
29
+ SkStrikeRef does not track changes to the SkFont it was created from. If the SkFont's
30
+ properties change (size, typeface, hinting, etc.), a new SkStrikeRef must be obtained.
31
+ */
32
+ class SK_API SkStrikeRef {
33
+ public:
34
+ SkStrikeRef();
35
+ ~SkStrikeRef();
36
+
37
+ SkStrikeRef(const SkStrikeRef&);
38
+ SkStrikeRef& operator=(const SkStrikeRef&);
39
+ SkStrikeRef(SkStrikeRef&&);
40
+ SkStrikeRef& operator=(SkStrikeRef&&);
41
+
42
+ /** Returns true if this SkStrikeRef holds a valid strike. */
43
+ explicit operator bool() const { return fStrike != nullptr; }
44
+
45
+ /** Retrieves the advance widths for each glyph.
46
+ widths receives min(widths.size(), glyphs.size()) values.
47
+
48
+ @param glyphs array of glyph indices to be measured
49
+ @param widths returns text advances for each glyph, in font units
50
+ */
51
+ void getWidths(SkSpan<const SkGlyphID> glyphs, SkSpan<SkScalar> widths) const;
52
+
53
+ /** Retrieves the advance width for a single glyph.
54
+
55
+ @param glyph glyph index to be measured
56
+ @return advance width in font units
57
+ */
58
+ SkScalar getWidth(SkGlyphID glyph) const;
59
+
60
+ /** Retrieves the advance widths and bounds for each glyph.
61
+ widths receives min(widths.size(), glyphs.size()) values.
62
+ bounds receives min(bounds.size(), glyphs.size()) values.
63
+
64
+ @param glyphs array of glyph indices to be measured
65
+ @param widths returns text advances for each glyph
66
+ @param bounds returns bounds for each glyph relative to (0, 0)
67
+ */
68
+ void getWidthsBounds(SkSpan<const SkGlyphID> glyphs,
69
+ SkSpan<SkScalar> widths,
70
+ SkSpan<SkRect> bounds) const;
71
+
72
+ private:
73
+ friend class SkFont;
74
+ SkStrikeRef(sk_sp<SkStrike> strike, SkScalar strikeToSourceScale);
75
+
76
+ sk_sp<SkStrike> fStrike;
77
+ SkScalar fStrikeToSourceScale = 0;
78
+ };
79
+
80
+ #endif // SkStrikeRef_DEFINED
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Copyright 2019 Google Inc.
2
+ * Copyright 2019 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.
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Copyright 2017 Google Inc.
2
+ * Copyright 2017 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.
@@ -126,12 +126,11 @@ public:
126
126
  DataType dataType() const { return fDataType; }
127
127
 
128
128
  /**
129
- * Row bytes for the ith plane. Returns zero if i >= numPlanes() or this SkYUVAPixmapInfo is
130
- * invalid.
129
+ * Row bytes for the ith plane. Returns zero if this SkYUVAPixmapInfo is invalid.
131
130
  */
132
131
  size_t rowBytes(int i) const { return fRowBytes[static_cast<size_t>(i)]; }
133
132
 
134
- /** Image info for the ith plane, or default SkImageInfo if i >= numPlanes() */
133
+ /** Image info for the ith plane */
135
134
  const SkImageInfo& planeInfo(int i) const { return fPlaneInfos[static_cast<size_t>(i)]; }
136
135
 
137
136
  /**
@@ -234,8 +233,7 @@ public:
234
233
  const std::array<SkPixmap, kMaxPlanes>& planes() const { return fPlanes; }
235
234
 
236
235
  /**
237
- * Get the ith SkPixmap plane. SkPixmap will be default initialized if i >= numPlanes or this
238
- * SkYUVAPixmaps is invalid.
236
+ * Get the ith SkPixmap plane. SkPixmap will be default initialized if SkYUVAPixmaps is invalid.
239
237
  */
240
238
  const SkPixmap& plane(int i) const { return fPlanes[SkToSizeT(i)]; }
241
239
 
@@ -1,4 +1,4 @@
1
- // Copyright 2018 Google LLC.
1
+ // Copyright 2018 Google LLC
2
2
  // Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.
3
3
  #ifndef SkPDFDocument_DEFINED
4
4
  #define SkPDFDocument_DEFINED