@nativescript/canvas 2.0.0-alpha.20 → 2.0.0-alpha.22

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 (234) hide show
  1. package/Canvas/common.d.ts +2 -0
  2. package/Canvas/common.js +6 -0
  3. package/Canvas/common.js.map +1 -1
  4. package/Canvas/index.android.d.ts +0 -2
  5. package/Canvas/index.android.js +8 -24
  6. package/Canvas/index.android.js.map +1 -1
  7. package/Canvas/index.d.ts +7 -0
  8. package/Canvas/index.ios.d.ts +0 -2
  9. package/Canvas/index.ios.js +7 -26
  10. package/Canvas/index.ios.js.map +1 -1
  11. package/Canvas2D/CanvasGradient/index.d.ts +1 -3
  12. package/Canvas2D/CanvasGradient/index.js +1 -10
  13. package/Canvas2D/CanvasGradient/index.js.map +1 -1
  14. package/Canvas2D/CanvasPattern/index.d.ts +1 -3
  15. package/Canvas2D/CanvasPattern/index.js +1 -10
  16. package/Canvas2D/CanvasPattern/index.js.map +1 -1
  17. package/Canvas2D/CanvasRenderingContext2D/index.d.ts +0 -2
  18. package/Canvas2D/CanvasRenderingContext2D/index.js +120 -138
  19. package/Canvas2D/CanvasRenderingContext2D/index.js.map +1 -1
  20. package/Canvas2D/DOMMatrix/index.js +3 -3
  21. package/Canvas2D/DOMMatrix/index.js.map +1 -1
  22. package/Canvas2D/ImageData/index.js +5 -5
  23. package/Canvas2D/ImageData/index.js.map +1 -1
  24. package/Canvas2D/Path2D/index.d.ts +0 -2
  25. package/Canvas2D/Path2D/index.js +34 -39
  26. package/Canvas2D/Path2D/index.js.map +1 -1
  27. package/ImageAsset/index.d.ts +2 -2
  28. package/ImageAsset/index.js +33 -37
  29. package/ImageAsset/index.js.map +1 -1
  30. package/ImageBitmap/index.d.ts +0 -2
  31. package/ImageBitmap/index.js +23 -29
  32. package/ImageBitmap/index.js.map +1 -1
  33. package/SVG/SVG.js +1 -1
  34. package/TextDecoder/index.d.ts +0 -2
  35. package/TextDecoder/index.js +3 -12
  36. package/TextDecoder/index.js.map +1 -1
  37. package/TextEncoder/index.d.ts +0 -2
  38. package/TextEncoder/index.js +4 -13
  39. package/TextEncoder/index.js.map +1 -1
  40. package/WebGL/WebGLExtensions/index.d.ts +0 -9
  41. package/WebGL/WebGLExtensions/index.js +17 -74
  42. package/WebGL/WebGLExtensions/index.js.map +1 -1
  43. package/WebGL/WebGLRenderingContext/common.d.ts +0 -2
  44. package/WebGL/WebGLRenderingContext/common.js +0 -10
  45. package/WebGL/WebGLRenderingContext/common.js.map +1 -1
  46. package/WebGL/WebGLRenderingContext/index.js +159 -298
  47. package/WebGL/WebGLRenderingContext/index.js.map +1 -1
  48. package/WebGL2/WebGL2RenderingContext/index.js +107 -195
  49. package/WebGL2/WebGL2RenderingContext/index.js.map +1 -1
  50. package/angular/esm2020/index.mjs +5 -5
  51. package/angular/fesm2015/nativescript-canvas-angular.mjs +4 -4
  52. package/angular/fesm2015/nativescript-canvas-angular.mjs.map +1 -1
  53. package/angular/fesm2020/nativescript-canvas-angular.mjs +4 -4
  54. package/angular/fesm2020/nativescript-canvas-angular.mjs.map +1 -1
  55. package/index.js.map +1 -1
  56. package/package.json +1 -1
  57. package/platforms/android/canvas-release.aar +0 -0
  58. package/platforms/android/include.gradle +15 -0
  59. package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/CanvasNative +0 -0
  60. package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Headers/CanvasNative-Swift.h +87 -57
  61. package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Headers/CanvasNative.h +10 -0
  62. package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Headers/canvas_ios.h +142 -0
  63. package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Headers/canvas_native.h +2589 -110
  64. package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Info.plist +0 -0
  65. package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Modules/CanvasNative.swiftmodule/Project/arm64-apple-ios.swiftsourceinfo +0 -0
  66. package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64-apple-ios.abi.json +1174 -89
  67. package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64-apple-ios.private.swiftinterface +2 -2
  68. package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64-apple-ios.swiftdoc +0 -0
  69. package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64-apple-ios.swiftinterface +2 -2
  70. package/platforms/ios/CanvasNative.xcframework/ios-arm64/dSYMs/CanvasNative.framework.dSYM/Contents/Resources/DWARF/CanvasNative +0 -0
  71. package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/CanvasNative +0 -0
  72. package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Headers/CanvasNative-Swift.h +174 -114
  73. package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Headers/CanvasNative.h +10 -0
  74. package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Headers/canvas_ios.h +142 -0
  75. package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Headers/canvas_native.h +2589 -110
  76. package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Info.plist +0 -0
  77. package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/Project/arm64-apple-ios-simulator.swiftsourceinfo +0 -0
  78. package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/Project/x86_64-apple-ios-simulator.swiftsourceinfo +0 -0
  79. package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64-apple-ios-simulator.abi.json +1174 -89
  80. package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface +2 -2
  81. package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64-apple-ios-simulator.swiftdoc +0 -0
  82. package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64-apple-ios-simulator.swiftinterface +2 -2
  83. package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/x86_64-apple-ios-simulator.abi.json +1174 -89
  84. package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface +2 -2
  85. package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/x86_64-apple-ios-simulator.swiftdoc +0 -0
  86. package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/x86_64-apple-ios-simulator.swiftinterface +2 -2
  87. package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/_CodeSignature/CodeResources +42 -31
  88. package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/dSYMs/CanvasNative.framework.dSYM/Contents/Resources/DWARF/CanvasNative +0 -0
  89. package/platforms/ios/Podfile +3 -0
  90. package/platforms/ios/build.xcconfig +3 -3
  91. package/platforms/ios/src/CanvasModule.h +0 -2
  92. package/platforms/ios/src/CanvasModule.mm +4 -4
  93. package/platforms/ios/src/NSOperationQueueWrapper.h +11 -0
  94. package/platforms/ios/src/NSOperationQueueWrapper.mm +74 -0
  95. package/platforms/ios/src/cpp/Caches.cpp +35 -0
  96. package/platforms/ios/src/cpp/Caches.h +186 -0
  97. package/platforms/ios/src/cpp/CanvasJSIModule.cpp +1582 -0
  98. package/platforms/ios/src/cpp/CanvasJSIModule.h +7 -34
  99. package/platforms/ios/src/cpp/Common.h +30 -0
  100. package/platforms/ios/src/cpp/ConcurrentMap.h +54 -0
  101. package/platforms/ios/src/cpp/Helpers.h +304 -38
  102. package/platforms/ios/src/cpp/ImageAssetImpl.cpp +802 -0
  103. package/platforms/ios/src/cpp/ImageAssetImpl.h +44 -12
  104. package/platforms/ios/src/cpp/ImageBitmapImpl.cpp +189 -0
  105. package/platforms/ios/src/cpp/ImageBitmapImpl.h +22 -16
  106. package/platforms/ios/src/cpp/JSICallback.h +61 -5
  107. package/platforms/ios/src/cpp/JSIReadFileCallback.h +86 -6
  108. package/platforms/ios/src/cpp/JSIRuntime.cpp +21 -0
  109. package/platforms/ios/src/cpp/JSIRuntime.h +7 -0
  110. package/platforms/ios/src/cpp/OneByteStringResource.cpp +25 -0
  111. package/platforms/ios/src/cpp/OneByteStringResource.h +21 -0
  112. package/platforms/ios/src/cpp/RafImpl.cpp +8 -0
  113. package/platforms/ios/src/cpp/RafImpl.h +11 -8
  114. package/platforms/ios/src/cpp/TextDecoderImpl.cpp +188 -0
  115. package/platforms/ios/src/cpp/TextDecoderImpl.h +20 -14
  116. package/platforms/ios/src/cpp/TextEncoderImpl.cpp +139 -0
  117. package/platforms/ios/src/cpp/TextEncoderImpl.h +20 -11
  118. package/platforms/ios/src/cpp/canvas2d/CanvasGradient.cpp +71 -0
  119. package/platforms/ios/src/cpp/canvas2d/CanvasGradient.h +27 -13
  120. package/platforms/ios/src/cpp/canvas2d/CanvasPattern.cpp +89 -0
  121. package/platforms/ios/src/cpp/canvas2d/CanvasPattern.h +26 -13
  122. package/platforms/ios/src/cpp/canvas2d/CanvasRenderingContext2DImpl.cpp +2391 -0
  123. package/platforms/ios/src/cpp/canvas2d/CanvasRenderingContext2DImpl.h +264 -21
  124. package/platforms/ios/src/cpp/canvas2d/ImageDataImpl.cpp +203 -0
  125. package/platforms/ios/src/cpp/canvas2d/ImageDataImpl.h +26 -12
  126. package/platforms/ios/src/cpp/canvas2d/MatrixImpl.cpp +800 -0
  127. package/platforms/ios/src/cpp/canvas2d/MatrixImpl.h +172 -13
  128. package/platforms/ios/src/cpp/canvas2d/Path2D.cpp +449 -0
  129. package/platforms/ios/src/cpp/canvas2d/Path2D.h +41 -12
  130. package/platforms/ios/src/cpp/canvas2d/TextMetricsImpl.cpp +253 -0
  131. package/platforms/ios/src/cpp/canvas2d/TextMetricsImpl.h +50 -12
  132. package/platforms/ios/src/cpp/gl.h +57 -7
  133. package/platforms/ios/src/cpp/gl3stub.c +425 -0
  134. package/platforms/ios/src/cpp/gl3stub.h +665 -0
  135. package/platforms/ios/src/cpp/gles3jni.h +37 -0
  136. package/platforms/ios/src/cpp/include/robin_hood.h +2544 -0
  137. package/platforms/ios/src/cpp/webgl/WebGLActiveInfoImpl.cpp +93 -0
  138. package/platforms/ios/src/cpp/webgl/WebGLActiveInfoImpl.h +33 -13
  139. package/platforms/ios/src/cpp/webgl/WebGLBuffer.h +41 -6
  140. package/platforms/ios/src/cpp/webgl/WebGLFramebuffer.h +46 -10
  141. package/platforms/ios/src/cpp/webgl/WebGLProgram.h +40 -5
  142. package/platforms/ios/src/cpp/webgl/WebGLRenderbuffer.h +40 -6
  143. package/platforms/ios/src/cpp/webgl/WebGLRenderingContext.cpp +6457 -0
  144. package/platforms/ios/src/cpp/webgl/WebGLRenderingContext.h +261 -390
  145. package/platforms/ios/src/cpp/webgl/{WebGLRenderingContextBase.mm → WebGLRenderingContextBase.cpp} +17 -16
  146. package/platforms/ios/src/cpp/webgl/WebGLRenderingContextBase.h +15 -36
  147. package/platforms/ios/src/cpp/webgl/WebGLShader.h +40 -6
  148. package/platforms/ios/src/cpp/webgl/WebGLShaderPrecisionFormatImpl.cpp +50 -0
  149. package/platforms/ios/src/cpp/webgl/WebGLShaderPrecisionFormatImpl.h +66 -11
  150. package/platforms/ios/src/cpp/webgl/WebGLTexture.h +40 -6
  151. package/platforms/ios/src/cpp/webgl/WebGLUniformLocation.h +44 -8
  152. package/platforms/ios/src/cpp/webgl/extensions/ANGLE_instanced_arraysImpl.cpp +126 -0
  153. package/platforms/ios/src/cpp/webgl/extensions/ANGLE_instanced_arraysImpl.h +25 -12
  154. package/platforms/ios/src/cpp/webgl/extensions/EXT_blend_minmaxImpl.cpp +35 -0
  155. package/platforms/ios/src/cpp/webgl/extensions/EXT_blend_minmaxImpl.h +25 -5
  156. package/platforms/ios/src/cpp/webgl/extensions/EXT_color_buffer_half_floatImpl.cpp +41 -0
  157. package/platforms/ios/src/cpp/webgl/extensions/EXT_color_buffer_half_floatImpl.h +25 -5
  158. package/platforms/ios/src/cpp/webgl/extensions/EXT_disjoint_timer_queryImpl.cpp +323 -0
  159. package/platforms/ios/src/cpp/webgl/extensions/EXT_disjoint_timer_queryImpl.h +47 -13
  160. package/platforms/ios/src/cpp/webgl/extensions/EXT_sRGBImpl.h +49 -6
  161. package/platforms/ios/src/cpp/webgl/extensions/EXT_shader_texture_lodImpl.h +37 -15
  162. package/platforms/ios/src/cpp/webgl/extensions/EXT_texture_filter_anisotropicImpl.h +47 -6
  163. package/platforms/ios/src/cpp/webgl/extensions/OES_element_index_uintImpl.h +49 -6
  164. package/platforms/ios/src/cpp/webgl/extensions/OES_fbo_render_mipmap.h +36 -15
  165. package/platforms/ios/src/cpp/webgl/extensions/OES_standard_derivativesImpl.h +44 -6
  166. package/platforms/ios/src/cpp/webgl/extensions/OES_texture_floatImpl.h +38 -15
  167. package/platforms/ios/src/cpp/webgl/extensions/OES_texture_float_linearImpl.h +37 -16
  168. package/platforms/ios/src/cpp/webgl/extensions/OES_texture_half_floatImpl.h +41 -6
  169. package/platforms/ios/src/cpp/webgl/extensions/OES_texture_half_float_linearImpl.h +40 -16
  170. package/platforms/ios/src/cpp/webgl/extensions/OES_vertex_array_objectImpl.cpp +102 -0
  171. package/platforms/ios/src/cpp/webgl/extensions/OES_vertex_array_objectImpl.h +69 -14
  172. package/platforms/ios/src/cpp/webgl/extensions/WEBGL_color_buffer_floatImpl.h +51 -8
  173. package/platforms/ios/src/cpp/webgl/extensions/WEBGL_compressed_texture_atcImpl.h +49 -6
  174. package/platforms/ios/src/cpp/webgl/extensions/WEBGL_compressed_texture_etc1Impl.h +49 -8
  175. package/platforms/ios/src/cpp/webgl/extensions/WEBGL_compressed_texture_etcImpl.h +76 -6
  176. package/platforms/ios/src/cpp/webgl/extensions/WEBGL_compressed_texture_pvrtcImpl.h +57 -6
  177. package/platforms/ios/src/cpp/webgl/extensions/WEBGL_compressed_texture_s3tcImpl.h +53 -6
  178. package/platforms/ios/src/cpp/webgl/extensions/WEBGL_compressed_texture_s3tc_srgbImpl.h +59 -6
  179. package/platforms/ios/src/cpp/webgl/extensions/WEBGL_depth_textureImpl.h +46 -6
  180. package/platforms/ios/src/cpp/webgl/extensions/WEBGL_draw_buffersImpl.cpp +43 -0
  181. package/platforms/ios/src/cpp/webgl/extensions/WEBGL_draw_buffersImpl.h +126 -14
  182. package/platforms/ios/src/cpp/webgl/extensions/WEBGL_lose_contextImpl.cpp +32 -0
  183. package/platforms/ios/src/cpp/webgl/extensions/WEBGL_lose_contextImpl.h +61 -12
  184. package/platforms/ios/src/cpp/webgl2/WebGL2RenderingContext.cpp +4380 -0
  185. package/platforms/ios/src/cpp/webgl2/WebGL2RenderingContext.h +139 -343
  186. package/platforms/ios/src/cpp/webgl2/WebGLQuery.h +40 -4
  187. package/platforms/ios/src/cpp/webgl2/WebGLSampler.h +42 -3
  188. package/platforms/ios/src/cpp/webgl2/WebGLSyncImpl.h +44 -11
  189. package/platforms/ios/src/cpp/webgl2/WebGLTransformFeedback.h +42 -4
  190. package/platforms/ios/src/cpp/webgl2/WebGLVertexArrayObject.h +43 -4
  191. package/platforms/ios/src/module.modulemap +1 -0
  192. package/platforms/ios/src/cpp/CanvasJSIModule.mm +0 -1105
  193. package/platforms/ios/src/cpp/ImageAssetImpl.mm +0 -417
  194. package/platforms/ios/src/cpp/ImageBitmapImpl.mm +0 -126
  195. package/platforms/ios/src/cpp/RafImpl.mm +0 -10
  196. package/platforms/ios/src/cpp/TextDecoderImpl.mm +0 -97
  197. package/platforms/ios/src/cpp/TextEncoderImpl.mm +0 -60
  198. package/platforms/ios/src/cpp/VecMutableBuffer.h +0 -46
  199. package/platforms/ios/src/cpp/canvas-cxx/src/lib.rs.cc +0 -6156
  200. package/platforms/ios/src/cpp/canvas-cxx/src/lib.rs.h +0 -2867
  201. package/platforms/ios/src/cpp/canvas2d/CanvasGradient.mm +0 -42
  202. package/platforms/ios/src/cpp/canvas2d/CanvasPattern.mm +0 -49
  203. package/platforms/ios/src/cpp/canvas2d/CanvasRenderingContext2DImpl.mm +0 -1972
  204. package/platforms/ios/src/cpp/canvas2d/ImageDataImpl.mm +0 -68
  205. package/platforms/ios/src/cpp/canvas2d/MatrixImpl.mm +0 -149
  206. package/platforms/ios/src/cpp/canvas2d/Path2D.mm +0 -335
  207. package/platforms/ios/src/cpp/canvas2d/TextMetricsImpl.mm +0 -68
  208. package/platforms/ios/src/cpp/rust/cxx.cc +0 -793
  209. package/platforms/ios/src/cpp/rust/cxx.h +0 -1111
  210. package/platforms/ios/src/cpp/webgl/WebGLActiveInfoImpl.mm +0 -39
  211. package/platforms/ios/src/cpp/webgl/WebGLRenderingContext.mm +0 -5958
  212. package/platforms/ios/src/cpp/webgl/WebGLShaderPrecisionFormatImpl.mm +0 -40
  213. package/platforms/ios/src/cpp/webgl/extensions/ANGLE_instanced_arraysImpl.mm +0 -108
  214. package/platforms/ios/src/cpp/webgl/extensions/EXT_blend_minmaxImpl.mm +0 -28
  215. package/platforms/ios/src/cpp/webgl/extensions/EXT_color_buffer_half_floatImpl.mm +0 -42
  216. package/platforms/ios/src/cpp/webgl/extensions/EXT_disjoint_timer_queryImpl.mm +0 -295
  217. package/platforms/ios/src/cpp/webgl/extensions/EXT_sRGBImpl.mm +0 -40
  218. package/platforms/ios/src/cpp/webgl/extensions/EXT_texture_filter_anisotropicImpl.mm +0 -37
  219. package/platforms/ios/src/cpp/webgl/extensions/OES_element_index_uintImpl.mm +0 -28
  220. package/platforms/ios/src/cpp/webgl/extensions/OES_standard_derivativesImpl.mm +0 -31
  221. package/platforms/ios/src/cpp/webgl/extensions/OES_texture_half_floatImpl.mm +0 -28
  222. package/platforms/ios/src/cpp/webgl/extensions/OES_vertex_array_objectImpl.mm +0 -127
  223. package/platforms/ios/src/cpp/webgl/extensions/WEBGL_color_buffer_floatImpl.mm +0 -45
  224. package/platforms/ios/src/cpp/webgl/extensions/WEBGL_compressed_texture_atcImpl.mm +0 -45
  225. package/platforms/ios/src/cpp/webgl/extensions/WEBGL_compressed_texture_etc1Impl.mm +0 -31
  226. package/platforms/ios/src/cpp/webgl/extensions/WEBGL_compressed_texture_etcImpl.mm +0 -70
  227. package/platforms/ios/src/cpp/webgl/extensions/WEBGL_compressed_texture_pvrtcImpl.mm +0 -47
  228. package/platforms/ios/src/cpp/webgl/extensions/WEBGL_compressed_texture_s3tcImpl.mm +0 -46
  229. package/platforms/ios/src/cpp/webgl/extensions/WEBGL_compressed_texture_s3tc_srgbImpl.mm +0 -49
  230. package/platforms/ios/src/cpp/webgl/extensions/WEBGL_depth_textureImpl.mm +0 -30
  231. package/platforms/ios/src/cpp/webgl/extensions/WEBGL_draw_buffersImpl.mm +0 -177
  232. package/platforms/ios/src/cpp/webgl/extensions/WEBGL_lose_contextImpl.mm +0 -64
  233. package/platforms/ios/src/cpp/webgl2/WebGL2RenderingContext.mm +0 -4551
  234. /package/platforms/ios/src/cpp/{OnRafCallback.mm → OnRafCallback.cpp} +0 -0
@@ -1,5 +1,5 @@
1
1
  // swift-interface-format-version: 1.0
2
- // swift-compiler-version: Apple Swift version 5.7 (swiftlang-5.7.0.127.4 clang-1400.0.29.50)
2
+ // swift-compiler-version: Apple Swift version 5.8.1 (swiftlang-5.8.0.124.5 clang-1403.0.22.11.100)
3
3
  // swift-module-flags: -target x86_64-apple-ios11.0-simulator -enable-objc-interop -enable-library-evolution -swift-version 5 -enforce-exclusivity=checked -O -module-name CanvasNative
4
4
  // swift-module-flags-ignorable: -enable-bare-slash-regex
5
5
  import AVFoundation
@@ -76,7 +76,7 @@ import _StringProcessing
76
76
  @objc @_Concurrency.MainActor(unsafe) public func context2DTest(_ context: Swift.Int64)
77
77
  @objc @_Concurrency.MainActor(unsafe) public func context2DTestToDataURL(_ context: Swift.Int64) -> Swift.String
78
78
  @_Concurrency.MainActor(unsafe) @objc override dynamic public init(frame: CoreFoundation.CGRect)
79
- @objc @_Concurrency.MainActor(unsafe) public func setListener(_ listener: CanvasNative.NSCCanvasListener?)
79
+ @objc @_Concurrency.MainActor(unsafe) public func setListener(_ listener: (any CanvasNative.NSCCanvasListener)?)
80
80
  @_Concurrency.MainActor(unsafe) @objc override dynamic public func layoutSubviews()
81
81
  @objc deinit
82
82
  }
@@ -1,5 +1,5 @@
1
1
  // swift-interface-format-version: 1.0
2
- // swift-compiler-version: Apple Swift version 5.7 (swiftlang-5.7.0.127.4 clang-1400.0.29.50)
2
+ // swift-compiler-version: Apple Swift version 5.8.1 (swiftlang-5.8.0.124.5 clang-1403.0.22.11.100)
3
3
  // swift-module-flags: -target x86_64-apple-ios11.0-simulator -enable-objc-interop -enable-library-evolution -swift-version 5 -enforce-exclusivity=checked -O -module-name CanvasNative
4
4
  // swift-module-flags-ignorable: -enable-bare-slash-regex
5
5
  import AVFoundation
@@ -76,7 +76,7 @@ import _StringProcessing
76
76
  @objc @_Concurrency.MainActor(unsafe) public func context2DTest(_ context: Swift.Int64)
77
77
  @objc @_Concurrency.MainActor(unsafe) public func context2DTestToDataURL(_ context: Swift.Int64) -> Swift.String
78
78
  @_Concurrency.MainActor(unsafe) @objc override dynamic public init(frame: CoreFoundation.CGRect)
79
- @objc @_Concurrency.MainActor(unsafe) public func setListener(_ listener: CanvasNative.NSCCanvasListener?)
79
+ @objc @_Concurrency.MainActor(unsafe) public func setListener(_ listener: (any CanvasNative.NSCCanvasListener)?)
80
80
  @_Concurrency.MainActor(unsafe) @objc override dynamic public func layoutSubviews()
81
81
  @objc deinit
82
82
  }
@@ -6,67 +6,71 @@
6
6
  <dict>
7
7
  <key>Headers/CanvasNative-Swift.h</key>
8
8
  <data>
9
- ILRUlpgV50gtkYPhukesFnRndOc=
9
+ nQtoIPuRAY9uRYYZCEaqMHer7F0=
10
10
  </data>
11
11
  <key>Headers/CanvasNative.h</key>
12
12
  <data>
13
- ZMHrbnL4GsXoVIIuWgQTvm0zpBY=
13
+ /f1joB+88Yli7N3M7UJmfZD+wrM=
14
+ </data>
15
+ <key>Headers/canvas_ios.h</key>
16
+ <data>
17
+ KTxEWGEXbMkpqkl1jFw9IrlUXNk=
14
18
  </data>
15
19
  <key>Headers/canvas_native.h</key>
16
20
  <data>
17
- 8pQdzsGE6qIYyme6Zfoj2bpQqsE=
21
+ L8PTQjQNEaaDkctrsr3n+1X9SGM=
18
22
  </data>
19
23
  <key>Info.plist</key>
20
24
  <data>
21
- VhrbJikfAL6yn4J+rfiUSfq4Luk=
25
+ U1i9btMZtOpHf9qhXwKYLDvVNdo=
22
26
  </data>
23
27
  <key>Modules/CanvasNative.swiftmodule/Project/arm64-apple-ios-simulator.swiftsourceinfo</key>
24
28
  <data>
25
- On3HtPq5afxCCYU68MUvC1yT82U=
29
+ ePAowlczAp5HJpTw2x1X4+QPbXI=
26
30
  </data>
27
31
  <key>Modules/CanvasNative.swiftmodule/Project/x86_64-apple-ios-simulator.swiftsourceinfo</key>
28
32
  <data>
29
- clOTNiLAgvXBDL2gvHd4zCjPH0c=
33
+ nNOxlc4WyDn3qBIS0haTpXjmNw8=
30
34
  </data>
31
35
  <key>Modules/CanvasNative.swiftmodule/arm64-apple-ios-simulator.abi.json</key>
32
36
  <data>
33
- Uwh94eEh7DJzzVI9819pQsYEJII=
37
+ r7arzWah724FL5A5bA8RvwuxXqU=
34
38
  </data>
35
39
  <key>Modules/CanvasNative.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface</key>
36
40
  <data>
37
- XlLbguFGyZHR9KwVSyjtlpJYdYs=
41
+ wlrtqLyuLVs3qeTlxhFuWJYFPkA=
38
42
  </data>
39
43
  <key>Modules/CanvasNative.swiftmodule/arm64-apple-ios-simulator.swiftdoc</key>
40
44
  <data>
41
- ECdY3x5N6YKCh2soIDhUEympMD4=
45
+ CMMmee6VmdZfdJ0Wkbazb7dDXdQ=
42
46
  </data>
43
47
  <key>Modules/CanvasNative.swiftmodule/arm64-apple-ios-simulator.swiftinterface</key>
44
48
  <data>
45
- XlLbguFGyZHR9KwVSyjtlpJYdYs=
49
+ wlrtqLyuLVs3qeTlxhFuWJYFPkA=
46
50
  </data>
47
51
  <key>Modules/CanvasNative.swiftmodule/arm64-apple-ios-simulator.swiftmodule</key>
48
52
  <data>
49
- nmTAR3JiQnR2M3EK6xeNPGRIT9E=
53
+ C7DBTWqlZA3pK0wqABMtp9M7RYs=
50
54
  </data>
51
55
  <key>Modules/CanvasNative.swiftmodule/x86_64-apple-ios-simulator.abi.json</key>
52
56
  <data>
53
- Uwh94eEh7DJzzVI9819pQsYEJII=
57
+ r7arzWah724FL5A5bA8RvwuxXqU=
54
58
  </data>
55
59
  <key>Modules/CanvasNative.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface</key>
56
60
  <data>
57
- zJ80fR6L0BjzzNKMEcazJ7KyqBw=
61
+ FFguMsxD4NYYvIa8AnpLmRFtvsw=
58
62
  </data>
59
63
  <key>Modules/CanvasNative.swiftmodule/x86_64-apple-ios-simulator.swiftdoc</key>
60
64
  <data>
61
- YRp9iFKV0/ZIsRIGjRB6TpBcVIc=
65
+ qIf+V6LPokPDapYCnIkzGPNTQBQ=
62
66
  </data>
63
67
  <key>Modules/CanvasNative.swiftmodule/x86_64-apple-ios-simulator.swiftinterface</key>
64
68
  <data>
65
- zJ80fR6L0BjzzNKMEcazJ7KyqBw=
69
+ FFguMsxD4NYYvIa8AnpLmRFtvsw=
66
70
  </data>
67
71
  <key>Modules/CanvasNative.swiftmodule/x86_64-apple-ios-simulator.swiftmodule</key>
68
72
  <data>
69
- S/xMA1VwVPxuOlfzY7IwE418jNg=
73
+ 9n4cAjTwJ58FCauLfS0DV6JwJdQ=
70
74
  </data>
71
75
  <key>Modules/module.modulemap</key>
72
76
  <data>
@@ -83,105 +87,112 @@
83
87
  <dict>
84
88
  <key>hash2</key>
85
89
  <data>
86
- C86E3vqVqKNwti45i9/RdfMuchnDFAjiN7aLHid7Wnw=
90
+ xwFUDtZ5319nV0wQyRtzw1LZyWudL6J9QLD6foTjLsU=
87
91
  </data>
88
92
  </dict>
89
93
  <key>Headers/CanvasNative.h</key>
90
94
  <dict>
91
95
  <key>hash2</key>
92
96
  <data>
93
- h6rWgL2qxZtLvvwnVfWZJ661yWKbzxWli7B8pITHakI=
97
+ etIfFZplh+fbBvYN1m/bsCHh1B91DXsoX2FOvSfQ5Vw=
98
+ </data>
99
+ </dict>
100
+ <key>Headers/canvas_ios.h</key>
101
+ <dict>
102
+ <key>hash2</key>
103
+ <data>
104
+ TiO6d1r0FpNodOiAuX3VSvZMqWAXTOTOJOr7ntjAfW0=
94
105
  </data>
95
106
  </dict>
96
107
  <key>Headers/canvas_native.h</key>
97
108
  <dict>
98
109
  <key>hash2</key>
99
110
  <data>
100
- EGOgsXDxc86fbWZKFO3Ohp6UhrjR38t6+IVCDAIlvDY=
111
+ lhkoVR96jtofkMLed9weKeJwxTKgJuneTVRcscP33aM=
101
112
  </data>
102
113
  </dict>
103
114
  <key>Modules/CanvasNative.swiftmodule/Project/arm64-apple-ios-simulator.swiftsourceinfo</key>
104
115
  <dict>
105
116
  <key>hash2</key>
106
117
  <data>
107
- NibRSZP8YMDNnP2TFqAgquM09kCsJwEt65eYSYAdzvc=
118
+ XXNQyzWBPNQc0LabYVFSq1+6FgiCA1PYg3CVpz1A/Ao=
108
119
  </data>
109
120
  </dict>
110
121
  <key>Modules/CanvasNative.swiftmodule/Project/x86_64-apple-ios-simulator.swiftsourceinfo</key>
111
122
  <dict>
112
123
  <key>hash2</key>
113
124
  <data>
114
- bZnVf7oVUWpFT0SGglL+jWa5KCgf3/+VNCxaaChKHgI=
125
+ MxYisuRzDnLJu8bdCdbZ+bLSCKuVjNrePs2w2NFQu8M=
115
126
  </data>
116
127
  </dict>
117
128
  <key>Modules/CanvasNative.swiftmodule/arm64-apple-ios-simulator.abi.json</key>
118
129
  <dict>
119
130
  <key>hash2</key>
120
131
  <data>
121
- cJe02j/o4uCSUWh9wgp6WPDK/US7bV0cuo77w7HRArQ=
132
+ i9e2tcx8M0/eA+88+O64ZYpGHYL/zuBPVrG4ceQY5H8=
122
133
  </data>
123
134
  </dict>
124
135
  <key>Modules/CanvasNative.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface</key>
125
136
  <dict>
126
137
  <key>hash2</key>
127
138
  <data>
128
- tnmGzMNDoc0Tbi38mX5qIeysRC7tFr9700O4c3E+qkY=
139
+ mU9wR9YI6z/UNBlZa45JU4RqDl1QKaUT7Tb5p61cE6w=
129
140
  </data>
130
141
  </dict>
131
142
  <key>Modules/CanvasNative.swiftmodule/arm64-apple-ios-simulator.swiftdoc</key>
132
143
  <dict>
133
144
  <key>hash2</key>
134
145
  <data>
135
- Y1a74PsPzlrgEGtG7bKHT11kz2TfsAsT2Sm4UmK1VNY=
146
+ XEwqbBhZEdrykIJcHcrifRLpaclowS2e/807PqxiO3c=
136
147
  </data>
137
148
  </dict>
138
149
  <key>Modules/CanvasNative.swiftmodule/arm64-apple-ios-simulator.swiftinterface</key>
139
150
  <dict>
140
151
  <key>hash2</key>
141
152
  <data>
142
- tnmGzMNDoc0Tbi38mX5qIeysRC7tFr9700O4c3E+qkY=
153
+ mU9wR9YI6z/UNBlZa45JU4RqDl1QKaUT7Tb5p61cE6w=
143
154
  </data>
144
155
  </dict>
145
156
  <key>Modules/CanvasNative.swiftmodule/arm64-apple-ios-simulator.swiftmodule</key>
146
157
  <dict>
147
158
  <key>hash2</key>
148
159
  <data>
149
- n9KWvjtg79bBdyBVjHrgJeB6poZnABXkSaWPhPFAxsI=
160
+ Crvg6K57JW0JDRD652CUIK2/p5YIlD8xXVQrHb82jHA=
150
161
  </data>
151
162
  </dict>
152
163
  <key>Modules/CanvasNative.swiftmodule/x86_64-apple-ios-simulator.abi.json</key>
153
164
  <dict>
154
165
  <key>hash2</key>
155
166
  <data>
156
- cJe02j/o4uCSUWh9wgp6WPDK/US7bV0cuo77w7HRArQ=
167
+ i9e2tcx8M0/eA+88+O64ZYpGHYL/zuBPVrG4ceQY5H8=
157
168
  </data>
158
169
  </dict>
159
170
  <key>Modules/CanvasNative.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface</key>
160
171
  <dict>
161
172
  <key>hash2</key>
162
173
  <data>
163
- A8bG7bxKgJHnF07rDPCMnRw2lR+gPYIZE1MrtN3+z+4=
174
+ 4ouJytdAzbFKEnd/Lvzzaznp6ecMfAOyLpDHj2ydA/0=
164
175
  </data>
165
176
  </dict>
166
177
  <key>Modules/CanvasNative.swiftmodule/x86_64-apple-ios-simulator.swiftdoc</key>
167
178
  <dict>
168
179
  <key>hash2</key>
169
180
  <data>
170
- SPlCrSLvqiOiv2YiUMpUjYaNahEHel5+PxrHlpvUgM0=
181
+ 4Vrv9xfds4FwI/1nDrreY1HfYl1r31bJkIMvsfoEf54=
171
182
  </data>
172
183
  </dict>
173
184
  <key>Modules/CanvasNative.swiftmodule/x86_64-apple-ios-simulator.swiftinterface</key>
174
185
  <dict>
175
186
  <key>hash2</key>
176
187
  <data>
177
- A8bG7bxKgJHnF07rDPCMnRw2lR+gPYIZE1MrtN3+z+4=
188
+ 4ouJytdAzbFKEnd/Lvzzaznp6ecMfAOyLpDHj2ydA/0=
178
189
  </data>
179
190
  </dict>
180
191
  <key>Modules/CanvasNative.swiftmodule/x86_64-apple-ios-simulator.swiftmodule</key>
181
192
  <dict>
182
193
  <key>hash2</key>
183
194
  <data>
184
- BSoMyWh2mvhZ0UcKFroEVKkrAiJ/ZwKcpxXJ722HEEQ=
195
+ xcHUbmIw4izou88kK/yKgfxaEf2rfhjQWFGq8a1YqLY=
185
196
  </data>
186
197
  </dict>
187
198
  <key>Modules/module.modulemap</key>
@@ -5,3 +5,6 @@ platform :ios, '11.0'
5
5
 
6
6
  #pod 'NativeScript', path: "../../node_modules/@nativescript/canvas/pods/NativeScript.podspec"
7
7
 
8
+
9
+ # Exposes NativeScript v8 headers to our module sources
10
+ pod 'NativeScript', path: "../../node_modules/@nativescript/canvas/src-native/ios/NativeScript.podspec"
@@ -1,5 +1,5 @@
1
- OTHER_LDFLAGS[sdk=*] = $(inherited) -framework CanvasNative -framework OpenGLES -framework GLKit
1
+ OTHER_LDFLAGS[sdk=*] = $(inherited) -framework Foundation -framework CanvasNative -framework OpenGLES -framework GLKit
2
2
 
3
- HEADER_SEARCH_PATHS = $(inherited) "$(BUILD_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)/NativeScript.framework/Headers" "$(BUILD_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)/NativeScript.framework/Headers/include" "$(SRCROOT)/../../node_modules/@nativescript/canvas/platforms/ios/src/cpp"/**
3
+ HEADER_SEARCH_PATHS = $(inherited) "$(BUILD_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)/NativeScript.framework/Headers" "$(BUILD_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)/NativeScript.framework/Headers/include"
4
4
 
5
- CLANG_CXX_LANGUAGE_STANDARD = c++17
5
+ CLANG_CXX_LANGUAGE_STANDARD = c++17
@@ -1,6 +1,4 @@
1
1
  #import "Foundation/Foundation.h"
2
- #import <NativeScript/JSIRuntime.h>
3
- #import "cpp/CanvasJSIModule.h"
4
2
  #import <sstream>
5
3
 
6
4
  @interface CanvasModule : NSObject
@@ -1,14 +1,14 @@
1
1
  #import "CanvasModule.h"
2
+ #import <NativeScript/runtime/Runtime.h>
3
+ #import "CanvasJSIModule.h"
2
4
 
3
-
4
- using namespace facebook::jsi;
5
5
  using namespace std;
6
6
 
7
7
  @implementation CanvasModule
8
8
 
9
9
  - (void )install {
10
- std::shared_ptr<facebook::jsi::Runtime> rt = [JSIRuntime runtime];
11
- CanvasJSIModule::install(*rt);
10
+ v8::Isolate* isolate = tns::Runtime::GetCurrentRuntime()->GetIsolate();
11
+ CanvasJSIModule::install(isolate);
12
12
  }
13
13
 
14
14
  @end
@@ -0,0 +1,11 @@
1
+ #include <functional>
2
+ class NSOperationQueueWrapper {
3
+ public:
4
+ NSOperationQueueWrapper(bool currentQueue);
5
+ ~NSOperationQueueWrapper();
6
+
7
+ void addOperation(std::function<void()> task);
8
+
9
+ private:
10
+ void *operationQueue;
11
+ };
@@ -0,0 +1,74 @@
1
+ #import "NSOperationQueueWrapper.h"
2
+ #include <Foundation/Foundation.h>
3
+
4
+ @interface NSOperationQueueWrapperObjC : NSObject
5
+ - (void)addOperation:(void (^)())task;
6
+ @end
7
+
8
+ @implementation NSOperationQueueWrapperObjC {
9
+ NSOperationQueue* operationQueue;
10
+ }
11
+
12
+ - (instancetype)init {
13
+ self = [super init];
14
+ if (self) {
15
+ operationQueue = [[NSOperationQueue alloc] init];
16
+ }
17
+ return self;
18
+ }
19
+
20
+ -(instancetype)initWithCurrentQueue {
21
+ self = [super init];
22
+ if (self) {
23
+ operationQueue = [NSOperationQueue currentQueue];
24
+ }
25
+ return self;
26
+ }
27
+
28
+ - (void)dealloc {}
29
+
30
+ - (void)addOperation:(void (^)())task {
31
+ NSBlockOperation* operation = [NSBlockOperation blockOperationWithBlock:^{
32
+ task();
33
+ }];
34
+
35
+ [operationQueue addOperation:operation];
36
+ }
37
+
38
+ - (NSOperationQueue*)getOperationQueue {
39
+ return operationQueue;
40
+ }
41
+
42
+
43
+ @end
44
+
45
+ NSOperationQueueWrapper::NSOperationQueueWrapper(bool currentQueue) {
46
+ if (currentQueue) {
47
+ NSOperationQueueWrapperObjC* objcWrapper = [[NSOperationQueueWrapperObjC alloc] initWithCurrentQueue];
48
+
49
+ CFTypeRef ptr = (__bridge_retained CFTypeRef)objcWrapper;
50
+
51
+ operationQueue = (void*)ptr;
52
+ }else {
53
+ NSOperationQueueWrapperObjC* objcWrapper = [[NSOperationQueueWrapperObjC alloc] init];
54
+ CFTypeRef ptr = (__bridge_retained CFTypeRef)objcWrapper;
55
+ operationQueue = (void*)ptr;
56
+ }
57
+
58
+ }
59
+
60
+ NSOperationQueueWrapper::~NSOperationQueueWrapper() {
61
+ if(operationQueue != nullptr){
62
+ CFBridgingRelease(operationQueue);
63
+ operationQueue = nullptr;
64
+ }
65
+ }
66
+
67
+ void NSOperationQueueWrapper::addOperation(std::function<void()> task) {
68
+
69
+ auto queue = (__bridge NSOperationQueueWrapperObjC*)(operationQueue);
70
+
71
+ [queue addOperation:^{
72
+ task();
73
+ }];
74
+ }
@@ -0,0 +1,35 @@
1
+ //
2
+ // Created by Osei Fortune on 10/06/2022.
3
+ //
4
+
5
+ #include "Caches.h"
6
+
7
+ std::shared_ptr <ConcurrentMap<v8::Isolate *, std::shared_ptr < Caches>>>
8
+ Caches::perIsolateCaches_ = std::make_shared < ConcurrentMap<v8::Isolate *, std::shared_ptr < Caches>>
9
+ >();
10
+
11
+ Caches::Caches(v8::Isolate *isolate) : isolate_(isolate) {}
12
+
13
+ Caches::~Caches() {}
14
+
15
+ std::shared_ptr <Caches> Caches::Get(v8::Isolate *isolate) {
16
+ std::shared_ptr <Caches> cache = Caches::perIsolateCaches_->Get(isolate);
17
+ if (cache == nullptr) {
18
+ cache = std::make_shared<Caches>(isolate);
19
+ Caches::perIsolateCaches_->Insert(isolate, cache);
20
+ }
21
+
22
+ return cache;
23
+ }
24
+
25
+ void Caches::Remove(v8::Isolate *isolate) {
26
+ Caches::perIsolateCaches_->Remove(isolate);
27
+ }
28
+
29
+ void Caches::SetContext(v8::Local<v8::Context> context) {
30
+ this->context_ = std::make_shared<v8::Persistent<v8::Context >>(this->isolate_, context);
31
+ }
32
+
33
+ v8::Local<v8::Context> Caches::GetContext() {
34
+ return this->context_->Get(this->isolate_);
35
+ }
@@ -0,0 +1,186 @@
1
+ //
2
+ // Created by Osei Fortune on 10/06/2022.
3
+ //
4
+
5
+ #pragma once
6
+
7
+ #include "Common.h"
8
+ #include "ConcurrentMap.h"
9
+
10
+ class Caches {
11
+ public:
12
+ Caches(v8::Isolate *isolate);
13
+
14
+ ~Caches();
15
+
16
+ static std::shared_ptr<Caches> Get(v8::Isolate *isolate);
17
+
18
+ static void Remove(v8::Isolate *isolate);
19
+
20
+ void SetContext(v8::Local<v8::Context> context);
21
+
22
+ v8::Local<v8::Context> GetContext();
23
+
24
+ std::unique_ptr<v8::Persistent<v8::FunctionTemplate>> TextDecoderTmpl = std::unique_ptr<v8::Persistent<v8::FunctionTemplate>>(
25
+ nullptr);
26
+
27
+ std::unique_ptr<v8::Persistent<v8::FunctionTemplate>> TextEncoderTmpl = std::unique_ptr<v8::Persistent<v8::FunctionTemplate>>(
28
+ nullptr);
29
+
30
+ std::unique_ptr<v8::Persistent<v8::FunctionTemplate>> Path2DTmpl = std::unique_ptr<v8::Persistent<v8::FunctionTemplate>>(
31
+ nullptr);
32
+
33
+ std::unique_ptr<v8::Persistent<v8::FunctionTemplate>> ImageDataTmpl = std::unique_ptr<v8::Persistent<v8::FunctionTemplate>>(
34
+ nullptr);
35
+
36
+ std::unique_ptr<v8::Persistent<v8::FunctionTemplate>> ImageAssetTmpl = std::unique_ptr<v8::Persistent<v8::FunctionTemplate>>(
37
+ nullptr);
38
+
39
+ std::unique_ptr<v8::Persistent<v8::FunctionTemplate>> CanvasGradientTmpl = std::unique_ptr<v8::Persistent<v8::FunctionTemplate>>(
40
+ nullptr);
41
+
42
+ std::unique_ptr<v8::Persistent<v8::FunctionTemplate>> CanvasPatternTmpl = std::unique_ptr<v8::Persistent<v8::FunctionTemplate>>(
43
+ nullptr);
44
+
45
+ std::unique_ptr<v8::Persistent<v8::FunctionTemplate>> MatrixTmpl = std::unique_ptr<v8::Persistent<v8::FunctionTemplate>>(
46
+ nullptr);
47
+
48
+ std::unique_ptr<v8::Persistent<v8::FunctionTemplate>> TextMetricsTmpl = std::unique_ptr<v8::Persistent<v8::FunctionTemplate>>(
49
+ nullptr);
50
+
51
+ std::unique_ptr<v8::Persistent<v8::FunctionTemplate>> CanvasRenderingContext2DTmpl = std::unique_ptr<v8::Persistent<v8::FunctionTemplate>>(
52
+ nullptr);
53
+
54
+ std::unique_ptr<v8::Persistent<v8::FunctionTemplate>> ImageBitmapTmpl = std::unique_ptr<v8::Persistent<v8::FunctionTemplate>>(
55
+ nullptr);
56
+
57
+ std::unique_ptr<v8::Persistent<v8::FunctionTemplate>> ANGLE_instanced_arraysTmpl = std::unique_ptr<v8::Persistent<v8::FunctionTemplate>>(
58
+ nullptr);
59
+
60
+ std::unique_ptr<v8::Persistent<v8::FunctionTemplate>> EXT_blend_minmaxTmpl = std::unique_ptr<v8::Persistent<v8::FunctionTemplate>>(
61
+ nullptr);
62
+
63
+ std::unique_ptr<v8::Persistent<v8::FunctionTemplate>> EXT_color_buffer_half_floatTmpl = std::unique_ptr<v8::Persistent<v8::FunctionTemplate>>(
64
+ nullptr);
65
+
66
+ std::unique_ptr<v8::Persistent<v8::FunctionTemplate>> WebGLQueryTmpl = std::unique_ptr<v8::Persistent<v8::FunctionTemplate>>(
67
+ nullptr);
68
+
69
+ std::unique_ptr<v8::Persistent<v8::FunctionTemplate>> EXT_disjoint_timer_queryTmpl = std::unique_ptr<v8::Persistent<v8::FunctionTemplate>>(
70
+ nullptr);
71
+
72
+ std::unique_ptr<v8::Persistent<v8::FunctionTemplate>> EXT_shader_texture_lodTmpl = std::unique_ptr<v8::Persistent<v8::FunctionTemplate>>(
73
+ nullptr);
74
+
75
+ std::unique_ptr<v8::Persistent<v8::FunctionTemplate>> WebGLActiveInfoTmpl = std::unique_ptr<v8::Persistent<v8::FunctionTemplate>>(
76
+ nullptr);
77
+
78
+ std::unique_ptr<v8::Persistent<v8::FunctionTemplate>> WebGLBufferTmpl = std::unique_ptr<v8::Persistent<v8::FunctionTemplate>>(
79
+ nullptr);
80
+
81
+ std::unique_ptr<v8::Persistent<v8::FunctionTemplate>> WebGLSamplerTmpl = std::unique_ptr<v8::Persistent<v8::FunctionTemplate>>(
82
+ nullptr);
83
+
84
+ std::unique_ptr<v8::Persistent<v8::FunctionTemplate>> WebGLSyncTmpl = std::unique_ptr<v8::Persistent<v8::FunctionTemplate>>(
85
+ nullptr);
86
+
87
+ std::unique_ptr<v8::Persistent<v8::FunctionTemplate>> WebGLTransformFeedbackTmpl = std::unique_ptr<v8::Persistent<v8::FunctionTemplate>>(
88
+ nullptr);
89
+
90
+ std::unique_ptr<v8::Persistent<v8::FunctionTemplate>> WebGLVertexArrayObjectTmpl = std::unique_ptr<v8::Persistent<v8::FunctionTemplate>>(
91
+ nullptr);
92
+
93
+ std::unique_ptr<v8::Persistent<v8::FunctionTemplate>> WebGLRenderingContextTmpl = std::unique_ptr<v8::Persistent<v8::FunctionTemplate>>(
94
+ nullptr);
95
+
96
+ std::unique_ptr<v8::Persistent<v8::FunctionTemplate>> WebGL2RenderingContextTmpl = std::unique_ptr<v8::Persistent<v8::FunctionTemplate>>(
97
+ nullptr);
98
+
99
+ std::unique_ptr<v8::Persistent<v8::FunctionTemplate>> WebGLProgramTmpl = std::unique_ptr<v8::Persistent<v8::FunctionTemplate>>(
100
+ nullptr);
101
+
102
+ std::unique_ptr<v8::Persistent<v8::FunctionTemplate>> WebGLShaderTmpl = std::unique_ptr<v8::Persistent<v8::FunctionTemplate>>(
103
+ nullptr);
104
+
105
+ std::unique_ptr<v8::Persistent<v8::FunctionTemplate>> WebGLFramebufferTmpl = std::unique_ptr<v8::Persistent<v8::FunctionTemplate>>(
106
+ nullptr);
107
+
108
+ std::unique_ptr<v8::Persistent<v8::FunctionTemplate>> WebGLRenderbufferTmpl = std::unique_ptr<v8::Persistent<v8::FunctionTemplate>>(
109
+ nullptr);
110
+
111
+ std::unique_ptr<v8::Persistent<v8::FunctionTemplate>> WebGLTextureTmpl = std::unique_ptr<v8::Persistent<v8::FunctionTemplate>>(
112
+ nullptr);
113
+
114
+ std::unique_ptr<v8::Persistent<v8::FunctionTemplate>> OES_fbo_render_mipmapTmpl = std::unique_ptr<v8::Persistent<v8::FunctionTemplate>>(
115
+ nullptr);
116
+
117
+ std::unique_ptr<v8::Persistent<v8::FunctionTemplate>> EXT_sRGBTmpl = std::unique_ptr<v8::Persistent<v8::FunctionTemplate>>(
118
+ nullptr);
119
+
120
+ std::unique_ptr<v8::Persistent<v8::FunctionTemplate>> EXT_texture_filter_anisotropicTmpl = std::unique_ptr<v8::Persistent<v8::FunctionTemplate>>(
121
+ nullptr);
122
+
123
+ std::unique_ptr<v8::Persistent<v8::FunctionTemplate>> OES_element_index_uintTmpl = std::unique_ptr<v8::Persistent<v8::FunctionTemplate>>(
124
+ nullptr);
125
+
126
+ std::unique_ptr<v8::Persistent<v8::FunctionTemplate>> OES_standard_derivativesTmpl = std::unique_ptr<v8::Persistent<v8::FunctionTemplate>>(
127
+ nullptr);
128
+
129
+ std::unique_ptr<v8::Persistent<v8::FunctionTemplate>> OES_texture_floatTmpl = std::unique_ptr<v8::Persistent<v8::FunctionTemplate>>(
130
+ nullptr);
131
+
132
+ std::unique_ptr<v8::Persistent<v8::FunctionTemplate>> OES_texture_float_linearTmpl = std::unique_ptr<v8::Persistent<v8::FunctionTemplate>>(
133
+ nullptr);
134
+
135
+ std::unique_ptr<v8::Persistent<v8::FunctionTemplate>> OES_texture_half_float_linearTmpl = std::unique_ptr<v8::Persistent<v8::FunctionTemplate>>(
136
+ nullptr);
137
+
138
+ std::unique_ptr<v8::Persistent<v8::FunctionTemplate>> OES_texture_half_floatTmpl = std::unique_ptr<v8::Persistent<v8::FunctionTemplate>>(
139
+ nullptr);
140
+
141
+ std::unique_ptr<v8::Persistent<v8::FunctionTemplate>> WEBGL_color_buffer_floatTmpl = std::unique_ptr<v8::Persistent<v8::FunctionTemplate>>(
142
+ nullptr);
143
+
144
+ std::unique_ptr<v8::Persistent<v8::FunctionTemplate>> OES_vertex_array_objectTmpl = std::unique_ptr<v8::Persistent<v8::FunctionTemplate>>(
145
+ nullptr);
146
+
147
+ std::unique_ptr<v8::Persistent<v8::FunctionTemplate>> WEBGL_compressed_texture_atcTmpl = std::unique_ptr<v8::Persistent<v8::FunctionTemplate>>(
148
+ nullptr);
149
+
150
+ std::unique_ptr<v8::Persistent<v8::FunctionTemplate>> WEBGL_compressed_texture_etc1Tmpl = std::unique_ptr<v8::Persistent<v8::FunctionTemplate>>(
151
+ nullptr);
152
+
153
+ std::unique_ptr<v8::Persistent<v8::FunctionTemplate>> WEBGL_compressed_texture_s3tcTmpl = std::unique_ptr<v8::Persistent<v8::FunctionTemplate>>(
154
+ nullptr);
155
+
156
+ std::unique_ptr<v8::Persistent<v8::FunctionTemplate>> WEBGL_compressed_texture_s3tc_srgbTmpl = std::unique_ptr<v8::Persistent<v8::FunctionTemplate>>(
157
+ nullptr);
158
+
159
+ std::unique_ptr<v8::Persistent<v8::FunctionTemplate>> WEBGL_compressed_texture_etcTmpl = std::unique_ptr<v8::Persistent<v8::FunctionTemplate>>(
160
+ nullptr);
161
+
162
+ std::unique_ptr<v8::Persistent<v8::FunctionTemplate>> WEBGL_compressed_texture_pvrtcTmpl = std::unique_ptr<v8::Persistent<v8::FunctionTemplate>>(
163
+ nullptr);
164
+
165
+ std::unique_ptr<v8::Persistent<v8::FunctionTemplate>> WEBGL_lose_contextTmpl = std::unique_ptr<v8::Persistent<v8::FunctionTemplate>>(
166
+ nullptr);
167
+
168
+ std::unique_ptr<v8::Persistent<v8::FunctionTemplate>> WEBGL_depth_textureTmpl = std::unique_ptr<v8::Persistent<v8::FunctionTemplate>>(
169
+ nullptr);
170
+
171
+ std::unique_ptr<v8::Persistent<v8::FunctionTemplate>> WEBGL_draw_buffersTmpl = std::unique_ptr<v8::Persistent<v8::FunctionTemplate>>(
172
+ nullptr);
173
+
174
+ std::unique_ptr<v8::Persistent<v8::FunctionTemplate>> WebGLShaderPrecisionFormatTmpl = std::unique_ptr<v8::Persistent<v8::FunctionTemplate>>(
175
+ nullptr);
176
+
177
+ std::unique_ptr<v8::Persistent<v8::FunctionTemplate>> WebGLUniformLocationTmpl = std::unique_ptr<v8::Persistent<v8::FunctionTemplate>>(
178
+ nullptr);
179
+
180
+ private:
181
+ static std::shared_ptr<ConcurrentMap<v8::Isolate *,
182
+ std::shared_ptr<Caches>>>
183
+ perIsolateCaches_;
184
+ v8::Isolate *isolate_;
185
+ std::shared_ptr<v8::Persistent<v8::Context>> context_;
186
+ };