@shopify/react-native-skia 2.6.4 → 2.6.6

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 (338) hide show
  1. package/android/CMakeLists.txt +8 -4
  2. package/android/build.gradle +22 -3
  3. package/android/cpp/rnskia-android/RNSkAndroidPlatformContext.h +62 -0
  4. package/android/src/paper/java/com/facebook/react/viewmanagers/SkiaWebGPUViewManagerDelegate.java +35 -0
  5. package/android/src/paper/java/com/facebook/react/viewmanagers/SkiaWebGPUViewManagerInterface.java +17 -0
  6. package/apple/RNSkApplePlatformContext.h +2 -0
  7. package/apple/RNSkApplePlatformContext.mm +71 -0
  8. package/apple/RNWebGPUAppleNativeBuffer.mm +33 -0
  9. package/cpp/api/JsiNativeBuffer.h +9 -1
  10. package/cpp/api/JsiSkAnimatedImageFactory.h +1 -1
  11. package/cpp/api/JsiSkApi.h +2 -2
  12. package/cpp/api/JsiSkCanvas.h +34 -1
  13. package/cpp/api/JsiSkDataFactory.h +1 -1
  14. package/cpp/api/JsiSkFont.h +1 -1
  15. package/cpp/api/JsiSkFontMgr.h +1 -1
  16. package/cpp/api/JsiSkHostObjects.h +3 -3
  17. package/cpp/api/JsiSkImage.h +14 -6
  18. package/cpp/api/JsiSkImageFactory.h +2 -2
  19. package/cpp/api/JsiSkPath.h +1 -1
  20. package/cpp/api/JsiSkPathFactory.h +1 -1
  21. package/cpp/api/JsiSkSurface.h +18 -6
  22. package/cpp/api/JsiSkTypeface.h +1 -1
  23. package/cpp/api/JsiSkTypefaceFontProvider.h +1 -1
  24. package/cpp/api/JsiSkiaContext.h +2 -2
  25. package/cpp/api/JsiTextureInfo.h +1 -1
  26. package/cpp/api/JsiVideo.h +2 -2
  27. package/cpp/api/recorder/Drawings.h +1 -1
  28. package/cpp/api/recorder/JsiRecorder.h +4 -4
  29. package/cpp/api/recorder/RNRecorder.h +1 -1
  30. package/cpp/jsi/ViewProperty.h +1 -1
  31. package/cpp/rnskia/RNDawnContext.h +13 -0
  32. package/cpp/rnskia/RNDawnUtils.h +11 -1
  33. package/cpp/rnskia/RNSkJsiViewApi.h +2 -2
  34. package/cpp/rnskia/RNSkManager.cpp +88 -2
  35. package/cpp/rnskia/RNSkPictureView.h +4 -4
  36. package/cpp/rnskia/RNSkPlatformContext.h +7 -0
  37. package/cpp/rnskia/RNSkView.h +9 -6
  38. package/cpp/rnwgpu/ArrayBuffer.h +51 -7
  39. package/cpp/rnwgpu/api/AppleNativeBuffer.h +22 -0
  40. package/cpp/rnwgpu/api/Convertors.h +33 -11
  41. package/cpp/rnwgpu/api/GPU.cpp +0 -3
  42. package/cpp/rnwgpu/api/GPUAdapter.cpp +37 -7
  43. package/cpp/rnwgpu/api/GPUBuffer.h +1 -1
  44. package/cpp/rnwgpu/api/GPUDevice.cpp +84 -6
  45. package/cpp/rnwgpu/api/GPUDevice.h +12 -0
  46. package/cpp/rnwgpu/api/GPUExternalTexture.cpp +139 -0
  47. package/cpp/rnwgpu/api/GPUExternalTexture.h +52 -2
  48. package/cpp/rnwgpu/api/GPUQueue.cpp +50 -45
  49. package/cpp/rnwgpu/api/GPUShaderModule.cpp +1 -1
  50. package/cpp/rnwgpu/api/GPUSharedFence.cpp +80 -0
  51. package/cpp/rnwgpu/api/GPUSharedFence.h +53 -0
  52. package/cpp/rnwgpu/api/GPUSharedTextureMemory.cpp +135 -0
  53. package/cpp/rnwgpu/api/GPUSharedTextureMemory.h +75 -0
  54. package/cpp/rnwgpu/api/ImageBitmap.h +62 -0
  55. package/cpp/rnwgpu/api/NativeBufferUtils.h +87 -0
  56. package/cpp/rnwgpu/api/descriptors/GPUBindGroupEntry.h +4 -1
  57. package/cpp/rnwgpu/api/descriptors/GPUCanvasConfiguration.h +1 -1
  58. package/cpp/rnwgpu/api/descriptors/GPUDawnTogglesDescriptor.h +56 -0
  59. package/cpp/rnwgpu/api/descriptors/GPUDeviceDescriptor.h +10 -0
  60. package/cpp/rnwgpu/api/descriptors/GPUExternalTextureDescriptor.h +43 -24
  61. package/cpp/rnwgpu/api/descriptors/GPUImageCopyExternalImage.h +9 -9
  62. package/cpp/rnwgpu/api/descriptors/GPUImageCopyTexture.h +1 -1
  63. package/cpp/rnwgpu/api/descriptors/GPUImageCopyTextureTagged.h +2 -2
  64. package/cpp/rnwgpu/api/descriptors/GPUSharedFenceDescriptor.h +58 -0
  65. package/cpp/rnwgpu/api/descriptors/GPUSharedFenceState.h +51 -0
  66. package/cpp/rnwgpu/api/descriptors/GPUSharedTextureMemoryDescriptor.h +73 -0
  67. package/cpp/rnwgpu/api/descriptors/GPUTextureDescriptor.h +1 -1
  68. package/cpp/rnwgpu/api/descriptors/GPUUncapturedErrorEventInit.h +1 -1
  69. package/cpp/skia/include/android/GrAHardwareBufferUtils.h +1 -1
  70. package/cpp/skia/include/android/SkAndroidFrameworkUtils.h +1 -1
  71. package/cpp/skia/include/android/SkAnimatedImage.h +1 -1
  72. package/cpp/skia/include/codec/SkCodec.h +0 -8
  73. package/cpp/skia/include/codec/SkEncodedOrigin.h +1 -1
  74. package/cpp/skia/include/codec/SkPngRustDecoder.h +1 -1
  75. package/cpp/skia/include/core/SkBitmap.h +2 -8
  76. package/cpp/skia/include/core/SkCPURecorder.h +3 -1
  77. package/cpp/skia/include/core/SkCanvasVirtualEnforcer.h +1 -1
  78. package/cpp/skia/include/core/SkColorType.h +5 -3
  79. package/cpp/skia/include/core/SkContourMeasure.h +1 -1
  80. package/cpp/skia/include/core/SkCoverageMode.h +1 -1
  81. package/cpp/skia/include/core/SkCubicMap.h +1 -1
  82. package/cpp/skia/include/core/SkExecutor.h +1 -1
  83. package/cpp/skia/include/core/SkFont.h +15 -0
  84. package/cpp/skia/include/core/SkFontArguments.h +6 -1
  85. package/cpp/skia/include/core/SkFontMetrics.h +1 -1
  86. package/cpp/skia/include/core/SkFontMgr.h +36 -1
  87. package/cpp/skia/include/core/SkFontParameters.h +1 -1
  88. package/cpp/skia/include/core/SkFontScanner.h +1 -1
  89. package/cpp/skia/include/core/SkFontTypes.h +1 -1
  90. package/cpp/skia/include/core/SkM44.h +1 -1
  91. package/cpp/skia/include/core/SkMilestone.h +1 -1
  92. package/cpp/skia/include/core/SkOpenTypeSVGDecoder.h +1 -1
  93. package/cpp/skia/include/core/SkPathBuilder.h +10 -4
  94. package/cpp/skia/include/core/SkPathIter.h +1 -1
  95. package/cpp/skia/include/core/SkPathTypes.h +1 -1
  96. package/cpp/skia/include/core/SkPixelRef.h +4 -1
  97. package/cpp/skia/include/core/SkRecorder.h +2 -1
  98. package/cpp/skia/include/core/SkRegion.h +17 -6
  99. package/cpp/skia/include/core/SkSamplingOptions.h +1 -1
  100. package/cpp/skia/include/core/SkSerialProcs.h +8 -1
  101. package/cpp/skia/include/core/SkShader.h +3 -5
  102. package/cpp/skia/include/core/SkSpan.h +1 -1
  103. package/cpp/skia/include/core/SkStream.h +1 -1
  104. package/cpp/skia/include/core/SkStrikeRef.h +80 -0
  105. package/cpp/skia/include/core/SkTileMode.h +1 -1
  106. package/cpp/skia/include/core/SkVertices.h +1 -1
  107. package/cpp/skia/include/core/SkYUVAPixmaps.h +3 -5
  108. package/cpp/skia/include/docs/SkPDFDocument.h +1 -1
  109. package/cpp/skia/include/docs/SkXPSDocument.h +1 -1
  110. package/cpp/skia/include/effects/SkGradient.h +1 -1
  111. package/cpp/skia/include/effects/SkHighContrastFilter.h +1 -1
  112. package/cpp/skia/include/effects/SkRuntimeEffect.h +2 -2
  113. package/cpp/skia/include/effects/SkShaderMaskFilter.h +1 -1
  114. package/cpp/skia/include/effects/SkTrimPathEffect.h +1 -1
  115. package/cpp/skia/include/encode/SkEncoder.h +1 -1
  116. package/cpp/skia/include/encode/SkJpegEncoder.h +1 -1
  117. package/cpp/skia/include/encode/SkPngEncoder.h +1 -1
  118. package/cpp/skia/include/encode/SkPngRustEncoder.h +1 -1
  119. package/cpp/skia/include/encode/SkWebpEncoder.h +1 -1
  120. package/cpp/skia/include/gpu/GpuTypes.h +2 -0
  121. package/cpp/skia/include/gpu/MutableTextureState.h +1 -1
  122. package/cpp/skia/include/gpu/ganesh/GrBackendSemaphore.h +1 -1
  123. package/cpp/skia/include/gpu/ganesh/GrBackendSurface.h +6 -62
  124. package/cpp/skia/include/gpu/ganesh/GrContextThreadSafeProxy.h +1 -1
  125. package/cpp/skia/include/gpu/ganesh/GrDirectContext.h +1 -1
  126. package/cpp/skia/include/gpu/ganesh/GrDriverBugWorkarounds.h +1 -1
  127. package/cpp/skia/include/gpu/ganesh/GrRecordingContext.h +2 -1
  128. package/cpp/skia/include/gpu/ganesh/mock/GrMockBackendSurface.h +59 -0
  129. package/cpp/skia/include/gpu/ganesh/mock/GrMockTypes.h +1 -1
  130. package/cpp/skia/include/gpu/ganesh/mtl/GrMtlBackendContext.h +1 -1
  131. package/cpp/skia/include/gpu/ganesh/mtl/GrMtlTypes.h +1 -1
  132. package/cpp/skia/include/gpu/ganesh/vk/GrBackendDrawableInfo.h +1 -1
  133. package/cpp/skia/include/gpu/graphite/Context.h +12 -5
  134. package/cpp/skia/include/gpu/graphite/GraphiteTypes.h +6 -0
  135. package/cpp/skia/include/gpu/graphite/Image.h +82 -9
  136. package/cpp/skia/include/gpu/graphite/PrecompileContext.h +7 -2
  137. package/cpp/skia/include/gpu/graphite/Recorder.h +6 -4
  138. package/cpp/skia/include/gpu/graphite/precompile/PrecompileColorFilter.h +11 -1
  139. package/cpp/skia/include/gpu/graphite/precompile/PrecompileShader.h +1 -0
  140. package/cpp/skia/include/gpu/graphite/vk/VulkanGraphiteTypes.h +1 -1
  141. package/cpp/skia/include/gpu/mtl/MtlMemoryAllocator.h +1 -1
  142. package/cpp/skia/include/gpu/vk/VulkanExtensions.h +1 -1
  143. package/cpp/skia/include/gpu/vk/VulkanMemoryAllocator.h +1 -1
  144. package/cpp/skia/include/gpu/vk/VulkanTypes.h +1 -1
  145. package/cpp/skia/include/ports/SkCFObject.h +1 -1
  146. package/cpp/skia/include/ports/SkFontMgr_Fontations.h +1 -1
  147. package/cpp/skia/include/ports/SkFontMgr_android_ndk.h +1 -1
  148. package/cpp/skia/include/ports/SkFontMgr_data.h +1 -1
  149. package/cpp/skia/include/ports/SkFontMgr_fuchsia.h +1 -1
  150. package/cpp/skia/include/ports/SkFontMgr_mac_ct.h +1 -1
  151. package/cpp/skia/include/ports/SkFontScanner_Fontations.h +1 -1
  152. package/cpp/skia/include/ports/SkFontScanner_FreeType.h +1 -1
  153. package/cpp/skia/include/ports/SkTypeface_fontations.h +1 -1
  154. package/cpp/skia/include/private/SkExif.h +1 -1
  155. package/cpp/skia/include/private/SkGainmapInfo.h +1 -1
  156. package/cpp/skia/include/private/SkGainmapShader.h +1 -1
  157. package/cpp/skia/include/private/SkHdrMetadata.h +21 -0
  158. package/cpp/skia/include/private/SkJpegGainmapEncoder.h +1 -1
  159. package/cpp/skia/include/private/SkPixelStorage.h +37 -0
  160. package/cpp/skia/include/private/SkXmp.h +1 -1
  161. package/cpp/skia/include/private/base/SkAssert.h +6 -5
  162. package/cpp/skia/include/private/base/SkContainers.h +1 -1
  163. package/cpp/skia/include/private/base/SkFeatures.h +30 -30
  164. package/cpp/skia/include/private/base/SkLog.h +1 -7
  165. package/cpp/skia/include/private/base/SkLogPriority.h +4 -5
  166. package/cpp/skia/include/private/base/SkMacros.h +1 -1
  167. package/cpp/skia/include/private/base/SkMalloc.h +1 -1
  168. package/cpp/skia/include/private/base/SkSafe32.h +1 -1
  169. package/cpp/skia/include/private/base/SkSpan_impl.h +1 -1
  170. package/cpp/skia/include/private/base/SkTDArray.h +13 -1
  171. package/cpp/skia/include/private/base/SkTPin.h +1 -1
  172. package/cpp/skia/include/private/base/SkTo.h +1 -1
  173. package/cpp/skia/include/private/chromium/GrVkSecondaryCBDrawContext.h +1 -1
  174. package/cpp/skia/include/private/chromium/SkChromeRemoteGlyphCache.h +1 -1
  175. package/cpp/skia/include/private/chromium/SkCodecsICCProfileChromium.h +52 -0
  176. package/cpp/skia/include/private/chromium/SkExifChromium.h +26 -0
  177. package/cpp/skia/include/private/gpu/ganesh/GrContext_Base.h +1 -1
  178. package/cpp/skia/include/private/gpu/ganesh/GrImageContext.h +1 -1
  179. package/cpp/skia/include/private/gpu/ganesh/GrTypesPriv.h +2 -1
  180. package/cpp/skia/include/private/gpu/vk/SkiaVulkan.h +1 -1
  181. package/cpp/skia/include/sksl/SkSLDebugTrace.h +1 -1
  182. package/cpp/skia/include/third_party/vulkan/vulkan/vk_icd.h +41 -51
  183. package/cpp/skia/include/third_party/vulkan/vulkan/vk_layer.h +42 -53
  184. package/cpp/skia/include/third_party/vulkan/vulkan/vk_platform.h +2 -1
  185. package/cpp/skia/include/third_party/vulkan/vulkan/vk_video/vulkan_video_codec_av1std.h +158 -154
  186. package/cpp/skia/include/third_party/vulkan/vulkan/vk_video/vulkan_video_codec_av1std_decode.h +68 -65
  187. package/cpp/skia/include/third_party/vulkan/vulkan/vk_video/vulkan_video_codec_av1std_encode.h +90 -87
  188. package/cpp/skia/include/third_party/vulkan/vulkan/vk_video/vulkan_video_codec_h264std.h +9 -9
  189. package/cpp/skia/include/third_party/vulkan/vulkan/vk_video/vulkan_video_codec_h264std_decode.h +2 -2
  190. package/cpp/skia/include/third_party/vulkan/vulkan/vk_video/vulkan_video_codec_h264std_encode.h +82 -79
  191. package/cpp/skia/include/third_party/vulkan/vulkan/vk_video/vulkan_video_codec_h265std.h +24 -24
  192. package/cpp/skia/include/third_party/vulkan/vulkan/vk_video/vulkan_video_codec_h265std_decode.h +2 -2
  193. package/cpp/skia/include/third_party/vulkan/vulkan/vk_video/vulkan_video_codec_h265std_encode.h +95 -96
  194. package/cpp/skia/include/third_party/vulkan/vulkan/vk_video/vulkan_video_codec_vp9std.h +151 -0
  195. package/cpp/skia/include/third_party/vulkan/vulkan/vk_video/vulkan_video_codec_vp9std_decode.h +68 -0
  196. package/cpp/skia/include/third_party/vulkan/vulkan/vk_video/vulkan_video_codecs_common.h +1 -1
  197. package/cpp/skia/include/third_party/vulkan/vulkan/vulkan.h +5 -1
  198. package/cpp/skia/include/third_party/vulkan/vulkan/vulkan_android.h +7 -1
  199. package/cpp/skia/include/third_party/vulkan/vulkan/vulkan_beta.h +291 -158
  200. package/cpp/skia/include/third_party/vulkan/vulkan/vulkan_core.h +13174 -10113
  201. package/cpp/skia/include/third_party/vulkan/vulkan/vulkan_directfb.h +23 -19
  202. package/cpp/skia/include/third_party/vulkan/vulkan/vulkan_fuchsia.h +159 -165
  203. package/cpp/skia/include/third_party/vulkan/vulkan/vulkan_ggp.h +22 -19
  204. package/cpp/skia/include/third_party/vulkan/vulkan/vulkan_ios.h +3 -1
  205. package/cpp/skia/include/third_party/vulkan/vulkan/vulkan_macos.h +3 -1
  206. package/cpp/skia/include/third_party/vulkan/vulkan/vulkan_metal.h +94 -88
  207. package/cpp/skia/include/third_party/vulkan/vulkan/vulkan_ohos.h +120 -0
  208. package/cpp/skia/include/third_party/vulkan/vulkan/vulkan_screen.h +55 -51
  209. package/cpp/skia/include/third_party/vulkan/vulkan/vulkan_vi.h +18 -15
  210. package/cpp/skia/include/third_party/vulkan/vulkan/vulkan_wayland.h +23 -19
  211. package/cpp/skia/include/third_party/vulkan/vulkan/vulkan_win32.h +31 -1
  212. package/cpp/skia/include/third_party/vulkan/vulkan/vulkan_xcb.h +5 -1
  213. package/cpp/skia/include/third_party/vulkan/vulkan/vulkan_xlib.h +27 -27
  214. package/cpp/skia/include/third_party/vulkan/vulkan/vulkan_xlib_xrandr.h +20 -16
  215. package/cpp/skia/include/utils/SkEventTracer.h +6 -1
  216. package/cpp/skia/include/utils/SkOrderedFontMgr.h +1 -1
  217. package/cpp/skia/include/utils/SkShadowUtils.h +1 -1
  218. package/cpp/skia/include/utils/SkTextUtils.h +1 -1
  219. package/cpp/skia/modules/jsonreader/SkJSONReader.cpp +20 -4
  220. package/cpp/skia/modules/skcms/src/Transform_inl.h +11 -15
  221. package/cpp/skia/modules/skcms/src/skcms_public.h +2 -0
  222. package/cpp/skia/modules/skottie/include/ExternalLayer.h +1 -1
  223. package/cpp/skia/modules/skottie/include/Skottie.h +1 -1
  224. package/cpp/skia/modules/skottie/include/SkottieProperty.h +1 -1
  225. package/cpp/skia/modules/skottie/include/SlotManager.h +1 -1
  226. package/cpp/skia/modules/skottie/include/TextShaper.h +1 -1
  227. package/cpp/skia/modules/skottie/src/SkottieValue.h +1 -1
  228. package/cpp/skia/modules/skottie/src/animator/Animator.h +1 -1
  229. package/cpp/skia/modules/skottie/src/text/Font.h +1 -1
  230. package/cpp/skia/modules/skottie/src/text/TextAdapter.h +1 -1
  231. package/cpp/skia/modules/skottie/src/text/TextAnimator.h +3 -2
  232. package/cpp/skia/modules/skottie/src/text/TextValue.h +1 -1
  233. package/cpp/skia/modules/skparagraph/include/DartTypes.h +1 -1
  234. package/cpp/skia/modules/skparagraph/include/FontArguments.h +1 -1
  235. package/cpp/skia/modules/skparagraph/include/FontCollection.h +5 -1
  236. package/cpp/skia/modules/skparagraph/include/Metrics.h +1 -1
  237. package/cpp/skia/modules/skparagraph/include/Paragraph.h +1 -1
  238. package/cpp/skia/modules/skparagraph/include/ParagraphBuilder.h +1 -1
  239. package/cpp/skia/modules/skparagraph/include/ParagraphCache.h +1 -1
  240. package/cpp/skia/modules/skparagraph/include/ParagraphPainter.h +1 -1
  241. package/cpp/skia/modules/skparagraph/include/ParagraphStyle.h +12 -5
  242. package/cpp/skia/modules/skparagraph/include/TextShadow.h +1 -1
  243. package/cpp/skia/modules/skparagraph/include/TextStyle.h +1 -1
  244. package/cpp/skia/modules/skparagraph/include/TypefaceFontProvider.h +1 -1
  245. package/cpp/skia/modules/sksg/include/SkSGClipEffect.h +1 -1
  246. package/cpp/skia/modules/sksg/include/SkSGColorFilter.h +1 -1
  247. package/cpp/skia/modules/sksg/include/SkSGDraw.h +1 -1
  248. package/cpp/skia/modules/sksg/include/SkSGEffectNode.h +1 -1
  249. package/cpp/skia/modules/sksg/include/SkSGGeometryEffect.h +1 -1
  250. package/cpp/skia/modules/sksg/include/SkSGGeometryNode.h +1 -1
  251. package/cpp/skia/modules/sksg/include/SkSGGradient.h +1 -1
  252. package/cpp/skia/modules/sksg/include/SkSGGroup.h +1 -1
  253. package/cpp/skia/modules/sksg/include/SkSGImage.h +1 -1
  254. package/cpp/skia/modules/sksg/include/SkSGInvalidationController.h +1 -1
  255. package/cpp/skia/modules/sksg/include/SkSGMaskEffect.h +1 -1
  256. package/cpp/skia/modules/sksg/include/SkSGMerge.h +1 -1
  257. package/cpp/skia/modules/sksg/include/SkSGNode.h +1 -1
  258. package/cpp/skia/modules/sksg/include/SkSGOpacityEffect.h +1 -1
  259. package/cpp/skia/modules/sksg/include/SkSGPaint.h +1 -1
  260. package/cpp/skia/modules/sksg/include/SkSGPath.h +1 -1
  261. package/cpp/skia/modules/sksg/include/SkSGPlane.h +1 -1
  262. package/cpp/skia/modules/sksg/include/SkSGRect.h +1 -1
  263. package/cpp/skia/modules/sksg/include/SkSGRenderEffect.h +1 -1
  264. package/cpp/skia/modules/sksg/include/SkSGRenderNode.h +1 -1
  265. package/cpp/skia/modules/sksg/include/SkSGScene.h +1 -1
  266. package/cpp/skia/modules/sksg/include/SkSGText.h +1 -1
  267. package/cpp/skia/modules/sksg/include/SkSGTransform.h +1 -1
  268. package/cpp/skia/modules/skshaper/include/SkShaper_coretext.h +8 -1
  269. package/cpp/skia/modules/svg/include/SkSVGFe.h +1 -1
  270. package/cpp/skia/modules/svg/include/SkSVGFeBlend.h +1 -1
  271. package/cpp/skia/modules/svg/include/SkSVGFeColorMatrix.h +1 -1
  272. package/cpp/skia/modules/svg/include/SkSVGFeComponentTransfer.h +1 -1
  273. package/cpp/skia/modules/svg/include/SkSVGFeComposite.h +1 -1
  274. package/cpp/skia/modules/svg/include/SkSVGFeDisplacementMap.h +1 -1
  275. package/cpp/skia/modules/svg/include/SkSVGFeFlood.h +1 -1
  276. package/cpp/skia/modules/svg/include/SkSVGFeGaussianBlur.h +1 -1
  277. package/cpp/skia/modules/svg/include/SkSVGFeImage.h +1 -1
  278. package/cpp/skia/modules/svg/include/SkSVGFeLightSource.h +1 -1
  279. package/cpp/skia/modules/svg/include/SkSVGFeLighting.h +1 -1
  280. package/cpp/skia/modules/svg/include/SkSVGFeMerge.h +1 -1
  281. package/cpp/skia/modules/svg/include/SkSVGFeMorphology.h +1 -1
  282. package/cpp/skia/modules/svg/include/SkSVGFeOffset.h +1 -1
  283. package/cpp/skia/modules/svg/include/SkSVGFeTurbulence.h +1 -1
  284. package/cpp/skia/modules/svg/include/SkSVGFilter.h +1 -1
  285. package/cpp/skia/modules/svg/include/SkSVGFilterContext.h +1 -1
  286. package/cpp/skia/modules/svg/include/SkSVGGradient.h +1 -1
  287. package/cpp/skia/modules/svg/include/SkSVGImage.h +1 -1
  288. package/cpp/skia/modules/svg/include/SkSVGMask.h +1 -1
  289. package/cpp/skia/modules/svg/include/SkSVGOpenTypeSVGDecoder.h +1 -1
  290. package/cpp/skia/modules/svg/include/SkSVGPattern.h +1 -1
  291. package/cpp/skia/modules/svg/include/SkSVGRadialGradient.h +1 -1
  292. package/cpp/skia/modules/svg/include/SkSVGText.h +1 -1
  293. package/cpp/skia/modules/svg/include/SkSVGUse.h +1 -1
  294. package/cpp/skia/src/base/SkAutoLocaleSetter.h +94 -0
  295. package/cpp/skia/src/base/SkUTF.h +1 -1
  296. package/lib/commonjs/skia/types/NativeBuffer/NativeBufferFactory.d.ts +10 -1
  297. package/lib/commonjs/skia/types/NativeBuffer/NativeBufferFactory.js.map +1 -1
  298. package/lib/commonjs/skia/types/WebGPU.d.ts +153 -0
  299. package/lib/commonjs/skia/types/WebGPU.js +6 -0
  300. package/lib/commonjs/skia/types/WebGPU.js.map +1 -0
  301. package/lib/commonjs/skia/types/index.d.ts +1 -0
  302. package/lib/commonjs/skia/types/index.js +11 -0
  303. package/lib/commonjs/skia/types/index.js.map +1 -1
  304. package/lib/commonjs/skia/web/JsiSkNativeBufferFactory.d.ts +1 -0
  305. package/lib/commonjs/skia/web/JsiSkNativeBufferFactory.js +19 -0
  306. package/lib/commonjs/skia/web/JsiSkNativeBufferFactory.js.map +1 -1
  307. package/lib/commonjs/skia/web/JsiSkPath.js.map +1 -1
  308. package/lib/module/skia/types/NativeBuffer/NativeBufferFactory.d.ts +10 -1
  309. package/lib/module/skia/types/NativeBuffer/NativeBufferFactory.js.map +1 -1
  310. package/lib/module/skia/types/WebGPU.d.ts +153 -0
  311. package/lib/module/skia/types/WebGPU.js +2 -0
  312. package/lib/module/skia/types/WebGPU.js.map +1 -0
  313. package/lib/module/skia/types/index.d.ts +1 -0
  314. package/lib/module/skia/types/index.js +1 -0
  315. package/lib/module/skia/types/index.js.map +1 -1
  316. package/lib/module/skia/web/JsiSkNativeBufferFactory.d.ts +1 -0
  317. package/lib/module/skia/web/JsiSkNativeBufferFactory.js +19 -0
  318. package/lib/module/skia/web/JsiSkNativeBufferFactory.js.map +1 -1
  319. package/lib/module/skia/web/JsiSkPath.js.map +1 -1
  320. package/lib/module/web/LoadSkiaWeb.js +1 -2
  321. package/lib/module/web/LoadSkiaWeb.js.map +1 -1
  322. package/lib/typescript/lib/commonjs/skia/types/WebGPU.d.ts +1 -0
  323. package/lib/typescript/lib/commonjs/skia/web/JsiSkNativeBufferFactory.d.ts +1 -0
  324. package/lib/typescript/lib/module/skia/types/WebGPU.d.ts +1 -0
  325. package/lib/typescript/lib/module/skia/types/index.d.ts +1 -0
  326. package/lib/typescript/lib/module/skia/web/JsiSkNativeBufferFactory.d.ts +1 -0
  327. package/lib/typescript/src/skia/types/NativeBuffer/NativeBufferFactory.d.ts +10 -1
  328. package/lib/typescript/src/skia/types/WebGPU.d.ts +153 -0
  329. package/lib/typescript/src/skia/types/index.d.ts +1 -0
  330. package/lib/typescript/src/skia/web/JsiSkNativeBufferFactory.d.ts +1 -0
  331. package/package.json +14 -12
  332. package/react-native-skia.podspec +59 -7
  333. package/src/skia/types/NativeBuffer/NativeBufferFactory.ts +10 -1
  334. package/src/skia/types/WebGPU.ts +186 -0
  335. package/src/skia/types/index.ts +1 -0
  336. package/src/skia/web/JsiSkNativeBufferFactory.ts +20 -0
  337. package/src/skia/web/JsiSkPath.ts +8 -2
  338. package/scripts/install-libs.js +0 -133
@@ -78,20 +78,20 @@
78
78
  #endif
79
79
 
80
80
  /**
81
- * SK_CPU_SSE_LEVEL
81
+ * SK_CPU_X64_LEVEL
82
82
  *
83
- * If defined, SK_CPU_SSE_LEVEL should be set to the highest supported level.
84
- * On non-intel CPU this should be undefined.
83
+ * If defined, SK_CPU_X64_LEVEL should be set to the highest supported level.
84
+ * On non-Intel, non-AMD CPUs this should be undefined.
85
85
  */
86
- #define SK_CPU_SSE_LEVEL_SSE1 10
87
- #define SK_CPU_SSE_LEVEL_SSE2 20
88
- #define SK_CPU_SSE_LEVEL_SSE3 30
89
- #define SK_CPU_SSE_LEVEL_SSSE3 31
90
- #define SK_CPU_SSE_LEVEL_SSE41 41
91
- #define SK_CPU_SSE_LEVEL_SSE42 42
92
- #define SK_CPU_SSE_LEVEL_AVX 51
93
- #define SK_CPU_SSE_LEVEL_AVX2 52
94
- #define SK_CPU_SSE_LEVEL_SKX 60
86
+ #define SK_CPU_X64_LEVEL_SSE1 10
87
+ #define SK_CPU_X64_LEVEL_SSE2 20
88
+ #define SK_CPU_X64_LEVEL_SSE3 30
89
+ #define SK_CPU_X64_LEVEL_SSSE3 31
90
+ #define SK_CPU_X64_LEVEL_SSE41 41
91
+ #define SK_CPU_X64_LEVEL_SSE42 42
92
+ #define SK_CPU_X64_LEVEL_AVX 51
93
+ #define SK_CPU_X64_LEVEL_AVX2 52
94
+ #define SK_CPU_X64_LEVEL_ML4 60
95
95
 
96
96
  /**
97
97
  * SK_CPU_LSX_LEVEL
@@ -99,32 +99,32 @@
99
99
  * If defined, SK_CPU_LSX_LEVEL should be set to the highest supported level.
100
100
  * On non-loongarch CPU this should be undefined.
101
101
  */
102
- #define SK_CPU_LSX_LEVEL_LSX 70
103
- #define SK_CPU_LSX_LEVEL_LASX 80
102
+ #define SK_CPU_LSX_LEVEL_LSX 10
103
+ #define SK_CPU_LSX_LEVEL_LASX 20
104
104
 
105
105
  // TODO(kjlubick) clean up these checks
106
106
 
107
107
  // Are we in GCC/Clang?
108
- #ifndef SK_CPU_SSE_LEVEL
108
+ #ifndef SK_CPU_X64_LEVEL
109
109
  // These checks must be done in descending order to ensure we set the highest
110
110
  // available SSE level.
111
111
  #if defined(__AVX512F__) && defined(__AVX512DQ__) && defined(__AVX512CD__) && \
112
112
  defined(__AVX512BW__) && defined(__AVX512VL__)
113
- #define SK_CPU_SSE_LEVEL SK_CPU_SSE_LEVEL_SKX
113
+ #define SK_CPU_X64_LEVEL SK_CPU_X64_LEVEL_ML4
114
114
  #elif defined(__AVX2__)
115
- #define SK_CPU_SSE_LEVEL SK_CPU_SSE_LEVEL_AVX2
115
+ #define SK_CPU_X64_LEVEL SK_CPU_X64_LEVEL_AVX2
116
116
  #elif defined(__AVX__)
117
- #define SK_CPU_SSE_LEVEL SK_CPU_SSE_LEVEL_AVX
117
+ #define SK_CPU_X64_LEVEL SK_CPU_X64_LEVEL_AVX
118
118
  #elif defined(__SSE4_2__)
119
- #define SK_CPU_SSE_LEVEL SK_CPU_SSE_LEVEL_SSE42
119
+ #define SK_CPU_X64_LEVEL SK_CPU_X64_LEVEL_SSE42
120
120
  #elif defined(__SSE4_1__)
121
- #define SK_CPU_SSE_LEVEL SK_CPU_SSE_LEVEL_SSE41
121
+ #define SK_CPU_X64_LEVEL SK_CPU_X64_LEVEL_SSE41
122
122
  #elif defined(__SSSE3__)
123
- #define SK_CPU_SSE_LEVEL SK_CPU_SSE_LEVEL_SSSE3
123
+ #define SK_CPU_X64_LEVEL SK_CPU_X64_LEVEL_SSSE3
124
124
  #elif defined(__SSE3__)
125
- #define SK_CPU_SSE_LEVEL SK_CPU_SSE_LEVEL_SSE3
125
+ #define SK_CPU_X64_LEVEL SK_CPU_X64_LEVEL_SSE3
126
126
  #elif defined(__SSE2__)
127
- #define SK_CPU_SSE_LEVEL SK_CPU_SSE_LEVEL_SSE2
127
+ #define SK_CPU_X64_LEVEL SK_CPU_X64_LEVEL_SSE2
128
128
  #endif
129
129
  #endif
130
130
 
@@ -137,23 +137,23 @@
137
137
  #endif
138
138
 
139
139
  // Are we in VisualStudio?
140
- #ifndef SK_CPU_SSE_LEVEL
140
+ #ifndef SK_CPU_X64_LEVEL
141
141
  // These checks must be done in descending order to ensure we set the highest
142
142
  // available SSE level. 64-bit intel guarantees at least SSE2 support.
143
143
  #if defined(__AVX512F__) && defined(__AVX512DQ__) && defined(__AVX512CD__) && \
144
144
  defined(__AVX512BW__) && defined(__AVX512VL__)
145
- #define SK_CPU_SSE_LEVEL SK_CPU_SSE_LEVEL_SKX
145
+ #define SK_CPU_X64_LEVEL SK_CPU_X64_LEVEL_ML4
146
146
  #elif defined(__AVX2__)
147
- #define SK_CPU_SSE_LEVEL SK_CPU_SSE_LEVEL_AVX2
147
+ #define SK_CPU_X64_LEVEL SK_CPU_X64_LEVEL_AVX2
148
148
  #elif defined(__AVX__)
149
- #define SK_CPU_SSE_LEVEL SK_CPU_SSE_LEVEL_AVX
149
+ #define SK_CPU_X64_LEVEL SK_CPU_X64_LEVEL_AVX
150
150
  #elif defined(_M_X64) || defined(_M_AMD64)
151
- #define SK_CPU_SSE_LEVEL SK_CPU_SSE_LEVEL_SSE2
151
+ #define SK_CPU_X64_LEVEL SK_CPU_X64_LEVEL_SSE2
152
152
  #elif defined(_M_IX86_FP)
153
153
  #if _M_IX86_FP >= 2
154
- #define SK_CPU_SSE_LEVEL SK_CPU_SSE_LEVEL_SSE2
154
+ #define SK_CPU_X64_LEVEL SK_CPU_X64_LEVEL_SSE2
155
155
  #elif _M_IX86_FP == 1
156
- #define SK_CPU_SSE_LEVEL SK_CPU_SSE_LEVEL_SSE1
156
+ #define SK_CPU_X64_LEVEL SK_CPU_X64_LEVEL_SSE1
157
157
  #endif
158
158
  #endif
159
159
  #endif
@@ -50,16 +50,10 @@ void SK_SPI SkLog(SkLogPriority priority, const char format[], ...) SK_PRINTF_LI
50
50
  #define SKIA_LOG(priority, fmt, ...) \
51
51
  do { \
52
52
  if constexpr (priority <= SKIA_LOWEST_ACTIVE_LOG_PRIORITY) { \
53
- if constexpr (priority == SkLogPriority::kFatal) { \
54
- SK_ABORT("[skia] " fmt, ##__VA_ARGS__); \
55
- } \
56
- else { \
57
- SkLog(priority, "[skia] " fmt "\n", ##__VA_ARGS__); \
58
- } \
53
+ SkLog(priority, "[skia] " fmt "\n", ##__VA_ARGS__); \
59
54
  } \
60
55
  } while (0)
61
56
 
62
- #define SKIA_LOG_F(fmt, ...) SKIA_LOG(SkLogPriority::kFatal, "** ERROR ** " fmt, ##__VA_ARGS__)
63
57
  #define SKIA_LOG_E(fmt, ...) SKIA_LOG(SkLogPriority::kError, "** ERROR ** " fmt, ##__VA_ARGS__)
64
58
  #define SKIA_LOG_W(fmt, ...) SKIA_LOG(SkLogPriority::kWarning, "WARNING - " fmt, ##__VA_ARGS__)
65
59
  #define SKIA_LOG_I(fmt, ...) SKIA_LOG(SkLogPriority::kInfo, fmt, ##__VA_ARGS__)
@@ -25,11 +25,10 @@
25
25
  * However, debug logs would be omitted.
26
26
  */
27
27
  enum class SkLogPriority : int {
28
- kFatal = 0,
29
- kError = 1,
30
- kWarning = 2,
31
- kInfo = 3,
32
- kDebug = 4,
28
+ kError = 0,
29
+ kWarning = 1,
30
+ kInfo = 2,
31
+ kDebug = 3,
33
32
  };
34
33
 
35
34
  #endif // SkLogPriority_DEFINED
@@ -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.
@@ -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.
@@ -17,6 +17,8 @@
17
17
  #include <initializer_list>
18
18
  #include <utility>
19
19
 
20
+ // We'd prefer not to use these types anymore. SkTDArray can be replaced skia_private::TArray
21
+
20
22
  class SK_SPI SkTDStorage {
21
23
  public:
22
24
  explicit SkTDStorage(int sizeOfT);
@@ -76,7 +78,17 @@ public:
76
78
  }
77
79
 
78
80
  private:
79
- size_t bytes(int n) const { return SkToSizeT(n * fSizeOfT); }
81
+ // Fast path for pointer arithmetic. Assumes 'n' has already been bounds-checked.
82
+ size_t bytes(int n) const { return SkToSizeT(n) * SkToSizeT(fSizeOfT); }
83
+
84
+ // Safe path for memory allocations; protects against 32-bit overflow.
85
+ size_t safe_bytes(int n) const {
86
+ size_t size = SkToSizeT(n);
87
+ size_t sizeOfT = SkToSizeT(fSizeOfT);
88
+ SkASSERT_RELEASE(size <= SIZE_MAX / sizeOfT);
89
+ return size * sizeOfT;
90
+ }
91
+
80
92
  void* address(int n) { return fStorage + this->bytes(n); }
81
93
 
82
94
  // Adds delta to fSize. Crash if outside [0, INT_MAX]
@@ -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 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 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 2021 Google LLC.
2
+ * Copyright 2021 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.
@@ -0,0 +1,52 @@
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 SkCodecsICCProfileChromium_DEFINED
9
+ #define SkCodecsICCProfileChromium_DEFINED
10
+
11
+ #include <memory>
12
+
13
+ #include "include/core/SkData.h"
14
+ #include "include/core/SkRefCnt.h"
15
+ #include "include/private/base/SkAPI.h"
16
+ #include "modules/skcms/skcms.h"
17
+
18
+ namespace SkCodecs {
19
+
20
+ // Allows Chromium code that does not use SkCodec to parse ICC profiles
21
+ // using the same parser that SkCodec uses (skcms or moxcms).
22
+ class SK_API ICCProfileChromium {
23
+ public:
24
+ virtual ~ICCProfileChromium() = default;
25
+
26
+ // Force all ICC profile parsing to use skcms instead of the build-default
27
+ // parser. This is intended for Chromium to have a kill-switch to fall back
28
+ // to skcms if moxcms causes issues in the field.
29
+ //
30
+ // This is a global setting and is NOT thread-safe with respect to concurrent
31
+ // codec operations. It should be called once early during process startup.
32
+ static void ForceSkcms(bool forceSkcms);
33
+
34
+ // Returns nullptr if parsing fails. May retain `data`. Uses the parser
35
+ // selected by ForceSkcms (defaults to the build-default parser).
36
+ static std::unique_ptr<ICCProfileChromium> Make(sk_sp<SkData> data);
37
+
38
+ // Return the parsed profile. The pointers in the structure are guaranteed
39
+ // to be valid until `this` is destroyed.
40
+ virtual const skcms_ICCProfile& GetProfile() const = 0;
41
+
42
+ protected:
43
+ ICCProfileChromium() = default;
44
+
45
+ private:
46
+ ICCProfileChromium(const ICCProfileChromium&) = delete;
47
+ ICCProfileChromium& operator=(const ICCProfileChromium&) = delete;
48
+ };
49
+
50
+ } // namespace SkCodecs
51
+
52
+ #endif // SkCodecsICCProfileChromium_DEFINED
@@ -0,0 +1,26 @@
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 SkExifChromium_DEFINED
9
+ #define SkExifChromium_DEFINED
10
+
11
+ #include "include/private/base/SkAPI.h"
12
+
13
+ namespace SkExif {
14
+
15
+ // Force all EXIF parsing to use the C++ SkExif parser instead of the
16
+ // build-default parser. This is intended for Chromium to have a kill-switch
17
+ // to fall back to the C++ implementation if rust_exif causes issues in the
18
+ // field.
19
+ //
20
+ // This is a global setting and is NOT thread-safe with respect to concurrent
21
+ // codec operations. It should be called once early during process startup.
22
+ SK_API void ForceSkExif(bool forceSkExif);
23
+
24
+ } // namespace SkExif
25
+
26
+ #endif // SkExifChromium_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 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.
@@ -621,7 +621,7 @@ static constexpr SkColorType GrColorTypeToSkColorType(GrColorType ct) {
621
621
  case GrColorType::kRGB_888: return kUnknown_SkColorType;
622
622
  case GrColorType::kR_8: return kR8_unorm_SkColorType;
623
623
  case GrColorType::kR_16: return kR16_unorm_SkColorType;
624
- case GrColorType::kR_F16: return kUnknown_SkColorType;
624
+ case GrColorType::kR_F16: return kR16_float_SkColorType;
625
625
  case GrColorType::kGray_F16: return kUnknown_SkColorType;
626
626
  case GrColorType::kARGB_4444: return kUnknown_SkColorType;
627
627
  case GrColorType::kBGRA_4444: return kUnknown_SkColorType;
@@ -656,6 +656,7 @@ static constexpr GrColorType SkColorTypeToGrColorType(SkColorType ct) {
656
656
  case kR16_unorm_SkColorType: return GrColorType::kR_16;
657
657
  case kR16G16_unorm_SkColorType: return GrColorType::kRG_1616;
658
658
  case kA16_float_SkColorType: return GrColorType::kAlpha_F16;
659
+ case kR16_float_SkColorType: return GrColorType::kR_F16;
659
660
  case kR16G16_float_SkColorType: return GrColorType::kRG_F16;
660
661
  case kR16G16B16A16_unorm_SkColorType: return GrColorType::kRGBA_16161616;
661
662
  case kR8_unorm_SkColorType: return GrColorType::kR_8;
@@ -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 2021 Google LLC.
2
+ * Copyright 2021 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.
@@ -7,8 +7,8 @@
7
7
  */
8
8
  #pragma once
9
9
 
10
- #include <stdbool.h>
11
10
  #include "vulkan.h"
11
+ #include <stdbool.h>
12
12
 
13
13
  // Loader-ICD version negotiation API. Versions add the following features:
14
14
  // Version 0 - Initial. Doesn't support vk_icdGetInstanceProcAddr
@@ -41,26 +41,21 @@
41
41
  #define MIN_PHYS_DEV_EXTENSION_ICD_INTERFACE_VERSION 4
42
42
 
43
43
  // Old typedefs that don't follow a proper naming convention but are preserved for compatibility
44
- typedef VkResult(VKAPI_PTR* PFN_vkNegotiateLoaderICDInterfaceVersion)(uint32_t* pVersion);
45
- // This is defined in vk_layer.h which will be found by the loader, but if an ICD is building
46
- // against this file directly, it won't be found.
47
- #ifndef PFN_GetPhysicalDeviceProcAddr
48
- typedef PFN_vkVoidFunction(VKAPI_PTR* PFN_GetPhysicalDeviceProcAddr)(VkInstance instance,
49
- const char* pName);
44
+ typedef VkResult(VKAPI_PTR *PFN_vkNegotiateLoaderICDInterfaceVersion)(uint32_t *pVersion);
45
+ // This is defined in vk_layer.h which will be found by the loader, but if an ICD is building against this
46
+ // file directly, it won't be found.
47
+ #ifndef IS_DEFINED_PFN_GetPhysicalDeviceProcAddr
48
+ typedef PFN_vkVoidFunction(VKAPI_PTR *PFN_GetPhysicalDeviceProcAddr)(VkInstance instance, const char *pName);
49
+ #define IS_DEFINED_PFN_GetPhysicalDeviceProcAddr
50
50
  #endif
51
51
 
52
52
  // Typedefs for loader/ICD interface
53
- typedef VkResult(VKAPI_PTR* PFN_vk_icdNegotiateLoaderICDInterfaceVersion)(uint32_t* pVersion);
54
- typedef PFN_vkVoidFunction(VKAPI_PTR* PFN_vk_icdGetInstanceProcAddr)(VkInstance instance,
55
- const char* pName);
56
- typedef PFN_vkVoidFunction(VKAPI_PTR* PFN_vk_icdGetPhysicalDeviceProcAddr)(VkInstance instance,
57
- const char* pName);
53
+ typedef VkResult (VKAPI_PTR *PFN_vk_icdNegotiateLoaderICDInterfaceVersion)(uint32_t* pVersion);
54
+ typedef PFN_vkVoidFunction (VKAPI_PTR *PFN_vk_icdGetInstanceProcAddr)(VkInstance instance, const char* pName);
55
+ typedef PFN_vkVoidFunction (VKAPI_PTR *PFN_vk_icdGetPhysicalDeviceProcAddr)(VkInstance instance, const char* pName);
58
56
  #if defined(VK_USE_PLATFORM_WIN32_KHR)
59
- typedef VkResult(VKAPI_PTR* PFN_vk_icdEnumerateAdapterPhysicalDevices)(
60
- VkInstance instance,
61
- LUID adapterLUID,
62
- uint32_t* pPhysicalDeviceCount,
63
- VkPhysicalDevice* pPhysicalDevices);
57
+ typedef VkResult (VKAPI_PTR *PFN_vk_icdEnumerateAdapterPhysicalDevices)(VkInstance instance, LUID adapterLUID,
58
+ uint32_t* pPhysicalDeviceCount, VkPhysicalDevice* pPhysicalDevices);
64
59
  #endif
65
60
 
66
61
  // Prototypes for loader/ICD interface
@@ -68,17 +63,12 @@ typedef VkResult(VKAPI_PTR* PFN_vk_icdEnumerateAdapterPhysicalDevices)(
68
63
  #ifdef __cplusplus
69
64
  extern "C" {
70
65
  #endif
71
- VKAPI_ATTR VkResult VKAPI_CALL vk_icdNegotiateLoaderICDInterfaceVersion(uint32_t* pVersion);
72
- VKAPI_ATTR PFN_vkVoidFunction VKAPI_CALL vk_icdGetInstanceProcAddr(VkInstance instance,
73
- const char* pName);
74
- VKAPI_ATTR PFN_vkVoidFunction VKAPI_CALL vk_icdGetPhysicalDeviceProcAddr(VkInstance instance,
75
- const char* pName);
66
+ VKAPI_ATTR VkResult VKAPI_CALL vk_icdNegotiateLoaderICDInterfaceVersion(uint32_t* pVersion);
67
+ VKAPI_ATTR PFN_vkVoidFunction VKAPI_CALL vk_icdGetInstanceProcAddr(VkInstance instance, const char* pName);
68
+ VKAPI_ATTR PFN_vkVoidFunction VKAPI_CALL vk_icdGetPhysicalDeviceProcAddr(VkInstance instance, const char* pName);
76
69
  #if defined(VK_USE_PLATFORM_WIN32_KHR)
77
- VKAPI_ATTR VkResult VKAPI_CALL
78
- vk_icdEnumerateAdapterPhysicalDevices(VkInstance instance,
79
- LUID adapterLUID,
80
- uint32_t* pPhysicalDeviceCount,
81
- VkPhysicalDevice* pPhysicalDevices);
70
+ VKAPI_ATTR VkResult VKAPI_CALL vk_icdEnumerateAdapterPhysicalDevices(VkInstance instance, LUID adapterLUID,
71
+ uint32_t* pPhysicalDeviceCount, VkPhysicalDevice* pPhysicalDevices);
82
72
  #endif
83
73
  #ifdef __cplusplus
84
74
  }
@@ -95,16 +85,16 @@ vk_icdEnumerateAdapterPhysicalDevices(VkInstance instance,
95
85
 
96
86
  typedef union {
97
87
  uintptr_t loaderMagic;
98
- void* loaderData;
88
+ void *loaderData;
99
89
  } VK_LOADER_DATA;
100
90
 
101
- static inline void set_loader_magic_value(void* pNewObject) {
102
- VK_LOADER_DATA* loader_info = (VK_LOADER_DATA*)pNewObject;
91
+ static inline void set_loader_magic_value(void *pNewObject) {
92
+ VK_LOADER_DATA *loader_info = (VK_LOADER_DATA *)pNewObject;
103
93
  loader_info->loaderMagic = ICD_LOADER_MAGIC;
104
94
  }
105
95
 
106
- static inline bool valid_loader_magic_value(void* pNewObject) {
107
- const VK_LOADER_DATA* loader_info = (VK_LOADER_DATA*)pNewObject;
96
+ static inline bool valid_loader_magic_value(void *pNewObject) {
97
+ const VK_LOADER_DATA *loader_info = (VK_LOADER_DATA *)pNewObject;
108
98
  return (loader_info->loaderMagic & 0xffffffff) == ICD_LOADER_MAGIC;
109
99
  }
110
100
 
@@ -138,16 +128,16 @@ typedef struct {
138
128
  #ifdef VK_USE_PLATFORM_MIR_KHR
139
129
  typedef struct {
140
130
  VkIcdSurfaceBase base;
141
- MirConnection* connection;
142
- MirSurface* mirSurface;
131
+ MirConnection *connection;
132
+ MirSurface *mirSurface;
143
133
  } VkIcdSurfaceMir;
144
134
  #endif // VK_USE_PLATFORM_MIR_KHR
145
135
 
146
136
  #ifdef VK_USE_PLATFORM_WAYLAND_KHR
147
137
  typedef struct {
148
138
  VkIcdSurfaceBase base;
149
- struct wl_display* display;
150
- struct wl_surface* surface;
139
+ struct wl_display *display;
140
+ struct wl_surface *surface;
151
141
  } VkIcdSurfaceWayland;
152
142
  #endif // VK_USE_PLATFORM_WAYLAND_KHR
153
143
 
@@ -162,7 +152,7 @@ typedef struct {
162
152
  #ifdef VK_USE_PLATFORM_XCB_KHR
163
153
  typedef struct {
164
154
  VkIcdSurfaceBase base;
165
- xcb_connection_t* connection;
155
+ xcb_connection_t *connection;
166
156
  xcb_window_t window;
167
157
  } VkIcdSurfaceXcb;
168
158
  #endif // VK_USE_PLATFORM_XCB_KHR
@@ -170,7 +160,7 @@ typedef struct {
170
160
  #ifdef VK_USE_PLATFORM_XLIB_KHR
171
161
  typedef struct {
172
162
  VkIcdSurfaceBase base;
173
- Display* dpy;
163
+ Display *dpy;
174
164
  Window window;
175
165
  } VkIcdSurfaceXlib;
176
166
  #endif // VK_USE_PLATFORM_XLIB_KHR
@@ -178,29 +168,29 @@ typedef struct {
178
168
  #ifdef VK_USE_PLATFORM_DIRECTFB_EXT
179
169
  typedef struct {
180
170
  VkIcdSurfaceBase base;
181
- IDirectFB* dfb;
182
- IDirectFBSurface* surface;
171
+ IDirectFB *dfb;
172
+ IDirectFBSurface *surface;
183
173
  } VkIcdSurfaceDirectFB;
184
174
  #endif // VK_USE_PLATFORM_DIRECTFB_EXT
185
175
 
186
176
  #ifdef VK_USE_PLATFORM_ANDROID_KHR
187
177
  typedef struct {
188
178
  VkIcdSurfaceBase base;
189
- struct ANativeWindow* window;
179
+ struct ANativeWindow *window;
190
180
  } VkIcdSurfaceAndroid;
191
181
  #endif // VK_USE_PLATFORM_ANDROID_KHR
192
182
 
193
183
  #ifdef VK_USE_PLATFORM_MACOS_MVK
194
184
  typedef struct {
195
185
  VkIcdSurfaceBase base;
196
- const void* pView;
186
+ const void *pView;
197
187
  } VkIcdSurfaceMacOS;
198
188
  #endif // VK_USE_PLATFORM_MACOS_MVK
199
189
 
200
190
  #ifdef VK_USE_PLATFORM_IOS_MVK
201
191
  typedef struct {
202
192
  VkIcdSurfaceBase base;
203
- const void* pView;
193
+ const void *pView;
204
194
  } VkIcdSurfaceIOS;
205
195
  #endif // VK_USE_PLATFORM_IOS_MVK
206
196
 
@@ -229,27 +219,27 @@ typedef struct {
229
219
  #ifdef VK_USE_PLATFORM_METAL_EXT
230
220
  typedef struct {
231
221
  VkIcdSurfaceBase base;
232
- const CAMetalLayer* pLayer;
222
+ const CAMetalLayer *pLayer;
233
223
  } VkIcdSurfaceMetal;
234
- #endif // VK_USE_PLATFORM_METAL_EXT
224
+ #endif // VK_USE_PLATFORM_METAL_EXT
235
225
 
236
226
  #ifdef VK_USE_PLATFORM_VI_NN
237
227
  typedef struct {
238
228
  VkIcdSurfaceBase base;
239
- void* window;
229
+ void *window;
240
230
  } VkIcdSurfaceVi;
241
- #endif // VK_USE_PLATFORM_VI_NN
231
+ #endif // VK_USE_PLATFORM_VI_NN
242
232
 
243
233
  #ifdef VK_USE_PLATFORM_SCREEN_QNX
244
234
  typedef struct {
245
235
  VkIcdSurfaceBase base;
246
- struct _screen_context* context;
247
- struct _screen_window* window;
236
+ struct _screen_context *context;
237
+ struct _screen_window *window;
248
238
  } VkIcdSurfaceScreen;
249
239
  #endif // VK_USE_PLATFORM_SCREEN_QNX
250
240
 
251
241
  #ifdef VK_USE_PLATFORM_FUCHSIA
252
242
  typedef struct {
253
- VkIcdSurfaceBase base;
243
+ VkIcdSurfaceBase base;
254
244
  } VkIcdSurfaceImagePipe;
255
- #endif // VK_USE_PLATFORM_FUCHSIA
245
+ #endif // VK_USE_PLATFORM_FUCHSIA