@shopify/react-native-skia 0.1.196 → 0.1.199

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 (221) hide show
  1. package/android/CMakeLists.txt +32 -31
  2. package/android/cpp/rnskia-android/SkiaOpenGLRenderer.cpp +4 -2
  3. package/android/cpp/rnskia-android/SkiaOpenGLRenderer.h +3 -0
  4. package/cpp/api/JsiSkImage.h +1 -1
  5. package/cpp/api/JsiSkShaderFactory.h +4 -4
  6. package/cpp/api/JsiSkSurface.h +0 -1
  7. package/cpp/api/JsiSkSurfaceFactory.h +2 -1
  8. package/cpp/rnskia/RNSkView.h +20 -40
  9. package/cpp/rnskia/dom/nodes/JsiShaderNodes.h +2 -2
  10. package/cpp/rnskia/values/RNSkReadonlyValue.h +6 -7
  11. package/cpp/skia/include/android/SkCanvasAndroid.h +20 -0
  12. package/cpp/skia/include/android/SkHeifDecoder.h +43 -0
  13. package/cpp/skia/include/android/SkSurfaceAndroid.h +50 -0
  14. package/cpp/skia/include/codec/SkAvifDecoder.h +43 -0
  15. package/cpp/skia/include/codec/SkBmpDecoder.h +43 -0
  16. package/cpp/skia/include/codec/SkCodec.h +25 -1
  17. package/cpp/skia/include/codec/SkGifDecoder.h +43 -0
  18. package/cpp/skia/include/codec/SkIcoDecoder.h +43 -0
  19. package/cpp/skia/include/codec/SkJpegDecoder.h +43 -0
  20. package/cpp/skia/include/codec/SkJpegxlDecoder.h +43 -0
  21. package/cpp/skia/include/codec/SkPngDecoder.h +43 -0
  22. package/cpp/skia/include/codec/SkRawDecoder.h +49 -0
  23. package/cpp/skia/include/codec/SkWbmpDecoder.h +43 -0
  24. package/cpp/skia/include/codec/SkWebpDecoder.h +43 -0
  25. package/cpp/skia/include/core/SkBBHFactory.h +5 -1
  26. package/cpp/skia/include/core/SkBlender.h +0 -2
  27. package/cpp/skia/include/core/SkCanvas.h +4 -23
  28. package/cpp/skia/include/core/SkColorFilter.h +14 -1
  29. package/cpp/skia/include/core/SkColorTable.h +59 -0
  30. package/cpp/skia/include/core/SkContourMeasure.h +3 -0
  31. package/cpp/skia/include/core/SkDeferredDisplayList.h +8 -104
  32. package/cpp/skia/include/core/SkDeferredDisplayListRecorder.h +8 -91
  33. package/cpp/skia/include/core/SkDrawable.h +5 -2
  34. package/cpp/skia/include/core/SkGraphics.h +7 -19
  35. package/cpp/skia/include/core/SkImage.h +157 -249
  36. package/cpp/skia/include/core/SkImageGenerator.h +0 -31
  37. package/cpp/skia/include/core/SkMilestone.h +1 -1
  38. package/cpp/skia/include/core/SkPathMeasure.h +3 -3
  39. package/cpp/skia/include/core/SkPictureRecorder.h +1 -1
  40. package/cpp/skia/include/core/SkPoint.h +5 -563
  41. package/cpp/skia/include/core/SkPoint3.h +1 -0
  42. package/cpp/skia/include/core/SkPromiseImageTexture.h +4 -30
  43. package/cpp/skia/include/core/SkRect.h +8 -8
  44. package/cpp/skia/include/core/SkSamplingOptions.h +4 -2
  45. package/cpp/skia/include/core/SkScalar.h +1 -1
  46. package/cpp/skia/include/core/SkSerialProcs.h +5 -1
  47. package/cpp/skia/include/core/SkShader.h +14 -21
  48. package/cpp/skia/include/core/SkString.h +2 -0
  49. package/cpp/skia/include/core/SkSurface.h +169 -701
  50. package/cpp/skia/include/core/SkSurfaceCharacterization.h +8 -256
  51. package/cpp/skia/include/core/SkTiledImageUtils.h +97 -0
  52. package/cpp/skia/include/core/SkTypes.h +4 -2
  53. package/cpp/skia/include/core/SkYUVAPixmaps.h +0 -5
  54. package/cpp/skia/include/effects/SkGradientShader.h +10 -1
  55. package/cpp/skia/include/effects/SkImageFilters.h +62 -37
  56. package/cpp/skia/include/effects/SkPerlinNoiseShader.h +28 -29
  57. package/cpp/skia/include/effects/SkRuntimeEffect.h +17 -12
  58. package/cpp/skia/include/gpu/GrBackendSurface.h +12 -39
  59. package/cpp/skia/include/gpu/GrBackendSurfaceMutableState.h +6 -0
  60. package/cpp/skia/include/gpu/GrContextThreadSafeProxy.h +3 -3
  61. package/cpp/skia/include/gpu/GrDirectContext.h +103 -3
  62. package/cpp/skia/include/gpu/GrRecordingContext.h +10 -19
  63. package/cpp/skia/include/gpu/MutableTextureState.h +4 -0
  64. package/cpp/skia/include/gpu/ganesh/GrExternalTextureGenerator.h +54 -0
  65. package/cpp/skia/include/gpu/ganesh/SkImageGanesh.h +20 -76
  66. package/cpp/skia/include/gpu/ganesh/SkSurfaceGanesh.h +217 -0
  67. package/cpp/skia/include/gpu/ganesh/mtl/SkSurfaceMetal.h +73 -0
  68. package/cpp/skia/include/gpu/gl/GrGLTypes.h +13 -2
  69. package/cpp/skia/include/gpu/graphite/BackendSemaphore.h +78 -0
  70. package/cpp/skia/include/gpu/graphite/BackendTexture.h +1 -0
  71. package/cpp/skia/include/gpu/graphite/Image.h +277 -0
  72. package/cpp/skia/include/gpu/graphite/ImageProvider.h +1 -1
  73. package/cpp/skia/include/gpu/graphite/Recording.h +1 -4
  74. package/cpp/skia/include/gpu/graphite/Surface.h +81 -0
  75. package/cpp/skia/include/gpu/graphite/TextureInfo.h +5 -7
  76. package/cpp/skia/include/gpu/graphite/YUVABackendTextures.h +2 -2
  77. package/cpp/skia/include/gpu/mock/GrMockTypes.h +23 -8
  78. package/cpp/skia/include/ports/SkTypeface_fontations.h +21 -0
  79. package/cpp/skia/include/private/SkGainmapInfo.h +2 -0
  80. package/cpp/skia/include/private/SkGainmapShader.h +1 -0
  81. package/cpp/skia/include/private/SkJpegMetadataDecoder.h +19 -1
  82. package/cpp/skia/include/private/SkPathRef.h +13 -15
  83. package/cpp/skia/include/private/SkXmp.h +53 -0
  84. package/cpp/skia/include/private/base/SkFeatures.h +0 -4
  85. package/cpp/skia/include/private/base/SkFloatingPoint.h +11 -5
  86. package/cpp/skia/include/private/base/SkPoint_impl.h +569 -0
  87. package/cpp/skia/include/private/base/SkSpan_impl.h +3 -7
  88. package/cpp/skia/include/private/base/SkTArray.h +11 -11
  89. package/cpp/skia/include/private/chromium/GrDeferredDisplayList.h +120 -0
  90. package/cpp/skia/include/private/chromium/GrDeferredDisplayListRecorder.h +98 -0
  91. package/cpp/skia/include/private/chromium/GrPromiseImageTexture.h +43 -0
  92. package/cpp/skia/include/private/chromium/GrSurfaceCharacterization.h +215 -0
  93. package/cpp/skia/include/private/chromium/GrVkSecondaryCBDrawContext.h +6 -6
  94. package/cpp/skia/include/private/chromium/SkImageChromium.h +104 -0
  95. package/cpp/skia/include/private/chromium/Slug.h +7 -3
  96. package/cpp/skia/include/private/gpu/ganesh/GrContext_Base.h +7 -3
  97. package/cpp/skia/include/private/gpu/ganesh/GrGLTypesPriv.h +2 -0
  98. package/cpp/skia/include/private/gpu/ganesh/GrImageContext.h +3 -2
  99. package/cpp/skia/include/private/gpu/ganesh/GrMtlTypesPriv.h +10 -2
  100. package/cpp/skia/include/{gpu → private/gpu}/ganesh/GrTextureGenerator.h +2 -13
  101. package/cpp/skia/include/private/gpu/ganesh/GrTypesPriv.h +1 -1
  102. package/cpp/skia/include/private/gpu/graphite/DawnTypesPriv.h +7 -0
  103. package/cpp/skia/include/private/gpu/graphite/MtlGraphiteTypesPriv.h +19 -6
  104. package/cpp/skia/include/private/gpu/graphite/VulkanGraphiteTypesPriv.h +13 -0
  105. package/cpp/skia/include/third_party/vulkan/vulkan/vulkan.h +0 -1
  106. package/cpp/skia/include/third_party/vulkan/vulkan/vulkan_android.h +14 -1
  107. package/cpp/skia/include/third_party/vulkan/vulkan/vulkan_core.h +999 -79
  108. package/cpp/skia/modules/skcms/src/Transform_inl.h +36 -236
  109. package/cpp/skia/modules/skparagraph/include/Paragraph.h +2 -0
  110. package/cpp/skia/modules/skparagraph/include/ParagraphBuilder.h +16 -0
  111. package/cpp/skia/modules/skparagraph/include/TextStyle.h +6 -2
  112. package/cpp/skia/modules/skresources/include/SkResources.h +1 -1
  113. package/cpp/skia/modules/svg/include/SkSVGCircle.h +1 -1
  114. package/cpp/skia/modules/svg/include/SkSVGClipPath.h +1 -1
  115. package/cpp/skia/modules/svg/include/SkSVGContainer.h +1 -1
  116. package/cpp/skia/modules/svg/include/SkSVGDOM.h +1 -1
  117. package/cpp/skia/modules/svg/include/SkSVGDefs.h +1 -1
  118. package/cpp/skia/modules/svg/include/SkSVGEllipse.h +1 -1
  119. package/cpp/skia/modules/svg/include/SkSVGFe.h +1 -1
  120. package/cpp/skia/modules/svg/include/SkSVGFeBlend.h +1 -1
  121. package/cpp/skia/modules/svg/include/SkSVGFeColorMatrix.h +1 -1
  122. package/cpp/skia/modules/svg/include/SkSVGFeComposite.h +1 -1
  123. package/cpp/skia/modules/svg/include/SkSVGFeDisplacementMap.h +1 -1
  124. package/cpp/skia/modules/svg/include/SkSVGFeFlood.h +1 -1
  125. package/cpp/skia/modules/svg/include/SkSVGFeGaussianBlur.h +1 -1
  126. package/cpp/skia/modules/svg/include/SkSVGFeImage.h +1 -1
  127. package/cpp/skia/modules/svg/include/SkSVGFeLightSource.h +1 -1
  128. package/cpp/skia/modules/svg/include/SkSVGFeLighting.h +1 -1
  129. package/cpp/skia/modules/svg/include/SkSVGFeOffset.h +1 -1
  130. package/cpp/skia/modules/svg/include/SkSVGFeTurbulence.h +1 -1
  131. package/cpp/skia/modules/svg/include/SkSVGFilter.h +1 -1
  132. package/cpp/skia/modules/svg/include/SkSVGG.h +1 -1
  133. package/cpp/skia/modules/svg/include/SkSVGGradient.h +1 -1
  134. package/cpp/skia/modules/svg/include/SkSVGHiddenContainer.h +1 -1
  135. package/cpp/skia/modules/svg/include/SkSVGImage.h +1 -1
  136. package/cpp/skia/modules/svg/include/SkSVGLine.h +1 -1
  137. package/cpp/skia/modules/svg/include/SkSVGLinearGradient.h +1 -1
  138. package/cpp/skia/modules/svg/include/SkSVGMask.h +1 -1
  139. package/cpp/skia/modules/svg/include/SkSVGNode.h +1 -1
  140. package/cpp/skia/modules/svg/include/SkSVGPath.h +1 -1
  141. package/cpp/skia/modules/svg/include/SkSVGPattern.h +1 -1
  142. package/cpp/skia/modules/svg/include/SkSVGPoly.h +1 -1
  143. package/cpp/skia/modules/svg/include/SkSVGRadialGradient.h +1 -1
  144. package/cpp/skia/modules/svg/include/SkSVGRect.h +1 -1
  145. package/cpp/skia/modules/svg/include/SkSVGRenderContext.h +3 -3
  146. package/cpp/skia/modules/svg/include/SkSVGSVG.h +1 -1
  147. package/cpp/skia/modules/svg/include/SkSVGShape.h +1 -1
  148. package/cpp/skia/modules/svg/include/SkSVGStop.h +1 -1
  149. package/cpp/skia/modules/svg/include/SkSVGText.h +1 -1
  150. package/cpp/skia/modules/svg/include/SkSVGTransformableNode.h +1 -1
  151. package/cpp/skia/modules/svg/include/SkSVGTypes.h +21 -21
  152. package/cpp/skia/modules/svg/include/SkSVGUse.h +1 -1
  153. package/cpp/skia/modules/svg/include/SkSVGValue.h +2 -2
  154. package/cpp/skia/{include/private → src/core}/SkChecksum.h +32 -17
  155. package/cpp/skia/src/core/SkTHash.h +1 -1
  156. package/ios/RNSkia-iOS/RNSkMetalCanvasProvider.mm +3 -1
  157. package/ios/RNSkia-iOS/SkiaMetalRenderer.mm +3 -1
  158. package/lib/commonjs/renderer/Canvas.js +24 -13
  159. package/lib/commonjs/renderer/Canvas.js.map +1 -1
  160. package/lib/commonjs/skia/core/Data.d.ts +2 -2
  161. package/lib/commonjs/skia/core/Data.js.map +1 -1
  162. package/lib/commonjs/skia/core/RRect.js +5 -1
  163. package/lib/commonjs/skia/core/RRect.js.map +1 -1
  164. package/lib/commonjs/skia/core/Rect.js +32 -6
  165. package/lib/commonjs/skia/core/Rect.js.map +1 -1
  166. package/lib/commonjs/skia/types/Color.js.map +1 -1
  167. package/lib/commonjs/skia/types/JsiInstance.d.ts +2 -4
  168. package/lib/commonjs/skia/types/JsiInstance.js.map +1 -1
  169. package/lib/module/renderer/Canvas.js +25 -14
  170. package/lib/module/renderer/Canvas.js.map +1 -1
  171. package/lib/module/skia/core/Data.d.ts +2 -2
  172. package/lib/module/skia/core/Data.js.map +1 -1
  173. package/lib/module/skia/core/RRect.js +5 -1
  174. package/lib/module/skia/core/RRect.js.map +1 -1
  175. package/lib/module/skia/core/Rect.js +32 -6
  176. package/lib/module/skia/core/Rect.js.map +1 -1
  177. package/lib/module/skia/types/Color.js.map +1 -1
  178. package/lib/module/skia/types/JsiInstance.d.ts +2 -4
  179. package/lib/module/skia/types/JsiInstance.js.map +1 -1
  180. package/lib/typescript/src/skia/core/Data.d.ts +2 -2
  181. package/lib/typescript/src/skia/types/JsiInstance.d.ts +2 -4
  182. package/libs/android/arm64-v8a/libskia.a +0 -0
  183. package/libs/android/arm64-v8a/libskottie.a +0 -0
  184. package/libs/android/arm64-v8a/libsksg.a +0 -0
  185. package/libs/android/arm64-v8a/libsvg.a +0 -0
  186. package/libs/android/armeabi-v7a/libskia.a +0 -0
  187. package/libs/android/armeabi-v7a/libskottie.a +0 -0
  188. package/libs/android/armeabi-v7a/libsksg.a +0 -0
  189. package/libs/android/armeabi-v7a/libsvg.a +0 -0
  190. package/libs/android/x86/libskia.a +0 -0
  191. package/libs/android/x86/libskottie.a +0 -0
  192. package/libs/android/x86/libsksg.a +0 -0
  193. package/libs/android/x86/libsvg.a +0 -0
  194. package/libs/android/x86_64/libskia.a +0 -0
  195. package/libs/android/x86_64/libskottie.a +0 -0
  196. package/libs/android/x86_64/libsksg.a +0 -0
  197. package/libs/android/x86_64/libsvg.a +0 -0
  198. package/libs/ios/libskia.xcframework/ios-arm64_arm64e/libskia.a +0 -0
  199. package/libs/ios/libskia.xcframework/ios-arm64_arm64e_x86_64-simulator/libskia.a +0 -0
  200. package/libs/ios/libskottie.xcframework/ios-arm64_arm64e/libskottie.a +0 -0
  201. package/libs/ios/libskottie.xcframework/ios-arm64_arm64e_x86_64-simulator/libskottie.a +0 -0
  202. package/libs/ios/libsksg.xcframework/Info.plist +5 -5
  203. package/libs/ios/libsksg.xcframework/ios-arm64_arm64e/libsksg.a +0 -0
  204. package/libs/ios/libsksg.xcframework/ios-arm64_arm64e_x86_64-simulator/libsksg.a +0 -0
  205. package/libs/ios/libskshaper.xcframework/ios-arm64_arm64e/libskshaper.a +0 -0
  206. package/libs/ios/libskshaper.xcframework/ios-arm64_arm64e_x86_64-simulator/libskshaper.a +0 -0
  207. package/libs/ios/libsvg.xcframework/Info.plist +5 -5
  208. package/libs/ios/libsvg.xcframework/ios-arm64_arm64e/libsvg.a +0 -0
  209. package/libs/ios/libsvg.xcframework/ios-arm64_arm64e_x86_64-simulator/libsvg.a +0 -0
  210. package/package.json +3 -4
  211. package/src/renderer/Canvas.tsx +25 -19
  212. package/src/skia/core/Data.ts +3 -3
  213. package/src/skia/core/RRect.tsx +4 -2
  214. package/src/skia/core/Rect.ts +29 -12
  215. package/src/skia/types/Color.ts +1 -1
  216. package/src/skia/types/JsiInstance.ts +2 -5
  217. package/cpp/skia/include/effects/SkTableColorFilter.h +0 -29
  218. package/cpp/skia/include/private/SkOpts_spi.h +0 -23
  219. package/cpp/skia/include/private/SkSpinlock.h +0 -57
  220. package/cpp/skia/include/private/chromium/GrSlug.h +0 -16
  221. package/scripts/install-npm.js +0 -33
@@ -8,17 +8,21 @@
8
8
  #ifndef sktext_gpu_Slug_DEFINED
9
9
  #define sktext_gpu_Slug_DEFINED
10
10
 
11
- #include "include/core/SkData.h"
12
11
  #include "include/core/SkRect.h"
13
12
  #include "include/core/SkRefCnt.h"
13
+ #include "include/private/base/SkAPI.h"
14
+
15
+ #include <cstddef>
16
+ #include <cstdint>
14
17
 
15
18
  class SkCanvas;
16
- class SkMatrix;
19
+ class SkData;
17
20
  class SkPaint;
18
- class SkTextBlob;
19
21
  class SkReadBuffer;
20
22
  class SkStrikeClient;
23
+ class SkTextBlob;
21
24
  class SkWriteBuffer;
25
+ struct SkPoint;
22
26
 
23
27
  namespace sktext::gpu {
24
28
  // Slug encapsulates an SkTextBlob at a specific origin, using a specific paint. It can be
@@ -9,9 +9,10 @@
9
9
  #define GrContext_Base_DEFINED
10
10
 
11
11
  #include "include/core/SkRefCnt.h"
12
- #include "include/gpu/GrBackendSurface.h"
13
- #include "include/gpu/GrContextOptions.h"
14
12
  #include "include/gpu/GrTypes.h"
13
+ #include "include/private/base/SkAPI.h"
14
+
15
+ #include <cstdint>
15
16
 
16
17
  class GrBaseContextPriv;
17
18
  class GrCaps;
@@ -19,7 +20,10 @@ class GrContextThreadSafeProxy;
19
20
  class GrDirectContext;
20
21
  class GrImageContext;
21
22
  class GrRecordingContext;
23
+ enum SkColorType : int;
22
24
  enum class SkTextureCompressionType;
25
+ struct GrContextOptions;
26
+ class GrBackendFormat;
23
27
 
24
28
  class GrContext_Base : public SkRefCnt {
25
29
  public:
@@ -38,7 +42,7 @@ public:
38
42
  /*
39
43
  * Retrieve the default GrBackendFormat for a given SkColorType and renderability.
40
44
  * It is guaranteed that this backend format will be the one used by the GrContext
41
- * SkColorType and SkSurfaceCharacterization-based createBackendTexture methods.
45
+ * SkColorType and GrSurfaceCharacterization-based createBackendTexture methods.
42
46
  *
43
47
  * The caller should check that the returned format is valid.
44
48
  */
@@ -87,6 +87,8 @@ public:
87
87
  void cleanup();
88
88
  void assign(const GrGLBackendTextureInfo&, bool thisIsValid);
89
89
 
90
+ bool isProtected() const { return fInfo.isProtected(); }
91
+
90
92
  private:
91
93
  GrGLTextureInfo fInfo;
92
94
  GrGLTextureParameters* fParams;
@@ -8,9 +8,12 @@
8
8
  #ifndef GrImageContext_DEFINED
9
9
  #define GrImageContext_DEFINED
10
10
 
11
+ #include "include/core/SkRefCnt.h"
11
12
  #include "include/private/base/SingleOwner.h"
13
+ #include "include/private/base/SkAPI.h"
12
14
  #include "include/private/gpu/ganesh/GrContext_Base.h"
13
15
 
16
+ class GrContextThreadSafeProxy;
14
17
  class GrImageContextPriv;
15
18
 
16
19
  // This is now just a view on a ThreadSafeProxy, that SkImages can attempt to
@@ -48,8 +51,6 @@ private:
48
51
  // GrSurfaceDrawContexts. It is also passed to the GrResourceProvider and SkGpuDevice.
49
52
  // TODO: Move this down to GrRecordingContext.
50
53
  mutable skgpu::SingleOwner fSingleOwner;
51
-
52
- using INHERITED = GrContext_Base;
53
54
  };
54
55
 
55
56
  #endif
@@ -18,7 +18,11 @@
18
18
  #include <TargetConditionals.h>
19
19
 
20
20
  #if defined(SK_BUILD_FOR_MAC)
21
- #if __MAC_OS_X_VERSION_MAX_ALLOWED >= 110000
21
+ #if __MAC_OS_X_VERSION_MAX_ALLOWED >= 130000
22
+ #define GR_METAL_SDK_VERSION 300
23
+ #elif __MAC_OS_X_VERSION_MAX_ALLOWED >= 120000
24
+ #define GR_METAL_SDK_VERSION 240
25
+ #elif __MAC_OS_X_VERSION_MAX_ALLOWED >= 110000
22
26
  #define GR_METAL_SDK_VERSION 230
23
27
  #elif __MAC_OS_X_VERSION_MAX_ALLOWED >= 101500
24
28
  #define GR_METAL_SDK_VERSION 220
@@ -28,7 +32,11 @@
28
32
  #error Must use at least 10.14 SDK to build Metal backend for MacOS
29
33
  #endif
30
34
  #else
31
- #if __IPHONE_OS_VERSION_MAX_ALLOWED >= 140000 || __TV_OS_VERSION_MAX_ALLOWED >= 140000
35
+ #if __IPHONE_OS_VERSION_MAX_ALLOWED >= 160000 || __TV_OS_VERSION_MAX_ALLOWED >= 160000
36
+ #define GR_METAL_SDK_VERSION 300
37
+ #elif __IPHONE_OS_VERSION_MAX_ALLOWED >= 150000 || __TV_OS_VERSION_MAX_ALLOWED >= 150000
38
+ #define GR_METAL_SDK_VERSION 240
39
+ #elif __IPHONE_OS_VERSION_MAX_ALLOWED >= 140000 || __TV_OS_VERSION_MAX_ALLOWED >= 140000
32
40
  #define GR_METAL_SDK_VERSION 230
33
41
  #elif __IPHONE_OS_VERSION_MAX_ALLOWED >= 130000 || __TV_OS_VERSION_MAX_ALLOWED >= 130000
34
42
  #define GR_METAL_SDK_VERSION 220
@@ -9,16 +9,13 @@
9
9
  #define GrTextureGenerator_DEFINED
10
10
 
11
11
  #include "include/core/SkImageGenerator.h"
12
- #include "include/core/SkRefCnt.h"
13
12
  #include "include/gpu/GrTypes.h"
14
13
  #include "include/private/base/SkAPI.h"
15
14
 
16
15
  #include <cstdint>
17
- #include <memory>
18
16
 
19
17
  class GrRecordingContext;
20
18
  class GrSurfaceProxyView;
21
- class SkImage;
22
19
  enum class GrImageTexGenPolicy : int;
23
20
  namespace skgpu { enum class Mipmapped : bool; }
24
21
  struct SkImageInfo;
@@ -51,6 +48,8 @@ public:
51
48
  skgpu::Mipmapped mipmapped,
52
49
  GrImageTexGenPolicy);
53
50
 
51
+ // External clients should override GrExternalTextureGenerator instead of trying to implement
52
+ // this (which uses private Skia types)
54
53
  virtual GrSurfaceProxyView onGenerateTexture(GrRecordingContext*, const SkImageInfo&,
55
54
  skgpu::Mipmapped, GrImageTexGenPolicy) = 0;
56
55
 
@@ -64,14 +63,4 @@ protected:
64
63
  GrTextureGenerator(const SkImageInfo& info, uint32_t uniqueId = kNeedNewImageUniqueID);
65
64
  };
66
65
 
67
- namespace SkImages {
68
- /**
69
- * Like SkImages::DeferredFromGenerator except allows for the use of SkGaneshTextureGenerator.
70
- *
71
- * @param gen producer of textures
72
- * @return created SkImage, or nullptr
73
- */
74
- SK_API sk_sp<SkImage> DeferredFromTextureGenerator(std::unique_ptr<GrTextureGenerator> gen);
75
- }
76
-
77
66
  #endif // GrTextureGenerator_DEFINED
@@ -465,7 +465,7 @@ constexpr static int kGrInternalTextureFlagsMask = static_cast<int>(
465
465
  // require that both the surface and proxy have matching values for this flag. Instead we require
466
466
  // if the proxy has it set then the surface must also have it set. All other flags listed here must
467
467
  // match on the proxy and surface.
468
- // TODO: Add back kFramebufferOnly flag here once we update SkSurfaceCharacterization to take it
468
+ // TODO: Add back kFramebufferOnly flag here once we update GrSurfaceCharacterization to take it
469
469
  // as a flag. skbug.com/10672
470
470
  constexpr static int kGrInternalRenderTargetFlagsMask = static_cast<int>(
471
471
  GrInternalSurfaceFlags::kGLRTFBOIDIs0 |
@@ -8,6 +8,7 @@
8
8
  #ifndef skgpu_graphite_DawnTypesPriv_DEFINED
9
9
  #define skgpu_graphite_DawnTypesPriv_DEFINED
10
10
 
11
+ #include "include/core/SkString.h"
11
12
  #include "include/gpu/graphite/dawn/DawnTypes.h"
12
13
 
13
14
  namespace skgpu::graphite {
@@ -25,6 +26,12 @@ struct DawnTextureSpec {
25
26
  fFormat == that.fFormat;
26
27
  }
27
28
 
29
+ SkString toString() const {
30
+ return SkStringPrintf("format=0x%08X,usage=0x%08X",
31
+ static_cast<unsigned int>(fFormat),
32
+ static_cast<unsigned int>(fUsage));
33
+ }
34
+
28
35
  wgpu::TextureFormat fFormat;
29
36
  wgpu::TextureUsage fUsage;
30
37
  };
@@ -8,6 +8,7 @@
8
8
  #ifndef skgpu_graphite_MtlGraphiteTypesPriv_DEFINED
9
9
  #define skgpu_graphite_MtlGraphiteTypesPriv_DEFINED
10
10
 
11
+ #include "include/core/SkString.h"
11
12
  #include "include/gpu/graphite/GraphiteTypes.h"
12
13
  #include "include/gpu/graphite/mtl/MtlGraphiteTypes.h"
13
14
 
@@ -19,18 +20,22 @@
19
20
 
20
21
  // We're using the MSL version as shorthand for the Metal SDK version here
21
22
  #if defined(SK_BUILD_FOR_MAC)
22
- #if __MAC_OS_X_VERSION_MAX_ALLOWED >= 110000
23
- #define GR_METAL_SDK_VERSION 230
23
+ #if __MAC_OS_X_VERSION_MAX_ALLOWED >= 130000
24
+ #define SKGPU_GRAPHITE_METAL_SDK_VERSION 300
24
25
  #elif __MAC_OS_X_VERSION_MAX_ALLOWED >= 120000
25
- #define GR_METAL_SDK_VERSION 240
26
+ #define SKGPU_GRAPHITE_METAL_SDK_VERSION 240
27
+ #elif __MAC_OS_X_VERSION_MAX_ALLOWED >= 110000
28
+ #define SKGPU_GRAPHITE_METAL_SDK_VERSION 230
26
29
  #else
27
30
  #error Must use at least 11.00 SDK to build Metal backend for MacOS
28
31
  #endif
29
32
  #else
30
- #if __IPHONE_OS_VERSION_MAX_ALLOWED >= 140000 || __TV_OS_VERSION_MAX_ALLOWED >= 140000
31
- #define GR_METAL_SDK_VERSION 230
33
+ #if __IPHONE_OS_VERSION_MAX_ALLOWED >= 160000 || __TV_OS_VERSION_MAX_ALLOWED >= 160000
34
+ #define SKGPU_GRAPHITE_METAL_SDK_VERSION 300
32
35
  #elif __IPHONE_OS_VERSION_MAX_ALLOWED >= 150000 || __TV_OS_VERSION_MAX_ALLOWED >= 150000
33
- #define GR_METAL_SDK_VERSION 240
36
+ #define SKGPU_GRAPHITE_METAL_SDK_VERSION 240
37
+ #elif __IPHONE_OS_VERSION_MAX_ALLOWED >= 140000 || __TV_OS_VERSION_MAX_ALLOWED >= 140000
38
+ #define SKGPU_GRAPHITE_METAL_SDK_VERSION 230
34
39
  #else
35
40
  #error Must use at least 14.00 SDK to build Metal backend for iOS
36
41
  #endif
@@ -59,6 +64,14 @@ struct MtlTextureSpec {
59
64
  fFramebufferOnly == that.fFramebufferOnly;
60
65
  }
61
66
 
67
+ SkString toString() const {
68
+ return SkStringPrintf("format=%u,usage=0x%04X,storageMode=%d,framebufferOnly=%d",
69
+ fFormat,
70
+ fUsage,
71
+ fStorageMode,
72
+ fFramebufferOnly);
73
+ }
74
+
62
75
  MtlPixelFormat fFormat;
63
76
  MtlTextureUsage fUsage;
64
77
  MtlStorageMode fStorageMode;
@@ -8,6 +8,7 @@
8
8
  #ifndef skgpu_graphite_VulkanGraphiteTypesPriv_DEFINED
9
9
  #define skgpu_graphite_VulkanGraphiteTypesPriv_DEFINED
10
10
 
11
+ #include "include/core/SkString.h"
11
12
  #include "include/gpu/graphite/vk/VulkanGraphiteTypes.h"
12
13
 
13
14
  namespace skgpu::graphite {
@@ -37,6 +38,18 @@ struct VulkanTextureSpec {
37
38
  fAspectMask == that.fAspectMask;
38
39
  }
39
40
 
41
+ SkString toString() const {
42
+ return SkStringPrintf(
43
+ "flags=0x%08X,format=%d,imageTiling=%d,imageUsageFlags=0x%08X,sharingMode=%d,"
44
+ "aspectMask=%d",
45
+ fFlags,
46
+ fFormat,
47
+ fImageTiling,
48
+ fImageUsageFlags,
49
+ fSharingMode,
50
+ fAspectMask);
51
+ }
52
+
40
53
  VkImageCreateFlags fFlags;
41
54
  VkFormat fFormat;
42
55
  VkImageTiling fImageTiling;
@@ -85,7 +85,6 @@
85
85
  #include "vulkan_screen.h"
86
86
  #endif
87
87
 
88
-
89
88
  #ifdef VK_ENABLE_BETA_EXTENSIONS
90
89
  #include "vulkan_beta.h"
91
90
  #endif
@@ -44,7 +44,7 @@ VKAPI_ATTR VkResult VKAPI_CALL vkCreateAndroidSurfaceKHR(
44
44
 
45
45
  #define VK_ANDROID_external_memory_android_hardware_buffer 1
46
46
  struct AHardwareBuffer;
47
- #define VK_ANDROID_EXTERNAL_MEMORY_ANDROID_HARDWARE_BUFFER_SPEC_VERSION 3
47
+ #define VK_ANDROID_EXTERNAL_MEMORY_ANDROID_HARDWARE_BUFFER_SPEC_VERSION 4
48
48
  #define VK_ANDROID_EXTERNAL_MEMORY_ANDROID_HARDWARE_BUFFER_EXTENSION_NAME "VK_ANDROID_external_memory_android_hardware_buffer"
49
49
  typedef struct VkAndroidHardwareBufferUsageANDROID {
50
50
  VkStructureType sType;
@@ -90,6 +90,19 @@ typedef struct VkExternalFormatANDROID {
90
90
  uint64_t externalFormat;
91
91
  } VkExternalFormatANDROID;
92
92
 
93
+ typedef struct VkAndroidHardwareBufferFormatProperties2ANDROID {
94
+ VkStructureType sType;
95
+ void* pNext;
96
+ VkFormat format;
97
+ uint64_t externalFormat;
98
+ VkFormatFeatureFlags2KHR formatFeatures;
99
+ VkComponentMapping samplerYcbcrConversionComponents;
100
+ VkSamplerYcbcrModelConversion suggestedYcbcrModel;
101
+ VkSamplerYcbcrRange suggestedYcbcrRange;
102
+ VkChromaLocation suggestedXChromaOffset;
103
+ VkChromaLocation suggestedYChromaOffset;
104
+ } VkAndroidHardwareBufferFormatProperties2ANDROID;
105
+
93
106
  typedef VkResult (VKAPI_PTR *PFN_vkGetAndroidHardwareBufferPropertiesANDROID)(VkDevice device, const struct AHardwareBuffer* buffer, VkAndroidHardwareBufferPropertiesANDROID* pProperties);
94
107
  typedef VkResult (VKAPI_PTR *PFN_vkGetMemoryAndroidHardwareBufferANDROID)(VkDevice device, const VkMemoryGetAndroidHardwareBufferInfoANDROID* pInfo, struct AHardwareBuffer** pBuffer);
95
108