@shopify/react-native-skia 0.1.197 → 0.1.199

Sign up to get free protection for your applications and to get access to all the features.
Files changed (187) 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/JsiSkShaderFactory.h +4 -4
  5. package/cpp/api/JsiSkSurfaceFactory.h +2 -1
  6. package/cpp/rnskia/dom/nodes/JsiShaderNodes.h +2 -2
  7. package/cpp/skia/include/android/SkCanvasAndroid.h +20 -0
  8. package/cpp/skia/include/android/SkHeifDecoder.h +43 -0
  9. package/cpp/skia/include/android/SkSurfaceAndroid.h +50 -0
  10. package/cpp/skia/include/codec/SkAvifDecoder.h +43 -0
  11. package/cpp/skia/include/codec/SkBmpDecoder.h +43 -0
  12. package/cpp/skia/include/codec/SkCodec.h +25 -1
  13. package/cpp/skia/include/codec/SkGifDecoder.h +43 -0
  14. package/cpp/skia/include/codec/SkIcoDecoder.h +43 -0
  15. package/cpp/skia/include/codec/SkJpegDecoder.h +43 -0
  16. package/cpp/skia/include/codec/SkJpegxlDecoder.h +43 -0
  17. package/cpp/skia/include/codec/SkPngDecoder.h +43 -0
  18. package/cpp/skia/include/codec/SkRawDecoder.h +49 -0
  19. package/cpp/skia/include/codec/SkWbmpDecoder.h +43 -0
  20. package/cpp/skia/include/codec/SkWebpDecoder.h +43 -0
  21. package/cpp/skia/include/core/SkBBHFactory.h +5 -1
  22. package/cpp/skia/include/core/SkBlender.h +0 -2
  23. package/cpp/skia/include/core/SkCanvas.h +4 -23
  24. package/cpp/skia/include/core/SkColorFilter.h +14 -1
  25. package/cpp/skia/include/core/SkColorTable.h +59 -0
  26. package/cpp/skia/include/core/SkContourMeasure.h +3 -0
  27. package/cpp/skia/include/core/SkDeferredDisplayList.h +8 -104
  28. package/cpp/skia/include/core/SkDeferredDisplayListRecorder.h +8 -91
  29. package/cpp/skia/include/core/SkDrawable.h +5 -2
  30. package/cpp/skia/include/core/SkGraphics.h +7 -19
  31. package/cpp/skia/include/core/SkImage.h +157 -249
  32. package/cpp/skia/include/core/SkImageGenerator.h +0 -31
  33. package/cpp/skia/include/core/SkMilestone.h +1 -1
  34. package/cpp/skia/include/core/SkPathMeasure.h +3 -3
  35. package/cpp/skia/include/core/SkPictureRecorder.h +1 -1
  36. package/cpp/skia/include/core/SkPoint.h +5 -563
  37. package/cpp/skia/include/core/SkPoint3.h +1 -0
  38. package/cpp/skia/include/core/SkPromiseImageTexture.h +4 -30
  39. package/cpp/skia/include/core/SkRect.h +8 -8
  40. package/cpp/skia/include/core/SkSamplingOptions.h +4 -2
  41. package/cpp/skia/include/core/SkScalar.h +1 -1
  42. package/cpp/skia/include/core/SkSerialProcs.h +5 -1
  43. package/cpp/skia/include/core/SkShader.h +14 -21
  44. package/cpp/skia/include/core/SkString.h +2 -0
  45. package/cpp/skia/include/core/SkSurface.h +169 -701
  46. package/cpp/skia/include/core/SkSurfaceCharacterization.h +8 -256
  47. package/cpp/skia/include/core/SkTiledImageUtils.h +97 -0
  48. package/cpp/skia/include/core/SkTypes.h +4 -2
  49. package/cpp/skia/include/core/SkYUVAPixmaps.h +0 -5
  50. package/cpp/skia/include/effects/SkGradientShader.h +10 -1
  51. package/cpp/skia/include/effects/SkImageFilters.h +62 -37
  52. package/cpp/skia/include/effects/SkPerlinNoiseShader.h +28 -29
  53. package/cpp/skia/include/effects/SkRuntimeEffect.h +17 -12
  54. package/cpp/skia/include/gpu/GrBackendSurface.h +12 -39
  55. package/cpp/skia/include/gpu/GrBackendSurfaceMutableState.h +6 -0
  56. package/cpp/skia/include/gpu/GrContextThreadSafeProxy.h +3 -3
  57. package/cpp/skia/include/gpu/GrDirectContext.h +103 -3
  58. package/cpp/skia/include/gpu/GrRecordingContext.h +10 -19
  59. package/cpp/skia/include/gpu/MutableTextureState.h +4 -0
  60. package/cpp/skia/include/gpu/ganesh/GrExternalTextureGenerator.h +54 -0
  61. package/cpp/skia/include/gpu/ganesh/SkImageGanesh.h +20 -76
  62. package/cpp/skia/include/gpu/ganesh/SkSurfaceGanesh.h +217 -0
  63. package/cpp/skia/include/gpu/ganesh/mtl/SkSurfaceMetal.h +73 -0
  64. package/cpp/skia/include/gpu/gl/GrGLTypes.h +13 -2
  65. package/cpp/skia/include/gpu/graphite/BackendSemaphore.h +78 -0
  66. package/cpp/skia/include/gpu/graphite/BackendTexture.h +1 -0
  67. package/cpp/skia/include/gpu/graphite/Image.h +277 -0
  68. package/cpp/skia/include/gpu/graphite/ImageProvider.h +1 -1
  69. package/cpp/skia/include/gpu/graphite/Recording.h +1 -4
  70. package/cpp/skia/include/gpu/graphite/Surface.h +81 -0
  71. package/cpp/skia/include/gpu/graphite/TextureInfo.h +5 -7
  72. package/cpp/skia/include/gpu/graphite/YUVABackendTextures.h +2 -2
  73. package/cpp/skia/include/gpu/mock/GrMockTypes.h +23 -8
  74. package/cpp/skia/include/ports/SkTypeface_fontations.h +21 -0
  75. package/cpp/skia/include/private/SkGainmapInfo.h +2 -0
  76. package/cpp/skia/include/private/SkGainmapShader.h +1 -0
  77. package/cpp/skia/include/private/SkJpegMetadataDecoder.h +19 -1
  78. package/cpp/skia/include/private/SkPathRef.h +13 -15
  79. package/cpp/skia/include/private/SkXmp.h +53 -0
  80. package/cpp/skia/include/private/base/SkFeatures.h +0 -4
  81. package/cpp/skia/include/private/base/SkFloatingPoint.h +11 -5
  82. package/cpp/skia/include/private/base/SkPoint_impl.h +569 -0
  83. package/cpp/skia/include/private/base/SkSpan_impl.h +3 -7
  84. package/cpp/skia/include/private/base/SkTArray.h +11 -11
  85. package/cpp/skia/include/private/chromium/GrDeferredDisplayList.h +120 -0
  86. package/cpp/skia/include/private/chromium/GrDeferredDisplayListRecorder.h +98 -0
  87. package/cpp/skia/include/private/chromium/GrPromiseImageTexture.h +43 -0
  88. package/cpp/skia/include/private/chromium/GrSurfaceCharacterization.h +215 -0
  89. package/cpp/skia/include/private/chromium/GrVkSecondaryCBDrawContext.h +6 -6
  90. package/cpp/skia/include/private/chromium/SkImageChromium.h +104 -0
  91. package/cpp/skia/include/private/chromium/Slug.h +7 -3
  92. package/cpp/skia/include/private/gpu/ganesh/GrContext_Base.h +7 -3
  93. package/cpp/skia/include/private/gpu/ganesh/GrGLTypesPriv.h +2 -0
  94. package/cpp/skia/include/private/gpu/ganesh/GrImageContext.h +3 -2
  95. package/cpp/skia/include/private/gpu/ganesh/GrMtlTypesPriv.h +10 -2
  96. package/cpp/skia/include/{gpu → private/gpu}/ganesh/GrTextureGenerator.h +2 -13
  97. package/cpp/skia/include/private/gpu/ganesh/GrTypesPriv.h +1 -1
  98. package/cpp/skia/include/private/gpu/graphite/DawnTypesPriv.h +7 -0
  99. package/cpp/skia/include/private/gpu/graphite/MtlGraphiteTypesPriv.h +19 -6
  100. package/cpp/skia/include/private/gpu/graphite/VulkanGraphiteTypesPriv.h +13 -0
  101. package/cpp/skia/include/third_party/vulkan/vulkan/vulkan.h +0 -1
  102. package/cpp/skia/include/third_party/vulkan/vulkan/vulkan_android.h +14 -1
  103. package/cpp/skia/include/third_party/vulkan/vulkan/vulkan_core.h +999 -79
  104. package/cpp/skia/modules/skcms/src/Transform_inl.h +36 -236
  105. package/cpp/skia/modules/skparagraph/include/Paragraph.h +2 -0
  106. package/cpp/skia/modules/skparagraph/include/ParagraphBuilder.h +16 -0
  107. package/cpp/skia/modules/skparagraph/include/TextStyle.h +6 -2
  108. package/cpp/skia/modules/skresources/include/SkResources.h +1 -1
  109. package/cpp/skia/modules/svg/include/SkSVGCircle.h +1 -1
  110. package/cpp/skia/modules/svg/include/SkSVGClipPath.h +1 -1
  111. package/cpp/skia/modules/svg/include/SkSVGContainer.h +1 -1
  112. package/cpp/skia/modules/svg/include/SkSVGDOM.h +1 -1
  113. package/cpp/skia/modules/svg/include/SkSVGDefs.h +1 -1
  114. package/cpp/skia/modules/svg/include/SkSVGEllipse.h +1 -1
  115. package/cpp/skia/modules/svg/include/SkSVGFe.h +1 -1
  116. package/cpp/skia/modules/svg/include/SkSVGFeBlend.h +1 -1
  117. package/cpp/skia/modules/svg/include/SkSVGFeColorMatrix.h +1 -1
  118. package/cpp/skia/modules/svg/include/SkSVGFeComposite.h +1 -1
  119. package/cpp/skia/modules/svg/include/SkSVGFeDisplacementMap.h +1 -1
  120. package/cpp/skia/modules/svg/include/SkSVGFeFlood.h +1 -1
  121. package/cpp/skia/modules/svg/include/SkSVGFeGaussianBlur.h +1 -1
  122. package/cpp/skia/modules/svg/include/SkSVGFeImage.h +1 -1
  123. package/cpp/skia/modules/svg/include/SkSVGFeLightSource.h +1 -1
  124. package/cpp/skia/modules/svg/include/SkSVGFeLighting.h +1 -1
  125. package/cpp/skia/modules/svg/include/SkSVGFeOffset.h +1 -1
  126. package/cpp/skia/modules/svg/include/SkSVGFeTurbulence.h +1 -1
  127. package/cpp/skia/modules/svg/include/SkSVGFilter.h +1 -1
  128. package/cpp/skia/modules/svg/include/SkSVGG.h +1 -1
  129. package/cpp/skia/modules/svg/include/SkSVGGradient.h +1 -1
  130. package/cpp/skia/modules/svg/include/SkSVGHiddenContainer.h +1 -1
  131. package/cpp/skia/modules/svg/include/SkSVGImage.h +1 -1
  132. package/cpp/skia/modules/svg/include/SkSVGLine.h +1 -1
  133. package/cpp/skia/modules/svg/include/SkSVGLinearGradient.h +1 -1
  134. package/cpp/skia/modules/svg/include/SkSVGMask.h +1 -1
  135. package/cpp/skia/modules/svg/include/SkSVGNode.h +1 -1
  136. package/cpp/skia/modules/svg/include/SkSVGPath.h +1 -1
  137. package/cpp/skia/modules/svg/include/SkSVGPattern.h +1 -1
  138. package/cpp/skia/modules/svg/include/SkSVGPoly.h +1 -1
  139. package/cpp/skia/modules/svg/include/SkSVGRadialGradient.h +1 -1
  140. package/cpp/skia/modules/svg/include/SkSVGRect.h +1 -1
  141. package/cpp/skia/modules/svg/include/SkSVGRenderContext.h +3 -3
  142. package/cpp/skia/modules/svg/include/SkSVGSVG.h +1 -1
  143. package/cpp/skia/modules/svg/include/SkSVGShape.h +1 -1
  144. package/cpp/skia/modules/svg/include/SkSVGStop.h +1 -1
  145. package/cpp/skia/modules/svg/include/SkSVGText.h +1 -1
  146. package/cpp/skia/modules/svg/include/SkSVGTransformableNode.h +1 -1
  147. package/cpp/skia/modules/svg/include/SkSVGTypes.h +21 -21
  148. package/cpp/skia/modules/svg/include/SkSVGUse.h +1 -1
  149. package/cpp/skia/modules/svg/include/SkSVGValue.h +2 -2
  150. package/cpp/skia/{include/private → src/core}/SkChecksum.h +32 -17
  151. package/cpp/skia/src/core/SkTHash.h +1 -1
  152. package/ios/RNSkia-iOS/RNSkMetalCanvasProvider.mm +3 -1
  153. package/ios/RNSkia-iOS/SkiaMetalRenderer.mm +3 -1
  154. package/libs/android/arm64-v8a/libskia.a +0 -0
  155. package/libs/android/arm64-v8a/libskottie.a +0 -0
  156. package/libs/android/arm64-v8a/libsksg.a +0 -0
  157. package/libs/android/arm64-v8a/libsvg.a +0 -0
  158. package/libs/android/armeabi-v7a/libskia.a +0 -0
  159. package/libs/android/armeabi-v7a/libskottie.a +0 -0
  160. package/libs/android/armeabi-v7a/libsksg.a +0 -0
  161. package/libs/android/armeabi-v7a/libsvg.a +0 -0
  162. package/libs/android/x86/libskia.a +0 -0
  163. package/libs/android/x86/libskottie.a +0 -0
  164. package/libs/android/x86/libsksg.a +0 -0
  165. package/libs/android/x86/libsvg.a +0 -0
  166. package/libs/android/x86_64/libskia.a +0 -0
  167. package/libs/android/x86_64/libskottie.a +0 -0
  168. package/libs/android/x86_64/libsksg.a +0 -0
  169. package/libs/android/x86_64/libsvg.a +0 -0
  170. package/libs/ios/libskia.xcframework/ios-arm64_arm64e/libskia.a +0 -0
  171. package/libs/ios/libskia.xcframework/ios-arm64_arm64e_x86_64-simulator/libskia.a +0 -0
  172. package/libs/ios/libskottie.xcframework/ios-arm64_arm64e/libskottie.a +0 -0
  173. package/libs/ios/libskottie.xcframework/ios-arm64_arm64e_x86_64-simulator/libskottie.a +0 -0
  174. package/libs/ios/libsksg.xcframework/Info.plist +5 -5
  175. package/libs/ios/libsksg.xcframework/ios-arm64_arm64e/libsksg.a +0 -0
  176. package/libs/ios/libsksg.xcframework/ios-arm64_arm64e_x86_64-simulator/libsksg.a +0 -0
  177. package/libs/ios/libskshaper.xcframework/ios-arm64_arm64e/libskshaper.a +0 -0
  178. package/libs/ios/libskshaper.xcframework/ios-arm64_arm64e_x86_64-simulator/libskshaper.a +0 -0
  179. package/libs/ios/libsvg.xcframework/Info.plist +5 -5
  180. package/libs/ios/libsvg.xcframework/ios-arm64_arm64e/libsvg.a +0 -0
  181. package/libs/ios/libsvg.xcframework/ios-arm64_arm64e_x86_64-simulator/libsvg.a +0 -0
  182. package/package.json +3 -4
  183. package/cpp/skia/include/effects/SkTableColorFilter.h +0 -29
  184. package/cpp/skia/include/private/SkOpts_spi.h +0 -23
  185. package/cpp/skia/include/private/SkSpinlock.h +0 -57
  186. package/cpp/skia/include/private/chromium/GrSlug.h +0 -16
  187. package/scripts/install-npm.js +0 -33
@@ -8,23 +8,19 @@
8
8
  #ifndef SkShader_DEFINED
9
9
  #define SkShader_DEFINED
10
10
 
11
- #include "include/core/SkBlendMode.h"
12
11
  #include "include/core/SkColor.h"
13
12
  #include "include/core/SkFlattenable.h"
14
- #include "include/core/SkImageInfo.h"
15
- #include "include/core/SkMatrix.h"
16
- #include "include/core/SkTileMode.h"
13
+ #include "include/core/SkRefCnt.h"
14
+ #include "include/private/base/SkAPI.h"
17
15
 
18
- class SkArenaAlloc;
19
- class SkBitmap;
20
16
  class SkBlender;
21
17
  class SkColorFilter;
22
18
  class SkColorSpace;
23
19
  class SkImage;
24
- class SkPath;
25
- class SkPicture;
26
- class SkRasterPipeline;
27
- class GrFragmentProcessor;
20
+ class SkMatrix;
21
+ enum class SkBlendMode;
22
+ enum class SkTileMode;
23
+ struct SkRect;
28
24
 
29
25
  /** \class SkShader
30
26
  *
@@ -78,16 +74,13 @@ private:
78
74
  using INHERITED = SkFlattenable;
79
75
  };
80
76
 
81
- class SK_API SkShaders {
82
- public:
83
- static sk_sp<SkShader> Empty();
84
- static sk_sp<SkShader> Color(SkColor);
85
- static sk_sp<SkShader> Color(const SkColor4f&, sk_sp<SkColorSpace>);
86
- static sk_sp<SkShader> Blend(SkBlendMode mode, sk_sp<SkShader> dst, sk_sp<SkShader> src);
87
- static sk_sp<SkShader> Blend(sk_sp<SkBlender>, sk_sp<SkShader> dst, sk_sp<SkShader> src);
88
- static sk_sp<SkShader> CoordClamp(sk_sp<SkShader>, const SkRect& subset);
89
- private:
90
- SkShaders() = delete;
91
- };
77
+ namespace SkShaders {
78
+ SK_API sk_sp<SkShader> Empty();
79
+ SK_API sk_sp<SkShader> Color(SkColor);
80
+ SK_API sk_sp<SkShader> Color(const SkColor4f&, sk_sp<SkColorSpace>);
81
+ SK_API sk_sp<SkShader> Blend(SkBlendMode mode, sk_sp<SkShader> dst, sk_sp<SkShader> src);
82
+ SK_API sk_sp<SkShader> Blend(sk_sp<SkBlender>, sk_sp<SkShader> dst, sk_sp<SkShader> src);
83
+ SK_API sk_sp<SkShader> CoordClamp(sk_sp<SkShader>, const SkRect& subset);
84
+ }
92
85
 
93
86
  #endif
@@ -270,8 +270,10 @@ private:
270
270
  static_assert(::sk_is_trivially_relocatable<decltype(fRec)>::value);
271
271
 
272
272
  #ifdef SK_DEBUG
273
+ SkString& validate();
273
274
  const SkString& validate() const;
274
275
  #else
276
+ SkString& validate() { return *this; }
275
277
  const SkString& validate() const { return *this; }
276
278
  #endif
277
279