@shopify/react-native-skia 1.0.6 → 1.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (150) hide show
  1. package/android/CMakeLists.txt +1 -0
  2. package/android/build.gradle +1 -0
  3. package/android/cpp/rnskia-android/AHardwareBufferUtils.cpp +31 -0
  4. package/android/cpp/rnskia-android/AHardwareBufferUtils.h +13 -0
  5. package/android/cpp/rnskia-android/RNSkAndroidPlatformContext.h +75 -0
  6. package/android/cpp/rnskia-android/SkiaOpenGLSurfaceFactory.cpp +29 -11
  7. package/android/cpp/rnskia-android/SkiaOpenGLSurfaceFactory.h +1 -2
  8. package/android/src/main/java/com/shopify/reactnative/skia/ViewScreenshotService.java +3 -2
  9. package/cpp/api/JsiPlatformBuffer.h +51 -0
  10. package/cpp/api/JsiSkApi.h +4 -0
  11. package/cpp/api/JsiSkImage.h +1 -1
  12. package/cpp/api/JsiSkImageFactory.h +15 -2
  13. package/cpp/api/JsiSkSurface.h +9 -1
  14. package/cpp/rnskia/RNSkJsiViewApi.h +48 -0
  15. package/cpp/rnskia/RNSkPlatformContext.h +13 -0
  16. package/ios/RNSkia-iOS/RNSkiOSPlatformContext.h +6 -0
  17. package/ios/RNSkia-iOS/RNSkiOSPlatformContext.mm +115 -0
  18. package/ios/RNSkia-iOS/SkiaMetalSurfaceFactory.h +4 -0
  19. package/ios/RNSkia-iOS/SkiaMetalSurfaceFactory.mm +12 -0
  20. package/lib/commonjs/external/reanimated/textures.js +11 -2
  21. package/lib/commonjs/external/reanimated/textures.js.map +1 -1
  22. package/lib/commonjs/external/reanimated/useAnimatedImageValue.d.ts +2 -1
  23. package/lib/commonjs/external/reanimated/useAnimatedImageValue.js +8 -4
  24. package/lib/commonjs/external/reanimated/useAnimatedImageValue.js.map +1 -1
  25. package/lib/commonjs/mock/index.js +1 -0
  26. package/lib/commonjs/mock/index.js.map +1 -1
  27. package/lib/commonjs/renderer/Offscreen.d.ts +2 -2
  28. package/lib/commonjs/renderer/Offscreen.js +2 -2
  29. package/lib/commonjs/renderer/Offscreen.js.map +1 -1
  30. package/lib/commonjs/skia/types/Image/ImageFactory.d.ts +14 -0
  31. package/lib/commonjs/skia/types/Image/ImageFactory.js.map +1 -1
  32. package/lib/commonjs/skia/types/PlatformBuffer/PlatformBufferFactory.d.ts +12 -0
  33. package/lib/commonjs/skia/types/PlatformBuffer/PlatformBufferFactory.js +6 -0
  34. package/lib/commonjs/skia/types/PlatformBuffer/PlatformBufferFactory.js.map +1 -0
  35. package/lib/commonjs/skia/types/PlatformBuffer/index.d.ts +1 -0
  36. package/lib/commonjs/skia/types/PlatformBuffer/index.js +17 -0
  37. package/lib/commonjs/skia/types/PlatformBuffer/index.js.map +1 -0
  38. package/lib/commonjs/skia/types/Skia.d.ts +2 -0
  39. package/lib/commonjs/skia/types/Skia.js.map +1 -1
  40. package/lib/commonjs/skia/types/Surface/Surface.d.ts +8 -0
  41. package/lib/commonjs/skia/types/Surface/Surface.js.map +1 -1
  42. package/lib/commonjs/skia/types/index.d.ts +1 -0
  43. package/lib/commonjs/skia/types/index.js +11 -0
  44. package/lib/commonjs/skia/types/index.js.map +1 -1
  45. package/lib/commonjs/skia/web/JsiSkImage.d.ts +1 -2
  46. package/lib/commonjs/skia/web/JsiSkImage.js +5 -12
  47. package/lib/commonjs/skia/web/JsiSkImage.js.map +1 -1
  48. package/lib/commonjs/skia/web/JsiSkImageFactory.d.ts +2 -2
  49. package/lib/commonjs/skia/web/JsiSkImageFactory.js +3 -0
  50. package/lib/commonjs/skia/web/JsiSkImageFactory.js.map +1 -1
  51. package/lib/commonjs/skia/web/JsiSkPlatformBufferFactory.d.ts +8 -0
  52. package/lib/commonjs/skia/web/JsiSkPlatformBufferFactory.js +20 -0
  53. package/lib/commonjs/skia/web/JsiSkPlatformBufferFactory.js.map +1 -0
  54. package/lib/commonjs/skia/web/JsiSkSurface.d.ts +3 -2
  55. package/lib/commonjs/skia/web/JsiSkSurface.js +8 -6
  56. package/lib/commonjs/skia/web/JsiSkSurface.js.map +1 -1
  57. package/lib/commonjs/skia/web/JsiSkSurfaceFactory.d.ts +1 -1
  58. package/lib/commonjs/skia/web/JsiSkSurfaceFactory.js +2 -17
  59. package/lib/commonjs/skia/web/JsiSkSurfaceFactory.js.map +1 -1
  60. package/lib/commonjs/skia/web/JsiSkia.js +3 -1
  61. package/lib/commonjs/skia/web/JsiSkia.js.map +1 -1
  62. package/lib/commonjs/views/SkiaDomView.d.ts +6 -0
  63. package/lib/commonjs/views/SkiaDomView.js +10 -0
  64. package/lib/commonjs/views/SkiaDomView.js.map +1 -1
  65. package/lib/commonjs/views/types.d.ts +1 -0
  66. package/lib/commonjs/views/types.js.map +1 -1
  67. package/lib/module/external/reanimated/textures.js +11 -2
  68. package/lib/module/external/reanimated/textures.js.map +1 -1
  69. package/lib/module/external/reanimated/useAnimatedImageValue.d.ts +2 -1
  70. package/lib/module/external/reanimated/useAnimatedImageValue.js +8 -4
  71. package/lib/module/external/reanimated/useAnimatedImageValue.js.map +1 -1
  72. package/lib/module/mock/index.js +1 -0
  73. package/lib/module/mock/index.js.map +1 -1
  74. package/lib/module/renderer/Offscreen.d.ts +2 -2
  75. package/lib/module/renderer/Offscreen.js +2 -2
  76. package/lib/module/renderer/Offscreen.js.map +1 -1
  77. package/lib/module/skia/types/Image/ImageFactory.d.ts +14 -0
  78. package/lib/module/skia/types/Image/ImageFactory.js.map +1 -1
  79. package/lib/module/skia/types/PlatformBuffer/PlatformBufferFactory.d.ts +12 -0
  80. package/lib/module/skia/types/PlatformBuffer/PlatformBufferFactory.js +2 -0
  81. package/lib/module/skia/types/PlatformBuffer/PlatformBufferFactory.js.map +1 -0
  82. package/lib/module/skia/types/PlatformBuffer/index.d.ts +1 -0
  83. package/lib/module/skia/types/PlatformBuffer/index.js +2 -0
  84. package/lib/module/skia/types/PlatformBuffer/index.js.map +1 -0
  85. package/lib/module/skia/types/Skia.d.ts +2 -0
  86. package/lib/module/skia/types/Skia.js.map +1 -1
  87. package/lib/module/skia/types/Surface/Surface.d.ts +8 -0
  88. package/lib/module/skia/types/Surface/Surface.js.map +1 -1
  89. package/lib/module/skia/types/index.d.ts +1 -0
  90. package/lib/module/skia/types/index.js +1 -0
  91. package/lib/module/skia/types/index.js.map +1 -1
  92. package/lib/module/skia/web/JsiSkImage.d.ts +1 -2
  93. package/lib/module/skia/web/JsiSkImage.js +5 -12
  94. package/lib/module/skia/web/JsiSkImage.js.map +1 -1
  95. package/lib/module/skia/web/JsiSkImageFactory.d.ts +2 -2
  96. package/lib/module/skia/web/JsiSkImageFactory.js +3 -0
  97. package/lib/module/skia/web/JsiSkImageFactory.js.map +1 -1
  98. package/lib/module/skia/web/JsiSkPlatformBufferFactory.d.ts +8 -0
  99. package/lib/module/skia/web/JsiSkPlatformBufferFactory.js +13 -0
  100. package/lib/module/skia/web/JsiSkPlatformBufferFactory.js.map +1 -0
  101. package/lib/module/skia/web/JsiSkSurface.d.ts +3 -2
  102. package/lib/module/skia/web/JsiSkSurface.js +8 -6
  103. package/lib/module/skia/web/JsiSkSurface.js.map +1 -1
  104. package/lib/module/skia/web/JsiSkSurfaceFactory.d.ts +1 -1
  105. package/lib/module/skia/web/JsiSkSurfaceFactory.js +2 -17
  106. package/lib/module/skia/web/JsiSkSurfaceFactory.js.map +1 -1
  107. package/lib/module/skia/web/JsiSkia.js +3 -1
  108. package/lib/module/skia/web/JsiSkia.js.map +1 -1
  109. package/lib/module/views/SkiaDomView.d.ts +6 -0
  110. package/lib/module/views/SkiaDomView.js +10 -0
  111. package/lib/module/views/SkiaDomView.js.map +1 -1
  112. package/lib/module/views/types.d.ts +1 -0
  113. package/lib/module/views/types.js.map +1 -1
  114. package/lib/typescript/src/external/reanimated/useAnimatedImageValue.d.ts +2 -1
  115. package/lib/typescript/src/renderer/Offscreen.d.ts +2 -2
  116. package/lib/typescript/src/skia/types/Image/ImageFactory.d.ts +14 -0
  117. package/lib/typescript/src/skia/types/PlatformBuffer/PlatformBufferFactory.d.ts +12 -0
  118. package/lib/typescript/src/skia/types/PlatformBuffer/index.d.ts +1 -0
  119. package/lib/typescript/src/skia/types/Skia.d.ts +2 -0
  120. package/lib/typescript/src/skia/types/Surface/Surface.d.ts +8 -0
  121. package/lib/typescript/src/skia/types/index.d.ts +1 -0
  122. package/lib/typescript/src/skia/web/JsiSkImage.d.ts +1 -2
  123. package/lib/typescript/src/skia/web/JsiSkImageFactory.d.ts +2 -2
  124. package/lib/typescript/src/skia/web/JsiSkPlatformBufferFactory.d.ts +8 -0
  125. package/lib/typescript/src/skia/web/JsiSkSurface.d.ts +3 -2
  126. package/lib/typescript/src/skia/web/JsiSkSurfaceFactory.d.ts +1 -1
  127. package/lib/typescript/src/views/SkiaDomView.d.ts +6 -0
  128. package/lib/typescript/src/views/types.d.ts +1 -0
  129. package/package.json +1 -1
  130. package/src/external/reanimated/textures.tsx +8 -2
  131. package/src/external/reanimated/useAnimatedImageValue.ts +12 -6
  132. package/src/mock/index.ts +1 -0
  133. package/src/renderer/Offscreen.tsx +3 -3
  134. package/src/skia/types/Image/ImageFactory.ts +15 -0
  135. package/src/skia/types/PlatformBuffer/PlatformBufferFactory.ts +14 -0
  136. package/src/skia/types/PlatformBuffer/index.ts +1 -0
  137. package/src/skia/types/Skia.ts +2 -1
  138. package/src/skia/types/Surface/Surface.ts +10 -0
  139. package/src/skia/types/index.ts +1 -0
  140. package/src/skia/web/JsiSkImage.ts +5 -22
  141. package/src/skia/web/JsiSkImageFactory.ts +13 -2
  142. package/src/skia/web/JsiSkPlatformBufferFactory.ts +22 -0
  143. package/src/skia/web/JsiSkSurface.ts +10 -9
  144. package/src/skia/web/JsiSkSurfaceFactory.ts +4 -20
  145. package/src/skia/web/JsiSkia.ts +2 -0
  146. package/src/views/SkiaDomView.tsx +10 -0
  147. package/src/views/types.ts +1 -0
  148. package/cpp/skia/include/third_party/vulkan/LICENSE +0 -29
  149. package/cpp/skia/modules/skcms/README.chromium +0 -6
  150. package/cpp/skia/readme.txt +0 -1
@@ -1,29 +0,0 @@
1
- // Copyright (c) 2018 Google Inc. All rights reserved.
2
- //
3
- // Redistribution and use in source and binary forms, with or without
4
- // modification, are permitted provided that the following conditions are
5
- // met:
6
- //
7
- // * Redistributions of source code must retain the above copyright
8
- // notice, this list of conditions and the following disclaimer.
9
- // * Redistributions in binary form must reproduce the above
10
- // copyright notice, this list of conditions and the following disclaimer
11
- // in the documentation and/or other materials provided with the
12
- // distribution.
13
- // * Neither the name of Google Inc. nor the names of its
14
- // contributors may be used to endorse or promote products derived from
15
- // this software without specific prior written permission.
16
- //
17
- // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
18
- // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
19
- // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
20
- // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
21
- // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
22
- // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
23
- // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
24
- // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
25
- // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26
- // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
27
- // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28
-
29
- --------------------------------------------------------------------------------
@@ -1,6 +0,0 @@
1
- Name: skcms
2
- URL: https://skia.org/
3
- Version: unknown
4
- Security Critical: yes
5
- Shipped: yes
6
- License: BSD
@@ -1 +0,0 @@
1
- Placeholder for the Skia include files.