diff --git a/CanvasNative.podspec b/CanvasNative.podspec index 68f74ebe..41f78db5 100644 --- a/CanvasNative.podspec +++ b/CanvasNative.podspec @@ -2,7 +2,7 @@ Pod::Spec.new do |s| s.name = "CanvasNative" - s.version = "1.0.0-alpha.3" + s.version = "1.0.0-alpha.11" s.summary = "A Canvas library" @@ -18,11 +18,11 @@ Pod::Spec.new do |s| s.source = { :git => "https://github.com/nativescript/canvas.git", :tag => "#{s.version}" } s.pod_target_xcconfig = { - 'FRAMEWORK_SEARCH_PATHS' => '$(inherited) "${PODS_ROOT}/CanvasNative/Dist"', + 'FRAMEWORK_SEARCH_PATHS' => '$(inherited) "${PODS_ROOT}/dist"', 'ENABLE_BITCODE' => 'YES', 'EXCLUDED_ARCHS[sdk=iphonesimulator*]' => '"arm64"', } s.swift_versions = ['4.0','4.2', '5.0'] - s.vendored_frameworks = 'packages/canvas/src-native/canvas-ios/CanvasNative/Dist/CanvasNative.xcframework' - s.preserve_paths = 'packages/canvas/src-native/canvas-ios/CanvasNative/Dist/CanvasNative.xcframework' + s.vendored_frameworks = 'packages/canvas/src-native/canvas-ios/dist/CanvasNative.xcframework' + s.preserve_paths = 'packages/canvas/src-native/canvas-ios/dist/CanvasNative.xcframework' end diff --git a/apps/demo/package.json b/apps/demo/package.json index a3cadbe5..a3393b85 100644 --- a/apps/demo/package.json +++ b/apps/demo/package.json @@ -28,7 +28,7 @@ "zen-3d": "file:../../node_modules/zen-3d" }, "devDependencies": { - "@nativescript/android": "8.2.0-alpha.2", - "@nativescript/ios": "8.0.0" + "@nativescript/android": "8.1.1", + "@nativescript/ios": "8.1.0" } } diff --git a/apps/demo/src/app.ts b/apps/demo/src/app.ts index 24afc973..bc132d18 100644 --- a/apps/demo/src/app.ts +++ b/apps/demo/src/app.ts @@ -1,2 +1,3 @@ +require('@nativescript/canvas-polyfill'); import { Application } from '@nativescript/core'; Application.run({ moduleName: 'app-root' }); diff --git a/apps/demo/src/plugin-demos/canvas.ts b/apps/demo/src/plugin-demos/canvas.ts index 8e97dd3e..63d3837b 100644 --- a/apps/demo/src/plugin-demos/canvas.ts +++ b/apps/demo/src/plugin-demos/canvas.ts @@ -1,10 +1,57 @@ -import {EventData, Page} from '@nativescript/core'; -import {DemoSharedCanvas} from '@demo/shared'; +import { EventData, Page, WebView } from '@nativescript/core'; +import { DemoSharedCanvas } from '@demo/shared'; export function navigatingTo(args: EventData) { const page = args.object; page.bindingContext = new DemoModel(); } +export function loaded(args) { + const view = args.object; + view.src = ` + + + + + + +`; +} + export class DemoModel extends DemoSharedCanvas { } diff --git a/apps/demo/src/plugin-demos/canvas.xml b/apps/demo/src/plugin-demos/canvas.xml index 310b1511..7651192c 100644 --- a/apps/demo/src/plugin-demos/canvas.xml +++ b/apps/demo/src/plugin-demos/canvas.xml @@ -4,8 +4,9 @@ - + + @@ -314,7 +314,7 @@ class MainActivity : AppCompatActivity() { } - fun issue54(){ + fun issue54() { executor.execute { try { val patternFile = File(filesDir, "pattern.svg") @@ -328,15 +328,14 @@ class MainActivity : AppCompatActivity() { url.openStream().use { input -> fs.use { output -> input.copyTo(output) + input.close() } + fs.close() } val ctx = canvas?.getContext("2d") as TNSCanvasRenderingContext2D? - val asset = TNSImageAsset() val bm = BitmapFactory.decodeFile(patternFile.absolutePath) val pattern = ctx?.createPattern(bm) - Log.d("com.test","issue54") - Log.d("com.test", "" + pattern) } catch (e: IOException) { e.printStackTrace() } @@ -829,31 +828,39 @@ class MainActivity : AppCompatActivity() { } fun drawRemoteGLImage(canvas: TNSCanvas) { - runBlocking { - val downloader = suspendCoroutine { - val file = File(filesDir, "ff.png") - if (file.exists()) { - it.resume(file) - } else { - val url = - URL("https://github.com/mdn/webgl-examples/raw/gh-pages/tutorial/sample6/cubetexture.png") - val fs = FileOutputStream(file) - url.openStream().use { input -> - fs.use { output -> - input.copyTo(output) - } + executor.execute { + val file = File(filesDir, "ff.png") + Log.d("Canvas", "drawRemoteGLImage ${file.absolutePath}") + if (!file.exists()) { + val url = + URL("https://github.com/mdn/webgl-examples/raw/gh-pages/tutorial/sample6/cubetexture.png") + val fs = FileOutputStream(file) + url.openStream().use { input -> + fs.use { output -> + input.copyTo(output) } - it.resume(file) } } + val asset = TNSImageAsset() - asset.loadImageFromPathAsync(downloader.absolutePath, object : Callback { + asset.loadImageFromPathAsync(file.absolutePath, object : Callback { override fun onSuccess(value: Any?) { + Log.d("Canvas", "w ${asset.width} h ${asset.height}") drawGLImage(canvas, asset) +// TNSImageBitmap.createFromImageAsset(asset, TNSImageBitmap.Options(), object: TNSImageBitmap.Callback{ +// override fun onSuccess(result: TNSImageBitmap) { +// Log.d("Canvas", "imageBitmap w ${result.width} h ${result.height}") +// drawGLImage(canvas, result) +// } +// +// override fun onError(message: String) { +// Log.e("Canvas"," bitmap onError $message") +// } +// }) } override fun onError(error: String?) { - println(error) + Log.e("Canvas", "onError asset ${error ?: ""}") } }) } @@ -919,11 +926,15 @@ class MainActivity : AppCompatActivity() { ctx3d.texParameteri(ctx3d.TEXTURE_2D, ctx3d.TEXTURE_MIN_FILTER, ctx3d.NEAREST); ctx3d.texParameteri(ctx3d.TEXTURE_2D, ctx3d.TEXTURE_MAG_FILTER, ctx3d.NEAREST); (image as? TNSImageAsset)?.let { - ctx3d.texImage2D(ctx3d.TEXTURE_2D, 0, ctx3d.RGBA, ctx3d.RGBA, ctx3d.UNSIGNED_BYTE, it); + ctx3d.texImage2D(ctx3d.TEXTURE_2D, 0, ctx3d.RGBA, ctx3d.RGBA, ctx3d.UNSIGNED_BYTE, it) } (image as? Bitmap)?.let { - ctx3d.texImage2D(ctx3d.TEXTURE_2D, 0, ctx3d.RGBA, ctx3d.RGBA, ctx3d.UNSIGNED_BYTE, it); + ctx3d.texImage2D(ctx3d.TEXTURE_2D, 0, ctx3d.RGBA, ctx3d.RGBA, ctx3d.UNSIGNED_BYTE, it) + } + + (image as? TNSImageBitmap)?.let { + ctx3d.texImage2D(ctx3d.TEXTURE_2D, 0, ctx3d.RGBA, ctx3d.RGBA, ctx3d.UNSIGNED_BYTE, it) } ctx3d.enableVertexAttribArray(vloc); @@ -1424,32 +1435,38 @@ class MainActivity : AppCompatActivity() { fun drawPattern(canvas: TNSCanvas) { - val img = File(filesDir, "Canvas_createpattern.png") + executor.execute { + val img = File(filesDir, "Canvas_createpattern.png") - val asset = TNSImageAsset() + val asset = TNSImageAsset() - if (img.exists()) { - asset.loadImageFromPath(img.absolutePath) - } else { - val url = URL("https://mdn.mozillademos.org/files/222/Canvas_createpattern.png") - val fs = FileOutputStream(img) - url.openStream().use { input -> - fs.use { output -> - input.copyTo(output) + if(img.exists() && img.length() == 0L){ + img.delete() + } + + if (img.exists()) { + asset.loadImageFromPath(img.absolutePath) + } else { + val url = URL("https://mdn.mozillademos.org/files/222/Canvas_createpattern.png") + val fs = FileOutputStream(img) + url.openStream().use { input -> + fs.use { output -> + input.copyTo(output) + } } + asset.loadImageFromPath(img.absolutePath) } - asset.loadImageFromPath(img.absolutePath) - } - val ctx = canvas.getContext("2d") as TNSCanvasRenderingContext2D - val pattern = ctx.createPattern(asset, TNSPatternRepetition.Repeat) - pattern?.let { - ctx.fillStyle = it - } - ctx.fillRect(0f, 0f, 300f, 300f); + val ctx = canvas.getContext("2d") as TNSCanvasRenderingContext2D + val pattern = ctx.createPattern(asset, TNSPatternRepetition.Repeat) + pattern?.let { + ctx.fillStyle = it + } + ctx.fillRect(0f, 0f, 300f, 300f); + } } var didPause = false; @@ -1505,27 +1522,27 @@ class MainActivity : AppCompatActivity() { @SuppressLint("NewApi") fun drawFill(view: View) { - issue54() + //issue54() //addPath(canvas!!) //decodeFile() //drawRemoteGLImage(canvas!!) - // ctx = canvas?.getContext("2d") as TNSCanvasRenderingContext2D? + // ctx = canvas?.getContext("2d") as TNSCanvasRenderingContext2D? //drawText(ctx!!) // ballExample(ctx!!) - //drawPattern(canvas!!) - //drawFace(ctx!!) + drawPattern(canvas!!) + //drawFace(ctx!!) //drawPattern(canvas!!) // drawElements(canvas!!) // drawPatterWithCanvas(canvas!!) - // executor.submit { - // drawPatterWithCanvas(canvas!!) - // drawPatterWithCanvas(canvas!!) - // canvas?.isHandleInvalidationManually = true - //drawElements(canvas!!) - //ctx = canvas?.getContext("2d") as CanvasRenderingContext2D? - //drawFace(ctx!!) - //canvas?.flush() - // ballExample(ctx!!) + // executor.submit { + // drawPatterWithCanvas(canvas!!) + // drawPatterWithCanvas(canvas!!) + // canvas?.isHandleInvalidationManually = true + //drawElements(canvas!!) + //ctx = canvas?.getContext("2d") as CanvasRenderingContext2D? + //drawFace(ctx!!) + //canvas?.flush() + // ballExample(ctx!!) //} //getImageData(ctx!!) // drawImageExample(ctx!!) diff --git a/packages/canvas/src-native/canvas-android/build.gradle b/packages/canvas/src-native/canvas-android/build.gradle index 160d2e66..7e8e1957 100644 --- a/packages/canvas/src-native/canvas-android/build.gradle +++ b/packages/canvas/src-native/canvas-android/build.gradle @@ -8,9 +8,9 @@ buildscript { mavenCentral() } dependencies { - classpath 'com.android.tools.build:gradle:4.1.3' + classpath 'com.android.tools.build:gradle:7.0.2' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" - classpath 'com.vanniktech:gradle-maven-publish-plugin:0.14.2' + classpath 'com.vanniktech:gradle-maven-publish-plugin:0.18.0' classpath 'org.jetbrains.dokka:dokka-gradle-plugin:1.4.10.2' } } diff --git a/packages/canvas/src-native/canvas-android/canvas/build.gradle b/packages/canvas/src-native/canvas-android/canvas/build.gradle index fd63999f..a410199b 100644 --- a/packages/canvas/src-native/canvas-android/canvas/build.gradle +++ b/packages/canvas/src-native/canvas-android/canvas/build.gradle @@ -17,10 +17,10 @@ project.ext { } android { - compileSdkVersion 30 + compileSdkVersion 31 defaultConfig { minSdkVersion 17 - targetSdkVersion 30 + targetSdkVersion 31 versionCode 1 versionName "1.0" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" diff --git a/packages/canvas/src-native/canvas-android/canvas/gradle.properties b/packages/canvas/src-native/canvas-android/canvas/gradle.properties index c651d6d7..f8d394c4 100644 --- a/packages/canvas/src-native/canvas-android/canvas/gradle.properties +++ b/packages/canvas/src-native/canvas-android/canvas/gradle.properties @@ -1,7 +1,7 @@ GROUP=org.nativescript POM_ARTIFACT_ID=canvas -VERSION_NAME=0.9.16 +VERSION_NAME=1.0.0-alpha.12 POM_NAME=canvas POM_PACKAGING=aar diff --git a/packages/canvas/src-native/canvas-android/canvas/publish.gradle b/packages/canvas/src-native/canvas-android/canvas/publish.gradle index f7dd4315..1567a4dd 100644 --- a/packages/canvas/src-native/canvas-android/canvas/publish.gradle +++ b/packages/canvas/src-native/canvas-android/canvas/publish.gradle @@ -1,32 +1,143 @@ -apply plugin: 'maven' apply plugin: 'signing' +apply plugin: 'maven-publish' +apply plugin: "com.vanniktech.maven.publish" -tasks.withType(Javadoc) { - failOnError false - options.addStringOption('Xdoclint:none', '-quiet') - options.addStringOption('encoding', 'UTF-8') - options.addStringOption('charSet', 'UTF-8') -} +//tasks.withType(Javadoc) { +// failOnError false +// options.addStringOption('Xdoclint:none', '-quiet') +// options.addStringOption('encoding', 'UTF-8') +// options.addStringOption('charSet', 'UTF-8') +//} +// +//task sourceJar(type: Jar) { +// from android.sourceSets.main.java.srcDirs +// classifier "sources" +//} -task sourceJar(type: Jar) { - from android.sourceSets.main.java.srcDirs - classifier "sources" -} +allprojects { + plugins.withId("com.vanniktech.maven.publish") { + mavenPublish { + sonatypeHost = "S01" + } + } + plugins.withId("com.vanniktech.maven.base") { + group = "org.nativescript" + archivesBaseName = "canvas" + version = "1.0.0-alpha.12" -signing { - sign configurations.archives + mavenPublishing { + publishToMavenCentral("DEFAULT") + + // Will only apply to non snapshot builds. + // Uses credentials as described above, supports both regular and in memory signing. + signAllPublications() + + pom { + name = "CanvasNative" + packaging = 'aar' + description = "DOM Canvas API for Android" + inceptionYear = "2019" + url = 'https://github.com/NativeScript/canvas' + + licenses { + license { + name = "The Apache License, Version 2.0" + url = "http://www.apache.org/licenses/LICENSE-2.0.txt" + distribution = "http://www.apache.org/licenses/LICENSE-2.0.txt" + } + } + + developers { + developer { + id = 'triniwiz' + name = 'Osei Fortune' + email = 'fortune.osei@yahoo.com' + url = "https://github.com/triniwiz/" + } + } + + scm { + connection = 'scm:git@github.com:nativescript/canvas.git' + developerConnection = 'scm:git@github.com:nativescript/canvas.git' + url = 'https://github.com/NativeScript/canvas' + } + } + + pomFromGradleProperties() + } + } } -group = "org.nativescript" -archivesBaseName = "canvas" -version = "1.0.0-alpha.4" +//signing { +// sign configurations.archives +//} + + +//group = "org.nativescript" +//archivesBaseName = "canvas" +//version = "1.0.0-alpha.4" + +//afterEvaluate { +// publishing { +// publications { +// maven(MavenPublication) { +// repository(url: "https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/") { +// authentication(userName: ossrhUsername, password: ossrhPassword) +// } +// +// snapshotRepository(url: "https://s01.oss.sonatype.org/content/repositories/snapshots/") { +// authentication(userName: ossrhUsername, password: ossrhPassword) +// } +// +// pom.project { +// name "CanvasNative" +// packaging 'aar' +// description "DOM Canvas API for Android" +// url 'https://github.com/NativeScript/canvas' +// +// scm { +// connection 'scm:git@github.com:nativescript/canvas.git' +// developerConnection 'scm:git@github.com:nativescript/canvas.git' +// url 'https://github.com/NativeScript/canvas' +// } +// +// licenses { +// license { +// name 'The Apache License, Version 2.0' +// url 'http://www.apache.org/licenses/LICENSE-2.0.txt' +// } +// } +// +// developers { +// developer { +// id 'triniwiz' +// name 'Osei Fortune' +// email 'fortune.osei@yahoo.com' +// } +// } +// } +// } +// } +// repositories { +// def releasesRepoUrl = "https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/" +// def snapshotsRepoUrl = "https://s01.oss.sonatype.org/content/repositories/snapshots/" +// url = version.endsWith('SNAPSHOT') ? snapshotsRepoUrl : releasesRepoUrl +// } +// } +// +// signing { +// sign publishing.publications.maven +// } +//} + +/* uploadArchives { repositories { mavenDeployer { - beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) } + // beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) } repository(url: "https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/") { authentication(userName: ossrhUsername, password: ossrhPassword) @@ -66,3 +177,6 @@ uploadArchives { } } } +*/ + + diff --git a/packages/canvas/src-native/canvas-android/canvas/src/main/java/org/nativescript/canvas/GLContext.kt b/packages/canvas/src-native/canvas-android/canvas/src/main/java/org/nativescript/canvas/GLContext.kt index a68fca63..f90df160 100644 --- a/packages/canvas/src-native/canvas-android/canvas/src/main/java/org/nativescript/canvas/GLContext.kt +++ b/packages/canvas/src-native/canvas-android/canvas/src/main/java/org/nativescript/canvas/GLContext.kt @@ -91,7 +91,7 @@ internal class GLContext { ) ) } - if (canvasView.nativeContext > 0) { + if (canvasView.nativeContext != 0L) { val frameBuffers = IntArray(1) GLES20.glGetIntegerv(GLES20.GL_FRAMEBUFFER_BINDING, frameBuffers, 0) var samples = 0 @@ -118,7 +118,7 @@ internal class GLContext { if (!mGLThread!!.getPaused() && !swapBuffers(mEGLSurface)) { Log.e("JS", "GLContext: Cannot swap buffers!") } - if (canvasView.nativeContext > 0) { + if (canvasView.nativeContext != 0L) { GLES20.glViewport(0, 0, width, height) val frameBuffers = IntArray(1) GLES20.glGetIntegerv(GLES20.GL_FRAMEBUFFER_BINDING, frameBuffers, 0) @@ -146,7 +146,7 @@ internal class GLContext { } fun flush() { - queueEvent(Runnable { + queueEvent { if (reference != null) { val canvasView = reference!!.get() if (canvasView != null && canvasView.nativeContext != 0L && canvasView.pendingInvalidate) { @@ -165,7 +165,7 @@ internal class GLContext { } } } - }) + } } fun createEglSurface(surface: Any): EGLSurface { @@ -175,9 +175,8 @@ internal class GLContext { return mEGL!!.eglCreateWindowSurface(mEGLDisplay, mEGLConfig, surface, surfaceAttribs) } - fun makeEglSurfaceCurrent(surface: EGLSurface) { - mEGL!!.eglMakeCurrent(mEGLDisplay, surface, surface, mEGLContext) + mEGL?.eglMakeCurrent(mEGLDisplay, surface, surface, mEGLContext) } fun createSurface(config: EGLConfig?, surface: Any?): EGLSurface { @@ -197,11 +196,11 @@ internal class GLContext { height = 1 } } - val surfaceAttribs = intArrayOf( - EGL10.EGL_WIDTH, width, - EGL10.EGL_HEIGHT, height, - EGL10.EGL_NONE - ) +// val surfaceAttribs = intArrayOf( +// EGL10.EGL_WIDTH, width, +// EGL10.EGL_HEIGHT, height, +// EGL10.EGL_NONE +// ) textureId += 1 offscreenTexture = SurfaceTexture(textureId) // return mEGL.eglCreatePbufferSurface(mEGLDisplay, config, surfaceAttribs); @@ -213,26 +212,22 @@ internal class GLContext { fun onPause() { queueEvent(Runnable { - if (mEGL != null) { - mEGL!!.eglMakeCurrent( - mEGLDisplay, - EGL10.EGL_NO_SURFACE, - EGL10.EGL_NO_SURFACE, - EGL10.EGL_NO_CONTEXT - ) - } - if (mGLThread != null) { - mGLThread!!.setPaused(true) - } + mEGL?.eglMakeCurrent( + mEGLDisplay, + EGL10.EGL_NO_SURFACE, + EGL10.EGL_NO_SURFACE, + EGL10.EGL_NO_CONTEXT + ) + mGLThread?.setPaused(true) }) } fun onResume() { - queueEvent(Runnable { - if (mGLThread != null) { - mGLThread!!.setPaused(false) + if (mGLThread?.isPaused == true) { + queueEvent { + mGLThread?.setPaused(false) } - }) + } } fun makeCurrent(surface: EGLSurface?): Boolean { @@ -577,7 +572,6 @@ internal class GLContext { view.drawingBufferHeight = 1 } - Log.d("com.test", "${view.drawingBufferWidth} ${view.drawingBufferHeight}") GLES20.glViewport(0, 0, view.drawingBufferWidth, view.drawingBufferHeight) GLES20.glGetIntegerv(GLES20.GL_FRAMEBUFFER_BINDING, frameBuffers, 0) var samples = 0 diff --git a/packages/canvas/src-native/canvas-android/canvas/src/main/java/org/nativescript/canvas/TNSCanvas.kt b/packages/canvas/src-native/canvas-android/canvas/src/main/java/org/nativescript/canvas/TNSCanvas.kt index a8bc9cc3..eb2a5d36 100644 --- a/packages/canvas/src-native/canvas-android/canvas/src/main/java/org/nativescript/canvas/TNSCanvas.kt +++ b/packages/canvas/src-native/canvas-android/canvas/src/main/java/org/nativescript/canvas/TNSCanvas.kt @@ -24,6 +24,7 @@ import java.nio.ByteBuffer import java.util.* import java.util.concurrent.ConcurrentHashMap import java.util.concurrent.CountDownLatch +import java.util.concurrent.TimeUnit /** @@ -209,6 +210,10 @@ class TNSCanvas : FrameLayout, FrameCallback, ActivityLifecycleCallbacks { surface?.gLContext?.onResume() } + fun destroy(){ + surface?.gLContext?.destroy(); + } + @Synchronized @Throws(Throwable::class) protected fun finalize() { @@ -266,7 +271,7 @@ class TNSCanvas : FrameLayout, FrameCallback, ActivityLifecycleCallbacks { lock.countDown() }) try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignore: InterruptedException) { } return data[0] @@ -290,7 +295,7 @@ class TNSCanvas : FrameLayout, FrameCallback, ActivityLifecycleCallbacks { lock.countDown() }) try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignore: InterruptedException) { } return ss[0] @@ -345,7 +350,7 @@ class TNSCanvas : FrameLayout, FrameCallback, ActivityLifecycleCallbacks { lock.countDown() }) try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignore: InterruptedException) { } return data[0] diff --git a/packages/canvas/src-native/canvas-android/canvas/src/main/java/org/nativescript/canvas/TNSCanvasRenderingContext2D.kt b/packages/canvas/src-native/canvas-android/canvas/src/main/java/org/nativescript/canvas/TNSCanvasRenderingContext2D.kt index 6341afcd..14f0260a 100644 --- a/packages/canvas/src-native/canvas-android/canvas/src/main/java/org/nativescript/canvas/TNSCanvasRenderingContext2D.kt +++ b/packages/canvas/src-native/canvas-android/canvas/src/main/java/org/nativescript/canvas/TNSCanvasRenderingContext2D.kt @@ -5,6 +5,7 @@ import android.util.Log import org.json.JSONException import org.json.JSONObject import java.util.concurrent.CountDownLatch +import java.util.concurrent.TimeUnit /** * Created by triniwiz on 2019-07-06 @@ -31,7 +32,7 @@ class TNSCanvasRenderingContext2D internal constructor(val canvas: TNSCanvas) : lock.countDown() } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (e: Exception) { } return value @@ -65,7 +66,7 @@ class TNSCanvasRenderingContext2D internal constructor(val canvas: TNSCanvas) : lock.countDown() } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (e: Exception) { } return value @@ -100,7 +101,7 @@ class TNSCanvasRenderingContext2D internal constructor(val canvas: TNSCanvas) : lock.countDown() } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (e: Exception) { } return value @@ -133,7 +134,7 @@ class TNSCanvasRenderingContext2D internal constructor(val canvas: TNSCanvas) : } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (e: Exception) { } return value @@ -168,7 +169,7 @@ class TNSCanvasRenderingContext2D internal constructor(val canvas: TNSCanvas) : lock.countDown() } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (e: Exception) { } return value @@ -188,7 +189,7 @@ class TNSCanvasRenderingContext2D internal constructor(val canvas: TNSCanvas) : lock.countDown() } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (e: Exception) { } return value @@ -208,7 +209,7 @@ class TNSCanvasRenderingContext2D internal constructor(val canvas: TNSCanvas) : lock.countDown() } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (e: Exception) { } return value @@ -229,7 +230,7 @@ class TNSCanvasRenderingContext2D internal constructor(val canvas: TNSCanvas) : lock.countDown() } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (e: Exception) { } return value @@ -249,7 +250,7 @@ class TNSCanvasRenderingContext2D internal constructor(val canvas: TNSCanvas) : lock.countDown() } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (e: Exception) { } return value @@ -270,7 +271,7 @@ class TNSCanvasRenderingContext2D internal constructor(val canvas: TNSCanvas) : lock.countDown() } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (e: Exception) { } return value @@ -291,7 +292,7 @@ class TNSCanvasRenderingContext2D internal constructor(val canvas: TNSCanvas) : lock.countDown() } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (e: Exception) { } return value @@ -314,7 +315,7 @@ class TNSCanvasRenderingContext2D internal constructor(val canvas: TNSCanvas) : lock.countDown() } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (e: java.lang.Exception) { } return value @@ -336,7 +337,7 @@ class TNSCanvasRenderingContext2D internal constructor(val canvas: TNSCanvas) : lock.countDown() } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (e: java.lang.Exception) { } return value @@ -359,7 +360,7 @@ class TNSCanvasRenderingContext2D internal constructor(val canvas: TNSCanvas) : lock.countDown() } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (e: java.lang.Exception) { } return value @@ -379,7 +380,7 @@ class TNSCanvasRenderingContext2D internal constructor(val canvas: TNSCanvas) : lock.countDown() } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (e: java.lang.Exception) { } return value @@ -399,7 +400,7 @@ class TNSCanvasRenderingContext2D internal constructor(val canvas: TNSCanvas) : lock.countDown() } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (e: java.lang.Exception) { } return value @@ -418,7 +419,7 @@ class TNSCanvasRenderingContext2D internal constructor(val canvas: TNSCanvas) : lock.countDown() } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (e: java.lang.Exception) { } return value @@ -438,7 +439,7 @@ class TNSCanvasRenderingContext2D internal constructor(val canvas: TNSCanvas) : lock.countDown() } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (e: java.lang.Exception) { } return value @@ -459,7 +460,7 @@ class TNSCanvasRenderingContext2D internal constructor(val canvas: TNSCanvas) : lock.countDown() } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (e: java.lang.Exception) { } return value @@ -482,7 +483,7 @@ class TNSCanvasRenderingContext2D internal constructor(val canvas: TNSCanvas) : lock.countDown() } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (e: java.lang.Exception) { } return value @@ -508,7 +509,7 @@ class TNSCanvasRenderingContext2D internal constructor(val canvas: TNSCanvas) : lock.countDown() } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (e: Exception) { } return value ?: TNSDOMMatrix() @@ -830,13 +831,39 @@ class TNSCanvasRenderingContext2D internal constructor(val canvas: TNSCanvas) : data, width, height, repetition ) - if (id > 0L) { + if (id != 0L) { value = TNSPattern(id) } lock.countDown() } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) + } catch (e: Exception) { + } + return value + } + + + private fun createPatternEncoded( + data: ByteArray, + repetition: Int + ): TNSPattern? { + printLog("createPattern: imagebitmap") + val lock = CountDownLatch(1) + var value: TNSPattern? = null + canvas.queueEvent { + val id = nativeCreatePatternEncoded( + canvas.nativeContext, + data, repetition + ) + + if (id != 0L) { + value = TNSPattern(id) + } + lock.countDown() + } + try { + lock.await(2, TimeUnit.SECONDS) } catch (e: Exception) { } return value @@ -855,13 +882,13 @@ class TNSCanvasRenderingContext2D internal constructor(val canvas: TNSCanvas) : canvas.nativeContext, src.nativeImageAsset, repetition.toNative() ) - if (id > 0L) { + if (id != 0L) { value = TNSPattern(id) } lock.countDown() } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (e: java.lang.Exception) { } return value @@ -880,13 +907,13 @@ class TNSCanvasRenderingContext2D internal constructor(val canvas: TNSCanvas) : canvas.nativeContext, src.nativeImageAsset, repetition.toNative() ) - if (id > 0L) { + if (id != 0L) { value = TNSPattern(id) } lock.countDown() } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (e: java.lang.Exception) { } return value @@ -1011,7 +1038,6 @@ class TNSCanvasRenderingContext2D internal constructor(val canvas: TNSCanvas) : }) } - fun drawImage(bitmap: TNSImageBitmap, dx: Float, dy: Float) { printLog("drawImage: bitmap") canvas.queueEvent(Runnable { @@ -1099,7 +1125,6 @@ class TNSCanvasRenderingContext2D internal constructor(val canvas: TNSCanvas) : }) } - fun drawImage(bitmap: TNSImageBitmap, dx: Float, dy: Float, dWidth: Float, dHeight: Float) { printLog("drawImage: bitmap") canvas.queueEvent(Runnable { @@ -1327,7 +1352,7 @@ class TNSCanvasRenderingContext2D internal constructor(val canvas: TNSCanvas) : lock.countDown() } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (e: Exception) { } return value ?: TNSImageData(sw.toInt(), sh.toInt(), -1) @@ -1374,7 +1399,7 @@ class TNSCanvasRenderingContext2D internal constructor(val canvas: TNSCanvas) : lock.countDown() } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (e: java.lang.Exception) { } return value @@ -1393,7 +1418,7 @@ class TNSCanvasRenderingContext2D internal constructor(val canvas: TNSCanvas) : lock.countDown() } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (e: java.lang.Exception) { } return value diff --git a/packages/canvas/src-native/canvas-android/canvas/src/main/java/org/nativescript/canvas/TNSImageAsset.kt b/packages/canvas/src-native/canvas-android/canvas/src/main/java/org/nativescript/canvas/TNSImageAsset.kt index 644e6ca6..ffec1570 100644 --- a/packages/canvas/src-native/canvas-android/canvas/src/main/java/org/nativescript/canvas/TNSImageAsset.kt +++ b/packages/canvas/src-native/canvas-android/canvas/src/main/java/org/nativescript/canvas/TNSImageAsset.kt @@ -8,6 +8,7 @@ import java.io.ByteArrayOutputStream import java.net.URL import java.util.concurrent.CountDownLatch import java.util.concurrent.Executors +import java.util.concurrent.TimeUnit /** * Created by triniwiz on 5/4/20 @@ -145,7 +146,7 @@ class TNSImageAsset { lock.countDown() } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (e: java.lang.Exception) { } diff --git a/packages/canvas/src-native/canvas-android/canvas/src/main/java/org/nativescript/canvas/TNSImageBitmap.kt b/packages/canvas/src-native/canvas-android/canvas/src/main/java/org/nativescript/canvas/TNSImageBitmap.kt index 25050ac3..ba08d93a 100644 --- a/packages/canvas/src-native/canvas-android/canvas/src/main/java/org/nativescript/canvas/TNSImageBitmap.kt +++ b/packages/canvas/src-native/canvas-android/canvas/src/main/java/org/nativescript/canvas/TNSImageBitmap.kt @@ -27,7 +27,7 @@ class TNSImageBitmap internal constructor(asset: Long) { @Throws(Throwable::class) protected fun finalize() { - if (nativeImageAsset > 0) { + if (nativeImageAsset != 0L) { TNSImageAsset.nativeDestroyImpl(nativeImageAsset) nativeImageAsset = 0 } @@ -105,7 +105,7 @@ class TNSImageBitmap internal constructor(asset: Long) { } handler.post { - if (asset > 0) { + if (asset != 0L) { callback.onSuccess(TNSImageBitmap(asset)) } else { callback.onError(FAILED_TO_LOAD) @@ -151,7 +151,7 @@ class TNSImageBitmap internal constructor(asset: Long) { ) } handler.post { - if (asset > 0) { + if (asset != 0L) { callback.onSuccess(TNSImageBitmap(asset)) } else { callback.onError(FAILED_TO_LOAD) @@ -203,7 +203,7 @@ class TNSImageBitmap internal constructor(asset: Long) { ) } handler.post { - if (asset > 0) { + if (asset != 0L) { callback.onSuccess(TNSImageBitmap(asset)) } else { callback.onError(FAILED_TO_LOAD) @@ -243,7 +243,7 @@ class TNSImageBitmap internal constructor(asset: Long) { ) } handler.post { - if (asset > 0) { + if (asset != 0L) { callback.onSuccess(TNSImageBitmap(asset)) } else { callback.onError(FAILED_TO_LOAD) @@ -271,7 +271,7 @@ class TNSImageBitmap internal constructor(asset: Long) { ) handler.post { - if (result > 0) { + if (result != 0L) { callback.onSuccess(TNSImageBitmap(result)) } else { callback.onError(FAILED_TO_LOAD) @@ -303,7 +303,7 @@ class TNSImageBitmap internal constructor(asset: Long) { ) handler.post { - if (result > 0) { + if (result != 0L) { callback.onSuccess(TNSImageBitmap(result)) } else { callback.onError(FAILED_TO_LOAD) @@ -366,7 +366,7 @@ class TNSImageBitmap internal constructor(asset: Long) { options.resizeHeight ) handler.post { - if (asset > 0) { + if (asset != 0L) { callback.onSuccess(TNSImageBitmap(asset)) } else { callback.onError(FAILED_TO_LOAD) @@ -400,7 +400,7 @@ class TNSImageBitmap internal constructor(asset: Long) { options.resizeHeight ) handler.post { - if (asset > 0) { + if (asset != 0L) { callback.onSuccess(TNSImageBitmap(asset)) } else { callback.onError(FAILED_TO_LOAD) @@ -435,7 +435,7 @@ class TNSImageBitmap internal constructor(asset: Long) { options.resizeHeight ) handler.post { - if (asset > 0) { + if (asset != 0L) { callback.onSuccess(TNSImageBitmap(asset)) } else { callback.onError(FAILED_TO_LOAD) @@ -462,7 +462,7 @@ class TNSImageBitmap internal constructor(asset: Long) { options.resizeHeight ) handler.post { - if (asset > 0) { + if (asset != 0L) { callback.onSuccess(TNSImageBitmap(asset)) } else { callback.onError(FAILED_TO_LOAD) @@ -500,7 +500,7 @@ class TNSImageBitmap internal constructor(asset: Long) { options.resizeHeight ) handler.post { - if (asset > 0) { + if (asset != 0L) { callback.onSuccess(TNSImageBitmap(asset)) } else { callback.onError(FAILED_TO_LOAD) @@ -528,7 +528,7 @@ class TNSImageBitmap internal constructor(asset: Long) { ) handler.post { - if (result > 0) { + if (result != 0L) { callback.onSuccess(TNSImageBitmap(result)) } else { callback.onError(FAILED_TO_LOAD) @@ -560,7 +560,7 @@ class TNSImageBitmap internal constructor(asset: Long) { ) handler.post { - if (result > 0) { + if (result != 0L) { callback.onSuccess(TNSImageBitmap(result)) } else { callback.onError(FAILED_TO_LOAD) @@ -588,7 +588,7 @@ class TNSImageBitmap internal constructor(asset: Long) { ) handler.post { - if (result > 0) { + if (result != 0L) { callback.onSuccess(TNSImageBitmap(result)) } else { callback.onError(FAILED_TO_LOAD) @@ -620,7 +620,7 @@ class TNSImageBitmap internal constructor(asset: Long) { ) handler.post { - if (result > 0) { + if (result != 0L) { callback.onSuccess(TNSImageBitmap(result)) } else { callback.onError(FAILED_TO_LOAD) @@ -648,7 +648,7 @@ class TNSImageBitmap internal constructor(asset: Long) { ) handler.post { - if (result > 0) { + if (result != 0L) { callback.onSuccess(TNSImageBitmap(result)) } else { callback.onError(FAILED_TO_LOAD) @@ -680,7 +680,7 @@ class TNSImageBitmap internal constructor(asset: Long) { ) handler.post { - if (result > 0) { + if (result != 0L) { callback.onSuccess(TNSImageBitmap(result)) } else { callback.onError(FAILED_TO_LOAD) diff --git a/packages/canvas/src-native/canvas-android/canvas/src/main/java/org/nativescript/canvas/TNSWebGL2RenderingContext.kt b/packages/canvas/src-native/canvas-android/canvas/src/main/java/org/nativescript/canvas/TNSWebGL2RenderingContext.kt index e6d1a7d4..6dc7dd92 100644 --- a/packages/canvas/src-native/canvas-android/canvas/src/main/java/org/nativescript/canvas/TNSWebGL2RenderingContext.kt +++ b/packages/canvas/src-native/canvas-android/canvas/src/main/java/org/nativescript/canvas/TNSWebGL2RenderingContext.kt @@ -10,6 +10,7 @@ import java.nio.charset.Charset import java.nio.charset.StandardCharsets import java.util.* import java.util.concurrent.CountDownLatch +import java.util.concurrent.TimeUnit /** * Created by triniwiz on 5/1/20 @@ -21,81 +22,82 @@ class TNSWebGL2RenderingContext : TNSWebGLRenderingContext { fun beginQuery(target: Int, query: Int) { val lock = CountDownLatch(1) - runOnGLThread(Runnable { + runOnGLThread { + -> GLES30.glBeginQuery(target, query) lock.countDown() - }) + } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } fun beginTransformFeedback(primitiveMode: Int) { val lock = CountDownLatch(1) - runOnGLThread(Runnable { + runOnGLThread { GLES30.glBeginTransformFeedback(primitiveMode) lock.countDown() - }) + } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } fun bindBufferBase(target: Int, index: Int, buffer: Int) { val lock = CountDownLatch(1) - runOnGLThread(Runnable { + runOnGLThread { GLES30.glBindBufferBase(target, index, buffer) lock.countDown() - }) + } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } fun bindBufferRange(target: Int, index: Int, buffer: Int, offset: Int, size: Int) { val lock = CountDownLatch(1) - runOnGLThread(Runnable { GLES30.glBindBufferRange(target, index, buffer, offset, size) }) + runOnGLThread { GLES30.glBindBufferRange(target, index, buffer, offset, size) } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } fun bindSampler(unit: Int, sampler: Int) { val lock = CountDownLatch(1) - runOnGLThread(Runnable { + runOnGLThread { GLES30.glBindSampler(unit, sampler) lock.countDown() - }) + } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } fun bindTransformFeedback(target: Int, transformFeedback: Int) { val lock = CountDownLatch(1) - runOnGLThread(Runnable { + runOnGLThread { GLES30.glBindTransformFeedback(target, transformFeedback) lock.countDown() - }) + } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } fun bindVertexArray(vertexArray: Int) { val lock = CountDownLatch(1) - runOnGLThread(Runnable { + runOnGLThread { GLES30.glBindVertexArray(vertexArray) lock.countDown() - }) + } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } @@ -106,60 +108,60 @@ class TNSWebGL2RenderingContext : TNSWebGLRenderingContext { mask: Int, filter: Int ) { val lock = CountDownLatch(1) - runOnGLThread(Runnable { + runOnGLThread { GLES30.glBlitFramebuffer(srcX0, srcY0, srcX1, srcY1, dstX0, dstY0, dstX1, dstY1, mask, filter) lock.countDown() - }) + } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } fun clearBufferfv(buffer: Int, drawbuffer: Int, values: FloatArray?) { val lock = CountDownLatch(1) - runOnGLThread(Runnable { + runOnGLThread { GLES30.glClearBufferfv(buffer, drawbuffer, FloatBuffer.wrap(values)) lock.countDown() - }) + } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } fun clearBufferiv(buffer: Int, drawbuffer: Int, values: IntArray?) { val lock = CountDownLatch(1) - runOnGLThread(Runnable { + runOnGLThread { GLES30.glClearBufferiv(buffer, drawbuffer, IntBuffer.wrap(values)) lock.countDown() - }) + } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } fun clearBufferuiv(buffer: Int, drawbuffer: Int, values: IntArray?) { val lock = CountDownLatch(1) - runOnGLThread(Runnable { + runOnGLThread { GLES30.glClearBufferuiv(buffer, drawbuffer, IntBuffer.wrap(values)) lock.countDown() - }) + } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } fun clearBufferfi(buffer: Int, drawbuffer: Int, depth: Float, stencil: Int) { val lock = CountDownLatch(1) - runOnGLThread(Runnable { + runOnGLThread { GLES30.glClearBufferfi(buffer, drawbuffer, depth, stencil) lock.countDown() - }) + } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } @@ -167,12 +169,12 @@ class TNSWebGL2RenderingContext : TNSWebGLRenderingContext { fun clientWaitSync(sync: Long, flags: Int, timeout: Long): Int { val lock = CountDownLatch(1) val value = IntArray(1) - runOnGLThread(Runnable { + runOnGLThread { value[0] = GLES30.glClientWaitSync(sync, flags, timeout) lock.countDown() - }) + } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } return value[0] @@ -192,7 +194,7 @@ class TNSWebGL2RenderingContext : TNSWebGLRenderingContext { offset: Int ) { val lock = CountDownLatch(1) - runOnGLThread(Runnable { + runOnGLThread { GLES30.glCompressedTexSubImage3D( target, level, @@ -207,9 +209,9 @@ class TNSWebGL2RenderingContext : TNSWebGLRenderingContext { offset ) lock.countDown() - }) + } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } @@ -229,7 +231,7 @@ class TNSWebGL2RenderingContext : TNSWebGLRenderingContext { srcLengthOverride: Int ) { val lock = CountDownLatch(1) - runOnGLThread(Runnable { + runOnGLThread { var size = srcData.size val buffer = ByteBuffer.wrap(srcData) val offset = srcOffset @@ -254,9 +256,9 @@ class TNSWebGL2RenderingContext : TNSWebGLRenderingContext { buffer ) lock.countDown() - }) + } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } @@ -331,7 +333,7 @@ class TNSWebGL2RenderingContext : TNSWebGLRenderingContext { lock.countDown() } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } @@ -344,12 +346,12 @@ class TNSWebGL2RenderingContext : TNSWebGLRenderingContext { size: Int ) { val lock = CountDownLatch(1) - runOnGLThread(Runnable { + runOnGLThread { GLES30.glCopyBufferSubData(readTarget, writeTarget, readOffset, writeOffset, size) lock.countDown() - }) + } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } @@ -366,13 +368,13 @@ class TNSWebGL2RenderingContext : TNSWebGLRenderingContext { height: Int ) { val lock = CountDownLatch(1) - runOnGLThread(Runnable { + runOnGLThread { clearIfComposited() GLES30.glCopyTexSubImage3D(target, level, xoffset, yoffset, zoffset, x, y, width, height) lock.countDown() - }) + } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (e: InterruptedException) { e.printStackTrace() } @@ -381,12 +383,12 @@ class TNSWebGL2RenderingContext : TNSWebGLRenderingContext { fun createQuery(): Int { val lock = CountDownLatch(1) val query = IntBuffer.allocate(1) - runOnGLThread(Runnable { + runOnGLThread { GLES30.glGenQueries(1, query) lock.countDown() - }) + } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (e: InterruptedException) { e.printStackTrace() } @@ -396,12 +398,12 @@ class TNSWebGL2RenderingContext : TNSWebGLRenderingContext { fun createSampler(): Int { val lock = CountDownLatch(1) val sampler = IntBuffer.allocate(1) - runOnGLThread(Runnable { + runOnGLThread { GLES30.glGenSamplers(1, sampler) lock.countDown() - }) + } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } return sampler[0] @@ -410,12 +412,12 @@ class TNSWebGL2RenderingContext : TNSWebGLRenderingContext { fun createVertexArray(): Int { val lock = CountDownLatch(1) val array = IntBuffer.allocate(1) - runOnGLThread(Runnable { + runOnGLThread { GLES30.glGenVertexArrays(1, array) lock.countDown() - }) + } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } return array[0] @@ -424,12 +426,12 @@ class TNSWebGL2RenderingContext : TNSWebGLRenderingContext { fun createTransformFeedback(): Int { val lock = CountDownLatch(1) val id = IntBuffer.allocate(1) - runOnGLThread(Runnable { + runOnGLThread { GLES30.glGenTransformFeedbacks(1, id) lock.countDown() - }) + } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } return id[0] @@ -437,118 +439,118 @@ class TNSWebGL2RenderingContext : TNSWebGLRenderingContext { fun deleteQuery(query: Int) { val lock = CountDownLatch(1) - runOnGLThread(Runnable { + runOnGLThread { val id = intArrayOf(query) GLES30.glDeleteQueries(1, id, 0) lock.countDown() - }) + } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } fun deleteSampler(sampler: Int) { val lock = CountDownLatch(1) - runOnGLThread(Runnable { + runOnGLThread { val id = intArrayOf(sampler) GLES30.glDeleteQueries(1, id, 0) lock.countDown() - }) + } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } fun deleteSync(sync: Int) { val lock = CountDownLatch(1) - runOnGLThread(Runnable { + runOnGLThread { GLES30.glDeleteSync(sync.toLong()) lock.countDown() - }) + } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } fun deleteTransformFeedback(transformFeedback: Int) { val lock = CountDownLatch(1) - runOnGLThread(Runnable { + runOnGLThread { val feedback = intArrayOf(transformFeedback) GLES30.glDeleteTransformFeedbacks(1, feedback, 0) lock.countDown() - }) + } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } fun deleteVertexArray(vertexArray: Int) { val lock = CountDownLatch(1) - runOnGLThread(Runnable { + runOnGLThread { val array = intArrayOf(vertexArray) GLES30.glDeleteVertexArrays(1, array, 0) lock.countDown() - }) + } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } fun drawArraysInstanced(mode: Int, first: Int, count: Int, instanceCount: Int) { val lock = CountDownLatch(1) - runOnGLThread(Runnable { + runOnGLThread { clearIfComposited() GLES30.glDrawArraysInstanced(mode, first, count, instanceCount) updateCanvas() lock.countDown() - }) + } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } fun drawElementsInstanced(mode: Int, count: Int, type: Int, offset: Int, instanceCount: Int) { val lock = CountDownLatch(1) - runOnGLThread(Runnable { + runOnGLThread { clearIfComposited() GLES30.glDrawElementsInstanced(mode, count, type, offset, instanceCount) updateCanvas() lock.countDown() - }) + } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } fun drawRangeElements(mode: Int, start: Int, end: Int, count: Int, type: Int, offset: Int) { val lock = CountDownLatch(1) - runOnGLThread(Runnable { + runOnGLThread { clearIfComposited() GLES30.glDrawRangeElements(mode, start, end, count, type, offset) updateCanvas() lock.countDown() - }) + } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } fun drawBuffers(buffers: IntArray) { val lock = CountDownLatch(1) - runOnGLThread(Runnable { + runOnGLThread { GLES30.glDrawBuffers(buffers.size, IntBuffer.wrap(buffers)) lock.countDown() - }) + } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } @@ -558,62 +560,62 @@ class TNSWebGL2RenderingContext : TNSWebGLRenderingContext { drawBuffers(buffers) } - fun drawBuffers(buffers: IntBuffer) { + private fun drawBuffers(buffers: IntBuffer) { val lock = CountDownLatch(1) - runOnGLThread(Runnable { + runOnGLThread { GLES30.glDrawBuffers(buffers.capacity(), buffers) lock.countDown() - }) + } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } fun endQuery(target: Int) { val lock = CountDownLatch(1) - runOnGLThread(Runnable { + runOnGLThread { GLES30.glEndQuery(target) lock.countDown() - }) + } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } fun endTransformFeedback() { val lock = CountDownLatch(1) - runOnGLThread(Runnable { + runOnGLThread { GLES30.glEndTransformFeedback() lock.countDown() - }) + } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } fun fenceSync(condition: Int, flags: Int) { val lock = CountDownLatch(1) - runOnGLThread(Runnable { + runOnGLThread { GLES30.glFenceSync(condition, flags) lock.countDown() - }) + } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } fun framebufferTextureLayer(target: Int, attachment: Int, texture: Int, level: Int, layer: Int) { val lock = CountDownLatch(1) - runOnGLThread(Runnable { + runOnGLThread { GLES30.glFramebufferTextureLayer(target, attachment, texture, level, layer) lock.countDown() - }) + } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } @@ -621,7 +623,7 @@ class TNSWebGL2RenderingContext : TNSWebGLRenderingContext { fun getActiveUniformBlockName(program: Int, uniformBlockIndex: Int): String? { val lock = CountDownLatch(1) val value = arrayOfNulls(1) - runOnGLThread(Runnable { + runOnGLThread { val maxNameLength = IntBuffer.allocate(1) GLES30.glGetProgramiv(program, GLES30.GL_ACTIVE_UNIFORM_BLOCK_MAX_NAME_LENGTH, maxNameLength) val name = ByteArray(maxNameLength[0]) @@ -633,9 +635,9 @@ class TNSWebGL2RenderingContext : TNSWebGLRenderingContext { value[0] = String(name, Charset.forName("UTF-8")) } lock.countDown() - }) + } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } return value[0] @@ -644,7 +646,7 @@ class TNSWebGL2RenderingContext : TNSWebGLRenderingContext { fun getActiveUniformBlockParameter(program: Int, uniformBlockIndex: Int, pname: Int): Any? { val lock = CountDownLatch(1) val value = arrayOfNulls(1) - runOnGLThread(Runnable { + runOnGLThread { when (pname) { GLES30.GL_UNIFORM_BLOCK_BINDING, GLES30.GL_UNIFORM_BLOCK_DATA_SIZE, GLES30.GL_UNIFORM_BLOCK_ACTIVE_UNIFORMS -> { val intValue = IntBuffer.allocate(1) @@ -676,9 +678,9 @@ class TNSWebGL2RenderingContext : TNSWebGLRenderingContext { else -> value[0] = null } lock.countDown() - }) + } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } return value[0] @@ -691,7 +693,7 @@ class TNSWebGL2RenderingContext : TNSWebGLRenderingContext { fun getActiveUniforms(program: Int, uniformIndices: IntArray, pname: Int): Any? { val lock = CountDownLatch(1) val value = arrayOfNulls(1) - runOnGLThread(Runnable { + runOnGLThread { val returnType: ReturnType when (pname) { GLES30.GL_UNIFORM_TYPE -> returnType = ReturnType.EnumType @@ -702,7 +704,7 @@ class TNSWebGL2RenderingContext : TNSWebGLRenderingContext { else -> { value[0] = null lock.countDown() - return@Runnable + return@runOnGLThread } } val activeUniforms = IntBuffer.allocate(1) @@ -715,7 +717,7 @@ class TNSWebGL2RenderingContext : TNSWebGLRenderingContext { if (i >= activeUniforms[0]) { value[0] = null lock.countDown() - return@Runnable + return@runOnGLThread } } val result = IntArray(size) @@ -726,12 +728,11 @@ class TNSWebGL2RenderingContext : TNSWebGLRenderingContext { when (returnType) { ReturnType.IntType, ReturnType.EnumType, ReturnType.UnsignedIntType -> value[0] = result ReturnType.BoolType -> value[0] = fromGLint(result) - else -> value[0] = null } lock.countDown() - }) + } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } return value[0] @@ -753,7 +754,7 @@ class TNSWebGL2RenderingContext : TNSWebGLRenderingContext { length: Int ) { val lock = CountDownLatch(1) - runOnGLThread(Runnable { + runOnGLThread { if (length == 0) { } val size: Int = dstData.size * TNSWebGLRenderingContext.Companion.SIZE_OF_BYTE @@ -771,16 +772,16 @@ class TNSWebGL2RenderingContext : TNSWebGLRenderingContext { var total = byteOffset total += byteLength if (total > size) { - return@Runnable + return@runOnGLThread } if (byteLength == 0) { byteLength = size - byteOffset } GLES30.glBufferSubData(target, byteOffset, byteLength, ByteBuffer.wrap(dstData)) lock.countDown() - }) + } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } @@ -788,12 +789,12 @@ class TNSWebGL2RenderingContext : TNSWebGLRenderingContext { fun getFragDataLocation(program: Int, name: String?): Int { val lock = CountDownLatch(1) val value = IntArray(1) - runOnGLThread(Runnable { + runOnGLThread { value[0] = GLES30.glGetFragDataLocation(program, name) lock.countDown() - }) + } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } return value[0] @@ -802,7 +803,7 @@ class TNSWebGL2RenderingContext : TNSWebGLRenderingContext { fun getIndexedParameter(target: Int, index: Int): Any? { val lock = CountDownLatch(1) var value: IndexedParameter? = null - runOnGLThread(Runnable { + runOnGLThread { val binding = IndexedParameter() when (target) { GLES30.GL_UNIFORM_BUFFER_BINDING, GLES30.GL_TRANSFORM_FEEDBACK_BUFFER_BINDING -> { @@ -830,9 +831,9 @@ class TNSWebGL2RenderingContext : TNSWebGLRenderingContext { } } lock.countDown() - }) + } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (e: Exception) { } return value @@ -841,12 +842,12 @@ class TNSWebGL2RenderingContext : TNSWebGLRenderingContext { fun getInternalformatParameter(target: Int, internalformat: Int, pname: Int): Any? { val lock = CountDownLatch(1) val value = arrayOfNulls(1) - runOnGLThread(Runnable { + runOnGLThread { when (internalformat) { GLES30.GL_RGB, GLES30.GL_RGBA, GLES30.GL_R8UI, GLES30.GL_R8I, GLES30.GL_R16UI, GLES30.GL_R16I, GLES30.GL_R32UI, GLES30.GL_R32I, GLES30.GL_RG8UI, GLES30.GL_RG8I, GLES30.GL_RG16UI, GLES30.GL_RG16I, GLES30.GL_RG32UI, GLES30.GL_RG32I, GLES30.GL_RGBA8UI, GLES30.GL_RGBA8I, GLES30.GL_RGB10_A2UI, GLES30.GL_RGBA16UI, GLES30.GL_RGBA16I, GLES30.GL_RGBA32UI, GLES30.GL_RGBA32I -> { value[0] = IntArray(0) lock.countDown() - return@Runnable + return@runOnGLThread } GLES30.GL_R8, GLES30.GL_RG8, GLES30.GL_RGB565, GLES30.GL_RGBA8, GLES30.GL_SRGB8_ALPHA8, GLES30.GL_RGB5_A1, GLES30.GL_RGBA4, GLES30.GL_RGB10_A2, GLES30.GL_DEPTH_COMPONENT16, GLES30.GL_DEPTH_COMPONENT24, GLES30.GL_DEPTH_COMPONENT32F, GLES30.GL_DEPTH24_STENCIL8, GLES30.GL_DEPTH32F_STENCIL8, GLES30.GL_STENCIL_INDEX8 -> { } @@ -855,7 +856,7 @@ class TNSWebGL2RenderingContext : TNSWebGLRenderingContext { else -> { value[0] = null lock.countDown() - return@Runnable + return@runOnGLThread } } if (pname == GLES30.GL_SAMPLES) { @@ -867,7 +868,7 @@ class TNSWebGL2RenderingContext : TNSWebGLRenderingContext { if (length[0] <= 0) { value[0] = IntArray(0) lock.countDown() - return@Runnable + return@runOnGLThread } val values = IntArray(length[0]) GLES30.glGetInternalformativ( @@ -882,9 +883,9 @@ class TNSWebGL2RenderingContext : TNSWebGLRenderingContext { value[0] = null } lock.countDown() - }) + } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } return value[0] @@ -896,7 +897,7 @@ class TNSWebGL2RenderingContext : TNSWebGLRenderingContext { COPY_READ_BUFFER_BINDING, COPY_WRITE_BUFFER_BINDING -> { val lock = CountDownLatch(1) val parameter = arrayOfNulls(1) - runOnGLThread(Runnable { + runOnGLThread { when (pname) { COPY_READ_BUFFER_BINDING, COPY_WRITE_BUFFER_BINDING, DRAW_FRAMEBUFFER_BINDING -> { val param = IntArray(1) @@ -908,9 +909,9 @@ class TNSWebGL2RenderingContext : TNSWebGLRenderingContext { } } } - }) + } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } return parameter[0] @@ -924,7 +925,7 @@ class TNSWebGL2RenderingContext : TNSWebGLRenderingContext { fun getQuery(target: Int, pname: Int): Any? { val lock = CountDownLatch(1) val value = arrayOfNulls(1) - runOnGLThread(Runnable { + runOnGLThread { if (pname == GLES30.GL_CURRENT_QUERY) { val params = IntBuffer.allocate(1) GLES30.glGetQueryiv(target, pname, params) @@ -933,9 +934,9 @@ class TNSWebGL2RenderingContext : TNSWebGLRenderingContext { value[0] = null } lock.countDown() - }) + } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } return value[0] @@ -944,7 +945,7 @@ class TNSWebGL2RenderingContext : TNSWebGLRenderingContext { fun getQueryParameter(query: Int, pname: Int): Any? { val lock = CountDownLatch(1) val value = arrayOfNulls(1) - runOnGLThread(Runnable { + runOnGLThread { val params = IntBuffer.allocate(1) GLES30.glGetQueryObjectuiv(query, pname, params) when (pname) { @@ -953,9 +954,9 @@ class TNSWebGL2RenderingContext : TNSWebGLRenderingContext { else -> value[0] = null } lock.countDown() - }) + } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } return value[0] @@ -964,7 +965,7 @@ class TNSWebGL2RenderingContext : TNSWebGLRenderingContext { fun getSamplerParameter(sampler: Int, pname: Int): Any? { val lock = CountDownLatch(1) val value = arrayOfNulls(1) - runOnGLThread(Runnable { + runOnGLThread { when (pname) { TEXTURE_MAX_LOD, TEXTURE_MIN_LOD -> { val floatValue = FloatBuffer.allocate(1) @@ -979,9 +980,9 @@ class TNSWebGL2RenderingContext : TNSWebGLRenderingContext { else -> value[0] = null } lock.countDown() - }) + } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } return value[0] @@ -990,7 +991,7 @@ class TNSWebGL2RenderingContext : TNSWebGLRenderingContext { fun getSyncParameter(sync: Int, pname: Int): Any? { val lock = CountDownLatch(1) val value = arrayOfNulls(1) - runOnGLThread(Runnable { + runOnGLThread { when (pname) { GLES30.GL_OBJECT_TYPE, GLES30.GL_SYNC_STATUS, GLES30.GL_SYNC_CONDITION, GLES30.GL_SYNC_FLAGS -> { val values = IntBuffer.allocate(1) @@ -1001,9 +1002,9 @@ class TNSWebGL2RenderingContext : TNSWebGLRenderingContext { else -> value[0] = null } lock.countDown() - }) + } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } return value[0] @@ -1012,12 +1013,12 @@ class TNSWebGL2RenderingContext : TNSWebGLRenderingContext { fun getTransformFeedbackVarying(program: Int, index: Int): Any? { val lock = CountDownLatch(1) val info = arrayOfNulls(1) - runOnGLThread(Runnable { + runOnGLThread { val maxIndex = IntBuffer.allocate(1) GLES30.glGetProgramiv(program, GLES30.GL_TRANSFORM_FEEDBACK_VARYINGS, maxIndex) if (index >= maxIndex[0]) { info[0] = null - return@Runnable + return@runOnGLThread } val maxNameLength = IntArray(1) GLES30.glGetProgramiv( @@ -1026,7 +1027,7 @@ class TNSWebGL2RenderingContext : TNSWebGLRenderingContext { ) if (maxNameLength[0] <= 0) { info[0] = null - return@Runnable + return@runOnGLThread } var name = ByteArray(maxNameLength[0]) val length = IntArray(1) @@ -1047,15 +1048,15 @@ class TNSWebGL2RenderingContext : TNSWebGLRenderingContext { ) if (length[0] == 0 || size[0] == 0 || type[0] == 0) { info[0] = null - return@Runnable + return@runOnGLThread } name = name.copyOfRange(0, length[0]) val nameValue = String(name) info[0] = WebGLActiveInfo(nameValue, size[0], type[0]) lock.countDown() - }) + } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } return info[0] @@ -1064,12 +1065,12 @@ class TNSWebGL2RenderingContext : TNSWebGLRenderingContext { fun getUniformBlockIndex(program: Int, uniformBlockName: String?): Int { val lock = CountDownLatch(1) val value = IntArray(1) - runOnGLThread(Runnable { + runOnGLThread { value[0] = GLES30.glGetUniformBlockIndex(program, uniformBlockName) lock.countDown() - }) + } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } return value[0] @@ -1078,13 +1079,13 @@ class TNSWebGL2RenderingContext : TNSWebGLRenderingContext { fun getUniformIndices(program: Int, uniformNames: Array): IntArray? { val lock = CountDownLatch(1) val value = arrayOfNulls(1) - runOnGLThread(Runnable { + runOnGLThread { val indices = IntArray(uniformNames.size) GLES30.glGetUniformIndices(program, uniformNames, IntBuffer.wrap(indices)) value[0] = indices - }) + } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } return value[0] @@ -1092,12 +1093,12 @@ class TNSWebGL2RenderingContext : TNSWebGLRenderingContext { fun invalidateFramebuffer(target: Int, attachments: IntArray) { val lock = CountDownLatch(1) - runOnGLThread(Runnable { + runOnGLThread { GLES30.glInvalidateFramebuffer(target, attachments.size, IntBuffer.wrap(attachments)) lock.countDown() - }) + } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } @@ -1111,7 +1112,7 @@ class TNSWebGL2RenderingContext : TNSWebGLRenderingContext { height: Int ) { val lock = CountDownLatch(1) - runOnGLThread(Runnable { + runOnGLThread { GLES30.glInvalidateSubFramebuffer( target, attachments.size, @@ -1122,9 +1123,9 @@ class TNSWebGL2RenderingContext : TNSWebGLRenderingContext { height ) lock.countDown() - }) + } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } @@ -1132,12 +1133,12 @@ class TNSWebGL2RenderingContext : TNSWebGLRenderingContext { fun isQuery(query: Int): Boolean { val lock = CountDownLatch(1) val value = BooleanArray(1) - runOnGLThread(Runnable { + runOnGLThread { value[0] = GLES30.glIsQuery(query) lock.countDown() - }) + } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } return value[0] @@ -1146,12 +1147,12 @@ class TNSWebGL2RenderingContext : TNSWebGLRenderingContext { fun isSampler(sampler: Int): Boolean { val lock = CountDownLatch(1) val value = BooleanArray(1) - runOnGLThread(Runnable { + runOnGLThread { value[0] = GLES30.glIsSampler(sampler) lock.countDown() - }) + } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } return value[0] @@ -1160,12 +1161,12 @@ class TNSWebGL2RenderingContext : TNSWebGLRenderingContext { fun isSync(sync: Int): Boolean { val lock = CountDownLatch(1) val value = BooleanArray(1) - runOnGLThread(Runnable { + runOnGLThread { value[0] = GLES30.glIsSync(sync.toLong()) lock.countDown() - }) + } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } return value[0] @@ -1174,12 +1175,12 @@ class TNSWebGL2RenderingContext : TNSWebGLRenderingContext { fun isTransformFeedback(transformFeedback: Int): Boolean { val lock = CountDownLatch(1) val value = BooleanArray(1) - runOnGLThread(Runnable { + runOnGLThread { value[0] = GLES30.glIsTransformFeedback(transformFeedback) lock.countDown() - }) + } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } return value[0] @@ -1188,12 +1189,12 @@ class TNSWebGL2RenderingContext : TNSWebGLRenderingContext { fun isVertexArray(vertexArray: Int): Boolean { val lock = CountDownLatch(1) val value = BooleanArray(1) - runOnGLThread(Runnable { + runOnGLThread { value[0] = GLES30.glIsVertexArray(vertexArray) lock.countDown() - }) + } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } return value[0] @@ -1201,24 +1202,24 @@ class TNSWebGL2RenderingContext : TNSWebGLRenderingContext { fun pauseTransformFeedback() { val lock = CountDownLatch(1) - runOnGLThread(Runnable { + runOnGLThread { GLES30.glPauseTransformFeedback() lock.countDown() - }) + } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } fun readBuffer(src: Int) { val lock = CountDownLatch(1) - runOnGLThread(Runnable { + runOnGLThread { GLES30.glReadBuffer(src) lock.countDown() - }) + } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } @@ -1231,48 +1232,48 @@ class TNSWebGL2RenderingContext : TNSWebGLRenderingContext { height: Int ) { val lock = CountDownLatch(1) - runOnGLThread(Runnable { + runOnGLThread { GLES30.glRenderbufferStorageMultisample(target, samples, internalFormat, width, height) lock.countDown() - }) + } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } fun resumeTransformFeedback() { val lock = CountDownLatch(1) - runOnGLThread(Runnable { + runOnGLThread { GLES30.glResumeTransformFeedback() lock.countDown() - }) + } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } fun samplerParameteri(sampler: Int, pname: Int, param: Int) { val lock = CountDownLatch(1) - runOnGLThread(Runnable { + runOnGLThread { GLES30.glSamplerParameteri(sampler, pname, param) lock.countDown() - }) + } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } fun samplerParameterf(sampler: Int, pname: Int, param: Float) { val lock = CountDownLatch(1) - runOnGLThread(Runnable { + runOnGLThread { GLES30.glSamplerParameterf(sampler, pname, param) lock.countDown() - }) + } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } @@ -1290,7 +1291,7 @@ class TNSWebGL2RenderingContext : TNSWebGLRenderingContext { offset: Int ) { val lock = CountDownLatch(1) - runOnGLThread(Runnable { + runOnGLThread { GLES30.glTexImage3D( target, level, @@ -1304,9 +1305,9 @@ class TNSWebGL2RenderingContext : TNSWebGLRenderingContext { offset ) lock.countDown() - }) + } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } @@ -1325,7 +1326,7 @@ class TNSWebGL2RenderingContext : TNSWebGLRenderingContext { source: ByteBuffer? ) { val lock = CountDownLatch(1) - runOnGLThread(Runnable { + runOnGLThread { source?.let { if (it.isDirect) { nativeTexImage3DBuffer( @@ -1371,9 +1372,9 @@ class TNSWebGL2RenderingContext : TNSWebGLRenderingContext { ) } lock.countDown() - }) + } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } @@ -1392,7 +1393,7 @@ class TNSWebGL2RenderingContext : TNSWebGLRenderingContext { source: ShortBuffer? ) { val lock = CountDownLatch(1) - runOnGLThread(Runnable { + runOnGLThread { source?.let { if (it.isDirect) { nativeTexImage3DBuffer( @@ -1438,9 +1439,9 @@ class TNSWebGL2RenderingContext : TNSWebGLRenderingContext { ) } lock.countDown() - }) + } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } @@ -1459,7 +1460,7 @@ class TNSWebGL2RenderingContext : TNSWebGLRenderingContext { source: IntBuffer? ) { val lock = CountDownLatch(1) - runOnGLThread(Runnable { + runOnGLThread { source?.let { if (it.isDirect) { nativeTexImage3DBuffer( @@ -1505,9 +1506,9 @@ class TNSWebGL2RenderingContext : TNSWebGLRenderingContext { ) } lock.countDown() - }) + } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } @@ -1526,7 +1527,7 @@ class TNSWebGL2RenderingContext : TNSWebGLRenderingContext { source: LongBuffer? ) { val lock = CountDownLatch(1) - runOnGLThread(Runnable { + runOnGLThread { source?.let { if (it.isDirect) { nativeTexImage3DBuffer( @@ -1572,9 +1573,9 @@ class TNSWebGL2RenderingContext : TNSWebGLRenderingContext { ) } lock.countDown() - }) + } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } @@ -1593,7 +1594,7 @@ class TNSWebGL2RenderingContext : TNSWebGLRenderingContext { source: FloatBuffer? ) { val lock = CountDownLatch(1) - runOnGLThread(Runnable { + runOnGLThread { source?.let { if (it.isDirect) { nativeTexImage3DBuffer( @@ -1639,9 +1640,9 @@ class TNSWebGL2RenderingContext : TNSWebGLRenderingContext { ) } lock.countDown() - }) + } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } @@ -1660,7 +1661,7 @@ class TNSWebGL2RenderingContext : TNSWebGLRenderingContext { source: DoubleBuffer? ) { val lock = CountDownLatch(1) - runOnGLThread(Runnable { + runOnGLThread { source?.let { if (it.isDirect) { nativeTexImage3DBuffer( @@ -1706,9 +1707,9 @@ class TNSWebGL2RenderingContext : TNSWebGLRenderingContext { ) } lock.countDown() - }) + } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } @@ -1909,7 +1910,7 @@ class TNSWebGL2RenderingContext : TNSWebGLRenderingContext { source: ByteArray? ) { val lock = CountDownLatch(1) - runOnGLThread(Runnable { + runOnGLThread { source?.let { nativeTexImage3DByteArray( target, @@ -1939,9 +1940,9 @@ class TNSWebGL2RenderingContext : TNSWebGLRenderingContext { ) } lock.countDown() - }) + } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } @@ -1960,7 +1961,7 @@ class TNSWebGL2RenderingContext : TNSWebGLRenderingContext { source: ShortArray? ) { val lock = CountDownLatch(1) - runOnGLThread(Runnable { + runOnGLThread { source?.let { nativeTexImage3DShortArray( target, @@ -1990,9 +1991,9 @@ class TNSWebGL2RenderingContext : TNSWebGLRenderingContext { ) } lock.countDown() - }) + } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } @@ -2011,7 +2012,7 @@ class TNSWebGL2RenderingContext : TNSWebGLRenderingContext { source: IntArray? ) { val lock = CountDownLatch(1) - runOnGLThread(Runnable { + runOnGLThread { source?.let { nativeTexImage3DIntArray( target, @@ -2041,9 +2042,9 @@ class TNSWebGL2RenderingContext : TNSWebGLRenderingContext { ) } lock.countDown() - }) + } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } @@ -2062,7 +2063,7 @@ class TNSWebGL2RenderingContext : TNSWebGLRenderingContext { source: LongArray? ) { val lock = CountDownLatch(1) - runOnGLThread(Runnable { + runOnGLThread { source?.let { nativeTexImage3DLongArray( target, @@ -2092,9 +2093,9 @@ class TNSWebGL2RenderingContext : TNSWebGLRenderingContext { ) } lock.countDown() - }) + } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } @@ -2113,7 +2114,7 @@ class TNSWebGL2RenderingContext : TNSWebGLRenderingContext { source: FloatArray? ) { val lock = CountDownLatch(1) - runOnGLThread(Runnable { + runOnGLThread { source?.let { nativeTexImage3DFloatArray( target, @@ -2143,9 +2144,9 @@ class TNSWebGL2RenderingContext : TNSWebGLRenderingContext { ) } lock.countDown() - }) + } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } @@ -2163,7 +2164,7 @@ class TNSWebGL2RenderingContext : TNSWebGLRenderingContext { source: DoubleArray? ) { val lock = CountDownLatch(1) - runOnGLThread(Runnable { + runOnGLThread { source?.let { nativeTexImage3DDoubleArray( target, @@ -2193,9 +2194,9 @@ class TNSWebGL2RenderingContext : TNSWebGLRenderingContext { ) } lock.countDown() - }) + } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } @@ -2213,7 +2214,7 @@ class TNSWebGL2RenderingContext : TNSWebGLRenderingContext { source: Bitmap ) { val lock = CountDownLatch(1) - runOnGLThread(Runnable { + runOnGLThread { nativeTexImage3DBitmap( target, level, @@ -2228,9 +2229,9 @@ class TNSWebGL2RenderingContext : TNSWebGLRenderingContext { flipYWebGL ) lock.countDown() - }) + } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } @@ -2249,7 +2250,7 @@ class TNSWebGL2RenderingContext : TNSWebGLRenderingContext { ) { val ss = source.snapshot() val lock = CountDownLatch(1) - runOnGLThread(Runnable { + runOnGLThread { nativeTexImage3DByteArray( target, level, @@ -2264,9 +2265,9 @@ class TNSWebGL2RenderingContext : TNSWebGLRenderingContext { flipYWebGL ) lock.countDown() - }) + } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } @@ -2284,7 +2285,7 @@ class TNSWebGL2RenderingContext : TNSWebGLRenderingContext { asset: TNSImageAsset ) { val lock = CountDownLatch(1) - runOnGLThread(Runnable { + runOnGLThread { nativeTexImage3DAsset( target, level, @@ -2299,21 +2300,21 @@ class TNSWebGL2RenderingContext : TNSWebGLRenderingContext { flipYWebGL ) lock.countDown() - }) + } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } fun texStorage2D(target: Int, levels: Int, internalformat: Int, width: Int, height: Int) { val lock = CountDownLatch(1) - runOnGLThread(Runnable { + runOnGLThread { GLES30.glTexStorage2D(target, levels, internalformat, width, height) lock.countDown() - }) + } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } @@ -2327,12 +2328,12 @@ class TNSWebGL2RenderingContext : TNSWebGLRenderingContext { depth: Int ) { val lock = CountDownLatch(1) - runOnGLThread(Runnable { + runOnGLThread { GLES30.glTexStorage3D(target, levels, internalformat, width, height, depth) lock.countDown() - }) + } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } @@ -2351,7 +2352,7 @@ class TNSWebGL2RenderingContext : TNSWebGLRenderingContext { offset: Int ) { val lock = CountDownLatch(1) - runOnGLThread(Runnable { + runOnGLThread { GLES30.glTexSubImage3D( target, level, @@ -2366,9 +2367,9 @@ class TNSWebGL2RenderingContext : TNSWebGLRenderingContext { offset ) lock.countDown() - }) + } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } @@ -2387,7 +2388,7 @@ class TNSWebGL2RenderingContext : TNSWebGLRenderingContext { srcData: Bitmap ) { val lock = CountDownLatch(1) - runOnGLThread(Runnable { + runOnGLThread { nativeTexSubImage3DBitmap( target, level, @@ -2403,9 +2404,9 @@ class TNSWebGL2RenderingContext : TNSWebGLRenderingContext { flipYWebGL ) lock.countDown() - }) + } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } @@ -2425,7 +2426,7 @@ class TNSWebGL2RenderingContext : TNSWebGLRenderingContext { ) { val ss = srcData.snapshot() val lock = CountDownLatch(1) - runOnGLThread(Runnable { + runOnGLThread { val size = ss.size val buf = ByteBuffer.allocateDirect(size) buf.put(ss) @@ -2445,9 +2446,9 @@ class TNSWebGL2RenderingContext : TNSWebGLRenderingContext { flipYWebGL ) lock.countDown() - }) + } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } @@ -2467,7 +2468,7 @@ class TNSWebGL2RenderingContext : TNSWebGLRenderingContext { asset: TNSImageAsset ) { val lock = CountDownLatch(1) - runOnGLThread(Runnable { + runOnGLThread { nativeTexSubImage3DAsset( target, level, @@ -2483,9 +2484,9 @@ class TNSWebGL2RenderingContext : TNSWebGLRenderingContext { flipYWebGL ) lock.countDown() - }) + } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } @@ -2676,9 +2677,6 @@ class TNSWebGL2RenderingContext : TNSWebGLRenderingContext { } - - - fun texSubImage3DByteBuffer( target: Int, level: Int, @@ -2864,7 +2862,6 @@ class TNSWebGL2RenderingContext : TNSWebGLRenderingContext { } - fun texSubImage3D( target: Int, level: Int, @@ -2880,7 +2877,7 @@ class TNSWebGL2RenderingContext : TNSWebGLRenderingContext { srcOffset: Int = 0 ) { val lock = CountDownLatch(1) - runOnGLThread(Runnable { + runOnGLThread { srcData?.let { it.position(srcOffset) nativeTexSubImage3DBuffer( @@ -2913,9 +2910,9 @@ class TNSWebGL2RenderingContext : TNSWebGLRenderingContext { ) } lock.countDown() - }) + } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } @@ -2936,7 +2933,7 @@ class TNSWebGL2RenderingContext : TNSWebGLRenderingContext { srcOffset: Int = 0 ) { val lock = CountDownLatch(1) - runOnGLThread(Runnable { + runOnGLThread { srcData?.let { it.position(srcOffset) nativeTexSubImage3DBuffer( @@ -2969,16 +2966,14 @@ class TNSWebGL2RenderingContext : TNSWebGLRenderingContext { ) } lock.countDown() - }) + } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } - - fun texSubImage3D( target: Int, level: Int, @@ -2994,7 +2989,7 @@ class TNSWebGL2RenderingContext : TNSWebGLRenderingContext { srcOffset: Int = 0 ) { val lock = CountDownLatch(1) - runOnGLThread(Runnable { + runOnGLThread { srcData?.let { it.position(srcOffset) nativeTexSubImage3DBuffer( @@ -3027,9 +3022,9 @@ class TNSWebGL2RenderingContext : TNSWebGLRenderingContext { ) } lock.countDown() - }) + } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } @@ -3050,7 +3045,7 @@ class TNSWebGL2RenderingContext : TNSWebGLRenderingContext { srcOffset: Int = 0 ) { val lock = CountDownLatch(1) - runOnGLThread(Runnable { + runOnGLThread { srcData?.let { it.position(srcOffset) nativeTexSubImage3DBuffer( @@ -3083,9 +3078,9 @@ class TNSWebGL2RenderingContext : TNSWebGLRenderingContext { ) } lock.countDown() - }) + } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } @@ -3106,7 +3101,7 @@ class TNSWebGL2RenderingContext : TNSWebGLRenderingContext { srcOffset: Int = 0 ) { val lock = CountDownLatch(1) - runOnGLThread(Runnable { + runOnGLThread { srcData?.let { it.position(srcOffset) nativeTexSubImage3DBuffer( @@ -3139,9 +3134,9 @@ class TNSWebGL2RenderingContext : TNSWebGLRenderingContext { ) } lock.countDown() - }) + } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } @@ -3162,7 +3157,7 @@ class TNSWebGL2RenderingContext : TNSWebGLRenderingContext { srcOffset: Int = 0 ) { val lock = CountDownLatch(1) - runOnGLThread(Runnable { + runOnGLThread { srcData?.let { it.position(srcOffset) nativeTexSubImage3DBuffer( @@ -3195,9 +3190,9 @@ class TNSWebGL2RenderingContext : TNSWebGLRenderingContext { ) } lock.countDown() - }) + } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } @@ -3217,7 +3212,7 @@ class TNSWebGL2RenderingContext : TNSWebGLRenderingContext { srcOffset: Int = 0 ) { val lock = CountDownLatch(1) - runOnGLThread(Runnable { + runOnGLThread { srcData?.let { val size = it.size val buffer = ByteBuffer.allocateDirect(size).order(ByteOrder.nativeOrder()) @@ -3254,9 +3249,9 @@ class TNSWebGL2RenderingContext : TNSWebGLRenderingContext { ) } lock.countDown() - }) + } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } @@ -3277,7 +3272,7 @@ class TNSWebGL2RenderingContext : TNSWebGLRenderingContext { srcOffset: Int = 0 ) { val lock = CountDownLatch(1) - runOnGLThread(Runnable { + runOnGLThread { srcData?.let { val size = it.size * SIZE_OF_SHORT val buffer = ByteBuffer.allocateDirect(size).order(ByteOrder.nativeOrder()) @@ -3314,9 +3309,9 @@ class TNSWebGL2RenderingContext : TNSWebGLRenderingContext { ) } lock.countDown() - }) + } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } @@ -3336,7 +3331,7 @@ class TNSWebGL2RenderingContext : TNSWebGLRenderingContext { srcOffset: Int = 0 ) { val lock = CountDownLatch(1) - runOnGLThread(Runnable { + runOnGLThread { srcData?.let { val size = it.size * SIZE_OF_INT val buffer = ByteBuffer.allocateDirect(size).order(ByteOrder.nativeOrder()) @@ -3373,9 +3368,9 @@ class TNSWebGL2RenderingContext : TNSWebGLRenderingContext { ) } lock.countDown() - }) + } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } @@ -3396,7 +3391,7 @@ class TNSWebGL2RenderingContext : TNSWebGLRenderingContext { srcOffset: Int = 0 ) { val lock = CountDownLatch(1) - runOnGLThread(Runnable { + runOnGLThread { srcData?.let { val size = it.size * SIZE_OF_LONG val buffer = ByteBuffer.allocateDirect(size).order(ByteOrder.nativeOrder()) @@ -3433,9 +3428,9 @@ class TNSWebGL2RenderingContext : TNSWebGLRenderingContext { ) } lock.countDown() - }) + } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } @@ -3456,7 +3451,7 @@ class TNSWebGL2RenderingContext : TNSWebGLRenderingContext { srcOffset: Int = 0 ) { val lock = CountDownLatch(1) - runOnGLThread(Runnable { + runOnGLThread { srcData?.let { val size = it.size * SIZE_OF_FLOAT val buffer = ByteBuffer.allocateDirect(size).order(ByteOrder.nativeOrder()) @@ -3493,9 +3488,9 @@ class TNSWebGL2RenderingContext : TNSWebGLRenderingContext { ) } lock.countDown() - }) + } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } @@ -3515,7 +3510,7 @@ class TNSWebGL2RenderingContext : TNSWebGLRenderingContext { srcOffset: Int = 0 ) { val lock = CountDownLatch(1) - runOnGLThread(Runnable { + runOnGLThread { srcData?.let { val size = it.size * SIZE_OF_DOUBLE val buffer = ByteBuffer.allocateDirect(size).order(ByteOrder.nativeOrder()) @@ -3552,408 +3547,404 @@ class TNSWebGL2RenderingContext : TNSWebGLRenderingContext { ) } lock.countDown() - }) + } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } fun transformFeedbackVaryings(program: Int, varyings: Array?, bufferMode: Int) { val lock = CountDownLatch(1) - runOnGLThread(Runnable { + runOnGLThread { GLES30.glTransformFeedbackVaryings(program, varyings, bufferMode) lock.countDown() - }) + } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } fun uniform1ui(location: Int, v0: Int) { val lock = CountDownLatch(1) - runOnGLThread(Runnable { + runOnGLThread { GLES30.glUniform1ui(location, v0) lock.countDown() - }) + } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } fun uniform2ui(location: Int, v0: Int, v1: Int) { val lock = CountDownLatch(1) - runOnGLThread(Runnable { + runOnGLThread { GLES30.glUniform2ui(location, v0, v1) lock.countDown() - }) + } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } fun uniform3ui(location: Int, v0: Int, v1: Int, v2: Int) { val lock = CountDownLatch(1) - runOnGLThread(Runnable { + runOnGLThread { GLES30.glUniform3ui(location, v0, v1, v2) lock.countDown() - }) + } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } fun uniform4ui(location: Int, v0: Int, v1: Int, v2: Int, v3: Int) { val lock = CountDownLatch(1) - runOnGLThread(Runnable { + runOnGLThread { GLES30.glUniform4ui(location, v0, v1, v2, v3) lock.countDown() - }) + } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } fun uniform1uiv(location: Int, data: IntArray) { val lock = CountDownLatch(1) - runOnGLThread(Runnable { + runOnGLThread { val count = data.size / 1 GLES30.glUniform1uiv(location, count, IntBuffer.wrap(data)) lock.countDown() - }) + } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } fun uniform2uiv(location: Int, data: IntArray) { val lock = CountDownLatch(1) - runOnGLThread(Runnable { + runOnGLThread { val count = data.size / 2 GLES30.glUniform2uiv(location, count, IntBuffer.wrap(data)) lock.countDown() - }) + } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } fun uniform3uiv(location: Int, data: IntArray) { val lock = CountDownLatch(1) - runOnGLThread(Runnable { + runOnGLThread { val count = data.size / 3 GLES30.glUniform3uiv(location, count, IntBuffer.wrap(data)) lock.countDown() - }) + } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } fun uniform4uiv(location: Int, data: IntArray) { val lock = CountDownLatch(1) - runOnGLThread(Runnable { + runOnGLThread { val count = data.size / 4 GLES30.glUniform4uiv(location, count, IntBuffer.wrap(data)) lock.countDown() - }) + } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } - fun uniform1uivBuffer(location: Int, data: IntBuffer) { val lock = CountDownLatch(1) - runOnGLThread(Runnable { + runOnGLThread { val count = data.capacity() / 1 GLES30.glUniform1uiv(location, count, data) lock.countDown() - }) + } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } fun uniform2uivBuffer(location: Int, data: IntBuffer) { val lock = CountDownLatch(1) - runOnGLThread(Runnable { + runOnGLThread { val count = data.capacity() / 2 GLES30.glUniform2uiv(location, count, data) lock.countDown() - }) + } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } fun uniform3uivBuffer(location: Int, data: IntBuffer) { val lock = CountDownLatch(1) - runOnGLThread(Runnable { + runOnGLThread { val count = data.capacity() / 3 GLES30.glUniform3uiv(location, count, data) lock.countDown() - }) + } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } fun uniform4uivBuffer(location: Int, data: IntBuffer) { val lock = CountDownLatch(1) - runOnGLThread(Runnable { + runOnGLThread { val count = data.capacity() / 4 GLES30.glUniform4uiv(location, count, data) lock.countDown() - }) + } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } fun uniformBlockBinding(program: Int, uniformBlockIndex: Int, uniformBlockBinding: Int) { val lock = CountDownLatch(1) - runOnGLThread(Runnable { + runOnGLThread { GLES30.glUniformBlockBinding(program, uniformBlockIndex, uniformBlockBinding) lock.countDown() - }) + } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } fun uniformMatrix3x2fv(location: Int, transpose: Boolean, data: FloatArray) { val lock = CountDownLatch(1) - runOnGLThread(Runnable { + runOnGLThread { val count = data.size / 6 GLES30.glUniformMatrix3x2fv(location, count, transpose, FloatBuffer.wrap(data)) lock.countDown() - }) + } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } fun uniformMatrix4x2fv(location: Int, transpose: Boolean, data: FloatArray) { val lock = CountDownLatch(1) - runOnGLThread(Runnable { + runOnGLThread { val count = data.size / 8 GLES30.glUniformMatrix4x2fv(location, count, transpose, FloatBuffer.wrap(data)) lock.countDown() - }) + } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } fun uniformMatrix2x3fv(location: Int, transpose: Boolean, data: FloatArray) { val lock = CountDownLatch(1) - runOnGLThread(Runnable { + runOnGLThread { val count = data.size / 6 GLES30.glUniformMatrix2x3fv(location, count, transpose, FloatBuffer.wrap(data)) lock.countDown() - }) + } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } fun uniformMatrix4x3fv(location: Int, transpose: Boolean, data: FloatArray) { val lock = CountDownLatch(1) - runOnGLThread(Runnable { + runOnGLThread { val count = data.size / 12 GLES30.glUniformMatrix4x3fv(location, count, transpose, FloatBuffer.wrap(data)) lock.countDown() - }) + } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } fun uniformMatrix2x4fv(location: Int, transpose: Boolean, data: FloatArray) { val lock = CountDownLatch(1) - runOnGLThread(Runnable { + runOnGLThread { val count = data.size / 8 GLES30.glUniformMatrix2x4fv(location, count, transpose, FloatBuffer.wrap(data)) lock.countDown() - }) + } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } fun uniformMatrix3x4fv(location: Int, transpose: Boolean, data: FloatArray) { val lock = CountDownLatch(1) - runOnGLThread(Runnable { + runOnGLThread { val count = data.size / 12 GLES30.glUniformMatrix3x4fv(location, count, transpose, FloatBuffer.wrap(data)) lock.countDown() - }) + } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } - - fun uniformMatrix3x2fvBuffer(location: Int, transpose: Boolean, data: FloatBuffer) { val lock = CountDownLatch(1) - runOnGLThread(Runnable { + runOnGLThread { val count = data.capacity() / 6 GLES30.glUniformMatrix3x2fv(location, count, transpose, data) lock.countDown() - }) + } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } fun uniformMatrix4x2fvBuffer(location: Int, transpose: Boolean, data: FloatBuffer) { val lock = CountDownLatch(1) - runOnGLThread(Runnable { + runOnGLThread { val count = data.capacity() / 8 GLES30.glUniformMatrix4x2fv(location, count, transpose, data) lock.countDown() - }) + } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } fun uniformMatrix2x3fvBuffer(location: Int, transpose: Boolean, data: FloatBuffer) { val lock = CountDownLatch(1) - runOnGLThread(Runnable { + runOnGLThread { val count = data.capacity() / 6 GLES30.glUniformMatrix2x3fv(location, count, transpose, data) lock.countDown() - }) + } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } fun uniformMatrix4x3fvBuffer(location: Int, transpose: Boolean, data: FloatBuffer) { val lock = CountDownLatch(1) - runOnGLThread(Runnable { + runOnGLThread { val count = data.capacity() / 12 GLES30.glUniformMatrix4x3fv(location, count, transpose, data) lock.countDown() - }) + } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } fun uniformMatrix2x4fvBuffer(location: Int, transpose: Boolean, data: FloatBuffer) { val lock = CountDownLatch(1) - runOnGLThread(Runnable { + runOnGLThread { val count = data.capacity() / 8 GLES30.glUniformMatrix2x4fv(location, count, transpose, data) lock.countDown() - }) + } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } fun uniformMatrix3x4fvBuffer(location: Int, transpose: Boolean, data: FloatBuffer) { val lock = CountDownLatch(1) - runOnGLThread(Runnable { + runOnGLThread { val count = data.capacity() / 12 GLES30.glUniformMatrix3x4fv(location, count, transpose, data) lock.countDown() - }) + } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } - fun vertexAttribDivisor(index: Int, divisor: Int) { val lock = CountDownLatch(1) - runOnGLThread(Runnable { + runOnGLThread { GLES30.glVertexAttribDivisor(index, divisor) lock.countDown() - }) + } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } fun vertexAttribI4i(index: Int, v0: Int, v1: Int, v2: Int, v3: Int) { val lock = CountDownLatch(1) - runOnGLThread(Runnable { + runOnGLThread { GLES30.glVertexAttribI4i(index, v0, v1, v2, v3) lock.countDown() - }) + } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } fun vertexAttribI4ui(index: Int, v0: Int, v1: Int, v2: Int, v3: Int) { val lock = CountDownLatch(1) - runOnGLThread(Runnable { + runOnGLThread { GLES30.glVertexAttribI4ui(index, v0, v1, v2, v3) lock.countDown() - }) + } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } fun vertexAttribI4iv(index: Int, value: IntArray?) { val lock = CountDownLatch(1) - runOnGLThread(Runnable { + runOnGLThread { GLES30.glVertexAttribI4iv(index, IntBuffer.wrap(value)) lock.countDown() - }) + } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } fun vertexAttribI4uiv(index: Int, value: IntArray?) { val lock = CountDownLatch(1) - runOnGLThread(Runnable { + runOnGLThread { GLES30.glVertexAttribI4uiv(index, IntBuffer.wrap(value)) lock.countDown() - }) + } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } @@ -3961,24 +3952,24 @@ class TNSWebGL2RenderingContext : TNSWebGLRenderingContext { fun vertexAttribI4ivBuffer(index: Int, value: IntBuffer?) { val lock = CountDownLatch(1) - runOnGLThread(Runnable { + runOnGLThread { GLES30.glVertexAttribI4iv(index, value) lock.countDown() - }) + } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } fun vertexAttribI4uivBuffer(index: Int, value: IntBuffer?) { val lock = CountDownLatch(1) - runOnGLThread(Runnable { + runOnGLThread { GLES30.glVertexAttribI4uiv(index, value) lock.countDown() - }) + } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } diff --git a/packages/canvas/src-native/canvas-android/canvas/src/main/java/org/nativescript/canvas/TNSWebGLRenderingContext.kt b/packages/canvas/src-native/canvas-android/canvas/src/main/java/org/nativescript/canvas/TNSWebGLRenderingContext.kt index 8ad44861..8fb1f5b1 100644 --- a/packages/canvas/src-native/canvas-android/canvas/src/main/java/org/nativescript/canvas/TNSWebGLRenderingContext.kt +++ b/packages/canvas/src-native/canvas-android/canvas/src/main/java/org/nativescript/canvas/TNSWebGLRenderingContext.kt @@ -11,6 +11,7 @@ import java.nio.charset.Charset import java.nio.charset.StandardCharsets import java.util.* import java.util.concurrent.CountDownLatch +import java.util.concurrent.TimeUnit /** @@ -62,7 +63,7 @@ open class TNSWebGLRenderingContext : TNSCanvasRenderingContext { lock.countDown() } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } @@ -74,7 +75,7 @@ open class TNSWebGLRenderingContext : TNSCanvasRenderingContext { lock.countDown() } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } @@ -86,7 +87,7 @@ open class TNSWebGLRenderingContext : TNSCanvasRenderingContext { lock.countDown() } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } @@ -98,7 +99,7 @@ open class TNSWebGLRenderingContext : TNSCanvasRenderingContext { lock.countDown() } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } @@ -110,7 +111,7 @@ open class TNSWebGLRenderingContext : TNSCanvasRenderingContext { lock.countDown() } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } @@ -122,7 +123,7 @@ open class TNSWebGLRenderingContext : TNSCanvasRenderingContext { lock.countDown() } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } @@ -134,7 +135,7 @@ open class TNSWebGLRenderingContext : TNSCanvasRenderingContext { lock.countDown() } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } @@ -146,7 +147,7 @@ open class TNSWebGLRenderingContext : TNSCanvasRenderingContext { lock.countDown() } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } @@ -158,7 +159,7 @@ open class TNSWebGLRenderingContext : TNSCanvasRenderingContext { lock.countDown() } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } @@ -170,7 +171,7 @@ open class TNSWebGLRenderingContext : TNSCanvasRenderingContext { lock.countDown() } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } @@ -182,7 +183,7 @@ open class TNSWebGLRenderingContext : TNSCanvasRenderingContext { lock.countDown() } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } @@ -194,7 +195,7 @@ open class TNSWebGLRenderingContext : TNSCanvasRenderingContext { lock.countDown() } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } @@ -206,7 +207,7 @@ open class TNSWebGLRenderingContext : TNSCanvasRenderingContext { lock.countDown() } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } @@ -218,7 +219,7 @@ open class TNSWebGLRenderingContext : TNSCanvasRenderingContext { lock.countDown() } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } @@ -230,7 +231,7 @@ open class TNSWebGLRenderingContext : TNSCanvasRenderingContext { lock.countDown() } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } @@ -259,7 +260,7 @@ open class TNSWebGLRenderingContext : TNSCanvasRenderingContext { lock.countDown() } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } @@ -273,7 +274,7 @@ open class TNSWebGLRenderingContext : TNSCanvasRenderingContext { lock.countDown() } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } @@ -287,7 +288,7 @@ open class TNSWebGLRenderingContext : TNSCanvasRenderingContext { lock.countDown() } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } @@ -301,7 +302,7 @@ open class TNSWebGLRenderingContext : TNSCanvasRenderingContext { lock.countDown() } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } @@ -331,7 +332,7 @@ open class TNSWebGLRenderingContext : TNSCanvasRenderingContext { lock.countDown() } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } @@ -343,7 +344,7 @@ open class TNSWebGLRenderingContext : TNSCanvasRenderingContext { lock.countDown() } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } @@ -355,7 +356,7 @@ open class TNSWebGLRenderingContext : TNSCanvasRenderingContext { lock.countDown() } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } @@ -367,7 +368,7 @@ open class TNSWebGLRenderingContext : TNSCanvasRenderingContext { lock.countDown() } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } @@ -397,7 +398,7 @@ open class TNSWebGLRenderingContext : TNSCanvasRenderingContext { lock.countDown() } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } @@ -412,7 +413,7 @@ open class TNSWebGLRenderingContext : TNSCanvasRenderingContext { lock.countDown() } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } @@ -427,7 +428,7 @@ open class TNSWebGLRenderingContext : TNSCanvasRenderingContext { lock.countDown() } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } @@ -442,7 +443,7 @@ open class TNSWebGLRenderingContext : TNSCanvasRenderingContext { lock.countDown() } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } @@ -472,7 +473,7 @@ open class TNSWebGLRenderingContext : TNSCanvasRenderingContext { lock.countDown() } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } @@ -484,7 +485,7 @@ open class TNSWebGLRenderingContext : TNSCanvasRenderingContext { lock.countDown() } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } @@ -496,7 +497,7 @@ open class TNSWebGLRenderingContext : TNSCanvasRenderingContext { lock.countDown() } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } @@ -508,7 +509,7 @@ open class TNSWebGLRenderingContext : TNSCanvasRenderingContext { lock.countDown() } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } @@ -521,7 +522,7 @@ open class TNSWebGLRenderingContext : TNSCanvasRenderingContext { lock.countDown() } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } return status[0] @@ -537,7 +538,7 @@ open class TNSWebGLRenderingContext : TNSCanvasRenderingContext { lock.countDown() } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } @@ -553,7 +554,7 @@ open class TNSWebGLRenderingContext : TNSCanvasRenderingContext { lock.countDown() } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } @@ -566,7 +567,7 @@ open class TNSWebGLRenderingContext : TNSCanvasRenderingContext { lock.countDown() } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } @@ -579,7 +580,7 @@ open class TNSWebGLRenderingContext : TNSCanvasRenderingContext { lock.countDown() } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } @@ -595,7 +596,7 @@ open class TNSWebGLRenderingContext : TNSCanvasRenderingContext { lock.countDown() } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } @@ -690,7 +691,7 @@ open class TNSWebGLRenderingContext : TNSCanvasRenderingContext { lock.countDown() } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } @@ -826,7 +827,7 @@ open class TNSWebGLRenderingContext : TNSCanvasRenderingContext { lock.countDown() } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } @@ -857,7 +858,7 @@ open class TNSWebGLRenderingContext : TNSCanvasRenderingContext { lock.countDown() } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } @@ -888,7 +889,7 @@ open class TNSWebGLRenderingContext : TNSCanvasRenderingContext { lock.countDown() } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } @@ -919,7 +920,7 @@ open class TNSWebGLRenderingContext : TNSCanvasRenderingContext { lock.countDown() } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } @@ -950,7 +951,7 @@ open class TNSWebGLRenderingContext : TNSCanvasRenderingContext { lock.countDown() } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } @@ -979,7 +980,7 @@ open class TNSWebGLRenderingContext : TNSCanvasRenderingContext { lock.countDown() } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } @@ -1008,7 +1009,7 @@ open class TNSWebGLRenderingContext : TNSCanvasRenderingContext { lock.countDown() } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } @@ -1037,7 +1038,7 @@ open class TNSWebGLRenderingContext : TNSCanvasRenderingContext { lock.countDown() } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } @@ -1179,7 +1180,7 @@ open class TNSWebGLRenderingContext : TNSCanvasRenderingContext { lock.countDown() } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } @@ -1211,7 +1212,7 @@ open class TNSWebGLRenderingContext : TNSCanvasRenderingContext { lock.countDown() } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } @@ -1243,7 +1244,7 @@ open class TNSWebGLRenderingContext : TNSCanvasRenderingContext { lock.countDown() } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } @@ -1274,7 +1275,7 @@ open class TNSWebGLRenderingContext : TNSCanvasRenderingContext { lock.countDown() } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } @@ -1308,7 +1309,7 @@ open class TNSWebGLRenderingContext : TNSCanvasRenderingContext { lock.countDown() } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } @@ -1341,7 +1342,7 @@ open class TNSWebGLRenderingContext : TNSCanvasRenderingContext { lock.countDown() } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } @@ -1374,7 +1375,7 @@ open class TNSWebGLRenderingContext : TNSCanvasRenderingContext { lock.countDown() } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } @@ -1407,7 +1408,7 @@ open class TNSWebGLRenderingContext : TNSCanvasRenderingContext { lock.countDown() } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } @@ -1429,7 +1430,7 @@ open class TNSWebGLRenderingContext : TNSCanvasRenderingContext { lock.countDown() } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } @@ -1451,7 +1452,7 @@ open class TNSWebGLRenderingContext : TNSCanvasRenderingContext { lock.countDown() } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } @@ -1464,7 +1465,7 @@ open class TNSWebGLRenderingContext : TNSCanvasRenderingContext { lock.countDown() } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } return bufferId[0] @@ -1478,7 +1479,7 @@ open class TNSWebGLRenderingContext : TNSCanvasRenderingContext { lock.countDown() } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } return frameBufferId[0] @@ -1492,7 +1493,7 @@ open class TNSWebGLRenderingContext : TNSCanvasRenderingContext { lock.countDown() } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } return program[0] @@ -1506,7 +1507,7 @@ open class TNSWebGLRenderingContext : TNSCanvasRenderingContext { lock.countDown() } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } return renderBufferId[0] @@ -1520,7 +1521,7 @@ open class TNSWebGLRenderingContext : TNSCanvasRenderingContext { lock.countDown() } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } return shader[0] @@ -1534,7 +1535,7 @@ open class TNSWebGLRenderingContext : TNSCanvasRenderingContext { lock.countDown() } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } return textureId[0] @@ -1547,7 +1548,7 @@ open class TNSWebGLRenderingContext : TNSCanvasRenderingContext { lock.countDown() } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } @@ -1560,7 +1561,7 @@ open class TNSWebGLRenderingContext : TNSCanvasRenderingContext { lock.countDown() } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } @@ -1573,7 +1574,7 @@ open class TNSWebGLRenderingContext : TNSCanvasRenderingContext { lock.countDown() } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } @@ -1585,7 +1586,7 @@ open class TNSWebGLRenderingContext : TNSCanvasRenderingContext { lock.countDown() } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } @@ -1598,7 +1599,7 @@ open class TNSWebGLRenderingContext : TNSCanvasRenderingContext { lock.countDown() } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } @@ -1610,7 +1611,7 @@ open class TNSWebGLRenderingContext : TNSCanvasRenderingContext { lock.countDown() } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } @@ -1623,7 +1624,7 @@ open class TNSWebGLRenderingContext : TNSCanvasRenderingContext { lock.countDown() } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } @@ -1635,7 +1636,7 @@ open class TNSWebGLRenderingContext : TNSCanvasRenderingContext { lock.countDown() } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } @@ -1647,7 +1648,7 @@ open class TNSWebGLRenderingContext : TNSCanvasRenderingContext { lock.countDown() } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } @@ -1659,7 +1660,7 @@ open class TNSWebGLRenderingContext : TNSCanvasRenderingContext { lock.countDown() } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } @@ -1671,7 +1672,7 @@ open class TNSWebGLRenderingContext : TNSCanvasRenderingContext { lock.countDown() } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } @@ -1683,7 +1684,7 @@ open class TNSWebGLRenderingContext : TNSCanvasRenderingContext { lock.countDown() } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } @@ -1695,7 +1696,7 @@ open class TNSWebGLRenderingContext : TNSCanvasRenderingContext { lock.countDown() } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } @@ -1709,7 +1710,7 @@ open class TNSWebGLRenderingContext : TNSCanvasRenderingContext { lock.countDown() } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } @@ -1723,7 +1724,7 @@ open class TNSWebGLRenderingContext : TNSCanvasRenderingContext { lock.countDown() } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } @@ -1735,7 +1736,7 @@ open class TNSWebGLRenderingContext : TNSCanvasRenderingContext { lock.countDown() } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } @@ -1747,7 +1748,7 @@ open class TNSWebGLRenderingContext : TNSCanvasRenderingContext { lock.countDown() } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } @@ -1759,7 +1760,7 @@ open class TNSWebGLRenderingContext : TNSCanvasRenderingContext { lock.countDown() } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } @@ -1771,7 +1772,7 @@ open class TNSWebGLRenderingContext : TNSCanvasRenderingContext { lock.countDown() } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } @@ -1788,7 +1789,7 @@ open class TNSWebGLRenderingContext : TNSCanvasRenderingContext { lock.countDown() } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } @@ -1800,7 +1801,7 @@ open class TNSWebGLRenderingContext : TNSCanvasRenderingContext { lock.countDown() } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } @@ -1812,7 +1813,7 @@ open class TNSWebGLRenderingContext : TNSCanvasRenderingContext { lock.countDown() } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } @@ -1824,7 +1825,7 @@ open class TNSWebGLRenderingContext : TNSCanvasRenderingContext { lock.countDown() } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } @@ -1857,7 +1858,7 @@ open class TNSWebGLRenderingContext : TNSCanvasRenderingContext { lock.countDown() } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } return info @@ -1890,7 +1891,7 @@ open class TNSWebGLRenderingContext : TNSCanvasRenderingContext { lock.countDown() } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } return info @@ -1909,7 +1910,7 @@ open class TNSWebGLRenderingContext : TNSCanvasRenderingContext { lock.countDown() } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } return shadersList[0] @@ -1923,7 +1924,7 @@ open class TNSWebGLRenderingContext : TNSCanvasRenderingContext { lock.countDown() } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } return location[0] @@ -1940,7 +1941,7 @@ open class TNSWebGLRenderingContext : TNSCanvasRenderingContext { lock.countDown() } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } return parameter[0] @@ -1981,7 +1982,7 @@ open class TNSWebGLRenderingContext : TNSCanvasRenderingContext { lock.countDown() } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } return error[0] @@ -2073,7 +2074,7 @@ open class TNSWebGLRenderingContext : TNSCanvasRenderingContext { lock.countDown() } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } return value[0] @@ -2118,7 +2119,7 @@ open class TNSWebGLRenderingContext : TNSCanvasRenderingContext { lock.countDown() } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } return result @@ -2202,7 +2203,7 @@ open class TNSWebGLRenderingContext : TNSCanvasRenderingContext { lock.countDown() } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } return parameter[0] @@ -2216,7 +2217,7 @@ open class TNSWebGLRenderingContext : TNSCanvasRenderingContext { lock.countDown() } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } return infoLog[0] @@ -2237,7 +2238,7 @@ open class TNSWebGLRenderingContext : TNSCanvasRenderingContext { lock.countDown() } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } return parameter[0] @@ -2253,7 +2254,7 @@ open class TNSWebGLRenderingContext : TNSCanvasRenderingContext { lock.countDown() } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } return parameter[0] @@ -2267,7 +2268,7 @@ open class TNSWebGLRenderingContext : TNSCanvasRenderingContext { lock.countDown() } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } return infoLog[0] @@ -2286,7 +2287,7 @@ open class TNSWebGLRenderingContext : TNSCanvasRenderingContext { lock.countDown() } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } return parameter[0] @@ -2312,7 +2313,7 @@ open class TNSWebGLRenderingContext : TNSCanvasRenderingContext { lock.countDown() } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } /*if (hasError[0]) { @@ -2328,7 +2329,7 @@ open class TNSWebGLRenderingContext : TNSCanvasRenderingContext { lock.countDown() } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } return source[0] @@ -2344,7 +2345,7 @@ open class TNSWebGLRenderingContext : TNSCanvasRenderingContext { lock.countDown() } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } return extensions[0] @@ -2361,7 +2362,7 @@ open class TNSWebGLRenderingContext : TNSCanvasRenderingContext { lock.countDown() } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } return parameters[0] @@ -2473,7 +2474,7 @@ open class TNSWebGLRenderingContext : TNSCanvasRenderingContext { lock.countDown() } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } return uniform[0] @@ -2487,7 +2488,7 @@ open class TNSWebGLRenderingContext : TNSCanvasRenderingContext { lock.countDown() } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } return location[0] @@ -2514,7 +2515,7 @@ open class TNSWebGLRenderingContext : TNSCanvasRenderingContext { lock.countDown() } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } return attrib[0] @@ -2531,7 +2532,7 @@ open class TNSWebGLRenderingContext : TNSCanvasRenderingContext { lock.countDown() } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } return offset[0] @@ -2544,7 +2545,7 @@ open class TNSWebGLRenderingContext : TNSCanvasRenderingContext { lock.countDown() } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } @@ -2557,7 +2558,7 @@ open class TNSWebGLRenderingContext : TNSCanvasRenderingContext { lock.countDown() } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } return value[0] @@ -2580,7 +2581,7 @@ open class TNSWebGLRenderingContext : TNSCanvasRenderingContext { lock.countDown() } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } return value[0] @@ -2594,7 +2595,7 @@ open class TNSWebGLRenderingContext : TNSCanvasRenderingContext { lock.countDown() } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } return value[0] @@ -2608,7 +2609,7 @@ open class TNSWebGLRenderingContext : TNSCanvasRenderingContext { lock.countDown() } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } return value[0] @@ -2622,7 +2623,7 @@ open class TNSWebGLRenderingContext : TNSCanvasRenderingContext { lock.countDown() } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } return value[0] @@ -2636,7 +2637,7 @@ open class TNSWebGLRenderingContext : TNSCanvasRenderingContext { lock.countDown() } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } return value[0] @@ -2650,7 +2651,7 @@ open class TNSWebGLRenderingContext : TNSCanvasRenderingContext { lock.countDown() } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } return value[0] @@ -2663,7 +2664,7 @@ open class TNSWebGLRenderingContext : TNSCanvasRenderingContext { lock.countDown() } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } @@ -2675,7 +2676,7 @@ open class TNSWebGLRenderingContext : TNSCanvasRenderingContext { lock.countDown() } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } @@ -2730,7 +2731,7 @@ open class TNSWebGLRenderingContext : TNSCanvasRenderingContext { lock.countDown() } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } @@ -2742,7 +2743,7 @@ open class TNSWebGLRenderingContext : TNSCanvasRenderingContext { lock.countDown() } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } @@ -2864,7 +2865,7 @@ open class TNSWebGLRenderingContext : TNSCanvasRenderingContext { lock.countDown() } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } @@ -2885,7 +2886,7 @@ open class TNSWebGLRenderingContext : TNSCanvasRenderingContext { lock.countDown() } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } @@ -2906,7 +2907,7 @@ open class TNSWebGLRenderingContext : TNSCanvasRenderingContext { lock.countDown() } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } @@ -2928,7 +2929,7 @@ open class TNSWebGLRenderingContext : TNSCanvasRenderingContext { lock.countDown() } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } @@ -2950,7 +2951,7 @@ open class TNSWebGLRenderingContext : TNSCanvasRenderingContext { lock.countDown() } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } @@ -2971,7 +2972,7 @@ open class TNSWebGLRenderingContext : TNSCanvasRenderingContext { lock.countDown() } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } @@ -2992,7 +2993,7 @@ open class TNSWebGLRenderingContext : TNSCanvasRenderingContext { lock.countDown() } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } @@ -3013,7 +3014,7 @@ open class TNSWebGLRenderingContext : TNSCanvasRenderingContext { lock.countDown() } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } @@ -3025,7 +3026,7 @@ open class TNSWebGLRenderingContext : TNSCanvasRenderingContext { lock.countDown() } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } @@ -3037,7 +3038,7 @@ open class TNSWebGLRenderingContext : TNSCanvasRenderingContext { lock.countDown() } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } @@ -3049,7 +3050,7 @@ open class TNSWebGLRenderingContext : TNSCanvasRenderingContext { lock.countDown() } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } @@ -3061,7 +3062,7 @@ open class TNSWebGLRenderingContext : TNSCanvasRenderingContext { lock.countDown() } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } @@ -3073,7 +3074,7 @@ open class TNSWebGLRenderingContext : TNSCanvasRenderingContext { lock.countDown() } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } @@ -3103,7 +3104,7 @@ open class TNSWebGLRenderingContext : TNSCanvasRenderingContext { lock.countDown() } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } @@ -3117,7 +3118,7 @@ open class TNSWebGLRenderingContext : TNSCanvasRenderingContext { lock.countDown() } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } @@ -3144,7 +3145,7 @@ open class TNSWebGLRenderingContext : TNSCanvasRenderingContext { lock.countDown() } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } @@ -3156,7 +3157,7 @@ open class TNSWebGLRenderingContext : TNSCanvasRenderingContext { lock.countDown() } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } @@ -3168,7 +3169,7 @@ open class TNSWebGLRenderingContext : TNSCanvasRenderingContext { lock.countDown() } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } @@ -3291,7 +3292,7 @@ open class TNSWebGLRenderingContext : TNSCanvasRenderingContext { lock.countDown() } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } @@ -3355,7 +3356,7 @@ open class TNSWebGLRenderingContext : TNSCanvasRenderingContext { lock.countDown() } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } @@ -3419,7 +3420,7 @@ open class TNSWebGLRenderingContext : TNSCanvasRenderingContext { lock.countDown() } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } @@ -3482,7 +3483,7 @@ open class TNSWebGLRenderingContext : TNSCanvasRenderingContext { lock.countDown() } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } @@ -3586,7 +3587,7 @@ open class TNSWebGLRenderingContext : TNSCanvasRenderingContext { lock.countDown() } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } @@ -3633,7 +3634,7 @@ open class TNSWebGLRenderingContext : TNSCanvasRenderingContext { lock.countDown() } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } @@ -3680,7 +3681,7 @@ open class TNSWebGLRenderingContext : TNSCanvasRenderingContext { lock.countDown() } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } @@ -3727,7 +3728,7 @@ open class TNSWebGLRenderingContext : TNSCanvasRenderingContext { lock.countDown() } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } @@ -3758,7 +3759,7 @@ open class TNSWebGLRenderingContext : TNSCanvasRenderingContext { lock.countDown() } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } @@ -3786,7 +3787,7 @@ open class TNSWebGLRenderingContext : TNSCanvasRenderingContext { lock.countDown() } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } @@ -3814,7 +3815,7 @@ open class TNSWebGLRenderingContext : TNSCanvasRenderingContext { lock.countDown() } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } @@ -3844,7 +3845,7 @@ open class TNSWebGLRenderingContext : TNSCanvasRenderingContext { lock.countDown() } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } @@ -3856,7 +3857,7 @@ open class TNSWebGLRenderingContext : TNSCanvasRenderingContext { lock.countDown() } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } @@ -3868,7 +3869,7 @@ open class TNSWebGLRenderingContext : TNSCanvasRenderingContext { lock.countDown() } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } @@ -4024,7 +4025,7 @@ open class TNSWebGLRenderingContext : TNSCanvasRenderingContext { lock.countDown() } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } @@ -4048,7 +4049,7 @@ open class TNSWebGLRenderingContext : TNSCanvasRenderingContext { lock.countDown() } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } @@ -4071,7 +4072,7 @@ open class TNSWebGLRenderingContext : TNSCanvasRenderingContext { lock.countDown() } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } @@ -4094,7 +4095,7 @@ open class TNSWebGLRenderingContext : TNSCanvasRenderingContext { lock.countDown() } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } @@ -4133,7 +4134,7 @@ open class TNSWebGLRenderingContext : TNSCanvasRenderingContext { lock.countDown() } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } @@ -4170,7 +4171,7 @@ open class TNSWebGLRenderingContext : TNSCanvasRenderingContext { lock.countDown() } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } @@ -4207,7 +4208,7 @@ open class TNSWebGLRenderingContext : TNSCanvasRenderingContext { lock.countDown() } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } @@ -4244,7 +4245,7 @@ open class TNSWebGLRenderingContext : TNSCanvasRenderingContext { lock.countDown() } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } @@ -4276,7 +4277,7 @@ open class TNSWebGLRenderingContext : TNSCanvasRenderingContext { lock.countDown() } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } @@ -4307,7 +4308,7 @@ open class TNSWebGLRenderingContext : TNSCanvasRenderingContext { lock.countDown() } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } @@ -4336,7 +4337,7 @@ open class TNSWebGLRenderingContext : TNSCanvasRenderingContext { lock.countDown() } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } @@ -4365,7 +4366,7 @@ open class TNSWebGLRenderingContext : TNSCanvasRenderingContext { lock.countDown() } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } @@ -4377,7 +4378,7 @@ open class TNSWebGLRenderingContext : TNSCanvasRenderingContext { lock.countDown() } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } @@ -4390,7 +4391,7 @@ open class TNSWebGLRenderingContext : TNSCanvasRenderingContext { lock.countDown() } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } @@ -4403,7 +4404,7 @@ open class TNSWebGLRenderingContext : TNSCanvasRenderingContext { lock.countDown() } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } @@ -4415,7 +4416,7 @@ open class TNSWebGLRenderingContext : TNSCanvasRenderingContext { lock.countDown() } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } @@ -4428,7 +4429,7 @@ open class TNSWebGLRenderingContext : TNSCanvasRenderingContext { lock.countDown() } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } @@ -4441,7 +4442,7 @@ open class TNSWebGLRenderingContext : TNSCanvasRenderingContext { lock.countDown() } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } @@ -4453,7 +4454,7 @@ open class TNSWebGLRenderingContext : TNSCanvasRenderingContext { lock.countDown() } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } @@ -4466,7 +4467,7 @@ open class TNSWebGLRenderingContext : TNSCanvasRenderingContext { lock.countDown() } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } @@ -4479,7 +4480,7 @@ open class TNSWebGLRenderingContext : TNSCanvasRenderingContext { lock.countDown() } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } @@ -4491,7 +4492,7 @@ open class TNSWebGLRenderingContext : TNSCanvasRenderingContext { lock.countDown() } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } @@ -4504,7 +4505,7 @@ open class TNSWebGLRenderingContext : TNSCanvasRenderingContext { lock.countDown() } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } @@ -4517,7 +4518,7 @@ open class TNSWebGLRenderingContext : TNSCanvasRenderingContext { lock.countDown() } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } @@ -4529,7 +4530,7 @@ open class TNSWebGLRenderingContext : TNSCanvasRenderingContext { lock.countDown() } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } @@ -4542,7 +4543,7 @@ open class TNSWebGLRenderingContext : TNSCanvasRenderingContext { lock.countDown() } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } @@ -4555,7 +4556,7 @@ open class TNSWebGLRenderingContext : TNSCanvasRenderingContext { lock.countDown() } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } @@ -4567,7 +4568,7 @@ open class TNSWebGLRenderingContext : TNSCanvasRenderingContext { lock.countDown() } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } @@ -4580,7 +4581,7 @@ open class TNSWebGLRenderingContext : TNSCanvasRenderingContext { lock.countDown() } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } @@ -4593,7 +4594,7 @@ open class TNSWebGLRenderingContext : TNSCanvasRenderingContext { lock.countDown() } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } @@ -4605,7 +4606,7 @@ open class TNSWebGLRenderingContext : TNSCanvasRenderingContext { lock.countDown() } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } @@ -4618,7 +4619,7 @@ open class TNSWebGLRenderingContext : TNSCanvasRenderingContext { lock.countDown() } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } @@ -4631,7 +4632,7 @@ open class TNSWebGLRenderingContext : TNSCanvasRenderingContext { lock.countDown() } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } @@ -4643,7 +4644,7 @@ open class TNSWebGLRenderingContext : TNSCanvasRenderingContext { lock.countDown() } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } @@ -4656,7 +4657,7 @@ open class TNSWebGLRenderingContext : TNSCanvasRenderingContext { lock.countDown() } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } @@ -4669,7 +4670,7 @@ open class TNSWebGLRenderingContext : TNSCanvasRenderingContext { lock.countDown() } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } @@ -4682,7 +4683,7 @@ open class TNSWebGLRenderingContext : TNSCanvasRenderingContext { lock.countDown() } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } @@ -4695,7 +4696,7 @@ open class TNSWebGLRenderingContext : TNSCanvasRenderingContext { lock.countDown() } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } @@ -4708,7 +4709,7 @@ open class TNSWebGLRenderingContext : TNSCanvasRenderingContext { lock.countDown() } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } @@ -4721,7 +4722,7 @@ open class TNSWebGLRenderingContext : TNSCanvasRenderingContext { lock.countDown() } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } @@ -4734,7 +4735,7 @@ open class TNSWebGLRenderingContext : TNSCanvasRenderingContext { lock.countDown() } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } @@ -4747,7 +4748,7 @@ open class TNSWebGLRenderingContext : TNSCanvasRenderingContext { lock.countDown() } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } @@ -4759,7 +4760,7 @@ open class TNSWebGLRenderingContext : TNSCanvasRenderingContext { lock.countDown() } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } @@ -4771,7 +4772,7 @@ open class TNSWebGLRenderingContext : TNSCanvasRenderingContext { lock.countDown() } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } @@ -4783,7 +4784,7 @@ open class TNSWebGLRenderingContext : TNSCanvasRenderingContext { lock.countDown() } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } @@ -4795,7 +4796,7 @@ open class TNSWebGLRenderingContext : TNSCanvasRenderingContext { lock.countDown() } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } @@ -4807,7 +4808,7 @@ open class TNSWebGLRenderingContext : TNSCanvasRenderingContext { lock.countDown() } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } @@ -4819,7 +4820,7 @@ open class TNSWebGLRenderingContext : TNSCanvasRenderingContext { lock.countDown() } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } @@ -4831,7 +4832,7 @@ open class TNSWebGLRenderingContext : TNSCanvasRenderingContext { lock.countDown() } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } @@ -4843,7 +4844,7 @@ open class TNSWebGLRenderingContext : TNSCanvasRenderingContext { lock.countDown() } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } @@ -4855,7 +4856,7 @@ open class TNSWebGLRenderingContext : TNSCanvasRenderingContext { lock.countDown() } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } @@ -4867,7 +4868,7 @@ open class TNSWebGLRenderingContext : TNSCanvasRenderingContext { lock.countDown() } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } @@ -4879,7 +4880,7 @@ open class TNSWebGLRenderingContext : TNSCanvasRenderingContext { lock.countDown() } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } @@ -4891,7 +4892,7 @@ open class TNSWebGLRenderingContext : TNSCanvasRenderingContext { lock.countDown() } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } @@ -4903,7 +4904,7 @@ open class TNSWebGLRenderingContext : TNSCanvasRenderingContext { lock.countDown() } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } @@ -4915,7 +4916,7 @@ open class TNSWebGLRenderingContext : TNSCanvasRenderingContext { lock.countDown() } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } @@ -4934,7 +4935,7 @@ open class TNSWebGLRenderingContext : TNSCanvasRenderingContext { lock.countDown() } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } @@ -4946,7 +4947,7 @@ open class TNSWebGLRenderingContext : TNSCanvasRenderingContext { lock.countDown() } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } diff --git a/packages/canvas/src-native/canvas-android/canvas/src/main/java/org/nativescript/canvas/Utils.kt b/packages/canvas/src-native/canvas-android/canvas/src/main/java/org/nativescript/canvas/Utils.kt index deab1768..ee771db1 100644 --- a/packages/canvas/src-native/canvas-android/canvas/src/main/java/org/nativescript/canvas/Utils.kt +++ b/packages/canvas/src-native/canvas-android/canvas/src/main/java/org/nativescript/canvas/Utils.kt @@ -7,6 +7,7 @@ import android.os.Build import android.os.Environment import java.io.File import java.util.concurrent.CountDownLatch +import java.util.concurrent.TimeUnit object Utils { @@ -129,7 +130,7 @@ object Utils { } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } @@ -152,7 +153,7 @@ object Utils { } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } return render @@ -172,7 +173,7 @@ object Utils { } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } @@ -186,7 +187,7 @@ object Utils { } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } @@ -214,7 +215,7 @@ object Utils { } try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } diff --git a/packages/canvas/src-native/canvas-android/canvas/src/main/java/org/nativescript/canvas/extensions/EXT_disjoint_timer_query.kt b/packages/canvas/src-native/canvas-android/canvas/src/main/java/org/nativescript/canvas/extensions/EXT_disjoint_timer_query.kt index 3fa81270..0bf1985d 100644 --- a/packages/canvas/src-native/canvas-android/canvas/src/main/java/org/nativescript/canvas/extensions/EXT_disjoint_timer_query.kt +++ b/packages/canvas/src-native/canvas-android/canvas/src/main/java/org/nativescript/canvas/extensions/EXT_disjoint_timer_query.kt @@ -7,6 +7,7 @@ import androidx.annotation.RequiresApi import org.nativescript.canvas.Constants import org.nativescript.canvas.TNSCanvas import java.util.concurrent.CountDownLatch +import java.util.concurrent.TimeUnit /** * Created by triniwiz on 5/1/20 @@ -21,7 +22,7 @@ class EXT_disjoint_timer_query(var canvas: TNSCanvas) { lock.countDown() }) try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } return query[0] @@ -35,7 +36,7 @@ class EXT_disjoint_timer_query(var canvas: TNSCanvas) { lock.countDown() }) try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } @@ -48,7 +49,7 @@ class EXT_disjoint_timer_query(var canvas: TNSCanvas) { lock.countDown() }) try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } return value[0] @@ -61,7 +62,7 @@ class EXT_disjoint_timer_query(var canvas: TNSCanvas) { lock.countDown() }) try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } @@ -73,7 +74,7 @@ class EXT_disjoint_timer_query(var canvas: TNSCanvas) { lock.countDown() }) try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } @@ -90,7 +91,7 @@ class EXT_disjoint_timer_query(var canvas: TNSCanvas) { lock.countDown() }) try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } return query[0] @@ -104,7 +105,7 @@ class EXT_disjoint_timer_query(var canvas: TNSCanvas) { lock.countDown() }) try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } return if (pname == QUERY_RESULT_AVAILABLE_EXT) { diff --git a/packages/canvas/src-native/canvas-android/canvas/src/main/java/org/nativescript/canvas/extensions/OES_vertex_array_object.kt b/packages/canvas/src-native/canvas-android/canvas/src/main/java/org/nativescript/canvas/extensions/OES_vertex_array_object.kt index 6858aa74..4803e19f 100644 --- a/packages/canvas/src-native/canvas-android/canvas/src/main/java/org/nativescript/canvas/extensions/OES_vertex_array_object.kt +++ b/packages/canvas/src-native/canvas-android/canvas/src/main/java/org/nativescript/canvas/extensions/OES_vertex_array_object.kt @@ -6,6 +6,7 @@ import androidx.annotation.RequiresApi import org.nativescript.canvas.Constants import org.nativescript.canvas.TNSCanvas import java.util.concurrent.CountDownLatch +import java.util.concurrent.TimeUnit /** * Created by triniwiz on 5/1/20 @@ -21,7 +22,7 @@ class OES_vertex_array_object(var canvas: TNSCanvas) { lock.countDown() }) try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } return array[0] @@ -35,7 +36,7 @@ class OES_vertex_array_object(var canvas: TNSCanvas) { lock.countDown() }) try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } @@ -48,7 +49,7 @@ class OES_vertex_array_object(var canvas: TNSCanvas) { lock.countDown() }) try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } return value[0] @@ -62,7 +63,7 @@ class OES_vertex_array_object(var canvas: TNSCanvas) { lock.countDown() }) try { - lock.await() + lock.await(2, TimeUnit.SECONDS) } catch (ignored: InterruptedException) { } } diff --git a/packages/canvas/src-native/canvas-android/gradle/wrapper/gradle-wrapper.properties b/packages/canvas/src-native/canvas-android/gradle/wrapper/gradle-wrapper.properties index 0bbb3c5f..56d26615 100644 --- a/packages/canvas/src-native/canvas-android/gradle/wrapper/gradle-wrapper.properties +++ b/packages/canvas/src-native/canvas-android/gradle/wrapper/gradle-wrapper.properties @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-6.6-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-all.zip diff --git a/packages/canvas/src-native/canvas-ios/CanvasNative copy-Info.plist b/packages/canvas/src-native/canvas-ios/CanvasNative copy-Info.plist new file mode 100644 index 00000000..9bcb2444 --- /dev/null +++ b/packages/canvas/src-native/canvas-ios/CanvasNative copy-Info.plist @@ -0,0 +1,22 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + $(PRODUCT_BUNDLE_PACKAGE_TYPE) + CFBundleShortVersionString + 1.0 + CFBundleVersion + $(CURRENT_PROJECT_VERSION) + + diff --git a/packages/canvas/src-native/canvas-ios/CanvasNative copy2-Info.plist b/packages/canvas/src-native/canvas-ios/CanvasNative copy2-Info.plist new file mode 100644 index 00000000..9bcb2444 --- /dev/null +++ b/packages/canvas/src-native/canvas-ios/CanvasNative copy2-Info.plist @@ -0,0 +1,22 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + $(PRODUCT_BUNDLE_PACKAGE_TYPE) + CFBundleShortVersionString + 1.0 + CFBundleVersion + $(CURRENT_PROJECT_VERSION) + + diff --git a/packages/canvas/src-native/canvas-ios/CanvasNative.xcodeproj/project.pbxproj b/packages/canvas/src-native/canvas-ios/CanvasNative.xcodeproj/project.pbxproj index e7950af4..628d3be3 100644 --- a/packages/canvas/src-native/canvas-ios/CanvasNative.xcodeproj/project.pbxproj +++ b/packages/canvas/src-native/canvas-ios/CanvasNative.xcodeproj/project.pbxproj @@ -108,6 +108,10 @@ F1A87B24255BB4F000394387 /* TextBaseLine.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TextBaseLine.swift; sourceTree = ""; }; F1A87C74255D00BA00394387 /* TNSCanvas.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = TNSCanvas.xib; sourceTree = ""; }; F1DE2E4E2612F7CA0000D48F /* Utils.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Utils.swift; sourceTree = ""; }; + F1FF5772271E5F7B001CBF6D /* CanvasNative copy-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; name = "CanvasNative copy-Info.plist"; path = "/Users/triniwiz/Desktop/oss/canvas/packages/canvas/src-native/canvas-ios/CanvasNative copy-Info.plist"; sourceTree = ""; }; + F1FF57C0271E6998001CBF6D /* CanvasNative copy2-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; name = "CanvasNative copy2-Info.plist"; path = "/Users/triniwiz/Desktop/oss/canvas/packages/canvas/src-native/canvas-ios/CanvasNative copy2-Info.plist"; sourceTree = ""; }; + F1FF57C2271E6BF0001CBF6D /* libcanvasnative.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libcanvasnative.a; path = "CanvasNative/libs/arm64-iphoneos/libcanvasnative.a"; sourceTree = ""; }; + F1FF57C4271E6C01001CBF6D /* libcanvasnative.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libcanvasnative.a; path = CanvasNative/libs/iphonesimulator/libcanvasnative.a; sourceTree = ""; }; F1FF6A3225248CFE001DAE0D /* TNSDOMMatrix.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = TNSDOMMatrix.swift; path = CanvasNative/Source/TNSDOMMatrix.swift; sourceTree = ""; }; F1FF6A3325248CFE001DAE0D /* TNSTextAlignment.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = TNSTextAlignment.swift; path = CanvasNative/Source/TNSTextAlignment.swift; sourceTree = ""; }; F1FF6A3425248CFE001DAE0D /* TNSCanvasListener.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = TNSCanvasListener.swift; path = CanvasNative/Source/TNSCanvasListener.swift; sourceTree = ""; }; @@ -289,6 +293,9 @@ F11C5D0C2524403700538D04 /* CanvasNative */, F11C5D172524403700538D04 /* CanvasNativeTests */, F11C5D0B2524403700538D04 /* Products */, + F1FF5772271E5F7B001CBF6D /* CanvasNative copy-Info.plist */, + F1FF57C0271E6998001CBF6D /* CanvasNative copy2-Info.plist */, + F1FF57C1271E6BF0001CBF6D /* Frameworks */, ); sourceTree = ""; }; @@ -319,6 +326,15 @@ path = CanvasNativeTests; sourceTree = ""; }; + F1FF57C1271E6BF0001CBF6D /* Frameworks */ = { + isa = PBXGroup; + children = ( + F1FF57C4271E6C01001CBF6D /* libcanvasnative.a */, + F1FF57C2271E6BF0001CBF6D /* libcanvasnative.a */, + ); + name = Frameworks; + sourceTree = ""; + }; /* End PBXGroup section */ /* Begin PBXHeadersBuildPhase section */ @@ -641,34 +657,39 @@ F11C5D1F2524403700538D04 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { + CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_STYLE = Automatic; DEFINES_MODULE = YES; - DEVELOPMENT_TEAM = ""; + DEVELOPMENT_TEAM = TG7LSJHB64; DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; ENABLE_BITCODE = NO; - "EXCLUDED_ARCHS[sdk=iphonesimulator*]" = "arm64 arm64e i386"; + "EXCLUDED_ARCHS[sdk=iphonesimulator*]" = i386; GCC_PREPROCESSOR_DEFINITIONS = ( "DEBUG=1", "GLES_SILENCE_DEPRECATION=1", "CI_SILENCE_GL_DEPRECATION=1", ); - HEADER_SEARCH_PATHS = "\"$(SRCROOT)/CanvasNative/include\""; + HEADER_SEARCH_PATHS = "$(SRCROOT)/CanvasNative/include"; INFOPLIST_FILE = CanvasNative/Info.plist; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 10.0; + IPHONEOS_DEPLOYMENT_TARGET = 11.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", "@loader_path/Frameworks", ); + "LIBRARY_SEARCH_PATHS[sdk=iphoneos*][arch=arm64]" = "$(SRCROOT)/CanvasNative/libs/arm64-iphoneos"; + "LIBRARY_SEARCH_PATHS[sdk=iphonesimulator*][arch=arm64]" = "$(SRCROOT)/CanvasNative/libs/arm64-iphonesimulator"; + "LIBRARY_SEARCH_PATHS[sdk=iphonesimulator*][arch=x86_64]" = "$(SRCROOT)/CanvasNative/libs/x86_64-iphonesimulator"; ONLY_ACTIVE_ARCH = NO; OTHER_LDFLAGS = ( - "-L\"$(SRCROOT)/CanvasNative/libs/$(CURRENT_ARCH)$(EFFECTIVE_PLATFORM_NAME)\"", "-lcanvasnative", "-lc++", "-ObjC", + "-framework", + OpenGLES, ); PRODUCT_BUNDLE_IDENTIFIER = com.github.triniwiz.CanvasNative; PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; @@ -683,32 +704,37 @@ F11C5D202524403700538D04 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { + CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_STYLE = Automatic; DEFINES_MODULE = YES; - DEVELOPMENT_TEAM = ""; + DEVELOPMENT_TEAM = TG7LSJHB64; DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; ENABLE_BITCODE = NO; - "EXCLUDED_ARCHS[sdk=iphonesimulator*]" = "arm64 arm64e i386"; + "EXCLUDED_ARCHS[sdk=iphonesimulator*]" = i386; GCC_PREPROCESSOR_DEFINITIONS = ( "GLES_SILENCE_DEPRECATION=1", "CI_SILENCE_GL_DEPRECATION=1", ); - HEADER_SEARCH_PATHS = "\"$(SRCROOT)/CanvasNative/include\""; + HEADER_SEARCH_PATHS = "$(SRCROOT)/CanvasNative/include"; INFOPLIST_FILE = CanvasNative/Info.plist; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 10.0; + IPHONEOS_DEPLOYMENT_TARGET = 11.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", "@loader_path/Frameworks", ); + "LIBRARY_SEARCH_PATHS[sdk=iphoneos*][arch=arm64]" = "$(SRCROOT)/CanvasNative/libs/arm64-iphoneos"; + "LIBRARY_SEARCH_PATHS[sdk=iphonesimulator*][arch=arm64]" = "$(SRCROOT)/CanvasNative/libs/arm64-iphonesimulator"; + "LIBRARY_SEARCH_PATHS[sdk=iphonesimulator*][arch=x86_64]" = "$(SRCROOT)/CanvasNative/libs/x86_64-iphonesimulator"; OTHER_LDFLAGS = ( - "-L\"$(SRCROOT)/CanvasNative/libs/$(CURRENT_ARCH)$(EFFECTIVE_PLATFORM_NAME)\"", "-lcanvasnative", "-lc++", "-ObjC", + "-framework", + OpenGLES, ); PRODUCT_BUNDLE_IDENTIFIER = com.github.triniwiz.CanvasNative; PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; diff --git a/packages/canvas/src-native/canvas-ios/CanvasNative.xcodeproj/project.xcworkspace/xcuserdata/triniwiz.xcuserdatad/UserInterfaceState.xcuserstate b/packages/canvas/src-native/canvas-ios/CanvasNative.xcodeproj/project.xcworkspace/xcuserdata/triniwiz.xcuserdatad/UserInterfaceState.xcuserstate index eb567ee5..c3032089 100644 Binary files a/packages/canvas/src-native/canvas-ios/CanvasNative.xcodeproj/project.xcworkspace/xcuserdata/triniwiz.xcuserdatad/UserInterfaceState.xcuserstate and b/packages/canvas/src-native/canvas-ios/CanvasNative.xcodeproj/project.xcworkspace/xcuserdata/triniwiz.xcuserdatad/UserInterfaceState.xcuserstate differ diff --git a/packages/canvas/src-native/canvas-ios/CanvasNative.xcodeproj/xcshareddata/xcschemes/CanvasNativeSim.xcscheme b/packages/canvas/src-native/canvas-ios/CanvasNative.xcodeproj/xcshareddata/xcschemes/CanvasNativeSim.xcscheme new file mode 100644 index 00000000..029a4863 --- /dev/null +++ b/packages/canvas/src-native/canvas-ios/CanvasNative.xcodeproj/xcshareddata/xcschemes/CanvasNativeSim.xcscheme @@ -0,0 +1,67 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/packages/canvas/src-native/canvas-ios/CanvasNative.xcodeproj/xcuserdata/triniwiz.xcuserdatad/xcschemes/xcschememanagement.plist b/packages/canvas/src-native/canvas-ios/CanvasNative.xcodeproj/xcuserdata/triniwiz.xcuserdatad/xcschemes/xcschememanagement.plist index 07746b1d..83d432c0 100644 --- a/packages/canvas/src-native/canvas-ios/CanvasNative.xcodeproj/xcuserdata/triniwiz.xcuserdatad/xcschemes/xcschememanagement.plist +++ b/packages/canvas/src-native/canvas-ios/CanvasNative.xcodeproj/xcuserdata/triniwiz.xcuserdatad/xcschemes/xcschememanagement.plist @@ -4,6 +4,11 @@ SchemeUserState + CanvasNative copy.xcscheme_^#shared#^_ + + orderHint + 2 + CanvasNative.xcscheme_^#shared#^_ orderHint @@ -14,6 +19,11 @@ orderHint 1 + CanvasNativeSim.xcscheme_^#shared#^_ + + orderHint + 3 + SuppressBuildableAutocreation diff --git a/packages/canvas/src-native/canvas-ios/CanvasNative/Dist/CanvasNative.framework.dSYM.zip b/packages/canvas/src-native/canvas-ios/CanvasNative/Dist/CanvasNative.framework.dSYM.zip deleted file mode 100644 index b2d09eff..00000000 Binary files a/packages/canvas/src-native/canvas-ios/CanvasNative/Dist/CanvasNative.framework.dSYM.zip and /dev/null differ diff --git a/packages/canvas/src-native/canvas-ios/CanvasNative/Dist/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Headers/canvas_native.h b/packages/canvas/src-native/canvas-ios/CanvasNative/Dist/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Headers/canvas_native.h deleted file mode 100644 index 63b8bf98..00000000 --- a/packages/canvas/src-native/canvas-ios/CanvasNative/Dist/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Headers/canvas_native.h +++ /dev/null @@ -1,977 +0,0 @@ -#include -#include -#include -#include - -typedef enum { - SourceOver = 0, - SourceIn = 1, - SourceOut = 2, - SourceAtop = 3, - DestinationOver = 4, - DestinationIn = 5, - DestinationOut = 6, - DestinationAtop = 7, - Lighter = 8, - Copy = 9, - Xor = 10, - Multiply = 11, - Screen = 12, - Overlay = 13, - Darken = 14, - Lighten = 15, - ColorDodge = 16, - ColorBurn = 17, - HardLight = 18, - SoftLight = 19, - Difference = 20, - Exclusion = 21, - Hue = 22, - Saturation = 23, - Color = 24, - Luminosity = 25, -} CompositeOperationType; - -typedef enum { - NonZero = 0, - EvenOdd = 1, -} FillRule; - -typedef enum { - Low = 0, - Medium = 1, - High = 2, -} ImageSmoothingQuality; - -typedef enum { - CapButt = 0, - CapRound = 1, - CapSquare = 2, -} LineCap; - -typedef enum { - JoinRound = 0, - JoinBevel = 1, - JoinMiter = 2, -} LineJoin; - -typedef enum { - PaintStyleValueTypeColor = 0, - PaintStyleValueTypeGradient = 1, - PaintStyleValueTypePattern = 2, -} PaintStyleValueType; - -typedef enum { - Repeat = 0, - RepeatX = 1, - RepeatY = 2, - NoRepeat = 3, -} Repetition; - -typedef enum { - START = 0, - LEFT = 1, - CENTER = 2, - RIGHT = 3, - END = 4, -} TextAlign; - -typedef enum { - TOP = 0, - HANGING = 1, - MIDDLE = 2, - ALPHABETIC = 3, - IDEOGRAPHIC = 4, - BOTTOM = 5, -} TextBaseLine; - -typedef enum { - LTR = 0, - RTL = 1, -} TextDirection; - -typedef struct Context Context; - -typedef struct { - long long value; - PaintStyleValueType value_type; -} PaintStyleValue; - -typedef struct { - float *data; - uintptr_t data_len; -} F32Array; - -typedef struct { - uint8_t *data; - uintptr_t data_len; -} U8Array; - -typedef struct { - double *data; - uintptr_t data_len; -} F64Array; - -typedef struct { - int16_t *data; - uintptr_t data_len; -} I16Array; - -typedef struct { - int32_t *data; - uintptr_t data_len; -} I32Array; - -typedef struct { - int8_t *data; - uintptr_t data_len; -} I8Array; - -typedef struct { - uint16_t *data; - uintptr_t data_len; -} U16Array; - -typedef struct { - uint32_t *data; - uintptr_t data_len; -} U32Array; - -void context_arc(long long context, - float x, - float y, - float radius, - float start_angle, - float end_angle, - bool anti_clockwise); - -void context_arc_to(long long context, float x1, float y1, float x2, float y2, float radius); - -void context_begin_path(long long context); - -void context_bezier_curve_to(long long context, - float cp1x, - float cp1y, - float cp2x, - float cp2y, - float x, - float y); - -void context_clear_rect(long long context, float x, float y, float width, float height); - -void context_clip(long long context, long long path, FillRule rule); - -void context_clip_rule(long long context, FillRule rule); - -void context_close_path(long long context); - -long long context_create_image_data(int width, int height); - -long long context_create_linear_gradient(long long context, float x0, float y0, float x1, float y1); - -long long context_create_pattern(long long context, - const uint8_t *image_data, - uintptr_t image_len, - int width, - int height, - Repetition repetition); - -long long context_create_pattern_asset(long long context, long long asset, Repetition repetition); - -long long context_create_pattern_encoded(long long context, - const uint8_t *image_data, - uintptr_t image_len, - Repetition repetition); - -long long context_create_radial_gradient(long long context, - float x0, - float y0, - float r0, - float x1, - float y1, - float r1); - -void context_custom_with_buffer_flush(long long context, - uint8_t *buf, - uintptr_t buf_size, - float width, - float height); - -const char *context_data_url(long long context, const char *format, float quality); - -void context_draw_image(long long context, - const uint8_t *image_data, - uintptr_t image_len, - float width, - float height, - float sx, - float sy, - float s_width, - float s_height, - float dx, - float dy, - float d_width, - float d_height); - -void context_draw_image_asset(long long context, - long long asset, - float sx, - float sy, - float s_width, - float s_height, - float dx, - float dy, - float d_width, - float d_height); - -void context_draw_image_dx_dy(long long context, - const uint8_t *image_data, - uintptr_t image_len, - float width, - float height, - float dx, - float dy); - -void context_draw_image_dx_dy_asset(long long context, long long asset, float dx, float dy); - -void context_draw_image_dx_dy_dw_dh(long long context, - const uint8_t *image_data, - uintptr_t image_len, - float width, - float height, - float dx, - float dy, - float d_width, - float d_height); - -void context_draw_image_dx_dy_dw_dh_asset(long long context, - long long asset, - float dx, - float dy, - float d_width, - float d_height); - -void context_draw_image_encoded(long long context, - const uint8_t *image_data, - uintptr_t image_len, - float sx, - float sy, - float s_width, - float s_height, - float dx, - float dy, - float d_width, - float d_height); - -void context_draw_image_encoded_dx_dy(long long context, - const uint8_t *image_data, - uintptr_t image_len, - float dx, - float dy); - -void context_draw_image_encoded_dx_dy_dw_dh(long long context, - const uint8_t *image_data, - uintptr_t image_len, - float dx, - float dy, - float d_width, - float d_height); - -void context_ellipse(long long context, - float x, - float y, - float radius_x, - float radius_y, - float rotation, - float start_angle, - float end_angle, - bool anticlockwise); - -void context_fill(long long context, long long path, FillRule rule); - -void context_fill_rect(long long context, float x, float y, float width, float height); - -void context_fill_text(long long context, const char *text, float x, float y, float width); - -void context_flush(long long context); - -TextDirection context_get_direction(const Context *context); - -PaintStyleValue *context_get_fill_style(long long context); - -const char *context_get_filter(long long context); - -const char *context_get_font(long long context); - -float context_get_global_alpha(long long context); - -CompositeOperationType context_get_global_composite_operation(long long context); - -long long context_get_image_data(long long context, float sx, float sy, float sw, float sh); - -bool context_get_image_smoothing_enabled(long long context); - -ImageSmoothingQuality context_get_image_smoothing_quality(long long context); - -LineCap context_get_line_cap(long long context); - -F32Array *context_get_line_dash(long long context); - -float context_get_line_dash_offset(long long context); - -LineJoin context_get_line_join(long long context); - -float context_get_line_width(long long context); - -float context_get_miter_limit(long long context); - -float context_get_shadow_blur(long long context); - -const char *context_get_shadow_color(long long context); - -float context_get_shadow_offset_x(long long context); - -float context_get_shadow_offset_y(long long context); - -PaintStyleValue *context_get_stroke_style(long long context); - -TextAlign context_get_text_align(long long context); - -TextBaseLine context_get_text_baseline(long long context); - -long long context_get_transform(long long context); - -long long context_init_context(float width, - float height, - float density, - int buffer_id, - uintptr_t samples, - bool alpha, - unsigned int font_color, - float ppi, - TextDirection direction); - -long long context_init_context_with_custom_surface(float width, - float height, - float density, - bool alpha, - int font_color, - float ppi, - TextDirection direction); - -bool context_is_point_in_path(long long context, long long path, float x, float y, FillRule rule); - -bool context_is_point_in_stroke(long long context, long long path, float x, float y); - -void context_line_to(long long context, float x, float y); - -long long context_measure_text(long long context, const char *text); - -void context_move_to(long long context, float x, float y); - -void context_put_image_data(long long context, - long long image_data, - float dx, - float dy, - float dirty_x, - float dirty_y, - float dirty_width, - float dirty_height); - -void context_quadratic_curve_to(long long context, float cpx, float cpy, float x, float y); - -void context_rect(long long context, float x, float y, float width, float height); - -void context_reset_transform(long long context); - -void context_resize_custom_surface(long long context, - float width, - float height, - float density, - bool alpha, - float ppi); - -void context_resize_surface(long long context, - float width, - float height, - float density, - int buffer_id, - uintptr_t samples, - bool alpha, - float ppi); - -void context_restore(long long context); - -void context_rotate(long long context, float angle); - -void context_save(long long context); - -void context_scale(long long context, float x, float y); - -void context_set_direction(long long context, TextDirection direction); - -void context_set_fill_style(long long context, long long style); - -void context_set_filter(long long context, const char *filter); - -void context_set_font(long long context, const char *filter); - -void context_set_global_alpha(long long context, float alpha); - -void context_set_global_composite_operation(long long context, CompositeOperationType operation); - -void context_set_image_smoothing_enabled(long long context, bool enabled); - -void context_set_image_smoothing_quality(long long context, ImageSmoothingQuality quality); - -void context_set_line_cap(long long context, LineCap cap); - -void context_set_line_dash(long long context, const float *data, uintptr_t data_length); - -void context_set_line_dash_offset(long long context, float offset); - -void context_set_line_join(long long context, LineJoin join); - -void context_set_line_width(long long context, float width); - -void context_set_miter_limit(long long context, float limit); - -void context_set_shadow_blur(long long context, float blur); - -void context_set_shadow_color(long long context, uint8_t r, uint8_t g, uint8_t b, uint8_t a); - -void context_set_shadow_color_string(long long context, const char *color); - -void context_set_shadow_offset_x(long long context, float x); - -void context_set_shadow_offset_y(long long context, float y); - -void context_set_stroke_style(long long context, long long style); - -void context_set_text_align(long long context, TextAlign align); - -void context_set_text_baseline(long long context, TextBaseLine baseline); - -void context_set_transform(long long context, float a, float b, float c, float d, float e, float f); - -void context_set_transform_matrix(long long context, long long matrix); - -U8Array *context_snapshot_canvas(long long context); - -void context_stroke(long long context, long long path); - -void context_stroke_rect(long long context, float x, float y, float width, float height); - -void context_stroke_text(long long context, const char *text, float x, float y, float width); - -void context_transform(long long context, float a, float b, float c, float d, float e, float f); - -void context_translate(long long context, float x, float y); - -void destroy_context(long long context); - -void destroy_f32_array(F32Array *array); - -void destroy_f64_array(F64Array *array); - -void destroy_i16_array(I16Array *array); - -void destroy_i32_array(I32Array *array); - -void destroy_i8_array(I8Array *array); - -void destroy_image_asset(long long asset); - -void destroy_image_data(long long image_data); - -void destroy_matrix(long long matrix); - -void destroy_paint_style(long long style); - -void destroy_paint_style_value(long long value); - -void destroy_path(long long path); - -void destroy_string(const char *string); - -void destroy_text_decoder(long long decoder); - -void destroy_text_encoder(long long encoder); - -void destroy_text_metrics(long long metrics); - -void destroy_u16_array(U16Array *array); - -void destroy_u32_array(U32Array *array); - -void destroy_u8_array(U8Array *array); - -void flip_y_in_place(uint8_t *data, uintptr_t length, uintptr_t bytes_per_row, uintptr_t height); - -void flip_y_in_place_3d(uint8_t *data, - uintptr_t length, - uintptr_t bytes_per_row, - uintptr_t height, - uintptr_t depth); - -void flip_y_in_place_3d_f32(float *data, - uintptr_t length, - uintptr_t bytes_per_row, - uintptr_t height, - uintptr_t depth); - -void flip_y_in_place_3d_f64(double *data, - uintptr_t length, - uintptr_t bytes_per_row, - uintptr_t height, - uintptr_t depth); - -void flip_y_in_place_3d_i16(int16_t *data, - uintptr_t length, - uintptr_t bytes_per_row, - uintptr_t height, - uintptr_t depth); - -void flip_y_in_place_3d_i32(int32_t *data, - uintptr_t length, - uintptr_t bytes_per_row, - uintptr_t height, - uintptr_t depth); - -void flip_y_in_place_3d_i8(int8_t *data, - uintptr_t length, - uintptr_t bytes_per_row, - uintptr_t height, - uintptr_t depth); - -void flip_y_in_place_3d_u16(uint16_t *data, - uintptr_t length, - uintptr_t bytes_per_row, - uintptr_t height, - uintptr_t depth); - -void flip_y_in_place_3d_u32(uint32_t *data, - uintptr_t length, - uintptr_t bytes_per_row, - uintptr_t height, - uintptr_t depth); - -void flip_y_in_place_f32(float *data, uintptr_t length, uintptr_t bytes_per_row, uintptr_t height); - -void flip_y_in_place_f64(double *data, uintptr_t length, uintptr_t bytes_per_row, uintptr_t height); - -void flip_y_in_place_i16(int16_t *data, - uintptr_t length, - uintptr_t bytes_per_row, - uintptr_t height); - -void flip_y_in_place_i32(int32_t *data, - uintptr_t length, - uintptr_t bytes_per_row, - uintptr_t height); - -void flip_y_in_place_i8(int8_t *data, uintptr_t length, uintptr_t bytes_per_row, uintptr_t height); - -void flip_y_in_place_u16(uint16_t *data, - uintptr_t length, - uintptr_t bytes_per_row, - uintptr_t height); - -void flip_y_in_place_u32(uint32_t *data, - uintptr_t length, - uintptr_t bytes_per_row, - uintptr_t height); - -long long gl_get_vertex_attrib_offset(unsigned int index, unsigned int pname); - -void gl_tex_image_2D_asset(unsigned int target, - int level, - int internalformat, - int border, - unsigned int format, - unsigned int image_type, - long long asset, - bool flip_y); - -void gl_tex_image_3D_asset(unsigned int target, - int level, - int internalformat, - int width, - int height, - int depth, - int border, - unsigned int format, - unsigned int image_type, - long long asset, - bool flip_y); - -void gl_tex_sub_image_2D_asset(unsigned int target, - int level, - int xoffset, - int yoffset, - unsigned int format, - unsigned int image_type, - long long asset, - bool flip_y); - -void gl_tex_sub_image_3D_asset(unsigned int target, - int level, - int xoffset, - int yoffset, - int zoffset, - int width, - int height, - int depth, - unsigned int format, - unsigned int image_type, - long long asset, - bool flip_y); - -void gl_vertex_attrib_pointer(unsigned int index, - int size, - unsigned int pointer_type, - bool normalized, - int stride, - long long offset); - -void gradient_add_color_stop(long long style, float stop, const char *color); - -long long image_asset_create(void); - -bool image_asset_flip_x(long long asset); - -bool image_asset_flip_x_in_place(long long asset); - -void image_asset_flip_x_in_place_owned(uint8_t *buf, uintptr_t length); - -bool image_asset_flip_y(long long asset); - -bool image_asset_flip_y_in_place(long long asset); - -void image_asset_flip_y_in_place_owned(uint8_t *buf, uintptr_t length); - -U8Array *image_asset_get_bytes(long long asset); - -const char *image_asset_get_error(long long asset); - -U8Array *image_asset_get_rgb_bytes(long long asset); - -U8Array *image_asset_get_rgba_bytes(long long asset); - -bool image_asset_has_error(long long asset); - -unsigned int image_asset_height(long long asset); - -bool image_asset_load_from_path(long long asset, const char *path); - -bool image_asset_load_from_raw(long long asset, const uint8_t *array, uintptr_t size); - -bool image_asset_save_path(long long asset, const char *path, unsigned int format); - -bool image_asset_scale(long long asset, unsigned int x, unsigned int y); - -unsigned int image_asset_width(long long asset); - -long long image_bitmap_create_from_bytes(const uint8_t *image_bytes, - uintptr_t image_size, - float image_width, - float image_height, - bool flip_y, - int32_t premultiply_alpha, - int32_t color_space_conversion, - int32_t resize_quality, - float resize_width, - float resize_height); - -long long image_bitmap_create_from_bytes_encoded(const uint8_t *image_bytes, - uintptr_t image_size, - bool flip_y, - int32_t premultiply_alpha, - int32_t color_space_conversion, - int32_t resize_quality, - float resize_width, - float resize_height); - -long long image_bitmap_create_from_bytes_encoded_src_rect(const uint8_t *image_bytes, - uintptr_t image_size, - float sx, - float sy, - float s_width, - float s_height, - bool flip_y, - int32_t premultiply_alpha, - int32_t color_space_conversion, - int32_t resize_quality, - float resize_width, - float resize_height); - -long long image_bitmap_create_from_bytes_src_rect(const uint8_t *image_bytes, - uintptr_t image_size, - float image_width, - float image_height, - float sx, - float sy, - float s_width, - float s_height, - bool flip_y, - int32_t premultiply_alpha, - int32_t color_space_conversion, - int32_t resize_quality, - float resize_width, - float resize_height); - -long long image_bitmap_create_from_image_asset(long long asset, - bool flip_y, - int premultiply_alpha, - int color_space_conversion, - int resize_quality, - float resize_width, - float resize_height); - -long long image_bitmap_create_from_image_asset_src_rect(long long asset, - float sx, - float sy, - float s_width, - float s_height, - bool flip_y, - int premultiply_alpha, - int color_space_conversion, - int resize_quality, - float resize_width, - float resize_height); - -long long image_bitmap_create_from_image_data(long long image_data, - bool flip_y, - int premultiply_alpha, - int color_space_conversion, - int resize_quality, - float resize_width, - float resize_height); - -long long image_bitmap_create_from_image_data_src_rect(long long image_data, - float sx, - float sy, - float s_width, - float s_height, - bool flip_y, - int premultiply_alpha, - int color_space_conversion, - int resize_quality, - float resize_width, - float resize_height); - -long long image_data_create(int width, int height); - -uint8_t *image_data_data(long long image_data); - -uintptr_t image_data_data_length(long long image_data); - -int image_data_height(long long image_data); - -int image_data_width(long long image_data); - -float matrix_a(long long matrix); - -float matrix_b(long long matrix); - -float matrix_c(long long matrix); - -long long matrix_create(void); - -float matrix_d(long long matrix); - -float matrix_e(long long matrix); - -float matrix_f(long long matrix); - -float matrix_m11(long long matrix); - -float matrix_m12(long long matrix); - -float matrix_m13(long long matrix); - -float matrix_m14(long long matrix); - -float matrix_m21(long long matrix); - -float matrix_m22(long long matrix); - -float matrix_m23(long long matrix); - -float matrix_m24(long long matrix); - -float matrix_m31(long long matrix); - -float matrix_m32(long long matrix); - -float matrix_m33(long long matrix); - -float matrix_m34(long long matrix); - -float matrix_m41(long long matrix); - -float matrix_m42(long long matrix); - -float matrix_m43(long long matrix); - -float matrix_m44(long long matrix); - -void matrix_set_a(long long matrix, float a); - -void matrix_set_b(long long matrix, float b); - -void matrix_set_c(long long matrix, float c); - -void matrix_set_d(long long matrix, float d); - -void matrix_set_e(long long matrix, float e); - -void matrix_set_f(long long matrix, float f); - -void matrix_set_m11(long long matrix, float m11); - -void matrix_set_m12(long long matrix, float m12); - -void matrix_set_m13(long long matrix, float m13); - -void matrix_set_m14(long long matrix, float m14); - -void matrix_set_m21(long long matrix, float m21); - -void matrix_set_m22(long long matrix, float m22); - -void matrix_set_m23(long long matrix, float m23); - -void matrix_set_m24(long long matrix, float m24); - -void matrix_set_m31(long long matrix, float m31); - -void matrix_set_m32(long long matrix, float m32); - -void matrix_set_m33(long long matrix, float m33); - -void matrix_set_m34(long long matrix, float m34); - -void matrix_set_m41(long long matrix, float m41); - -void matrix_set_m42(long long matrix, float m42); - -void matrix_set_m43(long long matrix, float m43); - -void matrix_set_m44(long long matrix, float m44); - -void matrix_update(long long matrix, const float *data, uintptr_t data_len); - -const char *paint_style_get_color_string(long long color); - -void paint_style_set_fill_color_with_string(long long context, const char *color); - -void paint_style_set_stroke_color_with_string(long long context, const char *color); - -void path_add_path(long long path, long long path_to_add); - -void path_add_path_with_matrix(long long path, long long path_to_add, long long matrix); - -void path_arc(long long path, - float x, - float y, - float radius, - float start_angle, - float end_angle, - bool anti_clockwise); - -void path_arc_to(long long path, float x1, float y1, float x2, float y2, float radius); - -void path_bezier_curve_to(long long path, - float cp1x, - float cp1y, - float cp2x, - float cp2y, - float x, - float y); - -void path_close_path(long long path); - -long long path_create(void); - -long long path_create_with_path(long long path); - -long long path_create_with_string(const char *string); - -void path_ellipse(long long path, - float x, - float y, - float radius_x, - float radius_y, - float rotation, - float start_angle, - float end_angle, - bool anticlockwise); - -void path_line_to(long long path, float x, float y); - -void path_move_to(long long path, float x, float y); - -void path_quadratic_curve_to(long long path, float cpx, float cpy, float x, float y); - -void path_rect(long long path, float x, float y, float width, float height); - -void pattern_set_transform(long long pattern, long long matrix); - -void svg_draw_from_path(long long context, const int8_t *path); - -void svg_draw_from_string(long long context, const int8_t *svg); - -long long text_decoder_create(const char *decoding); - -const char *text_decoder_decode(long long decoder, const uint8_t *data, uintptr_t len); - -U8Array *text_decoder_decode_bytes(long long decoder, const uint8_t *data, uintptr_t len); - -const char *text_decoder_decode_i16(long long decoder, const int16_t *data, uintptr_t len); - -U8Array *text_decoder_decode_i16_bytes(long long decoder, const int16_t *data, uintptr_t len); - -const char *text_decoder_decode_i32(long long decoder, const int32_t *data, uintptr_t len); - -U8Array *text_decoder_decode_i32_bytes(long long decoder, const int32_t *data, uintptr_t len); - -const U8Array *text_decoder_decode_to_bytes(long long decoder, const uint8_t *data, uintptr_t len); - -const char *text_decoder_decode_u16(long long decoder, const uint16_t *data, uintptr_t len); - -U8Array *text_decoder_decode_u16_bytes(long long decoder, const uint16_t *data, uintptr_t len); - -U8Array *text_decoder_decode_u32_bytes(long long decoder, const uint32_t *data, uintptr_t len); - -const char *text_decoder_get_encoding(long long decoder); - -long long text_encoder_create(const char *encoding); - -U8Array *text_encoder_encode(long long encoder, const char *text); - -const char *text_encoder_get_encoding(long long encoder); - -float text_metrics_get_actual_bounding_box_ascent(long long metrics); - -float text_metrics_get_actual_bounding_box_descent(long long metrics); - -float text_metrics_get_actual_bounding_box_left(long long metrics); - -float text_metrics_get_actual_bounding_box_right(long long metrics); - -float text_metrics_get_alphabetic_baseline(long long metrics); - -float text_metrics_get_em_height_ascent(long long metrics); - -float text_metrics_get_em_height_descent(long long metrics); - -float text_metrics_get_font_bounding_box_ascent(long long metrics); - -float text_metrics_get_font_bounding_box_descent(long long metrics); - -float text_metrics_get_hanging_baseline(long long metrics); - -float text_metrics_get_ideographic_baseline(long long metrics); - -float text_metrics_get_width(long long metrics); diff --git a/packages/canvas/src-native/canvas-ios/CanvasNative/Dist/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/TNSCanvas.nib b/packages/canvas/src-native/canvas-ios/CanvasNative/Dist/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/TNSCanvas.nib deleted file mode 100644 index 666453fc..00000000 Binary files a/packages/canvas/src-native/canvas-ios/CanvasNative/Dist/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/TNSCanvas.nib and /dev/null differ diff --git a/packages/canvas/src-native/canvas-ios/CanvasNative/Dist/CanvasNative.xcframework/ios-x86_64-simulator/CanvasNative.framework/Headers/canvas_native.h b/packages/canvas/src-native/canvas-ios/CanvasNative/Dist/CanvasNative.xcframework/ios-x86_64-simulator/CanvasNative.framework/Headers/canvas_native.h deleted file mode 100644 index 63b8bf98..00000000 --- a/packages/canvas/src-native/canvas-ios/CanvasNative/Dist/CanvasNative.xcframework/ios-x86_64-simulator/CanvasNative.framework/Headers/canvas_native.h +++ /dev/null @@ -1,977 +0,0 @@ -#include -#include -#include -#include - -typedef enum { - SourceOver = 0, - SourceIn = 1, - SourceOut = 2, - SourceAtop = 3, - DestinationOver = 4, - DestinationIn = 5, - DestinationOut = 6, - DestinationAtop = 7, - Lighter = 8, - Copy = 9, - Xor = 10, - Multiply = 11, - Screen = 12, - Overlay = 13, - Darken = 14, - Lighten = 15, - ColorDodge = 16, - ColorBurn = 17, - HardLight = 18, - SoftLight = 19, - Difference = 20, - Exclusion = 21, - Hue = 22, - Saturation = 23, - Color = 24, - Luminosity = 25, -} CompositeOperationType; - -typedef enum { - NonZero = 0, - EvenOdd = 1, -} FillRule; - -typedef enum { - Low = 0, - Medium = 1, - High = 2, -} ImageSmoothingQuality; - -typedef enum { - CapButt = 0, - CapRound = 1, - CapSquare = 2, -} LineCap; - -typedef enum { - JoinRound = 0, - JoinBevel = 1, - JoinMiter = 2, -} LineJoin; - -typedef enum { - PaintStyleValueTypeColor = 0, - PaintStyleValueTypeGradient = 1, - PaintStyleValueTypePattern = 2, -} PaintStyleValueType; - -typedef enum { - Repeat = 0, - RepeatX = 1, - RepeatY = 2, - NoRepeat = 3, -} Repetition; - -typedef enum { - START = 0, - LEFT = 1, - CENTER = 2, - RIGHT = 3, - END = 4, -} TextAlign; - -typedef enum { - TOP = 0, - HANGING = 1, - MIDDLE = 2, - ALPHABETIC = 3, - IDEOGRAPHIC = 4, - BOTTOM = 5, -} TextBaseLine; - -typedef enum { - LTR = 0, - RTL = 1, -} TextDirection; - -typedef struct Context Context; - -typedef struct { - long long value; - PaintStyleValueType value_type; -} PaintStyleValue; - -typedef struct { - float *data; - uintptr_t data_len; -} F32Array; - -typedef struct { - uint8_t *data; - uintptr_t data_len; -} U8Array; - -typedef struct { - double *data; - uintptr_t data_len; -} F64Array; - -typedef struct { - int16_t *data; - uintptr_t data_len; -} I16Array; - -typedef struct { - int32_t *data; - uintptr_t data_len; -} I32Array; - -typedef struct { - int8_t *data; - uintptr_t data_len; -} I8Array; - -typedef struct { - uint16_t *data; - uintptr_t data_len; -} U16Array; - -typedef struct { - uint32_t *data; - uintptr_t data_len; -} U32Array; - -void context_arc(long long context, - float x, - float y, - float radius, - float start_angle, - float end_angle, - bool anti_clockwise); - -void context_arc_to(long long context, float x1, float y1, float x2, float y2, float radius); - -void context_begin_path(long long context); - -void context_bezier_curve_to(long long context, - float cp1x, - float cp1y, - float cp2x, - float cp2y, - float x, - float y); - -void context_clear_rect(long long context, float x, float y, float width, float height); - -void context_clip(long long context, long long path, FillRule rule); - -void context_clip_rule(long long context, FillRule rule); - -void context_close_path(long long context); - -long long context_create_image_data(int width, int height); - -long long context_create_linear_gradient(long long context, float x0, float y0, float x1, float y1); - -long long context_create_pattern(long long context, - const uint8_t *image_data, - uintptr_t image_len, - int width, - int height, - Repetition repetition); - -long long context_create_pattern_asset(long long context, long long asset, Repetition repetition); - -long long context_create_pattern_encoded(long long context, - const uint8_t *image_data, - uintptr_t image_len, - Repetition repetition); - -long long context_create_radial_gradient(long long context, - float x0, - float y0, - float r0, - float x1, - float y1, - float r1); - -void context_custom_with_buffer_flush(long long context, - uint8_t *buf, - uintptr_t buf_size, - float width, - float height); - -const char *context_data_url(long long context, const char *format, float quality); - -void context_draw_image(long long context, - const uint8_t *image_data, - uintptr_t image_len, - float width, - float height, - float sx, - float sy, - float s_width, - float s_height, - float dx, - float dy, - float d_width, - float d_height); - -void context_draw_image_asset(long long context, - long long asset, - float sx, - float sy, - float s_width, - float s_height, - float dx, - float dy, - float d_width, - float d_height); - -void context_draw_image_dx_dy(long long context, - const uint8_t *image_data, - uintptr_t image_len, - float width, - float height, - float dx, - float dy); - -void context_draw_image_dx_dy_asset(long long context, long long asset, float dx, float dy); - -void context_draw_image_dx_dy_dw_dh(long long context, - const uint8_t *image_data, - uintptr_t image_len, - float width, - float height, - float dx, - float dy, - float d_width, - float d_height); - -void context_draw_image_dx_dy_dw_dh_asset(long long context, - long long asset, - float dx, - float dy, - float d_width, - float d_height); - -void context_draw_image_encoded(long long context, - const uint8_t *image_data, - uintptr_t image_len, - float sx, - float sy, - float s_width, - float s_height, - float dx, - float dy, - float d_width, - float d_height); - -void context_draw_image_encoded_dx_dy(long long context, - const uint8_t *image_data, - uintptr_t image_len, - float dx, - float dy); - -void context_draw_image_encoded_dx_dy_dw_dh(long long context, - const uint8_t *image_data, - uintptr_t image_len, - float dx, - float dy, - float d_width, - float d_height); - -void context_ellipse(long long context, - float x, - float y, - float radius_x, - float radius_y, - float rotation, - float start_angle, - float end_angle, - bool anticlockwise); - -void context_fill(long long context, long long path, FillRule rule); - -void context_fill_rect(long long context, float x, float y, float width, float height); - -void context_fill_text(long long context, const char *text, float x, float y, float width); - -void context_flush(long long context); - -TextDirection context_get_direction(const Context *context); - -PaintStyleValue *context_get_fill_style(long long context); - -const char *context_get_filter(long long context); - -const char *context_get_font(long long context); - -float context_get_global_alpha(long long context); - -CompositeOperationType context_get_global_composite_operation(long long context); - -long long context_get_image_data(long long context, float sx, float sy, float sw, float sh); - -bool context_get_image_smoothing_enabled(long long context); - -ImageSmoothingQuality context_get_image_smoothing_quality(long long context); - -LineCap context_get_line_cap(long long context); - -F32Array *context_get_line_dash(long long context); - -float context_get_line_dash_offset(long long context); - -LineJoin context_get_line_join(long long context); - -float context_get_line_width(long long context); - -float context_get_miter_limit(long long context); - -float context_get_shadow_blur(long long context); - -const char *context_get_shadow_color(long long context); - -float context_get_shadow_offset_x(long long context); - -float context_get_shadow_offset_y(long long context); - -PaintStyleValue *context_get_stroke_style(long long context); - -TextAlign context_get_text_align(long long context); - -TextBaseLine context_get_text_baseline(long long context); - -long long context_get_transform(long long context); - -long long context_init_context(float width, - float height, - float density, - int buffer_id, - uintptr_t samples, - bool alpha, - unsigned int font_color, - float ppi, - TextDirection direction); - -long long context_init_context_with_custom_surface(float width, - float height, - float density, - bool alpha, - int font_color, - float ppi, - TextDirection direction); - -bool context_is_point_in_path(long long context, long long path, float x, float y, FillRule rule); - -bool context_is_point_in_stroke(long long context, long long path, float x, float y); - -void context_line_to(long long context, float x, float y); - -long long context_measure_text(long long context, const char *text); - -void context_move_to(long long context, float x, float y); - -void context_put_image_data(long long context, - long long image_data, - float dx, - float dy, - float dirty_x, - float dirty_y, - float dirty_width, - float dirty_height); - -void context_quadratic_curve_to(long long context, float cpx, float cpy, float x, float y); - -void context_rect(long long context, float x, float y, float width, float height); - -void context_reset_transform(long long context); - -void context_resize_custom_surface(long long context, - float width, - float height, - float density, - bool alpha, - float ppi); - -void context_resize_surface(long long context, - float width, - float height, - float density, - int buffer_id, - uintptr_t samples, - bool alpha, - float ppi); - -void context_restore(long long context); - -void context_rotate(long long context, float angle); - -void context_save(long long context); - -void context_scale(long long context, float x, float y); - -void context_set_direction(long long context, TextDirection direction); - -void context_set_fill_style(long long context, long long style); - -void context_set_filter(long long context, const char *filter); - -void context_set_font(long long context, const char *filter); - -void context_set_global_alpha(long long context, float alpha); - -void context_set_global_composite_operation(long long context, CompositeOperationType operation); - -void context_set_image_smoothing_enabled(long long context, bool enabled); - -void context_set_image_smoothing_quality(long long context, ImageSmoothingQuality quality); - -void context_set_line_cap(long long context, LineCap cap); - -void context_set_line_dash(long long context, const float *data, uintptr_t data_length); - -void context_set_line_dash_offset(long long context, float offset); - -void context_set_line_join(long long context, LineJoin join); - -void context_set_line_width(long long context, float width); - -void context_set_miter_limit(long long context, float limit); - -void context_set_shadow_blur(long long context, float blur); - -void context_set_shadow_color(long long context, uint8_t r, uint8_t g, uint8_t b, uint8_t a); - -void context_set_shadow_color_string(long long context, const char *color); - -void context_set_shadow_offset_x(long long context, float x); - -void context_set_shadow_offset_y(long long context, float y); - -void context_set_stroke_style(long long context, long long style); - -void context_set_text_align(long long context, TextAlign align); - -void context_set_text_baseline(long long context, TextBaseLine baseline); - -void context_set_transform(long long context, float a, float b, float c, float d, float e, float f); - -void context_set_transform_matrix(long long context, long long matrix); - -U8Array *context_snapshot_canvas(long long context); - -void context_stroke(long long context, long long path); - -void context_stroke_rect(long long context, float x, float y, float width, float height); - -void context_stroke_text(long long context, const char *text, float x, float y, float width); - -void context_transform(long long context, float a, float b, float c, float d, float e, float f); - -void context_translate(long long context, float x, float y); - -void destroy_context(long long context); - -void destroy_f32_array(F32Array *array); - -void destroy_f64_array(F64Array *array); - -void destroy_i16_array(I16Array *array); - -void destroy_i32_array(I32Array *array); - -void destroy_i8_array(I8Array *array); - -void destroy_image_asset(long long asset); - -void destroy_image_data(long long image_data); - -void destroy_matrix(long long matrix); - -void destroy_paint_style(long long style); - -void destroy_paint_style_value(long long value); - -void destroy_path(long long path); - -void destroy_string(const char *string); - -void destroy_text_decoder(long long decoder); - -void destroy_text_encoder(long long encoder); - -void destroy_text_metrics(long long metrics); - -void destroy_u16_array(U16Array *array); - -void destroy_u32_array(U32Array *array); - -void destroy_u8_array(U8Array *array); - -void flip_y_in_place(uint8_t *data, uintptr_t length, uintptr_t bytes_per_row, uintptr_t height); - -void flip_y_in_place_3d(uint8_t *data, - uintptr_t length, - uintptr_t bytes_per_row, - uintptr_t height, - uintptr_t depth); - -void flip_y_in_place_3d_f32(float *data, - uintptr_t length, - uintptr_t bytes_per_row, - uintptr_t height, - uintptr_t depth); - -void flip_y_in_place_3d_f64(double *data, - uintptr_t length, - uintptr_t bytes_per_row, - uintptr_t height, - uintptr_t depth); - -void flip_y_in_place_3d_i16(int16_t *data, - uintptr_t length, - uintptr_t bytes_per_row, - uintptr_t height, - uintptr_t depth); - -void flip_y_in_place_3d_i32(int32_t *data, - uintptr_t length, - uintptr_t bytes_per_row, - uintptr_t height, - uintptr_t depth); - -void flip_y_in_place_3d_i8(int8_t *data, - uintptr_t length, - uintptr_t bytes_per_row, - uintptr_t height, - uintptr_t depth); - -void flip_y_in_place_3d_u16(uint16_t *data, - uintptr_t length, - uintptr_t bytes_per_row, - uintptr_t height, - uintptr_t depth); - -void flip_y_in_place_3d_u32(uint32_t *data, - uintptr_t length, - uintptr_t bytes_per_row, - uintptr_t height, - uintptr_t depth); - -void flip_y_in_place_f32(float *data, uintptr_t length, uintptr_t bytes_per_row, uintptr_t height); - -void flip_y_in_place_f64(double *data, uintptr_t length, uintptr_t bytes_per_row, uintptr_t height); - -void flip_y_in_place_i16(int16_t *data, - uintptr_t length, - uintptr_t bytes_per_row, - uintptr_t height); - -void flip_y_in_place_i32(int32_t *data, - uintptr_t length, - uintptr_t bytes_per_row, - uintptr_t height); - -void flip_y_in_place_i8(int8_t *data, uintptr_t length, uintptr_t bytes_per_row, uintptr_t height); - -void flip_y_in_place_u16(uint16_t *data, - uintptr_t length, - uintptr_t bytes_per_row, - uintptr_t height); - -void flip_y_in_place_u32(uint32_t *data, - uintptr_t length, - uintptr_t bytes_per_row, - uintptr_t height); - -long long gl_get_vertex_attrib_offset(unsigned int index, unsigned int pname); - -void gl_tex_image_2D_asset(unsigned int target, - int level, - int internalformat, - int border, - unsigned int format, - unsigned int image_type, - long long asset, - bool flip_y); - -void gl_tex_image_3D_asset(unsigned int target, - int level, - int internalformat, - int width, - int height, - int depth, - int border, - unsigned int format, - unsigned int image_type, - long long asset, - bool flip_y); - -void gl_tex_sub_image_2D_asset(unsigned int target, - int level, - int xoffset, - int yoffset, - unsigned int format, - unsigned int image_type, - long long asset, - bool flip_y); - -void gl_tex_sub_image_3D_asset(unsigned int target, - int level, - int xoffset, - int yoffset, - int zoffset, - int width, - int height, - int depth, - unsigned int format, - unsigned int image_type, - long long asset, - bool flip_y); - -void gl_vertex_attrib_pointer(unsigned int index, - int size, - unsigned int pointer_type, - bool normalized, - int stride, - long long offset); - -void gradient_add_color_stop(long long style, float stop, const char *color); - -long long image_asset_create(void); - -bool image_asset_flip_x(long long asset); - -bool image_asset_flip_x_in_place(long long asset); - -void image_asset_flip_x_in_place_owned(uint8_t *buf, uintptr_t length); - -bool image_asset_flip_y(long long asset); - -bool image_asset_flip_y_in_place(long long asset); - -void image_asset_flip_y_in_place_owned(uint8_t *buf, uintptr_t length); - -U8Array *image_asset_get_bytes(long long asset); - -const char *image_asset_get_error(long long asset); - -U8Array *image_asset_get_rgb_bytes(long long asset); - -U8Array *image_asset_get_rgba_bytes(long long asset); - -bool image_asset_has_error(long long asset); - -unsigned int image_asset_height(long long asset); - -bool image_asset_load_from_path(long long asset, const char *path); - -bool image_asset_load_from_raw(long long asset, const uint8_t *array, uintptr_t size); - -bool image_asset_save_path(long long asset, const char *path, unsigned int format); - -bool image_asset_scale(long long asset, unsigned int x, unsigned int y); - -unsigned int image_asset_width(long long asset); - -long long image_bitmap_create_from_bytes(const uint8_t *image_bytes, - uintptr_t image_size, - float image_width, - float image_height, - bool flip_y, - int32_t premultiply_alpha, - int32_t color_space_conversion, - int32_t resize_quality, - float resize_width, - float resize_height); - -long long image_bitmap_create_from_bytes_encoded(const uint8_t *image_bytes, - uintptr_t image_size, - bool flip_y, - int32_t premultiply_alpha, - int32_t color_space_conversion, - int32_t resize_quality, - float resize_width, - float resize_height); - -long long image_bitmap_create_from_bytes_encoded_src_rect(const uint8_t *image_bytes, - uintptr_t image_size, - float sx, - float sy, - float s_width, - float s_height, - bool flip_y, - int32_t premultiply_alpha, - int32_t color_space_conversion, - int32_t resize_quality, - float resize_width, - float resize_height); - -long long image_bitmap_create_from_bytes_src_rect(const uint8_t *image_bytes, - uintptr_t image_size, - float image_width, - float image_height, - float sx, - float sy, - float s_width, - float s_height, - bool flip_y, - int32_t premultiply_alpha, - int32_t color_space_conversion, - int32_t resize_quality, - float resize_width, - float resize_height); - -long long image_bitmap_create_from_image_asset(long long asset, - bool flip_y, - int premultiply_alpha, - int color_space_conversion, - int resize_quality, - float resize_width, - float resize_height); - -long long image_bitmap_create_from_image_asset_src_rect(long long asset, - float sx, - float sy, - float s_width, - float s_height, - bool flip_y, - int premultiply_alpha, - int color_space_conversion, - int resize_quality, - float resize_width, - float resize_height); - -long long image_bitmap_create_from_image_data(long long image_data, - bool flip_y, - int premultiply_alpha, - int color_space_conversion, - int resize_quality, - float resize_width, - float resize_height); - -long long image_bitmap_create_from_image_data_src_rect(long long image_data, - float sx, - float sy, - float s_width, - float s_height, - bool flip_y, - int premultiply_alpha, - int color_space_conversion, - int resize_quality, - float resize_width, - float resize_height); - -long long image_data_create(int width, int height); - -uint8_t *image_data_data(long long image_data); - -uintptr_t image_data_data_length(long long image_data); - -int image_data_height(long long image_data); - -int image_data_width(long long image_data); - -float matrix_a(long long matrix); - -float matrix_b(long long matrix); - -float matrix_c(long long matrix); - -long long matrix_create(void); - -float matrix_d(long long matrix); - -float matrix_e(long long matrix); - -float matrix_f(long long matrix); - -float matrix_m11(long long matrix); - -float matrix_m12(long long matrix); - -float matrix_m13(long long matrix); - -float matrix_m14(long long matrix); - -float matrix_m21(long long matrix); - -float matrix_m22(long long matrix); - -float matrix_m23(long long matrix); - -float matrix_m24(long long matrix); - -float matrix_m31(long long matrix); - -float matrix_m32(long long matrix); - -float matrix_m33(long long matrix); - -float matrix_m34(long long matrix); - -float matrix_m41(long long matrix); - -float matrix_m42(long long matrix); - -float matrix_m43(long long matrix); - -float matrix_m44(long long matrix); - -void matrix_set_a(long long matrix, float a); - -void matrix_set_b(long long matrix, float b); - -void matrix_set_c(long long matrix, float c); - -void matrix_set_d(long long matrix, float d); - -void matrix_set_e(long long matrix, float e); - -void matrix_set_f(long long matrix, float f); - -void matrix_set_m11(long long matrix, float m11); - -void matrix_set_m12(long long matrix, float m12); - -void matrix_set_m13(long long matrix, float m13); - -void matrix_set_m14(long long matrix, float m14); - -void matrix_set_m21(long long matrix, float m21); - -void matrix_set_m22(long long matrix, float m22); - -void matrix_set_m23(long long matrix, float m23); - -void matrix_set_m24(long long matrix, float m24); - -void matrix_set_m31(long long matrix, float m31); - -void matrix_set_m32(long long matrix, float m32); - -void matrix_set_m33(long long matrix, float m33); - -void matrix_set_m34(long long matrix, float m34); - -void matrix_set_m41(long long matrix, float m41); - -void matrix_set_m42(long long matrix, float m42); - -void matrix_set_m43(long long matrix, float m43); - -void matrix_set_m44(long long matrix, float m44); - -void matrix_update(long long matrix, const float *data, uintptr_t data_len); - -const char *paint_style_get_color_string(long long color); - -void paint_style_set_fill_color_with_string(long long context, const char *color); - -void paint_style_set_stroke_color_with_string(long long context, const char *color); - -void path_add_path(long long path, long long path_to_add); - -void path_add_path_with_matrix(long long path, long long path_to_add, long long matrix); - -void path_arc(long long path, - float x, - float y, - float radius, - float start_angle, - float end_angle, - bool anti_clockwise); - -void path_arc_to(long long path, float x1, float y1, float x2, float y2, float radius); - -void path_bezier_curve_to(long long path, - float cp1x, - float cp1y, - float cp2x, - float cp2y, - float x, - float y); - -void path_close_path(long long path); - -long long path_create(void); - -long long path_create_with_path(long long path); - -long long path_create_with_string(const char *string); - -void path_ellipse(long long path, - float x, - float y, - float radius_x, - float radius_y, - float rotation, - float start_angle, - float end_angle, - bool anticlockwise); - -void path_line_to(long long path, float x, float y); - -void path_move_to(long long path, float x, float y); - -void path_quadratic_curve_to(long long path, float cpx, float cpy, float x, float y); - -void path_rect(long long path, float x, float y, float width, float height); - -void pattern_set_transform(long long pattern, long long matrix); - -void svg_draw_from_path(long long context, const int8_t *path); - -void svg_draw_from_string(long long context, const int8_t *svg); - -long long text_decoder_create(const char *decoding); - -const char *text_decoder_decode(long long decoder, const uint8_t *data, uintptr_t len); - -U8Array *text_decoder_decode_bytes(long long decoder, const uint8_t *data, uintptr_t len); - -const char *text_decoder_decode_i16(long long decoder, const int16_t *data, uintptr_t len); - -U8Array *text_decoder_decode_i16_bytes(long long decoder, const int16_t *data, uintptr_t len); - -const char *text_decoder_decode_i32(long long decoder, const int32_t *data, uintptr_t len); - -U8Array *text_decoder_decode_i32_bytes(long long decoder, const int32_t *data, uintptr_t len); - -const U8Array *text_decoder_decode_to_bytes(long long decoder, const uint8_t *data, uintptr_t len); - -const char *text_decoder_decode_u16(long long decoder, const uint16_t *data, uintptr_t len); - -U8Array *text_decoder_decode_u16_bytes(long long decoder, const uint16_t *data, uintptr_t len); - -U8Array *text_decoder_decode_u32_bytes(long long decoder, const uint32_t *data, uintptr_t len); - -const char *text_decoder_get_encoding(long long decoder); - -long long text_encoder_create(const char *encoding); - -U8Array *text_encoder_encode(long long encoder, const char *text); - -const char *text_encoder_get_encoding(long long encoder); - -float text_metrics_get_actual_bounding_box_ascent(long long metrics); - -float text_metrics_get_actual_bounding_box_descent(long long metrics); - -float text_metrics_get_actual_bounding_box_left(long long metrics); - -float text_metrics_get_actual_bounding_box_right(long long metrics); - -float text_metrics_get_alphabetic_baseline(long long metrics); - -float text_metrics_get_em_height_ascent(long long metrics); - -float text_metrics_get_em_height_descent(long long metrics); - -float text_metrics_get_font_bounding_box_ascent(long long metrics); - -float text_metrics_get_font_bounding_box_descent(long long metrics); - -float text_metrics_get_hanging_baseline(long long metrics); - -float text_metrics_get_ideographic_baseline(long long metrics); - -float text_metrics_get_width(long long metrics); diff --git a/packages/canvas/src-native/canvas-ios/CanvasNative/Dist/CanvasNative.xcframework/ios-x86_64-simulator/CanvasNative.framework/TNSCanvas.nib b/packages/canvas/src-native/canvas-ios/CanvasNative/Dist/CanvasNative.xcframework/ios-x86_64-simulator/CanvasNative.framework/TNSCanvas.nib deleted file mode 100644 index 43b150ed..00000000 Binary files a/packages/canvas/src-native/canvas-ios/CanvasNative/Dist/CanvasNative.xcframework/ios-x86_64-simulator/CanvasNative.framework/TNSCanvas.nib and /dev/null differ diff --git a/packages/canvas/src-native/canvas-ios/CanvasNative/Source/TNSWebGL2RenderingContext.swift b/packages/canvas/src-native/canvas-ios/CanvasNative/Source/TNSWebGL2RenderingContext.swift index 0611698c..fa1fd6b0 100644 --- a/packages/canvas/src-native/canvas-ios/CanvasNative/Source/TNSWebGL2RenderingContext.swift +++ b/packages/canvas/src-native/canvas-ios/CanvasNative/Source/TNSWebGL2RenderingContext.swift @@ -781,6 +781,33 @@ public class TNSWebGL2RenderingContext: TNSWebGLRenderingContext { } + public func texImage3D(_ target: UInt32,_ level: Int32,_ internalformat: Int32,_ width: Int32,_ height: Int32,_ depth: Int32,_ border: Int32,_ format: UInt32,_ type: UInt32,pixels: UnsafeRawPointer, size: Int) { + texImage3D(target, level, internalformat, width, height, depth, border, format, type, pixels: pixels, size: size,pixelOffset: 0, srcOffset: 0) + } + + + + public func texImage3D(_ target: UInt32,_ level: Int32,_ internalformat: Int32,_ width: Int32,_ height: Int32,_ depth: Int32,_ border: Int32,_ format: UInt32,_ type: UInt32,pixels: UnsafeRawPointer, size: Int, pixelOffset: Int, srcOffset:Int32) { + let _ = canvas.renderer.ensureIsContextIsCurrent() + + if(flipYWebGL){ + var px = Data(bytes: pixels, count: size) + px.withUnsafeMutableBytes { ptr in + let pointer = ptr.baseAddress?.assumingMemoryBound(to: UInt8.self).advanced(by: pixelOffset + Int(srcOffset)) + + GLUtils.flipYInPlace3D(pointer, size, Int(width * bytes_per_pixel(pixel_type: type, format: format)), Int(height), Int(depth)) + + glTexImage3D(target, level, internalformat, width, height, depth, border,format,type, pointer) + } + + }else { + glTexImage3D(target, level, internalformat, width, height, depth, border,format,type, pixels.advanced(by: (pixelOffset + Int(srcOffset)))) + } + + } + + + public func texImage3D(_ target: UInt32,_ level: Int32,_ internalformat: Int32,_ width: Int32,_ height: Int32,_ depth: Int32,_ border: Int32,_ format: UInt32,_ type: UInt32,i8 source: [Int8]) { texImage3D(target, level, internalformat, width, height, depth, border, format, type, i8: source, 0) } diff --git a/packages/canvas/src-native/canvas-ios/CanvasNative/Source/TNS_EXT_shader_texture_lod.swift b/packages/canvas/src-native/canvas-ios/CanvasNative/Source/TNS_EXT_shader_texture_lod.swift index 249c90de..24f19f3a 100644 --- a/packages/canvas/src-native/canvas-ios/CanvasNative/Source/TNS_EXT_shader_texture_lod.swift +++ b/packages/canvas/src-native/canvas-ios/CanvasNative/Source/TNS_EXT_shader_texture_lod.swift @@ -6,7 +6,6 @@ // import Foundation -import OpenGLES @objcMembers @objc(TNS_EXT_shader_texture_lod) public class TNS_EXT_shader_texture_lod: NSObject { diff --git a/packages/canvas/src-native/canvas-ios/CanvasNative/Source/TNS_OES_standard_derivatives.swift b/packages/canvas/src-native/canvas-ios/CanvasNative/Source/TNS_OES_standard_derivatives.swift index 6a3883d8..9f376585 100644 --- a/packages/canvas/src-native/canvas-ios/CanvasNative/Source/TNS_OES_standard_derivatives.swift +++ b/packages/canvas/src-native/canvas-ios/CanvasNative/Source/TNS_OES_standard_derivatives.swift @@ -6,7 +6,6 @@ // import Foundation -import OpenGLES @objcMembers @objc(TNS_OES_standard_derivatives) public class TNS_OES_standard_derivatives: NSObject { diff --git a/packages/canvas/src-native/canvas-ios/CanvasNative/include/canvas_native.h b/packages/canvas/src-native/canvas-ios/CanvasNative/include/canvas_native.h index 63b8bf98..188377c1 100644 --- a/packages/canvas/src-native/canvas-ios/CanvasNative/include/canvas_native.h +++ b/packages/canvas/src-native/canvas-ios/CanvasNative/include/canvas_native.h @@ -1,9 +1,14 @@ +#ifndef CBINDGEN_BINDINGS_H +#define CBINDGEN_BINDINGS_H + +/* Warning, this file is autogenerated by cbindgen. Don't modify this manually. */ + #include #include #include #include -typedef enum { +typedef enum CompositeOperationType { SourceOver = 0, SourceIn = 1, SourceOut = 2, @@ -32,43 +37,43 @@ typedef enum { Luminosity = 25, } CompositeOperationType; -typedef enum { +typedef enum FillRule { NonZero = 0, EvenOdd = 1, } FillRule; -typedef enum { +typedef enum ImageSmoothingQuality { Low = 0, Medium = 1, High = 2, } ImageSmoothingQuality; -typedef enum { +typedef enum LineCap { CapButt = 0, CapRound = 1, CapSquare = 2, } LineCap; -typedef enum { +typedef enum LineJoin { JoinRound = 0, JoinBevel = 1, JoinMiter = 2, } LineJoin; -typedef enum { +typedef enum PaintStyleValueType { PaintStyleValueTypeColor = 0, PaintStyleValueTypeGradient = 1, PaintStyleValueTypePattern = 2, } PaintStyleValueType; -typedef enum { +typedef enum Repetition { Repeat = 0, RepeatX = 1, RepeatY = 2, NoRepeat = 3, } Repetition; -typedef enum { +typedef enum TextAlign { START = 0, LEFT = 1, CENTER = 2, @@ -76,7 +81,7 @@ typedef enum { END = 4, } TextAlign; -typedef enum { +typedef enum TextBaseLine { TOP = 0, HANGING = 1, MIDDLE = 2, @@ -85,58 +90,2678 @@ typedef enum { BOTTOM = 5, } TextBaseLine; -typedef enum { +typedef enum TextDirection { LTR = 0, RTL = 1, } TextDirection; typedef struct Context Context; -typedef struct { - long long value; - PaintStyleValueType value_type; -} PaintStyleValue; - -typedef struct { +typedef struct F32Array { float *data; uintptr_t data_len; } F32Array; -typedef struct { - uint8_t *data; - uintptr_t data_len; -} U8Array; - -typedef struct { +typedef struct F64Array { double *data; uintptr_t data_len; } F64Array; -typedef struct { +typedef struct I16Array { int16_t *data; uintptr_t data_len; } I16Array; -typedef struct { +typedef struct I32Array { int32_t *data; uintptr_t data_len; } I32Array; -typedef struct { +typedef struct I8Array { int8_t *data; uintptr_t data_len; } I8Array; -typedef struct { +typedef struct U16Array { uint16_t *data; uintptr_t data_len; } U16Array; -typedef struct { +typedef struct U32Array { uint32_t *data; uintptr_t data_len; } U32Array; +typedef struct U8Array { + uint8_t *data; + uintptr_t data_len; +} U8Array; + +typedef struct PaintStyleValue { + long long value; + enum PaintStyleValueType value_type; +} PaintStyleValue; + +#if defined(TARGET_OS_ANDROID) +/** + * AndroidBitmap functions result code. + */ +typedef int32_t _bindgen_ty_1; +#endif + +#if defined(TARGET_OS_ANDROID) +/** + * Bitmap pixel format. + */ +typedef uint32_t AndroidBitmapFormat; +#endif + +#if defined(TARGET_OS_ANDROID) +/** + * Operation was successful. + */ +#define ANDROID_BITMAP_RESULT_SUCCESS 0 +#endif + +#if defined(TARGET_OS_ANDROID) +/** + * Bad parameter. + */ +#define ANDROID_BITMAP_RESULT_BAD_PARAMETER -1 +#endif + +#if defined(TARGET_OS_ANDROID) +/** + * JNI exception occured. + */ +#define ANDROID_BITMAP_RESULT_JNI_EXCEPTION -2 +#endif + +#if defined(TARGET_OS_ANDROID) +/** + * Allocation failed. + */ +#define ANDROID_BITMAP_RESULT_ALLOCATION_FAILED -3 +#endif + +#if defined(TARGET_OS_ANDROID) +/** + * No format. + */ +#define AndroidBitmapFormat_ANDROID_BITMAP_FORMAT_NONE 0 +#endif + +#if defined(TARGET_OS_ANDROID) +/** + * Red: 8 bits, Green: 8 bits, Blue: 8 bits, Alpha: 8 bits. + */ +#define AndroidBitmapFormat_ANDROID_BITMAP_FORMAT_RGBA_8888 1 +#endif + +#if defined(TARGET_OS_ANDROID) +/** + * Red: 5 bits, Green: 6 bits, Blue: 5 bits. + */ +#define AndroidBitmapFormat_ANDROID_BITMAP_FORMAT_RGB_565 4 +#endif + +#if defined(TARGET_OS_ANDROID) +/** + * Deprecated in API level 13. Because of the poor quality of this configuration, it is advised to use ARGB_8888 instead. + */ +#define AndroidBitmapFormat_ANDROID_BITMAP_FORMAT_RGBA_4444 7 +#endif + +#if defined(TARGET_OS_ANDROID) +/** + * Alpha: 8 bits. + */ +#define AndroidBitmapFormat_ANDROID_BITMAP_FORMAT_A_8 8 +#endif + +void destroy_f32_array(struct F32Array *array); + +void destroy_f64_array(struct F64Array *array); + +void destroy_i16_array(struct I16Array *array); + +void destroy_i32_array(struct I32Array *array); + +void destroy_i8_array(struct I8Array *array); + +void destroy_paint_style_value(long long value); + +void destroy_u16_array(struct U16Array *array); + +void destroy_u32_array(struct U32Array *array); + +void destroy_u8_array(struct U8Array *array); + +#if defined(TARGET_OS_ANDROID) +jlong Java_org_nativescript_canvas_TNSCanvas_nativeInitContext(JNIEnv, + JClass, + jfloat width, + jfloat height, + jfloat density, + jint buffer_id, + jint samples, + jboolean alpha, + jint font_color, + jfloat ppi, + jint direction); +#endif + +#if defined(TARGET_OS_ANDROID) +jlong Java_org_nativescript_canvas_TNSCanvas_nativeInitContextWithCustomSurface(JNIEnv, + JClass, + jfloat width, + jfloat height, + jfloat density, + jboolean alpha, + jint font_color, + jfloat ppi, + jint direction); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSCanvas_nativeDestroyContext(JNIEnv, JClass, jlong context); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSCanvas_nativeResizeSurface(JNIEnv, + JClass, + jlong context, + jfloat width, + jfloat height, + jfloat density, + jint buffer_id, + jint samples, + jboolean alpha, + jfloat ppi); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSCanvas_nativeResizeCustomSurface(JNIEnv, + JClass, + jlong context, + jfloat width, + jfloat height, + jfloat density, + jboolean alpha, + jfloat ppi); +#endif + +#if defined(TARGET_OS_ANDROID) +jstring Java_org_nativescript_canvas_TNSCanvas_nativeDataURL(JNIEnv env, + JClass, + jlong context, + JString format, + jfloat quality); +#endif + +#if defined(TARGET_OS_ANDROID) +jbyteArray Java_org_nativescript_canvas_TNSCanvas_nativeSnapshotCanvas(JNIEnv env, + JClass, + jlong context); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSCanvas_nativeFlush(JNIEnv, JClass, jlong context); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSCanvas_nativeCustomWithBitmapFlush(JNIEnv env, + JClass, + jlong context, + JObject bitmap); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeSetDirection(JNIEnv, + JClass, + jlong context, + jint direction); +#endif + +#if defined(TARGET_OS_ANDROID) +jint Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeGetDirection(JNIEnv, + JClass, + jlong context); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeSetFillStyle(JNIEnv, + JClass, + jlong context, + jlong style); +#endif + +#if defined(TARGET_OS_ANDROID) +jobject Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeGetFillStyle(JNIEnv env, + JClass, + jlong context); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeSetFilter(JNIEnv env, + JClass, + jlong context, + JString filter); +#endif + +#if defined(TARGET_OS_ANDROID) +jstring Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeGetFilter(JNIEnv env, + JClass, + jlong context); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeSetFont(JNIEnv env, + JClass, + jlong context, + JString filter); +#endif + +#if defined(TARGET_OS_ANDROID) +jstring Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeGetFont(JNIEnv env, + JClass, + jlong context); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeSetGlobalAlpha(JNIEnv, + JClass, + jlong context, + jfloat alpha); +#endif + +#if defined(TARGET_OS_ANDROID) +jfloat Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeGetGlobalAlpha(JNIEnv, + JClass, + jlong context); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeSetGlobalCompositeOperation(JNIEnv, + JClass, + jlong context, + jint operation); +#endif + +#if defined(TARGET_OS_ANDROID) +jint Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeGetGlobalCompositeOperation(JNIEnv, + JClass, + jlong context); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeSetImageSmoothingEnabled(JNIEnv, + JClass, + jlong context, + jboolean enabled); +#endif + +#if defined(TARGET_OS_ANDROID) +jboolean Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeGetImageSmoothingEnabled(JNIEnv, + JClass, + jlong context); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeSetImageSmoothingQuality(JNIEnv, + JClass, + jlong context, + jint quality); +#endif + +#if defined(TARGET_OS_ANDROID) +jint Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeGetImageSmoothingQuality(JNIEnv, + JClass, + jlong context); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeSetLineCap(JNIEnv, + JClass, + jlong context, + jint cap); +#endif + +#if defined(TARGET_OS_ANDROID) +jint Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeGetLineCap(JNIEnv, + JClass, + jlong context); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeSetLineDashOffset(JNIEnv, + JClass, + jlong context, + jfloat offset); +#endif + +#if defined(TARGET_OS_ANDROID) +jfloat Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeGetLineDashOffset(JNIEnv, + JClass, + jlong context); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeSetLineJoin(JNIEnv, + JClass, + jlong context, + jint join); +#endif + +#if defined(TARGET_OS_ANDROID) +jint Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeGetLineJoin(JNIEnv, + JClass, + jlong context); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeSetLineWidth(JNIEnv, + JClass, + jlong context, + jfloat width); +#endif + +#if defined(TARGET_OS_ANDROID) +jfloat Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeGetLineWidth(JNIEnv, + JClass, + jlong context); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeSetMiterLimit(JNIEnv, + JClass, + jlong context, + jfloat limit); +#endif + +#if defined(TARGET_OS_ANDROID) +jfloat Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeGetMiterLimit(JNIEnv, + JClass, + jlong context); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeSetShadowBlur(JNIEnv, + JClass, + jlong context, + jfloat blur); +#endif + +#if defined(TARGET_OS_ANDROID) +jfloat Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeGetShadowBlur(JNIEnv, + JClass, + jlong context); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeSetShadowColor(JNIEnv, + JClass, + jlong context, + uint8_t r, + uint8_t g, + uint8_t b, + uint8_t a); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeSetShadowColorString(JNIEnv env, + JClass, + jlong context, + JString color); +#endif + +#if defined(TARGET_OS_ANDROID) +jstring Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeGetShadowColor(JNIEnv env, + JClass, + jlong context); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeSetShadowOffsetX(JNIEnv, + JClass, + jlong context, + jfloat x); +#endif + +#if defined(TARGET_OS_ANDROID) +jfloat Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeGetShadowOffsetX(JNIEnv, + JClass, + jlong context); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeSetShadowOffsetY(JNIEnv, + JClass, + jlong context, + jfloat y); +#endif + +#if defined(TARGET_OS_ANDROID) +jfloat Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeGetShadowOffsetY(JNIEnv, + JClass, + jlong context); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeSetStrokeStyle(JNIEnv, + JClass, + jlong context, + jlong style); +#endif + +#if defined(TARGET_OS_ANDROID) +jobject Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeGetStrokeStyle(JNIEnv env, + JClass, + jlong context); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeSetTextAlign(JNIEnv, + JClass, + jlong context, + jint align); +#endif + +#if defined(TARGET_OS_ANDROID) +jint Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeGetTextAlign(JNIEnv, + JClass, + jlong context); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeSetTextBaseline(JNIEnv, + JClass, + jlong context, + jint baseline); +#endif + +#if defined(TARGET_OS_ANDROID) +jint Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeGetTextBaseline(JNIEnv, + JClass, + jlong context); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeArc(JNIEnv, + JClass, + jlong context, + jfloat x, + jfloat y, + jfloat radius, + jfloat start_angle, + jfloat end_angle, + jboolean anti_clockwise); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeArcTo(JNIEnv, + JClass, + jlong context, + jfloat x1, + jfloat y1, + jfloat x2, + jfloat y2, + jfloat radius); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeBeginPath(JNIEnv, + JClass, + jlong context); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeBezierCurveTo(JNIEnv, + JClass, + jlong context, + jfloat cp1x, + jfloat cp1y, + jfloat cp2x, + jfloat cp2y, + jfloat x, + jfloat y); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeClearRect(JNIEnv, + JClass, + jlong context, + jfloat x, + jfloat y, + jfloat width, + jfloat height); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeClip(JNIEnv, + JClass, + jlong context, + jlong path, + jint rule); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeClipRule(JNIEnv, + JClass, + jlong context, + jint rule); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeClosePath(JNIEnv, + JClass, + jlong context); +#endif + +#if defined(TARGET_OS_ANDROID) +jlong Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeCreateImageData(JNIEnv, + JClass, + jint width, + jint height); +#endif + +#if defined(TARGET_OS_ANDROID) +jlong Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeCreateLinearGradient(JNIEnv, + JClass, + jlong context, + jfloat x0, + jfloat y0, + jfloat x1, + jfloat y1); +#endif + +#if defined(TARGET_OS_ANDROID) +jlong Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeCreatePatternEncoded(JNIEnv env, + JClass, + jlong context, + jbyteArray image_data, + jint repetition); +#endif + +#if defined(TARGET_OS_ANDROID) +jlong Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeCreatePattern(JNIEnv env, + JClass, + jlong context, + jbyteArray image_data, + jint width, + jint height, + jint repetition); +#endif + +#if defined(TARGET_OS_ANDROID) +jlong Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeCreatePatternWithAsset(JNIEnv, + JClass, + jlong context, + jlong asset, + jint repetition); +#endif + +#if defined(TARGET_OS_ANDROID) +jlong Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeCreateRadialGradient(JNIEnv, + JClass, + jlong context, + jfloat x0, + jfloat y0, + jfloat r0, + jfloat x1, + jfloat y1, + jfloat r1); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeDrawImageDxDyWithBitmap(JNIEnv env, + JClass, + jlong context, + JObject bitmap, + jfloat width, + jfloat height, + jfloat dx, + jfloat dy); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeDrawImageDxDy(JNIEnv env, + JClass, + jlong context, + jbyteArray image_data, + jfloat width, + jfloat height, + jfloat dx, + jfloat dy); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeDrawImageDxDyWithAsset(JNIEnv, + JClass, + jlong context, + jlong asset, + jfloat dx, + jfloat dy); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeDrawImageDxDyDwDhWithBitmap(JNIEnv env, + JClass, + jlong context, + JObject bitmap, + jfloat width, + jfloat height, + jfloat dx, + jfloat dy, + jfloat d_width, + jfloat d_height); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeDrawImageDxDyDwDh(JNIEnv env, + JClass, + jlong context, + jbyteArray image_data, + jfloat width, + jfloat height, + jfloat dx, + jfloat dy, + jfloat d_width, + jfloat d_height); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeDrawImageDxDyDwDhWithAsset(JNIEnv, + JClass, + jlong context, + jlong asset, + jfloat dx, + jfloat dy, + jfloat d_width, + jfloat d_height); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeDrawImageWithBitmap(JNIEnv env, + JClass, + jlong context, + JObject bitmap, + jfloat width, + jfloat height, + jfloat sx, + jfloat sy, + jfloat s_width, + jfloat s_height, + jfloat dx, + jfloat dy, + jfloat d_width, + jfloat d_height); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeDrawImageWithAsset(JNIEnv, + JClass, + jlong context, + jlong asset, + jfloat sx, + jfloat sy, + jfloat s_width, + jfloat s_height, + jfloat dx, + jfloat dy, + jfloat d_width, + jfloat d_height); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeDrawImage(JNIEnv env, + JClass, + jlong context, + jbyteArray image_data, + jfloat width, + jfloat height, + jfloat sx, + jfloat sy, + jfloat s_width, + jfloat s_height, + jfloat dx, + jfloat dy, + jfloat d_width, + jfloat d_height); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeEllipse(JNIEnv, + JClass, + jlong context, + jfloat x, + jfloat y, + jfloat radius_x, + jfloat radius_y, + jfloat rotation, + jfloat start_angle, + jfloat end_angle, + jboolean anticlockwise); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeFill(JNIEnv, + JClass, + jlong context, + jlong path, + jint rule); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeFillRect(JNIEnv, + JClass, + jlong context, + jfloat x, + jfloat y, + jfloat width, + jfloat height); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeFillText(JNIEnv env, + JClass, + jlong context, + JString text, + jfloat x, + jfloat y, + jfloat width); +#endif + +#if defined(TARGET_OS_ANDROID) +jlong Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeGetImageData(JNIEnv, + JClass, + jlong context, + jfloat sx, + jfloat sy, + jfloat sw, + jfloat sh); +#endif + +#if defined(TARGET_OS_ANDROID) +jfloatArray Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeGetLineDash(JNIEnv env, + JClass, + jlong context); +#endif + +#if defined(TARGET_OS_ANDROID) +jlong Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeGetTansform(JNIEnv, + JClass, + jlong context); +#endif + +#if defined(TARGET_OS_ANDROID) +bool Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeIsPointInPath(JNIEnv, + JClass, + jlong context, + jlong path, + jfloat x, + jfloat y, + jint rule); +#endif + +#if defined(TARGET_OS_ANDROID) +bool Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeIsPointInStroke(JNIEnv, + JClass, + jlong context, + jlong path, + jfloat x, + jfloat y); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeLineTo(JNIEnv, + JClass, + jlong context, + jfloat x, + jfloat y); +#endif + +#if defined(TARGET_OS_ANDROID) +jlong Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeMeasureText(JNIEnv env, + JClass, + jlong context, + JString text); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeMoveTo(JNIEnv, + JClass, + jlong context, + jfloat x, + jfloat y); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativePutImageData(JNIEnv, + JClass, + jlong context, + jlong image_data, + jfloat dx, + jfloat dy, + jfloat dirty_x, + jfloat dirty_y, + jfloat dirty_width, + jfloat dirty_height); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeQuadraticCurveTo(JNIEnv, + JClass, + jlong context, + jfloat cpx, + jfloat cpy, + jfloat x, + jfloat y); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeRect(JNIEnv, + JClass, + jlong context, + jfloat x, + jfloat y, + jfloat width, + jfloat height); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeResetTransform(JNIEnv, + JClass, + jlong context); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeRestore(JNIEnv, + JClass, + jlong context); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeRotate(JNIEnv, + JClass, + jlong context, + jfloat angle); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeSave(JNIEnv, + JClass, + jlong context); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeScale(JNIEnv, + JClass, + jlong context, + jfloat x, + jfloat y); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeSetLineDash(JNIEnv env, + JClass, + jlong context, + jfloatArray dash); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeSetTransform(JNIEnv, + JClass, + jlong context, + jfloat a, + jfloat b, + jfloat c, + jfloat d, + jfloat e, + jfloat f); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeSetTransformMatrix(JNIEnv, + JClass, + jlong context, + jlong matrix); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeStroke(JNIEnv, + JClass, + jlong context, + jlong path); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeStrokeRect(JNIEnv, + JClass, + jlong context, + jfloat x, + jfloat y, + jfloat width, + jfloat height); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeStrokeText(JNIEnv env, + JClass, + jlong context, + JString text, + jfloat x, + jfloat y, + jfloat width); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeTransform(JNIEnv, + JClass, + jlong context, + jfloat a, + jfloat b, + jfloat c, + jfloat d, + jfloat e, + jfloat f); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeTranslate(JNIEnv, + JClass, + jlong context, + jfloat x, + jfloat y); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TextureRender_nativeDrawFrame(JNIEnv env, + JClass, + JObject surface_texture_object, + bool flip_y_web_gl, + jint fbo, + jint rbo, + jint program, + jint external_texture, + jint sampler_pos, + jint array_buffer, + jint pos, + jfloatArray matrix, + jint matrix_pos, + jint width, + jint height, + jint render_width, + jint render_height, + jint internal_format, + jint format, + jint draw_count); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSWebGL2RenderingContext_nativeFlipInPlace3D(JNIEnv env, + JClass, + JByteBuffer pixels, + jint bytesPerPixel, + jint height, + jint depth); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSWebGL2RenderingContext_nativeTexImage3DBuffer(JNIEnv env, + JClass, + jint target, + jint level, + jint internalformat, + jint width, + jint height, + jint depth, + jint border, + jint format, + jint image_type, + JByteBuffer buffer, + jboolean flipY); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSWebGL2RenderingContext_nativeTexImage3DByteArray(JNIEnv env, + JClass, + jint target, + jint level, + jint internalformat, + jint width, + jint height, + jint depth, + jint border, + jint format, + jint image_type, + jbyteArray byteArray, + jboolean flipY); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSWebGL2RenderingContext_nativeTexImage3DShortArray(JNIEnv env, + JClass, + jint target, + jint level, + jint internalformat, + jint width, + jint height, + jint depth, + jint border, + jint format, + jint image_type, + jshortArray shortArray, + jboolean flipY); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSWebGL2RenderingContext_nativeTexImage3DIntArray(JNIEnv env, + JClass, + jint target, + jint level, + jint internalformat, + jint width, + jint height, + jint depth, + jint border, + jint format, + jint image_type, + jintArray intArray, + jboolean flipY); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSWebGL2RenderingContext_nativeTexImage3DFloatArray(JNIEnv env, + JClass, + jint target, + jint level, + jint internalformat, + jint width, + jint height, + jint depth, + jint border, + jint format, + jint image_type, + jfloatArray floatArray, + jboolean flipY); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSWebGL2RenderingContext_nativeTexImage3DDoubleArray(JNIEnv env, + JClass, + jint target, + jint level, + jint internalformat, + jint width, + jint height, + jint depth, + jint border, + jint format, + jint image_type, + jdoubleArray doubleArray, + jboolean flipY); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSWebGL2RenderingContext_nativeTexImage3DLongArray(JNIEnv env, + JClass, + jint target, + jint level, + jint internalformat, + jint width, + jint height, + jint depth, + jint border, + jint format, + jint image_type, + jlongArray longArray, + jboolean flipY); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSWebGL2RenderingContext_nativeTexImage3DAsset(JNIEnv _env, + JClass, + jint target, + jint level, + jint internalformat, + jint width, + jint height, + jint depth, + jint border, + jint format, + jint image_type, + jlong asset, + jboolean flipY); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSWebGL2RenderingContext_nativeTexImage3DBitmap(JNIEnv env, + JClass, + jint target, + jint level, + jint internalformat, + jint width, + jint height, + jint depth, + jint border, + jint format, + jint image_type, + JObject bitmap, + jboolean flipY); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSWebGL2RenderingContext_nativeTexSubImage3DBuffer(JNIEnv env, + JClass, + jint target, + jint level, + jint xoffset, + jint yoffset, + jint zoffset, + jint width, + jint height, + jint depth, + jint format, + jint image_type, + JByteBuffer buffer, + jboolean flipY); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSWebGL2RenderingContext_nativeTexSubImage3DByteArray(JNIEnv env, + JClass, + jint target, + jint level, + jint xoffset, + jint yoffset, + jint zoffset, + jint width, + jint height, + jint depth, + jint format, + jint image_type, + jbyteArray byteArray, + jboolean flipY); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSWebGL2RenderingContext_nativeTexSubImage3DShortArray(JNIEnv env, + JClass, + jint target, + jint level, + jint xoffset, + jint yoffset, + jint zoffset, + jint width, + jint height, + jint depth, + jint format, + jint image_type, + jshortArray shortArray, + jboolean flipY); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSWebGL2RenderingContext_nativeTexSubImage3DIntArray(JNIEnv env, + JClass, + jint target, + jint level, + jint xoffset, + jint yoffset, + jint zoffset, + jint width, + jint height, + jint depth, + jint format, + jint image_type, + jintArray intArray, + jboolean flipY); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSWebGL2RenderingContext_nativeTexSubImage3DLongArray(JNIEnv env, + JClass, + jint target, + jint level, + jint xoffset, + jint yoffset, + jint zoffset, + jint width, + jint height, + jint depth, + jint format, + jint image_type, + jlongArray longArray, + jboolean flipY); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSWebGL2RenderingContext_nativeTexSubImage3DFloatArray(JNIEnv env, + JClass, + jint target, + jint level, + jint xoffset, + jint yoffset, + jint zoffset, + jint width, + jint height, + jint depth, + jint format, + jint image_type, + jfloatArray floatArray, + jboolean flipY); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSWebGL2RenderingContext_nativeTexSubImage3DDoubleArray(JNIEnv env, + JClass, + jint target, + jint level, + jint xoffset, + jint yoffset, + jint zoffset, + jint width, + jint height, + jint depth, + jint format, + jint image_type, + jdoubleArray doubleArray, + jboolean flipY); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSWebGL2RenderingContext_nativeTexSubImage3DAsset(JNIEnv _env, + JClass, + jint target, + jint level, + jint xoffset, + jint yoffset, + jint zoffset, + jint width, + jint height, + jint depth, + jint format, + jint image_type, + jlong asset, + jboolean flipY); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSWebGL2RenderingContext_nativeTexSubImage3DBitmap(JNIEnv env, + JClass, + jint target, + jint level, + jint xoffset, + jint yoffset, + jint zoffset, + jint width, + jint height, + jint depth, + jint format, + jint image_type, + JObject bitmap, + jboolean flipY); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSWebGLRenderingContext_nativeTexImage2DTexture(JNIEnv _env, + JClass, + jint width, + jint height, + jint src_texture); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSWebGLRenderingContext_nativeFlipBufferInPlace(JNIEnv env, + JClass, + JByteBuffer pixels, + jint bytesPerPixel, + jint height); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSWebGLRenderingContext_nativeGetVertexAttribOffset(JNIEnv env, + JClass, + jint index, + jint pname, + JByteBuffer buffer); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSWebGLRenderingContext_nativeBindBuffer(JNIEnv _env, + JClass, + jint target, + jint buffer); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSWebGLRenderingContext_nativeReadPixels(JNIEnv _env, + JClass, + jint x, + jint y, + jint width, + jint height, + jint format, + jint pixel_type); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSWebGLRenderingContext_nativeTexImage2DByteArray(JNIEnv env, + JClass, + jint target, + jint level, + jint internalformat, + jint width, + jint height, + jint border, + jint format, + jint image_type, + jbyteArray byteArray, + jboolean flipY); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSWebGLRenderingContext_nativeTexImage2DShortArray(JNIEnv env, + JClass, + jint target, + jint level, + jint internalformat, + jint width, + jint height, + jint border, + jint format, + jint image_type, + jshortArray shortArray, + jboolean flipY); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSWebGLRenderingContext_nativeTexImage2DIntArray(JNIEnv env, + JClass, + jint target, + jint level, + jint internalformat, + jint width, + jint height, + jint border, + jint format, + jint image_type, + jintArray intArray, + jboolean flipY); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSWebGLRenderingContext_nativeTexImage2DFloatArray(JNIEnv env, + JClass, + jint target, + jint level, + jint internalformat, + jint width, + jint height, + jint border, + jint format, + jint image_type, + jfloatArray floatArray, + jboolean flipY); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSWebGLRenderingContext_nativeTexImage2DBuffer(JNIEnv env, + JClass, + jint target, + jint level, + jint internalformat, + jint width, + jint height, + jint border, + jint format, + jint image_type, + JByteBuffer buffer, + jboolean flipY); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSWebGLRenderingContext_nativeTexImage2DAsset(JNIEnv _env, + JClass, + jint target, + jint level, + jint internalformat, + jint border, + jint format, + jint image_type, + jlong asset, + jboolean flipY); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSWebGLRenderingContext_nativeTexImage2DBitmap(JNIEnv env, + JClass, + jint target, + jint level, + jint internalformat, + jint width, + jint height, + jint border, + jint format, + jint image_type, + JObject bitmap, + jboolean flipY); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSWebGLRenderingContext_nativeTexSubImage2DByteArray(JNIEnv env, + JClass, + jint target, + jint level, + jint xoffset, + jint yoffset, + jint width, + jint height, + jint format, + jint image_type, + jbyteArray byteArray, + jboolean flip_y); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSWebGLRenderingContext_nativeTexSubImage2DShortArray(JNIEnv env, + JClass, + jint target, + jint level, + jint xoffset, + jint yoffset, + jint width, + jint height, + jint format, + jint image_type, + jshortArray shortArray, + jboolean flip_y); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSWebGLRenderingContext_nativeTexSubImage2DIntArray(JNIEnv env, + JClass, + jint target, + jint level, + jint xoffset, + jint yoffset, + jint width, + jint height, + jint format, + jint image_type, + jintArray intArray, + jboolean flip_y); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSWebGLRenderingContext_nativeTexSubImage2DFloatArray(JNIEnv env, + JClass, + jint target, + jint level, + jint xoffset, + jint yoffset, + jint width, + jint height, + jint format, + jint image_type, + jfloatArray floatArray, + jboolean flip_y); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSWebGLRenderingContext_nativeTexSubImage2DBuffer(JNIEnv env, + JClass, + jint target, + jint level, + jint xoffset, + jint yoffset, + jint width, + jint height, + jint format, + jint image_type, + JByteBuffer buffer, + jboolean flip_y); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSWebGLRenderingContext_nativeTexSubImage2DAsset(JNIEnv _env, + JClass, + jint target, + jint level, + jint xoffset, + jint yoffset, + jint width, + jint height, + jint format, + jint image_type, + jlong asset, + jboolean flip_y); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSWebGLRenderingContext_nativeTexSubImage2DBitmap(JNIEnv env, + JClass, + jint target, + jint level, + jint xoffset, + jint yoffset, + jint width, + jint height, + jint format, + jint image_type, + JObject bitmap, + jboolean flip_y); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSWebGLRenderingContext_nativeVertexAttribPointer(JNIEnv _env, + JClass, + jint index, + jint size, + jint pointer_type, + jboolean normalized, + jint stride, + jlong offset); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSCanvasGradient_nativeAddColorStop(JNIEnv env, + JClass, + long long style, + float stop, + JString color); +#endif + +#if defined(TARGET_OS_ANDROID) +jlong Java_org_nativescript_canvas_TNSImageAsset_nativeInit(JNIEnv, JClass); +#endif + +#if defined(TARGET_OS_ANDROID) +jbyteArray Java_org_nativescript_canvas_TNSImageAsset_nativeGetBytes(JNIEnv env, + JClass, + jlong asset); +#endif + +#if defined(TARGET_OS_ANDROID) +jint Java_org_nativescript_canvas_TNSImageAsset_nativeGetWidth(JNIEnv _env, JClass, jlong asset); +#endif + +#if defined(TARGET_OS_ANDROID) +jint Java_org_nativescript_canvas_TNSImageAsset_nativeGetHeight(JNIEnv _env, JClass, jlong asset); +#endif + +#if defined(TARGET_OS_ANDROID) +jboolean Java_org_nativescript_canvas_TNSImageAsset_nativeScale(JNIEnv _env, + JClass, + jlong asset, + jint x, + jint y); +#endif + +#if defined(TARGET_OS_ANDROID) +jboolean Java_org_nativescript_canvas_TNSImageAsset_nativeFlipX(JNIEnv _env, JClass, jlong asset); +#endif + +#if defined(TARGET_OS_ANDROID) +jboolean Java_org_nativescript_canvas_TNSImageAsset_nativeFlipY(JNIEnv _env, JClass, jlong asset); +#endif + +#if defined(TARGET_OS_ANDROID) +jboolean Java_org_nativescript_canvas_TNSImageAsset_nativeSave(JNIEnv env, + JClass, + jlong asset, + JString path, + jint format); +#endif + +#if defined(TARGET_OS_ANDROID) +jstring Java_org_nativescript_canvas_TNSImageAsset_nativeGetError(JNIEnv env, JClass, jlong asset); +#endif + +#if defined(TARGET_OS_ANDROID) +jboolean Java_org_nativescript_canvas_TNSImageAsset_nativeHasError(JNIEnv _env, + JClass, + jlong asset); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSImageAsset_nativeDestroy(JNIEnv _env, JClass, jlong asset); +#endif + +#if defined(TARGET_OS_ANDROID) +jboolean Java_org_nativescript_canvas_TNSImageAsset_nativeLoadAssetPath(JNIEnv env, + JClass, + jlong asset, + JString path); +#endif + +#if defined(TARGET_OS_ANDROID) +jboolean Java_org_nativescript_canvas_TNSImageAsset_nativeLoadAssetBytes(JNIEnv env, + JClass, + jlong asset, + jbyteArray buffer); +#endif + +#if defined(TARGET_OS_ANDROID) +jlong Java_org_nativescript_canvas_TNSImageBitmap_nativeCreateFromBuffer(JNIEnv env, + JClass, + JByteBuffer image_buffer, + jfloat image_width, + jfloat image_height, + jboolean flip_y, + jint premultiply_alpha, + jint color_space_conversion, + jint resize_quality, + jfloat resize_width, + jfloat resize_height); +#endif + +#if defined(TARGET_OS_ANDROID) +jlong Java_org_nativescript_canvas_TNSImageBitmap_nativeCreateFromBufferSrcRect(JNIEnv env, + JClass, + JByteBuffer image_buffer, + jfloat image_width, + jfloat image_height, + jfloat sx, + jfloat sy, + jfloat s_width, + jfloat s_height, + jboolean flip_y, + jint premultiply_alpha, + jint color_space_conversion, + jint resize_quality, + jfloat resize_width, + jfloat resize_height); +#endif + +#if defined(TARGET_OS_ANDROID) +jlong Java_org_nativescript_canvas_TNSImageBitmap_nativeCreateFromBufferEncoded(JNIEnv env, + JClass, + JByteBuffer image_buffer, + jboolean flip_y, + jint premultiply_alpha, + jint color_space_conversion, + jint resize_quality, + jfloat resize_width, + jfloat resize_height); +#endif + +#if defined(TARGET_OS_ANDROID) +jlong Java_org_nativescript_canvas_TNSImageBitmap_nativeCreateFromBufferEncodedSrcRect(JNIEnv env, + JClass, + JByteBuffer image_buffer, + jfloat sx, + jfloat sy, + jfloat s_width, + jfloat s_height, + jboolean flip_y, + jint premultiply_alpha, + jint color_space_conversion, + jint resize_quality, + jfloat resize_width, + jfloat resize_height); +#endif + +#if defined(TARGET_OS_ANDROID) +jlong Java_org_nativescript_canvas_TNSImageBitmap_nativeCreateFromBytes(JNIEnv env, + JClass, + jbyteArray image_bytes, + jfloat image_width, + jfloat image_height, + jboolean flip_y, + jint premultiply_alpha, + jint color_space_conversion, + jint resize_quality, + jfloat resize_width, + jfloat resize_height); +#endif + +#if defined(TARGET_OS_ANDROID) +jlong Java_org_nativescript_canvas_TNSImageBitmap_nativeCreateFromBytesSrcRect(JNIEnv env, + JClass, + jbyteArray image_bytes, + jfloat image_width, + jfloat image_height, + jfloat sx, + jfloat sy, + jfloat s_width, + jfloat s_height, + jboolean flip_y, + jint premultiply_alpha, + jint color_space_conversion, + jint resize_quality, + jfloat resize_width, + jfloat resize_height); +#endif + +#if defined(TARGET_OS_ANDROID) +jlong Java_org_nativescript_canvas_TNSImageBitmap_nativeCreateFromBytesEncoded(JNIEnv env, + JClass, + jbyteArray image_bytes, + jboolean flip_y, + jint premultiply_alpha, + jint color_space_conversion, + jint resize_quality, + jfloat resize_width, + jfloat resize_height); +#endif + +#if defined(TARGET_OS_ANDROID) +jlong Java_org_nativescript_canvas_TNSImageBitmap_nativeCreateFromBytesEncodedSrcRect(JNIEnv env, + JClass, + jbyteArray image_bytes, + jfloat sx, + jfloat sy, + jfloat s_width, + jfloat s_height, + jboolean flip_y, + jint premultiply_alpha, + jint color_space_conversion, + jint resize_quality, + jfloat resize_width, + jfloat resize_height); +#endif + +#if defined(TARGET_OS_ANDROID) +jlong Java_org_nativescript_canvas_TNSImageBitmap_nativeCreateFromAsset(JNIEnv, + JClass, + jlong asset, + jboolean flip_y, + jint premultiply_alpha, + jint color_space_conversion, + jint resize_quality, + jfloat resize_width, + jfloat resize_height); +#endif + +#if defined(TARGET_OS_ANDROID) +jlong Java_org_nativescript_canvas_TNSImageBitmap_nativeCreateFromAssetSrcRect(JNIEnv, + JClass, + jlong asset, + jfloat sx, + jfloat sy, + jfloat s_width, + jfloat s_height, + jboolean flip_y, + jint premultiply_alpha, + jint color_space_conversion, + jint resize_quality, + jfloat resize_width, + jfloat resize_height); +#endif + +#if defined(TARGET_OS_ANDROID) +jlong Java_org_nativescript_canvas_TNSImageBitmap_nativeCreateFromBitmap(JNIEnv env, + JClass, + JObject bitmap, + jboolean flip_y, + jint premultiply_alpha, + jint color_space_conversion, + jint resize_quality, + jfloat resize_width, + jfloat resize_height); +#endif + +#if defined(TARGET_OS_ANDROID) +jlong Java_org_nativescript_canvas_TNSImageBitmap_nativeCreateFromBitmapSrcRect(JNIEnv env, + JClass, + JObject bitmap, + jfloat sx, + jfloat sy, + jfloat s_width, + jfloat s_height, + jboolean flip_y, + jint premultiply_alpha, + jint color_space_conversion, + jint resize_quality, + jfloat resize_width, + jfloat resize_height); +#endif + +#if defined(TARGET_OS_ANDROID) +jlong Java_org_nativescript_canvas_TNSImageBitmap_nativeCreateFromImageData(JNIEnv, + JClass, + jlong image_data, + jboolean flip_y, + jint premultiply_alpha, + jint color_space_conversion, + jint resize_quality, + jfloat resize_width, + jfloat resize_height); +#endif + +#if defined(TARGET_OS_ANDROID) +jlong Java_org_nativescript_canvas_TNSImageBitmap_nativeCreateFromImageDataSrcRect(JNIEnv, + JClass, + jlong image_data, + jfloat sx, + jfloat sy, + jfloat s_width, + jfloat s_height, + jboolean flip_y, + jint premultiply_alpha, + jint color_space_conversion, + jint resize_quality, + jfloat resize_width, + jfloat resize_height); +#endif + +#if defined(TARGET_OS_ANDROID) +jlong Java_org_nativescript_canvas_TNSImageData_nativeInit(JNIEnv, JClass, jint width, jint height); +#endif + +#if defined(TARGET_OS_ANDROID) +jint Java_org_nativescript_canvas_TNSImageData_nativeWidth(JNIEnv, JClass, jlong image_data); +#endif + +#if defined(TARGET_OS_ANDROID) +jint Java_org_nativescript_canvas_TNSImageData_nativeHeight(JNIEnv, JClass, jlong image_data); +#endif + +#if defined(TARGET_OS_ANDROID) +jobject Java_org_nativescript_canvas_TNSImageData_nativeData(JNIEnv env, JClass, jlong image_data); +#endif + +#if defined(TARGET_OS_ANDROID) +jint Java_org_nativescript_canvas_TNSImageData_nativeDataLength(JNIEnv, JClass, jlong image_data); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSImageData_nativeDestroy(JNIEnv, JClass, jlong image_data); +#endif + +#if defined(TARGET_OS_ANDROID) +jlong Java_org_nativescript_canvas_TNSDOMMatrix_nativeInit(JNIEnv, JClass); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSDOMMatrix_nativeUpdate(JNIEnv env, + JClass, + jlong matrix, + jfloatArray data); +#endif + +#if defined(TARGET_OS_ANDROID) +jfloat Java_org_nativescript_canvas_TNSDOMMatrix_nativeA(JNIEnv, JClass, jlong matrix); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSDOMMatrix_nativeSetA(JNIEnv, JClass, jlong matrix, jfloat a); +#endif + +#if defined(TARGET_OS_ANDROID) +jfloat Java_org_nativescript_canvas_TNSDOMMatrix_nativeB(JNIEnv, JClass, jlong matrix); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSDOMMatrix_nativeSetB(JNIEnv, JClass, jlong matrix, jfloat b); +#endif + +#if defined(TARGET_OS_ANDROID) +jfloat Java_org_nativescript_canvas_TNSDOMMatrix_nativeC(JNIEnv, JClass, jlong matrix); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSDOMMatrix_nativeSetC(JNIEnv, JClass, jlong matrix, jfloat c); +#endif + +#if defined(TARGET_OS_ANDROID) +jfloat Java_org_nativescript_canvas_TNSDOMMatrix_nativeD(JNIEnv, JClass, jlong matrix); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSDOMMatrix_nativeSetD(JNIEnv, JClass, jlong matrix, jfloat d); +#endif + +#if defined(TARGET_OS_ANDROID) +jfloat Java_org_nativescript_canvas_TNSDOMMatrix_nativeE(JNIEnv, JClass, jlong matrix); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSDOMMatrix_nativeSetE(JNIEnv, JClass, jlong matrix, jfloat e); +#endif + +#if defined(TARGET_OS_ANDROID) +jfloat Java_org_nativescript_canvas_TNSDOMMatrix_nativeF(JNIEnv, JClass, jlong matrix); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSDOMMatrix_nativeSetF(JNIEnv, JClass, jlong matrix, jfloat f); +#endif + +#if defined(TARGET_OS_ANDROID) +jfloat Java_org_nativescript_canvas_TNSDOMMatrix_nativeM11(JNIEnv, JClass, jlong matrix); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSDOMMatrix_nativeSetM11(JNIEnv, + JClass, + jlong matrix, + jfloat m11); +#endif + +#if defined(TARGET_OS_ANDROID) +jfloat Java_org_nativescript_canvas_TNSDOMMatrix_nativeM12(JNIEnv, JClass, jlong matrix); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSDOMMatrix_nativeSetM12(JNIEnv, + JClass, + jlong matrix, + jfloat m12); +#endif + +#if defined(TARGET_OS_ANDROID) +jfloat Java_org_nativescript_canvas_TNSDOMMatrix_nativeM13(JNIEnv, JClass, jlong matrix); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSDOMMatrix_nativeSetM13(JNIEnv, + JClass, + jlong matrix, + jfloat m13); +#endif + +#if defined(TARGET_OS_ANDROID) +jfloat Java_org_nativescript_canvas_TNSDOMMatrix_nativeM14(JNIEnv, JClass, jlong matrix); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSDOMMatrix_nativeSetM14(JNIEnv, + JClass, + jlong matrix, + jfloat m14); +#endif + +#if defined(TARGET_OS_ANDROID) +jfloat Java_org_nativescript_canvas_TNSDOMMatrix_nativeM21(JNIEnv, JClass, jlong matrix); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSDOMMatrix_nativeSetM21(JNIEnv, + JClass, + jlong matrix, + jfloat m21); +#endif + +#if defined(TARGET_OS_ANDROID) +jfloat Java_org_nativescript_canvas_TNSDOMMatrix_nativeM22(JNIEnv, JClass, jlong matrix); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSDOMMatrix_nativeSetM22(JNIEnv, + JClass, + jlong matrix, + jfloat m22); +#endif + +#if defined(TARGET_OS_ANDROID) +jfloat Java_org_nativescript_canvas_TNSDOMMatrix_nativeM23(JNIEnv, JClass, jlong matrix); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSDOMMatrix_nativeSetM23(JNIEnv, + JClass, + jlong matrix, + jfloat m23); +#endif + +#if defined(TARGET_OS_ANDROID) +jfloat Java_org_nativescript_canvas_TNSDOMMatrix_nativeM24(JNIEnv, JClass, jlong matrix); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSDOMMatrix_nativeSetM24(JNIEnv, + JClass, + jlong matrix, + jfloat m24); +#endif + +#if defined(TARGET_OS_ANDROID) +jfloat Java_org_nativescript_canvas_TNSDOMMatrix_nativeM31(JNIEnv, JClass, jlong matrix); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSDOMMatrix_nativeSetM31(JNIEnv, + JClass, + jlong matrix, + jfloat m31); +#endif + +#if defined(TARGET_OS_ANDROID) +jfloat Java_org_nativescript_canvas_TNSDOMMatrix_nativeM32(JNIEnv, JClass, jlong matrix); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSDOMMatrix_nativeSetM32(JNIEnv, + JClass, + jlong matrix, + jfloat m32); +#endif + +#if defined(TARGET_OS_ANDROID) +jfloat Java_org_nativescript_canvas_TNSDOMMatrix_nativeM33(JNIEnv, JClass, jlong matrix); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSDOMMatrix_nativeSetM33(JNIEnv, + JClass, + jlong matrix, + jfloat m33); +#endif + +#if defined(TARGET_OS_ANDROID) +jfloat Java_org_nativescript_canvas_TNSDOMMatrix_nativeM34(JNIEnv, JClass, jlong matrix); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSDOMMatrix_nativeSetM34(JNIEnv, + JClass, + jlong matrix, + jfloat m34); +#endif + +#if defined(TARGET_OS_ANDROID) +jfloat Java_org_nativescript_canvas_TNSDOMMatrix_nativeM41(JNIEnv, JClass, jlong matrix); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSDOMMatrix_nativeSetM41(JNIEnv, + JClass, + jlong matrix, + jfloat m41); +#endif + +#if defined(TARGET_OS_ANDROID) +jfloat Java_org_nativescript_canvas_TNSDOMMatrix_nativeM42(JNIEnv, JClass, jlong matrix); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSDOMMatrix_nativeSetM42(JNIEnv, + JClass, + jlong matrix, + jfloat m42); +#endif + +#if defined(TARGET_OS_ANDROID) +jfloat Java_org_nativescript_canvas_TNSDOMMatrix_nativeM43(JNIEnv, JClass, jlong matrix); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSDOMMatrix_nativeSetM43(JNIEnv, + JClass, + jlong matrix, + jfloat m43); +#endif + +#if defined(TARGET_OS_ANDROID) +jfloat Java_org_nativescript_canvas_TNSDOMMatrix_nativeM44(JNIEnv, JClass, jlong matrix); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSDOMMatrix_nativeSetM44(JNIEnv, + JClass, + jlong matrix, + jfloat m44); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSDOMMatrix_nativeDestroy(JNIEnv, JClass, jlong matrix); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeSetFillColorWithString(JNIEnv env, + JClass, + jlong context, + JString color); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeSetStrokeColorWithString(JNIEnv env, + JClass, + jlong context, + JString color); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSColorStyle_nativeDestroy(JNIEnv, JClass, jlong style); +#endif + +#if defined(TARGET_OS_ANDROID) +jstring Java_org_nativescript_canvas_TNSColor_nativeGetColorString(JNIEnv env, JClass, jlong color); +#endif + +#if defined(TARGET_OS_ANDROID) +jlong Java_org_nativescript_canvas_TNSPath2D_nativeInit(JNIEnv, JClass); +#endif + +#if defined(TARGET_OS_ANDROID) +jlong Java_org_nativescript_canvas_TNSPath2D_nativeCreateWithPath(JNIEnv, JClass, jlong path); +#endif + +#if defined(TARGET_OS_ANDROID) +jlong Java_org_nativescript_canvas_TNSPath2D_nativeCreateWithString(JNIEnv env, + JClass, + JString string); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSPath2D_nativeAddPath(JNIEnv, + JClass, + jlong path, + jlong path_to_add); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSPath2D_nativeAddPathWithMatrix(JNIEnv, + JClass, + jlong path, + jlong path_to_add, + jlong matrix); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSPath2D_nativeClosePath(JNIEnv, JClass, jlong path); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSPath2D_nativeMoveTo(JNIEnv, + JClass, + jlong path, + jfloat x, + jfloat y); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSPath2D_nativeLineTo(JNIEnv, + JClass, + jlong path, + jfloat x, + jfloat y); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSPath2D_nativeBezierCurveTo(JNIEnv, + JClass, + jlong path, + jfloat cp1x, + jfloat cp1y, + jfloat cp2x, + jfloat cp2y, + jfloat x, + jfloat y); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSPath2D_nativeQuadraticCurveTo(JNIEnv, + JClass, + jlong path, + jfloat cpx, + jfloat cpy, + jfloat x, + jfloat y); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSPath2D_nativeArc(JNIEnv, + JClass, + jlong path, + jfloat x, + jfloat y, + jfloat radius, + jfloat start_angle, + jfloat end_angle, + bool anti_clockwise); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSPath2D_nativeArcTo(JNIEnv, + JClass, + jlong path, + jfloat x1, + jfloat y1, + jfloat x2, + jfloat y2, + jfloat radius); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSPath2D_nativeEllipse(JNIEnv, + JClass, + jlong path, + jfloat x, + jfloat y, + jfloat radius_x, + jfloat radius_y, + jfloat rotation, + jfloat start_angle, + jfloat end_angle, + bool anticlockwise); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSPath2D_nativeRect(JNIEnv, + JClass, + jlong path, + jfloat x, + jfloat y, + jfloat width, + jfloat height); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSPath2D_nativeDestroy(JNIEnv, JClass, jlong path); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSPattern_nativeSetTransform(JNIEnv, + JClass, + jlong pattern, + jlong matrix); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSSVG_nativeDrawSVG(JNIEnv env, + JClass, + jlong context, + JString svg); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSSVG_nativeDrawSVGFromPath(JNIEnv env, + JClass, + jlong context, + JString path); +#endif + +#if defined(TARGET_OS_ANDROID) +jlong Java_org_nativescript_canvas_TNSTextDecoder_nativeInit(JNIEnv env, JClass, JString decoding); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSTextDecoder_nativeDestroy(JNIEnv, JClass, jlong decoder); +#endif + +#if defined(TARGET_OS_ANDROID) +jstring Java_org_nativescript_canvas_TNSTextDecoder_nativeGetEncoding(JNIEnv env, + JClass, + jlong decoder); +#endif + +#if defined(TARGET_OS_ANDROID) +jstring Java_org_nativescript_canvas_TNSTextDecoder_nativeDecodeBuffer(JNIEnv env, + JClass, + jlong decoder, + JByteBuffer data); +#endif + +#if defined(TARGET_OS_ANDROID) +jbyteArray Java_org_nativescript_canvas_TNSTextDecoder_nativeDecodeBufferToBytes(JNIEnv env, + JClass, + jlong decoder, + JByteBuffer data); +#endif + +#if defined(TARGET_OS_ANDROID) +jstring Java_org_nativescript_canvas_TNSTextDecoder_nativeDecode(JNIEnv env, + JClass, + jlong decoder, + jbyteArray data); +#endif + +#if defined(TARGET_OS_ANDROID) +jbyteArray Java_org_nativescript_canvas_TNSTextDecoder_nativeDecodeToBytes(JNIEnv env, + JClass, + jlong decoder, + jbyteArray data); +#endif + +#if defined(TARGET_OS_ANDROID) +jlong Java_org_nativescript_canvas_TNSTextEncoder_nativeInit(JNIEnv env, JClass, JString encoding); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSTextEncoder_nativeDestroy(JNIEnv, JClass, jlong encoder); +#endif + +#if defined(TARGET_OS_ANDROID) +jstring Java_org_nativescript_canvas_TNSTextEncoder_nativeGetEncoding(JNIEnv env, + JClass, + jlong encoder); +#endif + +#if defined(TARGET_OS_ANDROID) +jbyteArray Java_org_nativescript_canvas_TNSTextEncoder_nativeEncode(JNIEnv env, + JClass, + jlong encoder, + JString text); +#endif + +#if defined(TARGET_OS_ANDROID) +jfloat Java_org_nativescript_canvas_TNSTextMetrics_nativeGetWidth(JNIEnv, JClass, jlong metrics); +#endif + +#if defined(TARGET_OS_ANDROID) +jfloat Java_org_nativescript_canvas_TNSTextMetrics_nativeGetActualBoundingBoxLeft(JNIEnv, + JClass, + jlong metrics); +#endif + +#if defined(TARGET_OS_ANDROID) +jfloat Java_org_nativescript_canvas_TNSTextMetrics_nativeGetActualBoundingBoxRight(JNIEnv, + JClass, + jlong metrics); +#endif + +#if defined(TARGET_OS_ANDROID) +jfloat Java_org_nativescript_canvas_TNSTextMetrics_nativeGetActualBoundingBoxAscent(JNIEnv, + JClass, + jlong metrics); +#endif + +#if defined(TARGET_OS_ANDROID) +jfloat Java_org_nativescript_canvas_TNSTextMetrics_nativeGetActualBoundingBoxDescent(JNIEnv, + JClass, + jlong metrics); +#endif + +#if defined(TARGET_OS_ANDROID) +jfloat Java_org_nativescript_canvas_TNSTextMetrics_nativeGetFontBoundingBoxAscent(JNIEnv, + JClass, + jlong metrics); +#endif + +#if defined(TARGET_OS_ANDROID) +jfloat Java_org_nativescript_canvas_TNSTextMetrics_nativeGetFontBoundingBoxDescent(JNIEnv, + JClass, + jlong metrics); +#endif + +#if defined(TARGET_OS_ANDROID) +jfloat Java_org_nativescript_canvas_TNSTextMetrics_nativeGetEmHeightAscent(JNIEnv, + JClass, + jlong metrics); +#endif + +#if defined(TARGET_OS_ANDROID) +jfloat Java_org_nativescript_canvas_TNSTextMetrics_nativeGetEmHeightDescent(JNIEnv, + JClass, + jlong metrics); +#endif + +#if defined(TARGET_OS_ANDROID) +jfloat Java_org_nativescript_canvas_TNSTextMetrics_nativeGetHangingBaseline(JNIEnv, + JClass, + jlong metrics); +#endif + +#if defined(TARGET_OS_ANDROID) +jfloat Java_org_nativescript_canvas_TNSTextMetrics_nativeGetAlphabeticBaseline(JNIEnv, + JClass, + jlong metrics); +#endif + +#if defined(TARGET_OS_ANDROID) +jfloat Java_org_nativescript_canvas_TNSTextMetrics_nativeGetIdeographicBaseline(JNIEnv, + JClass, + jlong metrics); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSTextMetrics_nativeDestroy(JNIEnv, JClass, jlong metrics); +#endif + +#if defined(TARGET_OS_ANDROID) +jbyteArray Java_org_nativescript_canvas_Utils_nativeGetByteBufferFromBitmap(JNIEnv env, + JClass, + JObject bitmap); +#endif + +#if defined(TARGET_OS_IOS) +void destroy_string(const char *string); +#endif + +#if defined(TARGET_OS_IOS) +void destroy_context(long long context); +#endif + +#if defined(TARGET_OS_IOS) +void destroy_paint_style(long long style); +#endif + +#if defined(TARGET_OS_IOS) +void destroy_text_metrics(long long metrics); +#endif + +#if defined(TARGET_OS_IOS) +long long context_init_context(float width, + float height, + float density, + int buffer_id, + uintptr_t samples, + bool alpha, + unsigned int font_color, + float ppi, + enum TextDirection direction); +#endif + +#if defined(TARGET_OS_IOS) +long long context_init_context_with_custom_surface(float width, + float height, + float density, + bool alpha, + int font_color, + float ppi, + enum TextDirection direction); +#endif + +#if defined(TARGET_OS_IOS) +void context_resize_custom_surface(long long context, + float width, + float height, + float density, + bool alpha, + float ppi); +#endif + +#if defined(TARGET_OS_IOS) +void context_resize_surface(long long context, + float width, + float height, + float density, + int buffer_id, + uintptr_t samples, + bool alpha, + float ppi); +#endif + +#if defined(TARGET_OS_IOS) +const char *context_data_url(long long context, const char *format, float quality); +#endif + +#if defined(TARGET_OS_IOS) +struct U8Array *context_snapshot_canvas(long long context); +#endif + +#if defined(TARGET_OS_IOS) +void context_flush(long long context); +#endif + +#if defined(TARGET_OS_IOS) +void context_custom_with_buffer_flush(long long context, + uint8_t *buf, + uintptr_t buf_size, + float width, + float height); +#endif + +#if defined(TARGET_OS_IOS) +void context_set_direction(long long context, enum TextDirection direction); +#endif + +#if defined(TARGET_OS_IOS) +enum TextDirection context_get_direction(const struct Context *context); +#endif + +#if defined(TARGET_OS_IOS) +void context_set_fill_style(long long context, long long style); +#endif + +#if defined(TARGET_OS_IOS) +struct PaintStyleValue *context_get_fill_style(long long context); +#endif + +#if defined(TARGET_OS_IOS) +void context_set_filter(long long context, const char *filter); +#endif + +#if defined(TARGET_OS_IOS) +const char *context_get_filter(long long context); +#endif + +#if defined(TARGET_OS_IOS) +void context_set_font(long long context, const char *filter); +#endif + +#if defined(TARGET_OS_IOS) +const char *context_get_font(long long context); +#endif + +#if defined(TARGET_OS_IOS) +void context_set_global_alpha(long long context, float alpha); +#endif + +#if defined(TARGET_OS_IOS) +float context_get_global_alpha(long long context); +#endif + +#if defined(TARGET_OS_IOS) +void context_set_global_composite_operation(long long context, + enum CompositeOperationType operation); +#endif + +#if defined(TARGET_OS_IOS) +enum CompositeOperationType context_get_global_composite_operation(long long context); +#endif + +#if defined(TARGET_OS_IOS) +void context_set_image_smoothing_enabled(long long context, bool enabled); +#endif + +#if defined(TARGET_OS_IOS) +bool context_get_image_smoothing_enabled(long long context); +#endif + +#if defined(TARGET_OS_IOS) +void context_set_image_smoothing_quality(long long context, enum ImageSmoothingQuality quality); +#endif + +#if defined(TARGET_OS_IOS) +enum ImageSmoothingQuality context_get_image_smoothing_quality(long long context); +#endif + +#if defined(TARGET_OS_IOS) +void context_set_line_cap(long long context, enum LineCap cap); +#endif + +#if defined(TARGET_OS_IOS) +enum LineCap context_get_line_cap(long long context); +#endif + +#if defined(TARGET_OS_IOS) +void context_set_line_dash_offset(long long context, float offset); +#endif + +#if defined(TARGET_OS_IOS) +float context_get_line_dash_offset(long long context); +#endif + +#if defined(TARGET_OS_IOS) +void context_set_line_join(long long context, enum LineJoin join); +#endif + +#if defined(TARGET_OS_IOS) +enum LineJoin context_get_line_join(long long context); +#endif + +#if defined(TARGET_OS_IOS) +void context_set_line_width(long long context, float width); +#endif + +#if defined(TARGET_OS_IOS) +float context_get_line_width(long long context); +#endif + +#if defined(TARGET_OS_IOS) +void context_set_miter_limit(long long context, float limit); +#endif + +#if defined(TARGET_OS_IOS) +float context_get_miter_limit(long long context); +#endif + +#if defined(TARGET_OS_IOS) +void context_set_shadow_blur(long long context, float blur); +#endif + +#if defined(TARGET_OS_IOS) +float context_get_shadow_blur(long long context); +#endif + +#if defined(TARGET_OS_IOS) +void context_set_shadow_color(long long context, uint8_t r, uint8_t g, uint8_t b, uint8_t a); +#endif + +#if defined(TARGET_OS_IOS) +void context_set_shadow_color_string(long long context, const char *color); +#endif + +#if defined(TARGET_OS_IOS) +const char *context_get_shadow_color(long long context); +#endif + +#if defined(TARGET_OS_IOS) +void context_set_shadow_offset_x(long long context, float x); +#endif + +#if defined(TARGET_OS_IOS) +float context_get_shadow_offset_x(long long context); +#endif + +#if defined(TARGET_OS_IOS) +void context_set_shadow_offset_y(long long context, float y); +#endif + +#if defined(TARGET_OS_IOS) +float context_get_shadow_offset_y(long long context); +#endif + +#if defined(TARGET_OS_IOS) +void context_set_stroke_style(long long context, long long style); +#endif + +#if defined(TARGET_OS_IOS) +struct PaintStyleValue *context_get_stroke_style(long long context); +#endif + +#if defined(TARGET_OS_IOS) +void context_set_text_align(long long context, enum TextAlign align); +#endif + +#if defined(TARGET_OS_IOS) +enum TextAlign context_get_text_align(long long context); +#endif + +#if defined(TARGET_OS_IOS) +void context_set_text_baseline(long long context, enum TextBaseLine baseline); +#endif + +#if defined(TARGET_OS_IOS) +enum TextBaseLine context_get_text_baseline(long long context); +#endif + +#if defined(TARGET_OS_IOS) void context_arc(long long context, float x, float y, @@ -144,11 +2769,17 @@ void context_arc(long long context, float start_angle, float end_angle, bool anti_clockwise); +#endif +#if defined(TARGET_OS_IOS) void context_arc_to(long long context, float x1, float y1, float x2, float y2, float radius); +#endif +#if defined(TARGET_OS_IOS) void context_begin_path(long long context); +#endif +#if defined(TARGET_OS_IOS) void context_bezier_curve_to(long long context, float cp1x, float cp1y, @@ -156,33 +2787,55 @@ void context_bezier_curve_to(long long context, float cp2y, float x, float y); +#endif +#if defined(TARGET_OS_IOS) void context_clear_rect(long long context, float x, float y, float width, float height); +#endif -void context_clip(long long context, long long path, FillRule rule); +#if defined(TARGET_OS_IOS) +void context_clip(long long context, long long path, enum FillRule rule); +#endif -void context_clip_rule(long long context, FillRule rule); +#if defined(TARGET_OS_IOS) +void context_clip_rule(long long context, enum FillRule rule); +#endif +#if defined(TARGET_OS_IOS) void context_close_path(long long context); +#endif +#if defined(TARGET_OS_IOS) long long context_create_image_data(int width, int height); +#endif +#if defined(TARGET_OS_IOS) long long context_create_linear_gradient(long long context, float x0, float y0, float x1, float y1); +#endif +#if defined(TARGET_OS_IOS) long long context_create_pattern(long long context, const uint8_t *image_data, uintptr_t image_len, int width, int height, - Repetition repetition); + enum Repetition repetition); +#endif -long long context_create_pattern_asset(long long context, long long asset, Repetition repetition); +#if defined(TARGET_OS_IOS) +long long context_create_pattern_asset(long long context, + long long asset, + enum Repetition repetition); +#endif +#if defined(TARGET_OS_IOS) long long context_create_pattern_encoded(long long context, const uint8_t *image_data, uintptr_t image_len, - Repetition repetition); + enum Repetition repetition); +#endif +#if defined(TARGET_OS_IOS) long long context_create_radial_gradient(long long context, float x0, float y0, @@ -190,40 +2843,9 @@ long long context_create_radial_gradient(long long context, float x1, float y1, float r1); +#endif -void context_custom_with_buffer_flush(long long context, - uint8_t *buf, - uintptr_t buf_size, - float width, - float height); - -const char *context_data_url(long long context, const char *format, float quality); - -void context_draw_image(long long context, - const uint8_t *image_data, - uintptr_t image_len, - float width, - float height, - float sx, - float sy, - float s_width, - float s_height, - float dx, - float dy, - float d_width, - float d_height); - -void context_draw_image_asset(long long context, - long long asset, - float sx, - float sy, - float s_width, - float s_height, - float dx, - float dy, - float d_width, - float d_height); - +#if defined(TARGET_OS_IOS) void context_draw_image_dx_dy(long long context, const uint8_t *image_data, uintptr_t image_len, @@ -231,9 +2853,9 @@ void context_draw_image_dx_dy(long long context, float height, float dx, float dy); +#endif -void context_draw_image_dx_dy_asset(long long context, long long asset, float dx, float dy); - +#if defined(TARGET_OS_IOS) void context_draw_image_dx_dy_dw_dh(long long context, const uint8_t *image_data, uintptr_t image_len, @@ -243,32 +2865,33 @@ void context_draw_image_dx_dy_dw_dh(long long context, float dy, float d_width, float d_height); +#endif -void context_draw_image_dx_dy_dw_dh_asset(long long context, - long long asset, - float dx, - float dy, - float d_width, - float d_height); - -void context_draw_image_encoded(long long context, - const uint8_t *image_data, - uintptr_t image_len, - float sx, - float sy, - float s_width, - float s_height, - float dx, - float dy, - float d_width, - float d_height); +#if defined(TARGET_OS_IOS) +void context_draw_image(long long context, + const uint8_t *image_data, + uintptr_t image_len, + float width, + float height, + float sx, + float sy, + float s_width, + float s_height, + float dx, + float dy, + float d_width, + float d_height); +#endif +#if defined(TARGET_OS_IOS) void context_draw_image_encoded_dx_dy(long long context, const uint8_t *image_data, uintptr_t image_len, float dx, float dy); +#endif +#if defined(TARGET_OS_IOS) void context_draw_image_encoded_dx_dy_dw_dh(long long context, const uint8_t *image_data, uintptr_t image_len, @@ -276,7 +2899,49 @@ void context_draw_image_encoded_dx_dy_dw_dh(long long context, float dy, float d_width, float d_height); +#endif + +#if defined(TARGET_OS_IOS) +void context_draw_image_encoded(long long context, + const uint8_t *image_data, + uintptr_t image_len, + float sx, + float sy, + float s_width, + float s_height, + float dx, + float dy, + float d_width, + float d_height); +#endif + +#if defined(TARGET_OS_IOS) +void context_draw_image_dx_dy_asset(long long context, long long asset, float dx, float dy); +#endif + +#if defined(TARGET_OS_IOS) +void context_draw_image_dx_dy_dw_dh_asset(long long context, + long long asset, + float dx, + float dy, + float d_width, + float d_height); +#endif + +#if defined(TARGET_OS_IOS) +void context_draw_image_asset(long long context, + long long asset, + float sx, + float sy, + float s_width, + float s_height, + float dx, + float dy, + float d_width, + float d_height); +#endif +#if defined(TARGET_OS_IOS) void context_ellipse(long long context, float x, float y, @@ -286,304 +2951,128 @@ void context_ellipse(long long context, float start_angle, float end_angle, bool anticlockwise); +#endif -void context_fill(long long context, long long path, FillRule rule); +#if defined(TARGET_OS_IOS) +void context_fill(long long context, long long path, enum FillRule rule); +#endif +#if defined(TARGET_OS_IOS) void context_fill_rect(long long context, float x, float y, float width, float height); +#endif +#if defined(TARGET_OS_IOS) void context_fill_text(long long context, const char *text, float x, float y, float width); +#endif -void context_flush(long long context); +#if defined(TARGET_OS_IOS) +long long context_get_image_data(long long context, float sx, float sy, float sw, float sh); +#endif -TextDirection context_get_direction(const Context *context); +#if defined(TARGET_OS_IOS) +struct F32Array *context_get_line_dash(long long context); +#endif -PaintStyleValue *context_get_fill_style(long long context); +#if defined(TARGET_OS_IOS) +long long context_get_transform(long long context); +#endif -const char *context_get_filter(long long context); +#if defined(TARGET_OS_IOS) +bool context_is_point_in_path(long long context, + long long path, + float x, + float y, + enum FillRule rule); +#endif -const char *context_get_font(long long context); +#if defined(TARGET_OS_IOS) +bool context_is_point_in_stroke(long long context, long long path, float x, float y); +#endif -float context_get_global_alpha(long long context); +#if defined(TARGET_OS_IOS) +void context_line_to(long long context, float x, float y); +#endif -CompositeOperationType context_get_global_composite_operation(long long context); +#if defined(TARGET_OS_IOS) +long long context_measure_text(long long context, const char *text); +#endif -long long context_get_image_data(long long context, float sx, float sy, float sw, float sh); +#if defined(TARGET_OS_IOS) +void context_move_to(long long context, float x, float y); +#endif -bool context_get_image_smoothing_enabled(long long context); +#if defined(TARGET_OS_IOS) +void context_put_image_data(long long context, + long long image_data, + float dx, + float dy, + float dirty_x, + float dirty_y, + float dirty_width, + float dirty_height); +#endif -ImageSmoothingQuality context_get_image_smoothing_quality(long long context); +#if defined(TARGET_OS_IOS) +void context_quadratic_curve_to(long long context, float cpx, float cpy, float x, float y); +#endif -LineCap context_get_line_cap(long long context); - -F32Array *context_get_line_dash(long long context); - -float context_get_line_dash_offset(long long context); - -LineJoin context_get_line_join(long long context); - -float context_get_line_width(long long context); - -float context_get_miter_limit(long long context); - -float context_get_shadow_blur(long long context); - -const char *context_get_shadow_color(long long context); - -float context_get_shadow_offset_x(long long context); - -float context_get_shadow_offset_y(long long context); - -PaintStyleValue *context_get_stroke_style(long long context); - -TextAlign context_get_text_align(long long context); - -TextBaseLine context_get_text_baseline(long long context); - -long long context_get_transform(long long context); - -long long context_init_context(float width, - float height, - float density, - int buffer_id, - uintptr_t samples, - bool alpha, - unsigned int font_color, - float ppi, - TextDirection direction); - -long long context_init_context_with_custom_surface(float width, - float height, - float density, - bool alpha, - int font_color, - float ppi, - TextDirection direction); - -bool context_is_point_in_path(long long context, long long path, float x, float y, FillRule rule); - -bool context_is_point_in_stroke(long long context, long long path, float x, float y); - -void context_line_to(long long context, float x, float y); - -long long context_measure_text(long long context, const char *text); - -void context_move_to(long long context, float x, float y); - -void context_put_image_data(long long context, - long long image_data, - float dx, - float dy, - float dirty_x, - float dirty_y, - float dirty_width, - float dirty_height); - -void context_quadratic_curve_to(long long context, float cpx, float cpy, float x, float y); - -void context_rect(long long context, float x, float y, float width, float height); +#if defined(TARGET_OS_IOS) +void context_rect(long long context, float x, float y, float width, float height); +#endif +#if defined(TARGET_OS_IOS) void context_reset_transform(long long context); +#endif -void context_resize_custom_surface(long long context, - float width, - float height, - float density, - bool alpha, - float ppi); - -void context_resize_surface(long long context, - float width, - float height, - float density, - int buffer_id, - uintptr_t samples, - bool alpha, - float ppi); - +#if defined(TARGET_OS_IOS) void context_restore(long long context); +#endif +#if defined(TARGET_OS_IOS) void context_rotate(long long context, float angle); +#endif +#if defined(TARGET_OS_IOS) void context_save(long long context); +#endif +#if defined(TARGET_OS_IOS) void context_scale(long long context, float x, float y); +#endif -void context_set_direction(long long context, TextDirection direction); - -void context_set_fill_style(long long context, long long style); - -void context_set_filter(long long context, const char *filter); - -void context_set_font(long long context, const char *filter); - -void context_set_global_alpha(long long context, float alpha); - -void context_set_global_composite_operation(long long context, CompositeOperationType operation); - -void context_set_image_smoothing_enabled(long long context, bool enabled); - -void context_set_image_smoothing_quality(long long context, ImageSmoothingQuality quality); - -void context_set_line_cap(long long context, LineCap cap); - +#if defined(TARGET_OS_IOS) void context_set_line_dash(long long context, const float *data, uintptr_t data_length); +#endif -void context_set_line_dash_offset(long long context, float offset); - -void context_set_line_join(long long context, LineJoin join); - -void context_set_line_width(long long context, float width); - -void context_set_miter_limit(long long context, float limit); - -void context_set_shadow_blur(long long context, float blur); - -void context_set_shadow_color(long long context, uint8_t r, uint8_t g, uint8_t b, uint8_t a); - -void context_set_shadow_color_string(long long context, const char *color); - -void context_set_shadow_offset_x(long long context, float x); - -void context_set_shadow_offset_y(long long context, float y); - -void context_set_stroke_style(long long context, long long style); - -void context_set_text_align(long long context, TextAlign align); - -void context_set_text_baseline(long long context, TextBaseLine baseline); - +#if defined(TARGET_OS_IOS) void context_set_transform(long long context, float a, float b, float c, float d, float e, float f); +#endif +#if defined(TARGET_OS_IOS) void context_set_transform_matrix(long long context, long long matrix); +#endif -U8Array *context_snapshot_canvas(long long context); - +#if defined(TARGET_OS_IOS) void context_stroke(long long context, long long path); +#endif +#if defined(TARGET_OS_IOS) void context_stroke_rect(long long context, float x, float y, float width, float height); +#endif +#if defined(TARGET_OS_IOS) void context_stroke_text(long long context, const char *text, float x, float y, float width); +#endif +#if defined(TARGET_OS_IOS) void context_transform(long long context, float a, float b, float c, float d, float e, float f); +#endif +#if defined(TARGET_OS_IOS) void context_translate(long long context, float x, float y); +#endif -void destroy_context(long long context); - -void destroy_f32_array(F32Array *array); - -void destroy_f64_array(F64Array *array); - -void destroy_i16_array(I16Array *array); - -void destroy_i32_array(I32Array *array); - -void destroy_i8_array(I8Array *array); - -void destroy_image_asset(long long asset); - -void destroy_image_data(long long image_data); - -void destroy_matrix(long long matrix); - -void destroy_paint_style(long long style); - -void destroy_paint_style_value(long long value); - -void destroy_path(long long path); - -void destroy_string(const char *string); - -void destroy_text_decoder(long long decoder); - -void destroy_text_encoder(long long encoder); - -void destroy_text_metrics(long long metrics); - -void destroy_u16_array(U16Array *array); - -void destroy_u32_array(U32Array *array); - -void destroy_u8_array(U8Array *array); - -void flip_y_in_place(uint8_t *data, uintptr_t length, uintptr_t bytes_per_row, uintptr_t height); - -void flip_y_in_place_3d(uint8_t *data, - uintptr_t length, - uintptr_t bytes_per_row, - uintptr_t height, - uintptr_t depth); - -void flip_y_in_place_3d_f32(float *data, - uintptr_t length, - uintptr_t bytes_per_row, - uintptr_t height, - uintptr_t depth); - -void flip_y_in_place_3d_f64(double *data, - uintptr_t length, - uintptr_t bytes_per_row, - uintptr_t height, - uintptr_t depth); - -void flip_y_in_place_3d_i16(int16_t *data, - uintptr_t length, - uintptr_t bytes_per_row, - uintptr_t height, - uintptr_t depth); - -void flip_y_in_place_3d_i32(int32_t *data, - uintptr_t length, - uintptr_t bytes_per_row, - uintptr_t height, - uintptr_t depth); - -void flip_y_in_place_3d_i8(int8_t *data, - uintptr_t length, - uintptr_t bytes_per_row, - uintptr_t height, - uintptr_t depth); - -void flip_y_in_place_3d_u16(uint16_t *data, - uintptr_t length, - uintptr_t bytes_per_row, - uintptr_t height, - uintptr_t depth); - -void flip_y_in_place_3d_u32(uint32_t *data, - uintptr_t length, - uintptr_t bytes_per_row, - uintptr_t height, - uintptr_t depth); - -void flip_y_in_place_f32(float *data, uintptr_t length, uintptr_t bytes_per_row, uintptr_t height); - -void flip_y_in_place_f64(double *data, uintptr_t length, uintptr_t bytes_per_row, uintptr_t height); - -void flip_y_in_place_i16(int16_t *data, - uintptr_t length, - uintptr_t bytes_per_row, - uintptr_t height); - -void flip_y_in_place_i32(int32_t *data, - uintptr_t length, - uintptr_t bytes_per_row, - uintptr_t height); - -void flip_y_in_place_i8(int8_t *data, uintptr_t length, uintptr_t bytes_per_row, uintptr_t height); - -void flip_y_in_place_u16(uint16_t *data, - uintptr_t length, - uintptr_t bytes_per_row, - uintptr_t height); - -void flip_y_in_place_u32(uint32_t *data, - uintptr_t length, - uintptr_t bytes_per_row, - uintptr_t height); - -long long gl_get_vertex_attrib_offset(unsigned int index, unsigned int pname); - +#if defined(TARGET_OS_IOS) void gl_tex_image_2D_asset(unsigned int target, int level, int internalformat, @@ -592,7 +3081,20 @@ void gl_tex_image_2D_asset(unsigned int target, unsigned int image_type, long long asset, bool flip_y); +#endif + +#if defined(TARGET_OS_IOS) +void gl_tex_sub_image_2D_asset(unsigned int target, + int level, + int xoffset, + int yoffset, + unsigned int format, + unsigned int image_type, + long long asset, + bool flip_y); +#endif +#if defined(TARGET_OS_IOS) void gl_tex_image_3D_asset(unsigned int target, int level, int internalformat, @@ -604,16 +3106,9 @@ void gl_tex_image_3D_asset(unsigned int target, unsigned int image_type, long long asset, bool flip_y); +#endif -void gl_tex_sub_image_2D_asset(unsigned int target, - int level, - int xoffset, - int yoffset, - unsigned int format, - unsigned int image_type, - long long asset, - bool flip_y); - +#if defined(TARGET_OS_IOS) void gl_tex_sub_image_3D_asset(unsigned int target, int level, int xoffset, @@ -626,52 +3121,102 @@ void gl_tex_sub_image_3D_asset(unsigned int target, unsigned int image_type, long long asset, bool flip_y); +#endif +#if defined(TARGET_OS_IOS) void gl_vertex_attrib_pointer(unsigned int index, int size, unsigned int pointer_type, bool normalized, int stride, long long offset); +#endif +#if defined(TARGET_OS_IOS) +long long gl_get_vertex_attrib_offset(unsigned int index, unsigned int pname); +#endif + +#if defined(TARGET_OS_IOS) void gradient_add_color_stop(long long style, float stop, const char *color); +#endif +#if defined(TARGET_OS_IOS) long long image_asset_create(void); +#endif -bool image_asset_flip_x(long long asset); +#if defined(TARGET_OS_IOS) +bool image_asset_load_from_path(long long asset, const char *path); +#endif -bool image_asset_flip_x_in_place(long long asset); +#if defined(TARGET_OS_IOS) +bool image_asset_load_from_raw(long long asset, const uint8_t *array, uintptr_t size); +#endif -void image_asset_flip_x_in_place_owned(uint8_t *buf, uintptr_t length); +#if defined(TARGET_OS_IOS) +struct U8Array *image_asset_get_bytes(long long asset); +#endif -bool image_asset_flip_y(long long asset); +#if defined(TARGET_OS_IOS) +struct U8Array *image_asset_get_rgba_bytes(long long asset); +#endif -bool image_asset_flip_y_in_place(long long asset); +#if defined(TARGET_OS_IOS) +struct U8Array *image_asset_get_rgb_bytes(long long asset); +#endif -void image_asset_flip_y_in_place_owned(uint8_t *buf, uintptr_t length); +#if defined(TARGET_OS_IOS) +unsigned int image_asset_width(long long asset); +#endif -U8Array *image_asset_get_bytes(long long asset); +#if defined(TARGET_OS_IOS) +unsigned int image_asset_height(long long asset); +#endif +#if defined(TARGET_OS_IOS) const char *image_asset_get_error(long long asset); +#endif -U8Array *image_asset_get_rgb_bytes(long long asset); +#if defined(TARGET_OS_IOS) +bool image_asset_has_error(long long asset); +#endif -U8Array *image_asset_get_rgba_bytes(long long asset); +#if defined(TARGET_OS_IOS) +bool image_asset_scale(long long asset, unsigned int x, unsigned int y); +#endif -bool image_asset_has_error(long long asset); +#if defined(TARGET_OS_IOS) +bool image_asset_flip_x(long long asset); +#endif -unsigned int image_asset_height(long long asset); +#if defined(TARGET_OS_IOS) +bool image_asset_flip_x_in_place(long long asset); +#endif -bool image_asset_load_from_path(long long asset, const char *path); +#if defined(TARGET_OS_IOS) +bool image_asset_flip_y(long long asset); +#endif -bool image_asset_load_from_raw(long long asset, const uint8_t *array, uintptr_t size); +#if defined(TARGET_OS_IOS) +void image_asset_flip_y_in_place_owned(uint8_t *buf, uintptr_t length); +#endif -bool image_asset_save_path(long long asset, const char *path, unsigned int format); +#if defined(TARGET_OS_IOS) +void image_asset_flip_x_in_place_owned(uint8_t *buf, uintptr_t length); +#endif -bool image_asset_scale(long long asset, unsigned int x, unsigned int y); +#if defined(TARGET_OS_IOS) +bool image_asset_flip_y_in_place(long long asset); +#endif -unsigned int image_asset_width(long long asset); +#if defined(TARGET_OS_IOS) +bool image_asset_save_path(long long asset, const char *path, unsigned int format); +#endif + +#if defined(TARGET_OS_IOS) +void destroy_image_asset(long long asset); +#endif +#if defined(TARGET_OS_IOS) long long image_bitmap_create_from_bytes(const uint8_t *image_bytes, uintptr_t image_size, float image_width, @@ -682,29 +3227,9 @@ long long image_bitmap_create_from_bytes(const uint8_t *image_bytes, int32_t resize_quality, float resize_width, float resize_height); +#endif -long long image_bitmap_create_from_bytes_encoded(const uint8_t *image_bytes, - uintptr_t image_size, - bool flip_y, - int32_t premultiply_alpha, - int32_t color_space_conversion, - int32_t resize_quality, - float resize_width, - float resize_height); - -long long image_bitmap_create_from_bytes_encoded_src_rect(const uint8_t *image_bytes, - uintptr_t image_size, - float sx, - float sy, - float s_width, - float s_height, - bool flip_y, - int32_t premultiply_alpha, - int32_t color_space_conversion, - int32_t resize_quality, - float resize_width, - float resize_height); - +#if defined(TARGET_OS_IOS) long long image_bitmap_create_from_bytes_src_rect(const uint8_t *image_bytes, uintptr_t image_size, float image_width, @@ -719,7 +3244,9 @@ long long image_bitmap_create_from_bytes_src_rect(const uint8_t *image_bytes, int32_t resize_quality, float resize_width, float resize_height); +#endif +#if defined(TARGET_OS_IOS) long long image_bitmap_create_from_image_asset(long long asset, bool flip_y, int premultiply_alpha, @@ -727,7 +3254,9 @@ long long image_bitmap_create_from_image_asset(long long asset, int resize_quality, float resize_width, float resize_height); +#endif +#if defined(TARGET_OS_IOS) long long image_bitmap_create_from_image_asset_src_rect(long long asset, float sx, float sy, @@ -739,7 +3268,35 @@ long long image_bitmap_create_from_image_asset_src_rect(long long asset, int resize_quality, float resize_width, float resize_height); +#endif + +#if defined(TARGET_OS_IOS) +long long image_bitmap_create_from_bytes_encoded(const uint8_t *image_bytes, + uintptr_t image_size, + bool flip_y, + int32_t premultiply_alpha, + int32_t color_space_conversion, + int32_t resize_quality, + float resize_width, + float resize_height); +#endif + +#if defined(TARGET_OS_IOS) +long long image_bitmap_create_from_bytes_encoded_src_rect(const uint8_t *image_bytes, + uintptr_t image_size, + float sx, + float sy, + float s_width, + float s_height, + bool flip_y, + int32_t premultiply_alpha, + int32_t color_space_conversion, + int32_t resize_quality, + float resize_width, + float resize_height); +#endif +#if defined(TARGET_OS_IOS) long long image_bitmap_create_from_image_data(long long image_data, bool flip_y, int premultiply_alpha, @@ -747,7 +3304,9 @@ long long image_bitmap_create_from_image_data(long long image_data, int resize_quality, float resize_width, float resize_height); +#endif +#if defined(TARGET_OS_IOS) long long image_bitmap_create_from_image_data_src_rect(long long image_data, float sx, float sy, @@ -759,129 +3318,265 @@ long long image_bitmap_create_from_image_data_src_rect(long long image_data, int resize_quality, float resize_width, float resize_height); +#endif +#if defined(TARGET_OS_IOS) long long image_data_create(int width, int height); +#endif -uint8_t *image_data_data(long long image_data); - -uintptr_t image_data_data_length(long long image_data); +#if defined(TARGET_OS_IOS) +int image_data_width(long long image_data); +#endif +#if defined(TARGET_OS_IOS) int image_data_height(long long image_data); +#endif -int image_data_width(long long image_data); - -float matrix_a(long long matrix); +#if defined(TARGET_OS_IOS) +uint8_t *image_data_data(long long image_data); +#endif -float matrix_b(long long matrix); +#if defined(TARGET_OS_IOS) +uintptr_t image_data_data_length(long long image_data); +#endif -float matrix_c(long long matrix); +#if defined(TARGET_OS_IOS) +void destroy_image_data(long long image_data); +#endif +#if defined(TARGET_OS_IOS) long long matrix_create(void); +#endif -float matrix_d(long long matrix); - -float matrix_e(long long matrix); - -float matrix_f(long long matrix); - -float matrix_m11(long long matrix); - -float matrix_m12(long long matrix); - -float matrix_m13(long long matrix); - -float matrix_m14(long long matrix); - -float matrix_m21(long long matrix); - -float matrix_m22(long long matrix); - -float matrix_m23(long long matrix); - -float matrix_m24(long long matrix); - -float matrix_m31(long long matrix); - -float matrix_m32(long long matrix); - -float matrix_m33(long long matrix); - -float matrix_m34(long long matrix); - -float matrix_m41(long long matrix); - -float matrix_m42(long long matrix); - -float matrix_m43(long long matrix); +#if defined(TARGET_OS_IOS) +void matrix_update(long long matrix, const float *data, uintptr_t data_len); +#endif -float matrix_m44(long long matrix); +#if defined(TARGET_OS_IOS) +float matrix_a(long long matrix); +#endif +#if defined(TARGET_OS_IOS) void matrix_set_a(long long matrix, float a); +#endif + +#if defined(TARGET_OS_IOS) +float matrix_b(long long matrix); +#endif +#if defined(TARGET_OS_IOS) void matrix_set_b(long long matrix, float b); +#endif + +#if defined(TARGET_OS_IOS) +float matrix_c(long long matrix); +#endif +#if defined(TARGET_OS_IOS) void matrix_set_c(long long matrix, float c); +#endif + +#if defined(TARGET_OS_IOS) +float matrix_d(long long matrix); +#endif +#if defined(TARGET_OS_IOS) void matrix_set_d(long long matrix, float d); +#endif + +#if defined(TARGET_OS_IOS) +float matrix_e(long long matrix); +#endif +#if defined(TARGET_OS_IOS) void matrix_set_e(long long matrix, float e); +#endif + +#if defined(TARGET_OS_IOS) +float matrix_f(long long matrix); +#endif +#if defined(TARGET_OS_IOS) void matrix_set_f(long long matrix, float f); +#endif + +#if defined(TARGET_OS_IOS) +float matrix_m11(long long matrix); +#endif +#if defined(TARGET_OS_IOS) void matrix_set_m11(long long matrix, float m11); +#endif + +#if defined(TARGET_OS_IOS) +float matrix_m12(long long matrix); +#endif +#if defined(TARGET_OS_IOS) void matrix_set_m12(long long matrix, float m12); +#endif + +#if defined(TARGET_OS_IOS) +float matrix_m13(long long matrix); +#endif +#if defined(TARGET_OS_IOS) void matrix_set_m13(long long matrix, float m13); +#endif + +#if defined(TARGET_OS_IOS) +float matrix_m14(long long matrix); +#endif +#if defined(TARGET_OS_IOS) void matrix_set_m14(long long matrix, float m14); +#endif + +#if defined(TARGET_OS_IOS) +float matrix_m21(long long matrix); +#endif +#if defined(TARGET_OS_IOS) void matrix_set_m21(long long matrix, float m21); +#endif + +#if defined(TARGET_OS_IOS) +float matrix_m22(long long matrix); +#endif +#if defined(TARGET_OS_IOS) void matrix_set_m22(long long matrix, float m22); +#endif + +#if defined(TARGET_OS_IOS) +float matrix_m23(long long matrix); +#endif +#if defined(TARGET_OS_IOS) void matrix_set_m23(long long matrix, float m23); +#endif + +#if defined(TARGET_OS_IOS) +float matrix_m24(long long matrix); +#endif +#if defined(TARGET_OS_IOS) void matrix_set_m24(long long matrix, float m24); +#endif + +#if defined(TARGET_OS_IOS) +float matrix_m31(long long matrix); +#endif +#if defined(TARGET_OS_IOS) void matrix_set_m31(long long matrix, float m31); +#endif + +#if defined(TARGET_OS_IOS) +float matrix_m32(long long matrix); +#endif +#if defined(TARGET_OS_IOS) void matrix_set_m32(long long matrix, float m32); +#endif + +#if defined(TARGET_OS_IOS) +float matrix_m33(long long matrix); +#endif +#if defined(TARGET_OS_IOS) void matrix_set_m33(long long matrix, float m33); +#endif + +#if defined(TARGET_OS_IOS) +float matrix_m34(long long matrix); +#endif +#if defined(TARGET_OS_IOS) void matrix_set_m34(long long matrix, float m34); +#endif + +#if defined(TARGET_OS_IOS) +float matrix_m41(long long matrix); +#endif +#if defined(TARGET_OS_IOS) void matrix_set_m41(long long matrix, float m41); +#endif + +#if defined(TARGET_OS_IOS) +float matrix_m42(long long matrix); +#endif +#if defined(TARGET_OS_IOS) void matrix_set_m42(long long matrix, float m42); +#endif + +#if defined(TARGET_OS_IOS) +float matrix_m43(long long matrix); +#endif +#if defined(TARGET_OS_IOS) void matrix_set_m43(long long matrix, float m43); +#endif -void matrix_set_m44(long long matrix, float m44); +#if defined(TARGET_OS_IOS) +float matrix_m44(long long matrix); +#endif -void matrix_update(long long matrix, const float *data, uintptr_t data_len); +#if defined(TARGET_OS_IOS) +void matrix_set_m44(long long matrix, float m44); +#endif -const char *paint_style_get_color_string(long long color); +#if defined(TARGET_OS_IOS) +void destroy_matrix(long long matrix); +#endif +#if defined(TARGET_OS_IOS) void paint_style_set_fill_color_with_string(long long context, const char *color); +#endif +#if defined(TARGET_OS_IOS) void paint_style_set_stroke_color_with_string(long long context, const char *color); +#endif + +#if defined(TARGET_OS_IOS) +const char *paint_style_get_color_string(long long color); +#endif + +#if defined(TARGET_OS_IOS) +long long path_create(void); +#endif + +#if defined(TARGET_OS_IOS) +long long path_create_with_path(long long path); +#endif + +#if defined(TARGET_OS_IOS) +long long path_create_with_string(const char *string); +#endif +#if defined(TARGET_OS_IOS) void path_add_path(long long path, long long path_to_add); +#endif +#if defined(TARGET_OS_IOS) void path_add_path_with_matrix(long long path, long long path_to_add, long long matrix); +#endif -void path_arc(long long path, - float x, - float y, - float radius, - float start_angle, - float end_angle, - bool anti_clockwise); +#if defined(TARGET_OS_IOS) +void path_close_path(long long path); +#endif -void path_arc_to(long long path, float x1, float y1, float x2, float y2, float radius); +#if defined(TARGET_OS_IOS) +void path_move_to(long long path, float x, float y); +#endif + +#if defined(TARGET_OS_IOS) +void path_line_to(long long path, float x, float y); +#endif +#if defined(TARGET_OS_IOS) void path_bezier_curve_to(long long path, float cp1x, float cp1y, @@ -889,15 +3584,27 @@ void path_bezier_curve_to(long long path, float cp2y, float x, float y); +#endif -void path_close_path(long long path); - -long long path_create(void); +#if defined(TARGET_OS_IOS) +void path_quadratic_curve_to(long long path, float cpx, float cpy, float x, float y); +#endif -long long path_create_with_path(long long path); +#if defined(TARGET_OS_IOS) +void path_arc(long long path, + float x, + float y, + float radius, + float start_angle, + float end_angle, + bool anti_clockwise); +#endif -long long path_create_with_string(const char *string); +#if defined(TARGET_OS_IOS) +void path_arc_to(long long path, float x1, float y1, float x2, float y2, float radius); +#endif +#if defined(TARGET_OS_IOS) void path_ellipse(long long path, float x, float y, @@ -907,71 +3614,260 @@ void path_ellipse(long long path, float start_angle, float end_angle, bool anticlockwise); +#endif -void path_line_to(long long path, float x, float y); - -void path_move_to(long long path, float x, float y); - -void path_quadratic_curve_to(long long path, float cpx, float cpy, float x, float y); - +#if defined(TARGET_OS_IOS) void path_rect(long long path, float x, float y, float width, float height); +#endif -void pattern_set_transform(long long pattern, long long matrix); +#if defined(TARGET_OS_IOS) +void destroy_path(long long path); +#endif -void svg_draw_from_path(long long context, const int8_t *path); +#if defined(TARGET_OS_IOS) +void pattern_set_transform(long long pattern, long long matrix); +#endif +#if defined(TARGET_OS_IOS) void svg_draw_from_string(long long context, const int8_t *svg); +#endif + +#if defined(TARGET_OS_IOS) +void svg_draw_from_path(long long context, const int8_t *path); +#endif +#if defined(TARGET_OS_IOS) long long text_decoder_create(const char *decoding); +#endif + +#if defined(TARGET_OS_IOS) +const char *text_decoder_get_encoding(long long decoder); +#endif +#if defined(TARGET_OS_IOS) const char *text_decoder_decode(long long decoder, const uint8_t *data, uintptr_t len); +#endif -U8Array *text_decoder_decode_bytes(long long decoder, const uint8_t *data, uintptr_t len); +#if defined(TARGET_OS_IOS) +const struct U8Array *text_decoder_decode_to_bytes(long long decoder, + const uint8_t *data, + uintptr_t len); +#endif -const char *text_decoder_decode_i16(long long decoder, const int16_t *data, uintptr_t len); +#if defined(TARGET_OS_IOS) +const char *text_decoder_decode_u16(long long decoder, const uint16_t *data, uintptr_t len); +#endif -U8Array *text_decoder_decode_i16_bytes(long long decoder, const int16_t *data, uintptr_t len); +#if defined(TARGET_OS_IOS) +const char *text_decoder_decode_i16(long long decoder, const int16_t *data, uintptr_t len); +#endif +#if defined(TARGET_OS_IOS) const char *text_decoder_decode_i32(long long decoder, const int32_t *data, uintptr_t len); +#endif -U8Array *text_decoder_decode_i32_bytes(long long decoder, const int32_t *data, uintptr_t len); - -const U8Array *text_decoder_decode_to_bytes(long long decoder, const uint8_t *data, uintptr_t len); - -const char *text_decoder_decode_u16(long long decoder, const uint16_t *data, uintptr_t len); +#if defined(TARGET_OS_IOS) +void destroy_text_decoder(long long decoder); +#endif + +#if defined(TARGET_OS_IOS) +struct U8Array *text_decoder_decode_bytes(long long decoder, const uint8_t *data, uintptr_t len); +#endif + +#if defined(TARGET_OS_IOS) +struct U8Array *text_decoder_decode_u16_bytes(long long decoder, + const uint16_t *data, + uintptr_t len); +#endif + +#if defined(TARGET_OS_IOS) +struct U8Array *text_decoder_decode_i16_bytes(long long decoder, + const int16_t *data, + uintptr_t len); +#endif + +#if defined(TARGET_OS_IOS) +struct U8Array *text_decoder_decode_i32_bytes(long long decoder, + const int32_t *data, + uintptr_t len); +#endif + +#if defined(TARGET_OS_IOS) +struct U8Array *text_decoder_decode_u32_bytes(long long decoder, + const uint32_t *data, + uintptr_t len); +#endif + +#if defined(TARGET_OS_IOS) +long long text_encoder_create(const char *encoding); +#endif -U8Array *text_decoder_decode_u16_bytes(long long decoder, const uint16_t *data, uintptr_t len); +#if defined(TARGET_OS_IOS) +const char *text_encoder_get_encoding(long long encoder); +#endif -U8Array *text_decoder_decode_u32_bytes(long long decoder, const uint32_t *data, uintptr_t len); +#if defined(TARGET_OS_IOS) +struct U8Array *text_encoder_encode(long long encoder, const char *text); +#endif -const char *text_decoder_get_encoding(long long decoder); +#if defined(TARGET_OS_IOS) +void destroy_text_encoder(long long encoder); +#endif -long long text_encoder_create(const char *encoding); +#if defined(TARGET_OS_IOS) +float text_metrics_get_width(long long metrics); +#endif -U8Array *text_encoder_encode(long long encoder, const char *text); +#if defined(TARGET_OS_IOS) +float text_metrics_get_actual_bounding_box_left(long long metrics); +#endif -const char *text_encoder_get_encoding(long long encoder); +#if defined(TARGET_OS_IOS) +float text_metrics_get_actual_bounding_box_right(long long metrics); +#endif +#if defined(TARGET_OS_IOS) float text_metrics_get_actual_bounding_box_ascent(long long metrics); +#endif +#if defined(TARGET_OS_IOS) float text_metrics_get_actual_bounding_box_descent(long long metrics); +#endif -float text_metrics_get_actual_bounding_box_left(long long metrics); - -float text_metrics_get_actual_bounding_box_right(long long metrics); +#if defined(TARGET_OS_IOS) +float text_metrics_get_font_bounding_box_ascent(long long metrics); +#endif -float text_metrics_get_alphabetic_baseline(long long metrics); +#if defined(TARGET_OS_IOS) +float text_metrics_get_font_bounding_box_descent(long long metrics); +#endif +#if defined(TARGET_OS_IOS) float text_metrics_get_em_height_ascent(long long metrics); +#endif +#if defined(TARGET_OS_IOS) float text_metrics_get_em_height_descent(long long metrics); +#endif -float text_metrics_get_font_bounding_box_ascent(long long metrics); - -float text_metrics_get_font_bounding_box_descent(long long metrics); - +#if defined(TARGET_OS_IOS) float text_metrics_get_hanging_baseline(long long metrics); +#endif + +#if defined(TARGET_OS_IOS) +float text_metrics_get_alphabetic_baseline(long long metrics); +#endif +#if defined(TARGET_OS_IOS) float text_metrics_get_ideographic_baseline(long long metrics); +#endif -float text_metrics_get_width(long long metrics); +#if defined(TARGET_OS_IOS) +void flip_y_in_place(uint8_t *data, uintptr_t length, uintptr_t bytes_per_row, uintptr_t height); +#endif + +#if defined(TARGET_OS_IOS) +void flip_y_in_place_3d(uint8_t *data, + uintptr_t length, + uintptr_t bytes_per_row, + uintptr_t height, + uintptr_t depth); +#endif + +#if defined(TARGET_OS_IOS) +void flip_y_in_place_3d_i8(int8_t *data, + uintptr_t length, + uintptr_t bytes_per_row, + uintptr_t height, + uintptr_t depth); +#endif + +#if defined(TARGET_OS_IOS) +void flip_y_in_place_3d_u16(uint16_t *data, + uintptr_t length, + uintptr_t bytes_per_row, + uintptr_t height, + uintptr_t depth); +#endif + +#if defined(TARGET_OS_IOS) +void flip_y_in_place_3d_i16(int16_t *data, + uintptr_t length, + uintptr_t bytes_per_row, + uintptr_t height, + uintptr_t depth); +#endif + +#if defined(TARGET_OS_IOS) +void flip_y_in_place_3d_u32(uint32_t *data, + uintptr_t length, + uintptr_t bytes_per_row, + uintptr_t height, + uintptr_t depth); +#endif + +#if defined(TARGET_OS_IOS) +void flip_y_in_place_3d_i32(int32_t *data, + uintptr_t length, + uintptr_t bytes_per_row, + uintptr_t height, + uintptr_t depth); +#endif + +#if defined(TARGET_OS_IOS) +void flip_y_in_place_3d_f32(float *data, + uintptr_t length, + uintptr_t bytes_per_row, + uintptr_t height, + uintptr_t depth); +#endif + +#if defined(TARGET_OS_IOS) +void flip_y_in_place_3d_f64(double *data, + uintptr_t length, + uintptr_t bytes_per_row, + uintptr_t height, + uintptr_t depth); +#endif + +#if defined(TARGET_OS_IOS) +void flip_y_in_place_i8(int8_t *data, uintptr_t length, uintptr_t bytes_per_row, uintptr_t height); +#endif + +#if defined(TARGET_OS_IOS) +void flip_y_in_place_u16(uint16_t *data, + uintptr_t length, + uintptr_t bytes_per_row, + uintptr_t height); +#endif + +#if defined(TARGET_OS_IOS) +void flip_y_in_place_i16(int16_t *data, + uintptr_t length, + uintptr_t bytes_per_row, + uintptr_t height); +#endif + +#if defined(TARGET_OS_IOS) +void flip_y_in_place_u32(uint32_t *data, + uintptr_t length, + uintptr_t bytes_per_row, + uintptr_t height); +#endif + +#if defined(TARGET_OS_IOS) +void flip_y_in_place_i32(int32_t *data, + uintptr_t length, + uintptr_t bytes_per_row, + uintptr_t height); +#endif + +#if defined(TARGET_OS_IOS) +void flip_y_in_place_f32(float *data, uintptr_t length, uintptr_t bytes_per_row, uintptr_t height); +#endif + +#if defined(TARGET_OS_IOS) +void flip_y_in_place_f64(double *data, uintptr_t length, uintptr_t bytes_per_row, uintptr_t height); +#endif + +#endif /* CBINDGEN_BINDINGS_H */ diff --git a/packages/canvas/src-native/canvas-ios/CanvasNative/libs/arm64-iphoneos/libcanvasnative.a b/packages/canvas/src-native/canvas-ios/CanvasNative/libs/arm64-iphoneos/libcanvasnative.a index 98f432c5..e7a9b1d7 100644 Binary files a/packages/canvas/src-native/canvas-ios/CanvasNative/libs/arm64-iphoneos/libcanvasnative.a and b/packages/canvas/src-native/canvas-ios/CanvasNative/libs/arm64-iphoneos/libcanvasnative.a differ diff --git a/packages/canvas/src-native/canvas-ios/CanvasNative/libs/arm64-iphonesimulator/libcanvasnative.a b/packages/canvas/src-native/canvas-ios/CanvasNative/libs/arm64-iphonesimulator/libcanvasnative.a new file mode 100644 index 00000000..dc531e96 Binary files /dev/null and b/packages/canvas/src-native/canvas-ios/CanvasNative/libs/arm64-iphonesimulator/libcanvasnative.a differ diff --git a/packages/canvas/src-native/canvas-ios/CanvasNative/libs/x86_64-iphonesimulator/libcanvasnative.a b/packages/canvas/src-native/canvas-ios/CanvasNative/libs/x86_64-iphonesimulator/libcanvasnative.a index b716388e..1edb35b5 100644 Binary files a/packages/canvas/src-native/canvas-ios/CanvasNative/libs/x86_64-iphonesimulator/libcanvasnative.a and b/packages/canvas/src-native/canvas-ios/CanvasNative/libs/x86_64-iphonesimulator/libcanvasnative.a differ diff --git a/packages/canvas/src-native/canvas-ios/CanvasNative/Dist/CanvasNative.xcframework/Info.plist b/packages/canvas/src-native/canvas-ios/dist/CanvasNative.xcframework/Info.plist similarity index 89% rename from packages/canvas/src-native/canvas-ios/CanvasNative/Dist/CanvasNative.xcframework/Info.plist rename to packages/canvas/src-native/canvas-ios/dist/CanvasNative.xcframework/Info.plist index 1bb6313a..a18d66bd 100644 --- a/packages/canvas/src-native/canvas-ios/CanvasNative/Dist/CanvasNative.xcframework/Info.plist +++ b/packages/canvas/src-native/canvas-ios/dist/CanvasNative.xcframework/Info.plist @@ -5,6 +5,8 @@ AvailableLibraries + DebugSymbolsPath + dSYMs LibraryIdentifier ios-x86_64-simulator LibraryPath @@ -19,6 +21,8 @@ simulator + DebugSymbolsPath + dSYMs LibraryIdentifier ios-arm64 LibraryPath diff --git a/packages/canvas/src-native/canvas-ios/CanvasNative/Dist/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/CanvasNative b/packages/canvas/src-native/canvas-ios/dist/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/CanvasNative similarity index 58% rename from packages/canvas/src-native/canvas-ios/CanvasNative/Dist/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/CanvasNative rename to packages/canvas/src-native/canvas-ios/dist/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/CanvasNative index aa9f9d27..3c4e3f90 100755 Binary files a/packages/canvas/src-native/canvas-ios/CanvasNative/Dist/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/CanvasNative and b/packages/canvas/src-native/canvas-ios/dist/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/CanvasNative differ diff --git a/packages/canvas/src-native/canvas-ios/CanvasNative/Dist/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Headers/CanvasNative-Swift.h b/packages/canvas/src-native/canvas-ios/dist/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Headers/CanvasNative-Swift.h similarity index 99% rename from packages/canvas/src-native/canvas-ios/CanvasNative/Dist/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Headers/CanvasNative-Swift.h rename to packages/canvas/src-native/canvas-ios/dist/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Headers/CanvasNative-Swift.h index 98f9a876..73c24e58 100644 --- a/packages/canvas/src-native/canvas-ios/CanvasNative/Dist/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Headers/CanvasNative-Swift.h +++ b/packages/canvas/src-native/canvas-ios/dist/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Headers/CanvasNative-Swift.h @@ -1,4 +1,4 @@ -// Generated by Apple Swift version 5.4 (swiftlang-1205.0.26.9 clang-1205.0.19.55) +// Generated by Apple Swift version 5.5.1 (swiftlang-1300.0.31.4 clang-1300.0.29.6) #ifndef CANVASNATIVE_SWIFT_H #define CANVASNATIVE_SWIFT_H #pragma clang diagnostic push @@ -1385,6 +1385,8 @@ SWIFT_CLASS_NAMED("TNSWebGL2RenderingContext") - (void)samplerParameterf:(uint32_t)sampler :(uint32_t)pname :(float)param; - (void)texImage3D:(uint32_t)target :(int32_t)level :(int32_t)internalformat :(int32_t)width :(int32_t)height :(int32_t)depth :(int32_t)border :(uint32_t)format :(uint32_t)type data:(NSData * _Nonnull)data; - (void)texImage3D:(uint32_t)target :(int32_t)level :(int32_t)internalformat :(int32_t)width :(int32_t)height :(int32_t)depth :(int32_t)border :(uint32_t)format :(uint32_t)type offset:(NSInteger)offset; +- (void)texImage3D:(uint32_t)target :(int32_t)level :(int32_t)internalformat :(int32_t)width :(int32_t)height :(int32_t)depth :(int32_t)border :(uint32_t)format :(uint32_t)type pixels:(void const * _Nonnull)pixels size:(NSInteger)size; +- (void)texImage3D:(uint32_t)target :(int32_t)level :(int32_t)internalformat :(int32_t)width :(int32_t)height :(int32_t)depth :(int32_t)border :(uint32_t)format :(uint32_t)type pixels:(void const * _Nonnull)pixels size:(NSInteger)size pixelOffset:(NSInteger)pixelOffset srcOffset:(int32_t)srcOffset; - (void)texImage3D:(uint32_t)target :(int32_t)level :(int32_t)internalformat :(int32_t)width :(int32_t)height :(int32_t)depth :(int32_t)border :(uint32_t)format :(uint32_t)type i8:(NSArray * _Nonnull)source; - (void)texImage3D:(uint32_t)target :(int32_t)level :(int32_t)internalformat :(int32_t)width :(int32_t)height :(int32_t)depth :(int32_t)border :(uint32_t)format :(uint32_t)type u8:(NSArray * _Nonnull)source; - (void)texImage3D:(uint32_t)target :(int32_t)level :(int32_t)internalformat :(int32_t)width :(int32_t)height :(int32_t)depth :(int32_t)border :(uint32_t)format :(uint32_t)type i16:(NSArray * _Nonnull)source; diff --git a/packages/canvas/src-native/canvas-ios/CanvasNative/Dist/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Headers/CanvasNative.h b/packages/canvas/src-native/canvas-ios/dist/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Headers/CanvasNative.h similarity index 100% rename from packages/canvas/src-native/canvas-ios/CanvasNative/Dist/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Headers/CanvasNative.h rename to packages/canvas/src-native/canvas-ios/dist/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Headers/CanvasNative.h diff --git a/packages/canvas/src-native/canvas-ios/CanvasNative/Dist/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Headers/Utils.h b/packages/canvas/src-native/canvas-ios/dist/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Headers/Utils.h similarity index 100% rename from packages/canvas/src-native/canvas-ios/CanvasNative/Dist/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Headers/Utils.h rename to packages/canvas/src-native/canvas-ios/dist/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Headers/Utils.h diff --git a/packages/canvas/src-native/canvas-ios/dist/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Headers/canvas_native.h b/packages/canvas/src-native/canvas-ios/dist/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Headers/canvas_native.h new file mode 100644 index 00000000..188377c1 --- /dev/null +++ b/packages/canvas/src-native/canvas-ios/dist/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Headers/canvas_native.h @@ -0,0 +1,3873 @@ +#ifndef CBINDGEN_BINDINGS_H +#define CBINDGEN_BINDINGS_H + +/* Warning, this file is autogenerated by cbindgen. Don't modify this manually. */ + +#include +#include +#include +#include + +typedef enum CompositeOperationType { + SourceOver = 0, + SourceIn = 1, + SourceOut = 2, + SourceAtop = 3, + DestinationOver = 4, + DestinationIn = 5, + DestinationOut = 6, + DestinationAtop = 7, + Lighter = 8, + Copy = 9, + Xor = 10, + Multiply = 11, + Screen = 12, + Overlay = 13, + Darken = 14, + Lighten = 15, + ColorDodge = 16, + ColorBurn = 17, + HardLight = 18, + SoftLight = 19, + Difference = 20, + Exclusion = 21, + Hue = 22, + Saturation = 23, + Color = 24, + Luminosity = 25, +} CompositeOperationType; + +typedef enum FillRule { + NonZero = 0, + EvenOdd = 1, +} FillRule; + +typedef enum ImageSmoothingQuality { + Low = 0, + Medium = 1, + High = 2, +} ImageSmoothingQuality; + +typedef enum LineCap { + CapButt = 0, + CapRound = 1, + CapSquare = 2, +} LineCap; + +typedef enum LineJoin { + JoinRound = 0, + JoinBevel = 1, + JoinMiter = 2, +} LineJoin; + +typedef enum PaintStyleValueType { + PaintStyleValueTypeColor = 0, + PaintStyleValueTypeGradient = 1, + PaintStyleValueTypePattern = 2, +} PaintStyleValueType; + +typedef enum Repetition { + Repeat = 0, + RepeatX = 1, + RepeatY = 2, + NoRepeat = 3, +} Repetition; + +typedef enum TextAlign { + START = 0, + LEFT = 1, + CENTER = 2, + RIGHT = 3, + END = 4, +} TextAlign; + +typedef enum TextBaseLine { + TOP = 0, + HANGING = 1, + MIDDLE = 2, + ALPHABETIC = 3, + IDEOGRAPHIC = 4, + BOTTOM = 5, +} TextBaseLine; + +typedef enum TextDirection { + LTR = 0, + RTL = 1, +} TextDirection; + +typedef struct Context Context; + +typedef struct F32Array { + float *data; + uintptr_t data_len; +} F32Array; + +typedef struct F64Array { + double *data; + uintptr_t data_len; +} F64Array; + +typedef struct I16Array { + int16_t *data; + uintptr_t data_len; +} I16Array; + +typedef struct I32Array { + int32_t *data; + uintptr_t data_len; +} I32Array; + +typedef struct I8Array { + int8_t *data; + uintptr_t data_len; +} I8Array; + +typedef struct U16Array { + uint16_t *data; + uintptr_t data_len; +} U16Array; + +typedef struct U32Array { + uint32_t *data; + uintptr_t data_len; +} U32Array; + +typedef struct U8Array { + uint8_t *data; + uintptr_t data_len; +} U8Array; + +typedef struct PaintStyleValue { + long long value; + enum PaintStyleValueType value_type; +} PaintStyleValue; + +#if defined(TARGET_OS_ANDROID) +/** + * AndroidBitmap functions result code. + */ +typedef int32_t _bindgen_ty_1; +#endif + +#if defined(TARGET_OS_ANDROID) +/** + * Bitmap pixel format. + */ +typedef uint32_t AndroidBitmapFormat; +#endif + +#if defined(TARGET_OS_ANDROID) +/** + * Operation was successful. + */ +#define ANDROID_BITMAP_RESULT_SUCCESS 0 +#endif + +#if defined(TARGET_OS_ANDROID) +/** + * Bad parameter. + */ +#define ANDROID_BITMAP_RESULT_BAD_PARAMETER -1 +#endif + +#if defined(TARGET_OS_ANDROID) +/** + * JNI exception occured. + */ +#define ANDROID_BITMAP_RESULT_JNI_EXCEPTION -2 +#endif + +#if defined(TARGET_OS_ANDROID) +/** + * Allocation failed. + */ +#define ANDROID_BITMAP_RESULT_ALLOCATION_FAILED -3 +#endif + +#if defined(TARGET_OS_ANDROID) +/** + * No format. + */ +#define AndroidBitmapFormat_ANDROID_BITMAP_FORMAT_NONE 0 +#endif + +#if defined(TARGET_OS_ANDROID) +/** + * Red: 8 bits, Green: 8 bits, Blue: 8 bits, Alpha: 8 bits. + */ +#define AndroidBitmapFormat_ANDROID_BITMAP_FORMAT_RGBA_8888 1 +#endif + +#if defined(TARGET_OS_ANDROID) +/** + * Red: 5 bits, Green: 6 bits, Blue: 5 bits. + */ +#define AndroidBitmapFormat_ANDROID_BITMAP_FORMAT_RGB_565 4 +#endif + +#if defined(TARGET_OS_ANDROID) +/** + * Deprecated in API level 13. Because of the poor quality of this configuration, it is advised to use ARGB_8888 instead. + */ +#define AndroidBitmapFormat_ANDROID_BITMAP_FORMAT_RGBA_4444 7 +#endif + +#if defined(TARGET_OS_ANDROID) +/** + * Alpha: 8 bits. + */ +#define AndroidBitmapFormat_ANDROID_BITMAP_FORMAT_A_8 8 +#endif + +void destroy_f32_array(struct F32Array *array); + +void destroy_f64_array(struct F64Array *array); + +void destroy_i16_array(struct I16Array *array); + +void destroy_i32_array(struct I32Array *array); + +void destroy_i8_array(struct I8Array *array); + +void destroy_paint_style_value(long long value); + +void destroy_u16_array(struct U16Array *array); + +void destroy_u32_array(struct U32Array *array); + +void destroy_u8_array(struct U8Array *array); + +#if defined(TARGET_OS_ANDROID) +jlong Java_org_nativescript_canvas_TNSCanvas_nativeInitContext(JNIEnv, + JClass, + jfloat width, + jfloat height, + jfloat density, + jint buffer_id, + jint samples, + jboolean alpha, + jint font_color, + jfloat ppi, + jint direction); +#endif + +#if defined(TARGET_OS_ANDROID) +jlong Java_org_nativescript_canvas_TNSCanvas_nativeInitContextWithCustomSurface(JNIEnv, + JClass, + jfloat width, + jfloat height, + jfloat density, + jboolean alpha, + jint font_color, + jfloat ppi, + jint direction); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSCanvas_nativeDestroyContext(JNIEnv, JClass, jlong context); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSCanvas_nativeResizeSurface(JNIEnv, + JClass, + jlong context, + jfloat width, + jfloat height, + jfloat density, + jint buffer_id, + jint samples, + jboolean alpha, + jfloat ppi); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSCanvas_nativeResizeCustomSurface(JNIEnv, + JClass, + jlong context, + jfloat width, + jfloat height, + jfloat density, + jboolean alpha, + jfloat ppi); +#endif + +#if defined(TARGET_OS_ANDROID) +jstring Java_org_nativescript_canvas_TNSCanvas_nativeDataURL(JNIEnv env, + JClass, + jlong context, + JString format, + jfloat quality); +#endif + +#if defined(TARGET_OS_ANDROID) +jbyteArray Java_org_nativescript_canvas_TNSCanvas_nativeSnapshotCanvas(JNIEnv env, + JClass, + jlong context); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSCanvas_nativeFlush(JNIEnv, JClass, jlong context); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSCanvas_nativeCustomWithBitmapFlush(JNIEnv env, + JClass, + jlong context, + JObject bitmap); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeSetDirection(JNIEnv, + JClass, + jlong context, + jint direction); +#endif + +#if defined(TARGET_OS_ANDROID) +jint Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeGetDirection(JNIEnv, + JClass, + jlong context); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeSetFillStyle(JNIEnv, + JClass, + jlong context, + jlong style); +#endif + +#if defined(TARGET_OS_ANDROID) +jobject Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeGetFillStyle(JNIEnv env, + JClass, + jlong context); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeSetFilter(JNIEnv env, + JClass, + jlong context, + JString filter); +#endif + +#if defined(TARGET_OS_ANDROID) +jstring Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeGetFilter(JNIEnv env, + JClass, + jlong context); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeSetFont(JNIEnv env, + JClass, + jlong context, + JString filter); +#endif + +#if defined(TARGET_OS_ANDROID) +jstring Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeGetFont(JNIEnv env, + JClass, + jlong context); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeSetGlobalAlpha(JNIEnv, + JClass, + jlong context, + jfloat alpha); +#endif + +#if defined(TARGET_OS_ANDROID) +jfloat Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeGetGlobalAlpha(JNIEnv, + JClass, + jlong context); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeSetGlobalCompositeOperation(JNIEnv, + JClass, + jlong context, + jint operation); +#endif + +#if defined(TARGET_OS_ANDROID) +jint Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeGetGlobalCompositeOperation(JNIEnv, + JClass, + jlong context); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeSetImageSmoothingEnabled(JNIEnv, + JClass, + jlong context, + jboolean enabled); +#endif + +#if defined(TARGET_OS_ANDROID) +jboolean Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeGetImageSmoothingEnabled(JNIEnv, + JClass, + jlong context); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeSetImageSmoothingQuality(JNIEnv, + JClass, + jlong context, + jint quality); +#endif + +#if defined(TARGET_OS_ANDROID) +jint Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeGetImageSmoothingQuality(JNIEnv, + JClass, + jlong context); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeSetLineCap(JNIEnv, + JClass, + jlong context, + jint cap); +#endif + +#if defined(TARGET_OS_ANDROID) +jint Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeGetLineCap(JNIEnv, + JClass, + jlong context); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeSetLineDashOffset(JNIEnv, + JClass, + jlong context, + jfloat offset); +#endif + +#if defined(TARGET_OS_ANDROID) +jfloat Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeGetLineDashOffset(JNIEnv, + JClass, + jlong context); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeSetLineJoin(JNIEnv, + JClass, + jlong context, + jint join); +#endif + +#if defined(TARGET_OS_ANDROID) +jint Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeGetLineJoin(JNIEnv, + JClass, + jlong context); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeSetLineWidth(JNIEnv, + JClass, + jlong context, + jfloat width); +#endif + +#if defined(TARGET_OS_ANDROID) +jfloat Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeGetLineWidth(JNIEnv, + JClass, + jlong context); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeSetMiterLimit(JNIEnv, + JClass, + jlong context, + jfloat limit); +#endif + +#if defined(TARGET_OS_ANDROID) +jfloat Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeGetMiterLimit(JNIEnv, + JClass, + jlong context); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeSetShadowBlur(JNIEnv, + JClass, + jlong context, + jfloat blur); +#endif + +#if defined(TARGET_OS_ANDROID) +jfloat Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeGetShadowBlur(JNIEnv, + JClass, + jlong context); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeSetShadowColor(JNIEnv, + JClass, + jlong context, + uint8_t r, + uint8_t g, + uint8_t b, + uint8_t a); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeSetShadowColorString(JNIEnv env, + JClass, + jlong context, + JString color); +#endif + +#if defined(TARGET_OS_ANDROID) +jstring Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeGetShadowColor(JNIEnv env, + JClass, + jlong context); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeSetShadowOffsetX(JNIEnv, + JClass, + jlong context, + jfloat x); +#endif + +#if defined(TARGET_OS_ANDROID) +jfloat Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeGetShadowOffsetX(JNIEnv, + JClass, + jlong context); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeSetShadowOffsetY(JNIEnv, + JClass, + jlong context, + jfloat y); +#endif + +#if defined(TARGET_OS_ANDROID) +jfloat Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeGetShadowOffsetY(JNIEnv, + JClass, + jlong context); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeSetStrokeStyle(JNIEnv, + JClass, + jlong context, + jlong style); +#endif + +#if defined(TARGET_OS_ANDROID) +jobject Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeGetStrokeStyle(JNIEnv env, + JClass, + jlong context); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeSetTextAlign(JNIEnv, + JClass, + jlong context, + jint align); +#endif + +#if defined(TARGET_OS_ANDROID) +jint Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeGetTextAlign(JNIEnv, + JClass, + jlong context); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeSetTextBaseline(JNIEnv, + JClass, + jlong context, + jint baseline); +#endif + +#if defined(TARGET_OS_ANDROID) +jint Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeGetTextBaseline(JNIEnv, + JClass, + jlong context); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeArc(JNIEnv, + JClass, + jlong context, + jfloat x, + jfloat y, + jfloat radius, + jfloat start_angle, + jfloat end_angle, + jboolean anti_clockwise); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeArcTo(JNIEnv, + JClass, + jlong context, + jfloat x1, + jfloat y1, + jfloat x2, + jfloat y2, + jfloat radius); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeBeginPath(JNIEnv, + JClass, + jlong context); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeBezierCurveTo(JNIEnv, + JClass, + jlong context, + jfloat cp1x, + jfloat cp1y, + jfloat cp2x, + jfloat cp2y, + jfloat x, + jfloat y); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeClearRect(JNIEnv, + JClass, + jlong context, + jfloat x, + jfloat y, + jfloat width, + jfloat height); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeClip(JNIEnv, + JClass, + jlong context, + jlong path, + jint rule); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeClipRule(JNIEnv, + JClass, + jlong context, + jint rule); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeClosePath(JNIEnv, + JClass, + jlong context); +#endif + +#if defined(TARGET_OS_ANDROID) +jlong Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeCreateImageData(JNIEnv, + JClass, + jint width, + jint height); +#endif + +#if defined(TARGET_OS_ANDROID) +jlong Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeCreateLinearGradient(JNIEnv, + JClass, + jlong context, + jfloat x0, + jfloat y0, + jfloat x1, + jfloat y1); +#endif + +#if defined(TARGET_OS_ANDROID) +jlong Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeCreatePatternEncoded(JNIEnv env, + JClass, + jlong context, + jbyteArray image_data, + jint repetition); +#endif + +#if defined(TARGET_OS_ANDROID) +jlong Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeCreatePattern(JNIEnv env, + JClass, + jlong context, + jbyteArray image_data, + jint width, + jint height, + jint repetition); +#endif + +#if defined(TARGET_OS_ANDROID) +jlong Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeCreatePatternWithAsset(JNIEnv, + JClass, + jlong context, + jlong asset, + jint repetition); +#endif + +#if defined(TARGET_OS_ANDROID) +jlong Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeCreateRadialGradient(JNIEnv, + JClass, + jlong context, + jfloat x0, + jfloat y0, + jfloat r0, + jfloat x1, + jfloat y1, + jfloat r1); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeDrawImageDxDyWithBitmap(JNIEnv env, + JClass, + jlong context, + JObject bitmap, + jfloat width, + jfloat height, + jfloat dx, + jfloat dy); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeDrawImageDxDy(JNIEnv env, + JClass, + jlong context, + jbyteArray image_data, + jfloat width, + jfloat height, + jfloat dx, + jfloat dy); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeDrawImageDxDyWithAsset(JNIEnv, + JClass, + jlong context, + jlong asset, + jfloat dx, + jfloat dy); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeDrawImageDxDyDwDhWithBitmap(JNIEnv env, + JClass, + jlong context, + JObject bitmap, + jfloat width, + jfloat height, + jfloat dx, + jfloat dy, + jfloat d_width, + jfloat d_height); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeDrawImageDxDyDwDh(JNIEnv env, + JClass, + jlong context, + jbyteArray image_data, + jfloat width, + jfloat height, + jfloat dx, + jfloat dy, + jfloat d_width, + jfloat d_height); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeDrawImageDxDyDwDhWithAsset(JNIEnv, + JClass, + jlong context, + jlong asset, + jfloat dx, + jfloat dy, + jfloat d_width, + jfloat d_height); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeDrawImageWithBitmap(JNIEnv env, + JClass, + jlong context, + JObject bitmap, + jfloat width, + jfloat height, + jfloat sx, + jfloat sy, + jfloat s_width, + jfloat s_height, + jfloat dx, + jfloat dy, + jfloat d_width, + jfloat d_height); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeDrawImageWithAsset(JNIEnv, + JClass, + jlong context, + jlong asset, + jfloat sx, + jfloat sy, + jfloat s_width, + jfloat s_height, + jfloat dx, + jfloat dy, + jfloat d_width, + jfloat d_height); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeDrawImage(JNIEnv env, + JClass, + jlong context, + jbyteArray image_data, + jfloat width, + jfloat height, + jfloat sx, + jfloat sy, + jfloat s_width, + jfloat s_height, + jfloat dx, + jfloat dy, + jfloat d_width, + jfloat d_height); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeEllipse(JNIEnv, + JClass, + jlong context, + jfloat x, + jfloat y, + jfloat radius_x, + jfloat radius_y, + jfloat rotation, + jfloat start_angle, + jfloat end_angle, + jboolean anticlockwise); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeFill(JNIEnv, + JClass, + jlong context, + jlong path, + jint rule); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeFillRect(JNIEnv, + JClass, + jlong context, + jfloat x, + jfloat y, + jfloat width, + jfloat height); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeFillText(JNIEnv env, + JClass, + jlong context, + JString text, + jfloat x, + jfloat y, + jfloat width); +#endif + +#if defined(TARGET_OS_ANDROID) +jlong Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeGetImageData(JNIEnv, + JClass, + jlong context, + jfloat sx, + jfloat sy, + jfloat sw, + jfloat sh); +#endif + +#if defined(TARGET_OS_ANDROID) +jfloatArray Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeGetLineDash(JNIEnv env, + JClass, + jlong context); +#endif + +#if defined(TARGET_OS_ANDROID) +jlong Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeGetTansform(JNIEnv, + JClass, + jlong context); +#endif + +#if defined(TARGET_OS_ANDROID) +bool Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeIsPointInPath(JNIEnv, + JClass, + jlong context, + jlong path, + jfloat x, + jfloat y, + jint rule); +#endif + +#if defined(TARGET_OS_ANDROID) +bool Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeIsPointInStroke(JNIEnv, + JClass, + jlong context, + jlong path, + jfloat x, + jfloat y); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeLineTo(JNIEnv, + JClass, + jlong context, + jfloat x, + jfloat y); +#endif + +#if defined(TARGET_OS_ANDROID) +jlong Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeMeasureText(JNIEnv env, + JClass, + jlong context, + JString text); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeMoveTo(JNIEnv, + JClass, + jlong context, + jfloat x, + jfloat y); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativePutImageData(JNIEnv, + JClass, + jlong context, + jlong image_data, + jfloat dx, + jfloat dy, + jfloat dirty_x, + jfloat dirty_y, + jfloat dirty_width, + jfloat dirty_height); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeQuadraticCurveTo(JNIEnv, + JClass, + jlong context, + jfloat cpx, + jfloat cpy, + jfloat x, + jfloat y); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeRect(JNIEnv, + JClass, + jlong context, + jfloat x, + jfloat y, + jfloat width, + jfloat height); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeResetTransform(JNIEnv, + JClass, + jlong context); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeRestore(JNIEnv, + JClass, + jlong context); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeRotate(JNIEnv, + JClass, + jlong context, + jfloat angle); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeSave(JNIEnv, + JClass, + jlong context); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeScale(JNIEnv, + JClass, + jlong context, + jfloat x, + jfloat y); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeSetLineDash(JNIEnv env, + JClass, + jlong context, + jfloatArray dash); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeSetTransform(JNIEnv, + JClass, + jlong context, + jfloat a, + jfloat b, + jfloat c, + jfloat d, + jfloat e, + jfloat f); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeSetTransformMatrix(JNIEnv, + JClass, + jlong context, + jlong matrix); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeStroke(JNIEnv, + JClass, + jlong context, + jlong path); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeStrokeRect(JNIEnv, + JClass, + jlong context, + jfloat x, + jfloat y, + jfloat width, + jfloat height); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeStrokeText(JNIEnv env, + JClass, + jlong context, + JString text, + jfloat x, + jfloat y, + jfloat width); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeTransform(JNIEnv, + JClass, + jlong context, + jfloat a, + jfloat b, + jfloat c, + jfloat d, + jfloat e, + jfloat f); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeTranslate(JNIEnv, + JClass, + jlong context, + jfloat x, + jfloat y); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TextureRender_nativeDrawFrame(JNIEnv env, + JClass, + JObject surface_texture_object, + bool flip_y_web_gl, + jint fbo, + jint rbo, + jint program, + jint external_texture, + jint sampler_pos, + jint array_buffer, + jint pos, + jfloatArray matrix, + jint matrix_pos, + jint width, + jint height, + jint render_width, + jint render_height, + jint internal_format, + jint format, + jint draw_count); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSWebGL2RenderingContext_nativeFlipInPlace3D(JNIEnv env, + JClass, + JByteBuffer pixels, + jint bytesPerPixel, + jint height, + jint depth); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSWebGL2RenderingContext_nativeTexImage3DBuffer(JNIEnv env, + JClass, + jint target, + jint level, + jint internalformat, + jint width, + jint height, + jint depth, + jint border, + jint format, + jint image_type, + JByteBuffer buffer, + jboolean flipY); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSWebGL2RenderingContext_nativeTexImage3DByteArray(JNIEnv env, + JClass, + jint target, + jint level, + jint internalformat, + jint width, + jint height, + jint depth, + jint border, + jint format, + jint image_type, + jbyteArray byteArray, + jboolean flipY); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSWebGL2RenderingContext_nativeTexImage3DShortArray(JNIEnv env, + JClass, + jint target, + jint level, + jint internalformat, + jint width, + jint height, + jint depth, + jint border, + jint format, + jint image_type, + jshortArray shortArray, + jboolean flipY); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSWebGL2RenderingContext_nativeTexImage3DIntArray(JNIEnv env, + JClass, + jint target, + jint level, + jint internalformat, + jint width, + jint height, + jint depth, + jint border, + jint format, + jint image_type, + jintArray intArray, + jboolean flipY); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSWebGL2RenderingContext_nativeTexImage3DFloatArray(JNIEnv env, + JClass, + jint target, + jint level, + jint internalformat, + jint width, + jint height, + jint depth, + jint border, + jint format, + jint image_type, + jfloatArray floatArray, + jboolean flipY); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSWebGL2RenderingContext_nativeTexImage3DDoubleArray(JNIEnv env, + JClass, + jint target, + jint level, + jint internalformat, + jint width, + jint height, + jint depth, + jint border, + jint format, + jint image_type, + jdoubleArray doubleArray, + jboolean flipY); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSWebGL2RenderingContext_nativeTexImage3DLongArray(JNIEnv env, + JClass, + jint target, + jint level, + jint internalformat, + jint width, + jint height, + jint depth, + jint border, + jint format, + jint image_type, + jlongArray longArray, + jboolean flipY); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSWebGL2RenderingContext_nativeTexImage3DAsset(JNIEnv _env, + JClass, + jint target, + jint level, + jint internalformat, + jint width, + jint height, + jint depth, + jint border, + jint format, + jint image_type, + jlong asset, + jboolean flipY); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSWebGL2RenderingContext_nativeTexImage3DBitmap(JNIEnv env, + JClass, + jint target, + jint level, + jint internalformat, + jint width, + jint height, + jint depth, + jint border, + jint format, + jint image_type, + JObject bitmap, + jboolean flipY); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSWebGL2RenderingContext_nativeTexSubImage3DBuffer(JNIEnv env, + JClass, + jint target, + jint level, + jint xoffset, + jint yoffset, + jint zoffset, + jint width, + jint height, + jint depth, + jint format, + jint image_type, + JByteBuffer buffer, + jboolean flipY); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSWebGL2RenderingContext_nativeTexSubImage3DByteArray(JNIEnv env, + JClass, + jint target, + jint level, + jint xoffset, + jint yoffset, + jint zoffset, + jint width, + jint height, + jint depth, + jint format, + jint image_type, + jbyteArray byteArray, + jboolean flipY); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSWebGL2RenderingContext_nativeTexSubImage3DShortArray(JNIEnv env, + JClass, + jint target, + jint level, + jint xoffset, + jint yoffset, + jint zoffset, + jint width, + jint height, + jint depth, + jint format, + jint image_type, + jshortArray shortArray, + jboolean flipY); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSWebGL2RenderingContext_nativeTexSubImage3DIntArray(JNIEnv env, + JClass, + jint target, + jint level, + jint xoffset, + jint yoffset, + jint zoffset, + jint width, + jint height, + jint depth, + jint format, + jint image_type, + jintArray intArray, + jboolean flipY); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSWebGL2RenderingContext_nativeTexSubImage3DLongArray(JNIEnv env, + JClass, + jint target, + jint level, + jint xoffset, + jint yoffset, + jint zoffset, + jint width, + jint height, + jint depth, + jint format, + jint image_type, + jlongArray longArray, + jboolean flipY); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSWebGL2RenderingContext_nativeTexSubImage3DFloatArray(JNIEnv env, + JClass, + jint target, + jint level, + jint xoffset, + jint yoffset, + jint zoffset, + jint width, + jint height, + jint depth, + jint format, + jint image_type, + jfloatArray floatArray, + jboolean flipY); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSWebGL2RenderingContext_nativeTexSubImage3DDoubleArray(JNIEnv env, + JClass, + jint target, + jint level, + jint xoffset, + jint yoffset, + jint zoffset, + jint width, + jint height, + jint depth, + jint format, + jint image_type, + jdoubleArray doubleArray, + jboolean flipY); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSWebGL2RenderingContext_nativeTexSubImage3DAsset(JNIEnv _env, + JClass, + jint target, + jint level, + jint xoffset, + jint yoffset, + jint zoffset, + jint width, + jint height, + jint depth, + jint format, + jint image_type, + jlong asset, + jboolean flipY); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSWebGL2RenderingContext_nativeTexSubImage3DBitmap(JNIEnv env, + JClass, + jint target, + jint level, + jint xoffset, + jint yoffset, + jint zoffset, + jint width, + jint height, + jint depth, + jint format, + jint image_type, + JObject bitmap, + jboolean flipY); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSWebGLRenderingContext_nativeTexImage2DTexture(JNIEnv _env, + JClass, + jint width, + jint height, + jint src_texture); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSWebGLRenderingContext_nativeFlipBufferInPlace(JNIEnv env, + JClass, + JByteBuffer pixels, + jint bytesPerPixel, + jint height); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSWebGLRenderingContext_nativeGetVertexAttribOffset(JNIEnv env, + JClass, + jint index, + jint pname, + JByteBuffer buffer); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSWebGLRenderingContext_nativeBindBuffer(JNIEnv _env, + JClass, + jint target, + jint buffer); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSWebGLRenderingContext_nativeReadPixels(JNIEnv _env, + JClass, + jint x, + jint y, + jint width, + jint height, + jint format, + jint pixel_type); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSWebGLRenderingContext_nativeTexImage2DByteArray(JNIEnv env, + JClass, + jint target, + jint level, + jint internalformat, + jint width, + jint height, + jint border, + jint format, + jint image_type, + jbyteArray byteArray, + jboolean flipY); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSWebGLRenderingContext_nativeTexImage2DShortArray(JNIEnv env, + JClass, + jint target, + jint level, + jint internalformat, + jint width, + jint height, + jint border, + jint format, + jint image_type, + jshortArray shortArray, + jboolean flipY); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSWebGLRenderingContext_nativeTexImage2DIntArray(JNIEnv env, + JClass, + jint target, + jint level, + jint internalformat, + jint width, + jint height, + jint border, + jint format, + jint image_type, + jintArray intArray, + jboolean flipY); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSWebGLRenderingContext_nativeTexImage2DFloatArray(JNIEnv env, + JClass, + jint target, + jint level, + jint internalformat, + jint width, + jint height, + jint border, + jint format, + jint image_type, + jfloatArray floatArray, + jboolean flipY); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSWebGLRenderingContext_nativeTexImage2DBuffer(JNIEnv env, + JClass, + jint target, + jint level, + jint internalformat, + jint width, + jint height, + jint border, + jint format, + jint image_type, + JByteBuffer buffer, + jboolean flipY); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSWebGLRenderingContext_nativeTexImage2DAsset(JNIEnv _env, + JClass, + jint target, + jint level, + jint internalformat, + jint border, + jint format, + jint image_type, + jlong asset, + jboolean flipY); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSWebGLRenderingContext_nativeTexImage2DBitmap(JNIEnv env, + JClass, + jint target, + jint level, + jint internalformat, + jint width, + jint height, + jint border, + jint format, + jint image_type, + JObject bitmap, + jboolean flipY); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSWebGLRenderingContext_nativeTexSubImage2DByteArray(JNIEnv env, + JClass, + jint target, + jint level, + jint xoffset, + jint yoffset, + jint width, + jint height, + jint format, + jint image_type, + jbyteArray byteArray, + jboolean flip_y); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSWebGLRenderingContext_nativeTexSubImage2DShortArray(JNIEnv env, + JClass, + jint target, + jint level, + jint xoffset, + jint yoffset, + jint width, + jint height, + jint format, + jint image_type, + jshortArray shortArray, + jboolean flip_y); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSWebGLRenderingContext_nativeTexSubImage2DIntArray(JNIEnv env, + JClass, + jint target, + jint level, + jint xoffset, + jint yoffset, + jint width, + jint height, + jint format, + jint image_type, + jintArray intArray, + jboolean flip_y); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSWebGLRenderingContext_nativeTexSubImage2DFloatArray(JNIEnv env, + JClass, + jint target, + jint level, + jint xoffset, + jint yoffset, + jint width, + jint height, + jint format, + jint image_type, + jfloatArray floatArray, + jboolean flip_y); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSWebGLRenderingContext_nativeTexSubImage2DBuffer(JNIEnv env, + JClass, + jint target, + jint level, + jint xoffset, + jint yoffset, + jint width, + jint height, + jint format, + jint image_type, + JByteBuffer buffer, + jboolean flip_y); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSWebGLRenderingContext_nativeTexSubImage2DAsset(JNIEnv _env, + JClass, + jint target, + jint level, + jint xoffset, + jint yoffset, + jint width, + jint height, + jint format, + jint image_type, + jlong asset, + jboolean flip_y); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSWebGLRenderingContext_nativeTexSubImage2DBitmap(JNIEnv env, + JClass, + jint target, + jint level, + jint xoffset, + jint yoffset, + jint width, + jint height, + jint format, + jint image_type, + JObject bitmap, + jboolean flip_y); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSWebGLRenderingContext_nativeVertexAttribPointer(JNIEnv _env, + JClass, + jint index, + jint size, + jint pointer_type, + jboolean normalized, + jint stride, + jlong offset); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSCanvasGradient_nativeAddColorStop(JNIEnv env, + JClass, + long long style, + float stop, + JString color); +#endif + +#if defined(TARGET_OS_ANDROID) +jlong Java_org_nativescript_canvas_TNSImageAsset_nativeInit(JNIEnv, JClass); +#endif + +#if defined(TARGET_OS_ANDROID) +jbyteArray Java_org_nativescript_canvas_TNSImageAsset_nativeGetBytes(JNIEnv env, + JClass, + jlong asset); +#endif + +#if defined(TARGET_OS_ANDROID) +jint Java_org_nativescript_canvas_TNSImageAsset_nativeGetWidth(JNIEnv _env, JClass, jlong asset); +#endif + +#if defined(TARGET_OS_ANDROID) +jint Java_org_nativescript_canvas_TNSImageAsset_nativeGetHeight(JNIEnv _env, JClass, jlong asset); +#endif + +#if defined(TARGET_OS_ANDROID) +jboolean Java_org_nativescript_canvas_TNSImageAsset_nativeScale(JNIEnv _env, + JClass, + jlong asset, + jint x, + jint y); +#endif + +#if defined(TARGET_OS_ANDROID) +jboolean Java_org_nativescript_canvas_TNSImageAsset_nativeFlipX(JNIEnv _env, JClass, jlong asset); +#endif + +#if defined(TARGET_OS_ANDROID) +jboolean Java_org_nativescript_canvas_TNSImageAsset_nativeFlipY(JNIEnv _env, JClass, jlong asset); +#endif + +#if defined(TARGET_OS_ANDROID) +jboolean Java_org_nativescript_canvas_TNSImageAsset_nativeSave(JNIEnv env, + JClass, + jlong asset, + JString path, + jint format); +#endif + +#if defined(TARGET_OS_ANDROID) +jstring Java_org_nativescript_canvas_TNSImageAsset_nativeGetError(JNIEnv env, JClass, jlong asset); +#endif + +#if defined(TARGET_OS_ANDROID) +jboolean Java_org_nativescript_canvas_TNSImageAsset_nativeHasError(JNIEnv _env, + JClass, + jlong asset); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSImageAsset_nativeDestroy(JNIEnv _env, JClass, jlong asset); +#endif + +#if defined(TARGET_OS_ANDROID) +jboolean Java_org_nativescript_canvas_TNSImageAsset_nativeLoadAssetPath(JNIEnv env, + JClass, + jlong asset, + JString path); +#endif + +#if defined(TARGET_OS_ANDROID) +jboolean Java_org_nativescript_canvas_TNSImageAsset_nativeLoadAssetBytes(JNIEnv env, + JClass, + jlong asset, + jbyteArray buffer); +#endif + +#if defined(TARGET_OS_ANDROID) +jlong Java_org_nativescript_canvas_TNSImageBitmap_nativeCreateFromBuffer(JNIEnv env, + JClass, + JByteBuffer image_buffer, + jfloat image_width, + jfloat image_height, + jboolean flip_y, + jint premultiply_alpha, + jint color_space_conversion, + jint resize_quality, + jfloat resize_width, + jfloat resize_height); +#endif + +#if defined(TARGET_OS_ANDROID) +jlong Java_org_nativescript_canvas_TNSImageBitmap_nativeCreateFromBufferSrcRect(JNIEnv env, + JClass, + JByteBuffer image_buffer, + jfloat image_width, + jfloat image_height, + jfloat sx, + jfloat sy, + jfloat s_width, + jfloat s_height, + jboolean flip_y, + jint premultiply_alpha, + jint color_space_conversion, + jint resize_quality, + jfloat resize_width, + jfloat resize_height); +#endif + +#if defined(TARGET_OS_ANDROID) +jlong Java_org_nativescript_canvas_TNSImageBitmap_nativeCreateFromBufferEncoded(JNIEnv env, + JClass, + JByteBuffer image_buffer, + jboolean flip_y, + jint premultiply_alpha, + jint color_space_conversion, + jint resize_quality, + jfloat resize_width, + jfloat resize_height); +#endif + +#if defined(TARGET_OS_ANDROID) +jlong Java_org_nativescript_canvas_TNSImageBitmap_nativeCreateFromBufferEncodedSrcRect(JNIEnv env, + JClass, + JByteBuffer image_buffer, + jfloat sx, + jfloat sy, + jfloat s_width, + jfloat s_height, + jboolean flip_y, + jint premultiply_alpha, + jint color_space_conversion, + jint resize_quality, + jfloat resize_width, + jfloat resize_height); +#endif + +#if defined(TARGET_OS_ANDROID) +jlong Java_org_nativescript_canvas_TNSImageBitmap_nativeCreateFromBytes(JNIEnv env, + JClass, + jbyteArray image_bytes, + jfloat image_width, + jfloat image_height, + jboolean flip_y, + jint premultiply_alpha, + jint color_space_conversion, + jint resize_quality, + jfloat resize_width, + jfloat resize_height); +#endif + +#if defined(TARGET_OS_ANDROID) +jlong Java_org_nativescript_canvas_TNSImageBitmap_nativeCreateFromBytesSrcRect(JNIEnv env, + JClass, + jbyteArray image_bytes, + jfloat image_width, + jfloat image_height, + jfloat sx, + jfloat sy, + jfloat s_width, + jfloat s_height, + jboolean flip_y, + jint premultiply_alpha, + jint color_space_conversion, + jint resize_quality, + jfloat resize_width, + jfloat resize_height); +#endif + +#if defined(TARGET_OS_ANDROID) +jlong Java_org_nativescript_canvas_TNSImageBitmap_nativeCreateFromBytesEncoded(JNIEnv env, + JClass, + jbyteArray image_bytes, + jboolean flip_y, + jint premultiply_alpha, + jint color_space_conversion, + jint resize_quality, + jfloat resize_width, + jfloat resize_height); +#endif + +#if defined(TARGET_OS_ANDROID) +jlong Java_org_nativescript_canvas_TNSImageBitmap_nativeCreateFromBytesEncodedSrcRect(JNIEnv env, + JClass, + jbyteArray image_bytes, + jfloat sx, + jfloat sy, + jfloat s_width, + jfloat s_height, + jboolean flip_y, + jint premultiply_alpha, + jint color_space_conversion, + jint resize_quality, + jfloat resize_width, + jfloat resize_height); +#endif + +#if defined(TARGET_OS_ANDROID) +jlong Java_org_nativescript_canvas_TNSImageBitmap_nativeCreateFromAsset(JNIEnv, + JClass, + jlong asset, + jboolean flip_y, + jint premultiply_alpha, + jint color_space_conversion, + jint resize_quality, + jfloat resize_width, + jfloat resize_height); +#endif + +#if defined(TARGET_OS_ANDROID) +jlong Java_org_nativescript_canvas_TNSImageBitmap_nativeCreateFromAssetSrcRect(JNIEnv, + JClass, + jlong asset, + jfloat sx, + jfloat sy, + jfloat s_width, + jfloat s_height, + jboolean flip_y, + jint premultiply_alpha, + jint color_space_conversion, + jint resize_quality, + jfloat resize_width, + jfloat resize_height); +#endif + +#if defined(TARGET_OS_ANDROID) +jlong Java_org_nativescript_canvas_TNSImageBitmap_nativeCreateFromBitmap(JNIEnv env, + JClass, + JObject bitmap, + jboolean flip_y, + jint premultiply_alpha, + jint color_space_conversion, + jint resize_quality, + jfloat resize_width, + jfloat resize_height); +#endif + +#if defined(TARGET_OS_ANDROID) +jlong Java_org_nativescript_canvas_TNSImageBitmap_nativeCreateFromBitmapSrcRect(JNIEnv env, + JClass, + JObject bitmap, + jfloat sx, + jfloat sy, + jfloat s_width, + jfloat s_height, + jboolean flip_y, + jint premultiply_alpha, + jint color_space_conversion, + jint resize_quality, + jfloat resize_width, + jfloat resize_height); +#endif + +#if defined(TARGET_OS_ANDROID) +jlong Java_org_nativescript_canvas_TNSImageBitmap_nativeCreateFromImageData(JNIEnv, + JClass, + jlong image_data, + jboolean flip_y, + jint premultiply_alpha, + jint color_space_conversion, + jint resize_quality, + jfloat resize_width, + jfloat resize_height); +#endif + +#if defined(TARGET_OS_ANDROID) +jlong Java_org_nativescript_canvas_TNSImageBitmap_nativeCreateFromImageDataSrcRect(JNIEnv, + JClass, + jlong image_data, + jfloat sx, + jfloat sy, + jfloat s_width, + jfloat s_height, + jboolean flip_y, + jint premultiply_alpha, + jint color_space_conversion, + jint resize_quality, + jfloat resize_width, + jfloat resize_height); +#endif + +#if defined(TARGET_OS_ANDROID) +jlong Java_org_nativescript_canvas_TNSImageData_nativeInit(JNIEnv, JClass, jint width, jint height); +#endif + +#if defined(TARGET_OS_ANDROID) +jint Java_org_nativescript_canvas_TNSImageData_nativeWidth(JNIEnv, JClass, jlong image_data); +#endif + +#if defined(TARGET_OS_ANDROID) +jint Java_org_nativescript_canvas_TNSImageData_nativeHeight(JNIEnv, JClass, jlong image_data); +#endif + +#if defined(TARGET_OS_ANDROID) +jobject Java_org_nativescript_canvas_TNSImageData_nativeData(JNIEnv env, JClass, jlong image_data); +#endif + +#if defined(TARGET_OS_ANDROID) +jint Java_org_nativescript_canvas_TNSImageData_nativeDataLength(JNIEnv, JClass, jlong image_data); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSImageData_nativeDestroy(JNIEnv, JClass, jlong image_data); +#endif + +#if defined(TARGET_OS_ANDROID) +jlong Java_org_nativescript_canvas_TNSDOMMatrix_nativeInit(JNIEnv, JClass); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSDOMMatrix_nativeUpdate(JNIEnv env, + JClass, + jlong matrix, + jfloatArray data); +#endif + +#if defined(TARGET_OS_ANDROID) +jfloat Java_org_nativescript_canvas_TNSDOMMatrix_nativeA(JNIEnv, JClass, jlong matrix); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSDOMMatrix_nativeSetA(JNIEnv, JClass, jlong matrix, jfloat a); +#endif + +#if defined(TARGET_OS_ANDROID) +jfloat Java_org_nativescript_canvas_TNSDOMMatrix_nativeB(JNIEnv, JClass, jlong matrix); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSDOMMatrix_nativeSetB(JNIEnv, JClass, jlong matrix, jfloat b); +#endif + +#if defined(TARGET_OS_ANDROID) +jfloat Java_org_nativescript_canvas_TNSDOMMatrix_nativeC(JNIEnv, JClass, jlong matrix); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSDOMMatrix_nativeSetC(JNIEnv, JClass, jlong matrix, jfloat c); +#endif + +#if defined(TARGET_OS_ANDROID) +jfloat Java_org_nativescript_canvas_TNSDOMMatrix_nativeD(JNIEnv, JClass, jlong matrix); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSDOMMatrix_nativeSetD(JNIEnv, JClass, jlong matrix, jfloat d); +#endif + +#if defined(TARGET_OS_ANDROID) +jfloat Java_org_nativescript_canvas_TNSDOMMatrix_nativeE(JNIEnv, JClass, jlong matrix); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSDOMMatrix_nativeSetE(JNIEnv, JClass, jlong matrix, jfloat e); +#endif + +#if defined(TARGET_OS_ANDROID) +jfloat Java_org_nativescript_canvas_TNSDOMMatrix_nativeF(JNIEnv, JClass, jlong matrix); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSDOMMatrix_nativeSetF(JNIEnv, JClass, jlong matrix, jfloat f); +#endif + +#if defined(TARGET_OS_ANDROID) +jfloat Java_org_nativescript_canvas_TNSDOMMatrix_nativeM11(JNIEnv, JClass, jlong matrix); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSDOMMatrix_nativeSetM11(JNIEnv, + JClass, + jlong matrix, + jfloat m11); +#endif + +#if defined(TARGET_OS_ANDROID) +jfloat Java_org_nativescript_canvas_TNSDOMMatrix_nativeM12(JNIEnv, JClass, jlong matrix); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSDOMMatrix_nativeSetM12(JNIEnv, + JClass, + jlong matrix, + jfloat m12); +#endif + +#if defined(TARGET_OS_ANDROID) +jfloat Java_org_nativescript_canvas_TNSDOMMatrix_nativeM13(JNIEnv, JClass, jlong matrix); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSDOMMatrix_nativeSetM13(JNIEnv, + JClass, + jlong matrix, + jfloat m13); +#endif + +#if defined(TARGET_OS_ANDROID) +jfloat Java_org_nativescript_canvas_TNSDOMMatrix_nativeM14(JNIEnv, JClass, jlong matrix); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSDOMMatrix_nativeSetM14(JNIEnv, + JClass, + jlong matrix, + jfloat m14); +#endif + +#if defined(TARGET_OS_ANDROID) +jfloat Java_org_nativescript_canvas_TNSDOMMatrix_nativeM21(JNIEnv, JClass, jlong matrix); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSDOMMatrix_nativeSetM21(JNIEnv, + JClass, + jlong matrix, + jfloat m21); +#endif + +#if defined(TARGET_OS_ANDROID) +jfloat Java_org_nativescript_canvas_TNSDOMMatrix_nativeM22(JNIEnv, JClass, jlong matrix); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSDOMMatrix_nativeSetM22(JNIEnv, + JClass, + jlong matrix, + jfloat m22); +#endif + +#if defined(TARGET_OS_ANDROID) +jfloat Java_org_nativescript_canvas_TNSDOMMatrix_nativeM23(JNIEnv, JClass, jlong matrix); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSDOMMatrix_nativeSetM23(JNIEnv, + JClass, + jlong matrix, + jfloat m23); +#endif + +#if defined(TARGET_OS_ANDROID) +jfloat Java_org_nativescript_canvas_TNSDOMMatrix_nativeM24(JNIEnv, JClass, jlong matrix); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSDOMMatrix_nativeSetM24(JNIEnv, + JClass, + jlong matrix, + jfloat m24); +#endif + +#if defined(TARGET_OS_ANDROID) +jfloat Java_org_nativescript_canvas_TNSDOMMatrix_nativeM31(JNIEnv, JClass, jlong matrix); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSDOMMatrix_nativeSetM31(JNIEnv, + JClass, + jlong matrix, + jfloat m31); +#endif + +#if defined(TARGET_OS_ANDROID) +jfloat Java_org_nativescript_canvas_TNSDOMMatrix_nativeM32(JNIEnv, JClass, jlong matrix); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSDOMMatrix_nativeSetM32(JNIEnv, + JClass, + jlong matrix, + jfloat m32); +#endif + +#if defined(TARGET_OS_ANDROID) +jfloat Java_org_nativescript_canvas_TNSDOMMatrix_nativeM33(JNIEnv, JClass, jlong matrix); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSDOMMatrix_nativeSetM33(JNIEnv, + JClass, + jlong matrix, + jfloat m33); +#endif + +#if defined(TARGET_OS_ANDROID) +jfloat Java_org_nativescript_canvas_TNSDOMMatrix_nativeM34(JNIEnv, JClass, jlong matrix); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSDOMMatrix_nativeSetM34(JNIEnv, + JClass, + jlong matrix, + jfloat m34); +#endif + +#if defined(TARGET_OS_ANDROID) +jfloat Java_org_nativescript_canvas_TNSDOMMatrix_nativeM41(JNIEnv, JClass, jlong matrix); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSDOMMatrix_nativeSetM41(JNIEnv, + JClass, + jlong matrix, + jfloat m41); +#endif + +#if defined(TARGET_OS_ANDROID) +jfloat Java_org_nativescript_canvas_TNSDOMMatrix_nativeM42(JNIEnv, JClass, jlong matrix); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSDOMMatrix_nativeSetM42(JNIEnv, + JClass, + jlong matrix, + jfloat m42); +#endif + +#if defined(TARGET_OS_ANDROID) +jfloat Java_org_nativescript_canvas_TNSDOMMatrix_nativeM43(JNIEnv, JClass, jlong matrix); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSDOMMatrix_nativeSetM43(JNIEnv, + JClass, + jlong matrix, + jfloat m43); +#endif + +#if defined(TARGET_OS_ANDROID) +jfloat Java_org_nativescript_canvas_TNSDOMMatrix_nativeM44(JNIEnv, JClass, jlong matrix); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSDOMMatrix_nativeSetM44(JNIEnv, + JClass, + jlong matrix, + jfloat m44); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSDOMMatrix_nativeDestroy(JNIEnv, JClass, jlong matrix); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeSetFillColorWithString(JNIEnv env, + JClass, + jlong context, + JString color); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeSetStrokeColorWithString(JNIEnv env, + JClass, + jlong context, + JString color); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSColorStyle_nativeDestroy(JNIEnv, JClass, jlong style); +#endif + +#if defined(TARGET_OS_ANDROID) +jstring Java_org_nativescript_canvas_TNSColor_nativeGetColorString(JNIEnv env, JClass, jlong color); +#endif + +#if defined(TARGET_OS_ANDROID) +jlong Java_org_nativescript_canvas_TNSPath2D_nativeInit(JNIEnv, JClass); +#endif + +#if defined(TARGET_OS_ANDROID) +jlong Java_org_nativescript_canvas_TNSPath2D_nativeCreateWithPath(JNIEnv, JClass, jlong path); +#endif + +#if defined(TARGET_OS_ANDROID) +jlong Java_org_nativescript_canvas_TNSPath2D_nativeCreateWithString(JNIEnv env, + JClass, + JString string); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSPath2D_nativeAddPath(JNIEnv, + JClass, + jlong path, + jlong path_to_add); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSPath2D_nativeAddPathWithMatrix(JNIEnv, + JClass, + jlong path, + jlong path_to_add, + jlong matrix); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSPath2D_nativeClosePath(JNIEnv, JClass, jlong path); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSPath2D_nativeMoveTo(JNIEnv, + JClass, + jlong path, + jfloat x, + jfloat y); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSPath2D_nativeLineTo(JNIEnv, + JClass, + jlong path, + jfloat x, + jfloat y); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSPath2D_nativeBezierCurveTo(JNIEnv, + JClass, + jlong path, + jfloat cp1x, + jfloat cp1y, + jfloat cp2x, + jfloat cp2y, + jfloat x, + jfloat y); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSPath2D_nativeQuadraticCurveTo(JNIEnv, + JClass, + jlong path, + jfloat cpx, + jfloat cpy, + jfloat x, + jfloat y); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSPath2D_nativeArc(JNIEnv, + JClass, + jlong path, + jfloat x, + jfloat y, + jfloat radius, + jfloat start_angle, + jfloat end_angle, + bool anti_clockwise); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSPath2D_nativeArcTo(JNIEnv, + JClass, + jlong path, + jfloat x1, + jfloat y1, + jfloat x2, + jfloat y2, + jfloat radius); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSPath2D_nativeEllipse(JNIEnv, + JClass, + jlong path, + jfloat x, + jfloat y, + jfloat radius_x, + jfloat radius_y, + jfloat rotation, + jfloat start_angle, + jfloat end_angle, + bool anticlockwise); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSPath2D_nativeRect(JNIEnv, + JClass, + jlong path, + jfloat x, + jfloat y, + jfloat width, + jfloat height); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSPath2D_nativeDestroy(JNIEnv, JClass, jlong path); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSPattern_nativeSetTransform(JNIEnv, + JClass, + jlong pattern, + jlong matrix); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSSVG_nativeDrawSVG(JNIEnv env, + JClass, + jlong context, + JString svg); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSSVG_nativeDrawSVGFromPath(JNIEnv env, + JClass, + jlong context, + JString path); +#endif + +#if defined(TARGET_OS_ANDROID) +jlong Java_org_nativescript_canvas_TNSTextDecoder_nativeInit(JNIEnv env, JClass, JString decoding); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSTextDecoder_nativeDestroy(JNIEnv, JClass, jlong decoder); +#endif + +#if defined(TARGET_OS_ANDROID) +jstring Java_org_nativescript_canvas_TNSTextDecoder_nativeGetEncoding(JNIEnv env, + JClass, + jlong decoder); +#endif + +#if defined(TARGET_OS_ANDROID) +jstring Java_org_nativescript_canvas_TNSTextDecoder_nativeDecodeBuffer(JNIEnv env, + JClass, + jlong decoder, + JByteBuffer data); +#endif + +#if defined(TARGET_OS_ANDROID) +jbyteArray Java_org_nativescript_canvas_TNSTextDecoder_nativeDecodeBufferToBytes(JNIEnv env, + JClass, + jlong decoder, + JByteBuffer data); +#endif + +#if defined(TARGET_OS_ANDROID) +jstring Java_org_nativescript_canvas_TNSTextDecoder_nativeDecode(JNIEnv env, + JClass, + jlong decoder, + jbyteArray data); +#endif + +#if defined(TARGET_OS_ANDROID) +jbyteArray Java_org_nativescript_canvas_TNSTextDecoder_nativeDecodeToBytes(JNIEnv env, + JClass, + jlong decoder, + jbyteArray data); +#endif + +#if defined(TARGET_OS_ANDROID) +jlong Java_org_nativescript_canvas_TNSTextEncoder_nativeInit(JNIEnv env, JClass, JString encoding); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSTextEncoder_nativeDestroy(JNIEnv, JClass, jlong encoder); +#endif + +#if defined(TARGET_OS_ANDROID) +jstring Java_org_nativescript_canvas_TNSTextEncoder_nativeGetEncoding(JNIEnv env, + JClass, + jlong encoder); +#endif + +#if defined(TARGET_OS_ANDROID) +jbyteArray Java_org_nativescript_canvas_TNSTextEncoder_nativeEncode(JNIEnv env, + JClass, + jlong encoder, + JString text); +#endif + +#if defined(TARGET_OS_ANDROID) +jfloat Java_org_nativescript_canvas_TNSTextMetrics_nativeGetWidth(JNIEnv, JClass, jlong metrics); +#endif + +#if defined(TARGET_OS_ANDROID) +jfloat Java_org_nativescript_canvas_TNSTextMetrics_nativeGetActualBoundingBoxLeft(JNIEnv, + JClass, + jlong metrics); +#endif + +#if defined(TARGET_OS_ANDROID) +jfloat Java_org_nativescript_canvas_TNSTextMetrics_nativeGetActualBoundingBoxRight(JNIEnv, + JClass, + jlong metrics); +#endif + +#if defined(TARGET_OS_ANDROID) +jfloat Java_org_nativescript_canvas_TNSTextMetrics_nativeGetActualBoundingBoxAscent(JNIEnv, + JClass, + jlong metrics); +#endif + +#if defined(TARGET_OS_ANDROID) +jfloat Java_org_nativescript_canvas_TNSTextMetrics_nativeGetActualBoundingBoxDescent(JNIEnv, + JClass, + jlong metrics); +#endif + +#if defined(TARGET_OS_ANDROID) +jfloat Java_org_nativescript_canvas_TNSTextMetrics_nativeGetFontBoundingBoxAscent(JNIEnv, + JClass, + jlong metrics); +#endif + +#if defined(TARGET_OS_ANDROID) +jfloat Java_org_nativescript_canvas_TNSTextMetrics_nativeGetFontBoundingBoxDescent(JNIEnv, + JClass, + jlong metrics); +#endif + +#if defined(TARGET_OS_ANDROID) +jfloat Java_org_nativescript_canvas_TNSTextMetrics_nativeGetEmHeightAscent(JNIEnv, + JClass, + jlong metrics); +#endif + +#if defined(TARGET_OS_ANDROID) +jfloat Java_org_nativescript_canvas_TNSTextMetrics_nativeGetEmHeightDescent(JNIEnv, + JClass, + jlong metrics); +#endif + +#if defined(TARGET_OS_ANDROID) +jfloat Java_org_nativescript_canvas_TNSTextMetrics_nativeGetHangingBaseline(JNIEnv, + JClass, + jlong metrics); +#endif + +#if defined(TARGET_OS_ANDROID) +jfloat Java_org_nativescript_canvas_TNSTextMetrics_nativeGetAlphabeticBaseline(JNIEnv, + JClass, + jlong metrics); +#endif + +#if defined(TARGET_OS_ANDROID) +jfloat Java_org_nativescript_canvas_TNSTextMetrics_nativeGetIdeographicBaseline(JNIEnv, + JClass, + jlong metrics); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSTextMetrics_nativeDestroy(JNIEnv, JClass, jlong metrics); +#endif + +#if defined(TARGET_OS_ANDROID) +jbyteArray Java_org_nativescript_canvas_Utils_nativeGetByteBufferFromBitmap(JNIEnv env, + JClass, + JObject bitmap); +#endif + +#if defined(TARGET_OS_IOS) +void destroy_string(const char *string); +#endif + +#if defined(TARGET_OS_IOS) +void destroy_context(long long context); +#endif + +#if defined(TARGET_OS_IOS) +void destroy_paint_style(long long style); +#endif + +#if defined(TARGET_OS_IOS) +void destroy_text_metrics(long long metrics); +#endif + +#if defined(TARGET_OS_IOS) +long long context_init_context(float width, + float height, + float density, + int buffer_id, + uintptr_t samples, + bool alpha, + unsigned int font_color, + float ppi, + enum TextDirection direction); +#endif + +#if defined(TARGET_OS_IOS) +long long context_init_context_with_custom_surface(float width, + float height, + float density, + bool alpha, + int font_color, + float ppi, + enum TextDirection direction); +#endif + +#if defined(TARGET_OS_IOS) +void context_resize_custom_surface(long long context, + float width, + float height, + float density, + bool alpha, + float ppi); +#endif + +#if defined(TARGET_OS_IOS) +void context_resize_surface(long long context, + float width, + float height, + float density, + int buffer_id, + uintptr_t samples, + bool alpha, + float ppi); +#endif + +#if defined(TARGET_OS_IOS) +const char *context_data_url(long long context, const char *format, float quality); +#endif + +#if defined(TARGET_OS_IOS) +struct U8Array *context_snapshot_canvas(long long context); +#endif + +#if defined(TARGET_OS_IOS) +void context_flush(long long context); +#endif + +#if defined(TARGET_OS_IOS) +void context_custom_with_buffer_flush(long long context, + uint8_t *buf, + uintptr_t buf_size, + float width, + float height); +#endif + +#if defined(TARGET_OS_IOS) +void context_set_direction(long long context, enum TextDirection direction); +#endif + +#if defined(TARGET_OS_IOS) +enum TextDirection context_get_direction(const struct Context *context); +#endif + +#if defined(TARGET_OS_IOS) +void context_set_fill_style(long long context, long long style); +#endif + +#if defined(TARGET_OS_IOS) +struct PaintStyleValue *context_get_fill_style(long long context); +#endif + +#if defined(TARGET_OS_IOS) +void context_set_filter(long long context, const char *filter); +#endif + +#if defined(TARGET_OS_IOS) +const char *context_get_filter(long long context); +#endif + +#if defined(TARGET_OS_IOS) +void context_set_font(long long context, const char *filter); +#endif + +#if defined(TARGET_OS_IOS) +const char *context_get_font(long long context); +#endif + +#if defined(TARGET_OS_IOS) +void context_set_global_alpha(long long context, float alpha); +#endif + +#if defined(TARGET_OS_IOS) +float context_get_global_alpha(long long context); +#endif + +#if defined(TARGET_OS_IOS) +void context_set_global_composite_operation(long long context, + enum CompositeOperationType operation); +#endif + +#if defined(TARGET_OS_IOS) +enum CompositeOperationType context_get_global_composite_operation(long long context); +#endif + +#if defined(TARGET_OS_IOS) +void context_set_image_smoothing_enabled(long long context, bool enabled); +#endif + +#if defined(TARGET_OS_IOS) +bool context_get_image_smoothing_enabled(long long context); +#endif + +#if defined(TARGET_OS_IOS) +void context_set_image_smoothing_quality(long long context, enum ImageSmoothingQuality quality); +#endif + +#if defined(TARGET_OS_IOS) +enum ImageSmoothingQuality context_get_image_smoothing_quality(long long context); +#endif + +#if defined(TARGET_OS_IOS) +void context_set_line_cap(long long context, enum LineCap cap); +#endif + +#if defined(TARGET_OS_IOS) +enum LineCap context_get_line_cap(long long context); +#endif + +#if defined(TARGET_OS_IOS) +void context_set_line_dash_offset(long long context, float offset); +#endif + +#if defined(TARGET_OS_IOS) +float context_get_line_dash_offset(long long context); +#endif + +#if defined(TARGET_OS_IOS) +void context_set_line_join(long long context, enum LineJoin join); +#endif + +#if defined(TARGET_OS_IOS) +enum LineJoin context_get_line_join(long long context); +#endif + +#if defined(TARGET_OS_IOS) +void context_set_line_width(long long context, float width); +#endif + +#if defined(TARGET_OS_IOS) +float context_get_line_width(long long context); +#endif + +#if defined(TARGET_OS_IOS) +void context_set_miter_limit(long long context, float limit); +#endif + +#if defined(TARGET_OS_IOS) +float context_get_miter_limit(long long context); +#endif + +#if defined(TARGET_OS_IOS) +void context_set_shadow_blur(long long context, float blur); +#endif + +#if defined(TARGET_OS_IOS) +float context_get_shadow_blur(long long context); +#endif + +#if defined(TARGET_OS_IOS) +void context_set_shadow_color(long long context, uint8_t r, uint8_t g, uint8_t b, uint8_t a); +#endif + +#if defined(TARGET_OS_IOS) +void context_set_shadow_color_string(long long context, const char *color); +#endif + +#if defined(TARGET_OS_IOS) +const char *context_get_shadow_color(long long context); +#endif + +#if defined(TARGET_OS_IOS) +void context_set_shadow_offset_x(long long context, float x); +#endif + +#if defined(TARGET_OS_IOS) +float context_get_shadow_offset_x(long long context); +#endif + +#if defined(TARGET_OS_IOS) +void context_set_shadow_offset_y(long long context, float y); +#endif + +#if defined(TARGET_OS_IOS) +float context_get_shadow_offset_y(long long context); +#endif + +#if defined(TARGET_OS_IOS) +void context_set_stroke_style(long long context, long long style); +#endif + +#if defined(TARGET_OS_IOS) +struct PaintStyleValue *context_get_stroke_style(long long context); +#endif + +#if defined(TARGET_OS_IOS) +void context_set_text_align(long long context, enum TextAlign align); +#endif + +#if defined(TARGET_OS_IOS) +enum TextAlign context_get_text_align(long long context); +#endif + +#if defined(TARGET_OS_IOS) +void context_set_text_baseline(long long context, enum TextBaseLine baseline); +#endif + +#if defined(TARGET_OS_IOS) +enum TextBaseLine context_get_text_baseline(long long context); +#endif + +#if defined(TARGET_OS_IOS) +void context_arc(long long context, + float x, + float y, + float radius, + float start_angle, + float end_angle, + bool anti_clockwise); +#endif + +#if defined(TARGET_OS_IOS) +void context_arc_to(long long context, float x1, float y1, float x2, float y2, float radius); +#endif + +#if defined(TARGET_OS_IOS) +void context_begin_path(long long context); +#endif + +#if defined(TARGET_OS_IOS) +void context_bezier_curve_to(long long context, + float cp1x, + float cp1y, + float cp2x, + float cp2y, + float x, + float y); +#endif + +#if defined(TARGET_OS_IOS) +void context_clear_rect(long long context, float x, float y, float width, float height); +#endif + +#if defined(TARGET_OS_IOS) +void context_clip(long long context, long long path, enum FillRule rule); +#endif + +#if defined(TARGET_OS_IOS) +void context_clip_rule(long long context, enum FillRule rule); +#endif + +#if defined(TARGET_OS_IOS) +void context_close_path(long long context); +#endif + +#if defined(TARGET_OS_IOS) +long long context_create_image_data(int width, int height); +#endif + +#if defined(TARGET_OS_IOS) +long long context_create_linear_gradient(long long context, float x0, float y0, float x1, float y1); +#endif + +#if defined(TARGET_OS_IOS) +long long context_create_pattern(long long context, + const uint8_t *image_data, + uintptr_t image_len, + int width, + int height, + enum Repetition repetition); +#endif + +#if defined(TARGET_OS_IOS) +long long context_create_pattern_asset(long long context, + long long asset, + enum Repetition repetition); +#endif + +#if defined(TARGET_OS_IOS) +long long context_create_pattern_encoded(long long context, + const uint8_t *image_data, + uintptr_t image_len, + enum Repetition repetition); +#endif + +#if defined(TARGET_OS_IOS) +long long context_create_radial_gradient(long long context, + float x0, + float y0, + float r0, + float x1, + float y1, + float r1); +#endif + +#if defined(TARGET_OS_IOS) +void context_draw_image_dx_dy(long long context, + const uint8_t *image_data, + uintptr_t image_len, + float width, + float height, + float dx, + float dy); +#endif + +#if defined(TARGET_OS_IOS) +void context_draw_image_dx_dy_dw_dh(long long context, + const uint8_t *image_data, + uintptr_t image_len, + float width, + float height, + float dx, + float dy, + float d_width, + float d_height); +#endif + +#if defined(TARGET_OS_IOS) +void context_draw_image(long long context, + const uint8_t *image_data, + uintptr_t image_len, + float width, + float height, + float sx, + float sy, + float s_width, + float s_height, + float dx, + float dy, + float d_width, + float d_height); +#endif + +#if defined(TARGET_OS_IOS) +void context_draw_image_encoded_dx_dy(long long context, + const uint8_t *image_data, + uintptr_t image_len, + float dx, + float dy); +#endif + +#if defined(TARGET_OS_IOS) +void context_draw_image_encoded_dx_dy_dw_dh(long long context, + const uint8_t *image_data, + uintptr_t image_len, + float dx, + float dy, + float d_width, + float d_height); +#endif + +#if defined(TARGET_OS_IOS) +void context_draw_image_encoded(long long context, + const uint8_t *image_data, + uintptr_t image_len, + float sx, + float sy, + float s_width, + float s_height, + float dx, + float dy, + float d_width, + float d_height); +#endif + +#if defined(TARGET_OS_IOS) +void context_draw_image_dx_dy_asset(long long context, long long asset, float dx, float dy); +#endif + +#if defined(TARGET_OS_IOS) +void context_draw_image_dx_dy_dw_dh_asset(long long context, + long long asset, + float dx, + float dy, + float d_width, + float d_height); +#endif + +#if defined(TARGET_OS_IOS) +void context_draw_image_asset(long long context, + long long asset, + float sx, + float sy, + float s_width, + float s_height, + float dx, + float dy, + float d_width, + float d_height); +#endif + +#if defined(TARGET_OS_IOS) +void context_ellipse(long long context, + float x, + float y, + float radius_x, + float radius_y, + float rotation, + float start_angle, + float end_angle, + bool anticlockwise); +#endif + +#if defined(TARGET_OS_IOS) +void context_fill(long long context, long long path, enum FillRule rule); +#endif + +#if defined(TARGET_OS_IOS) +void context_fill_rect(long long context, float x, float y, float width, float height); +#endif + +#if defined(TARGET_OS_IOS) +void context_fill_text(long long context, const char *text, float x, float y, float width); +#endif + +#if defined(TARGET_OS_IOS) +long long context_get_image_data(long long context, float sx, float sy, float sw, float sh); +#endif + +#if defined(TARGET_OS_IOS) +struct F32Array *context_get_line_dash(long long context); +#endif + +#if defined(TARGET_OS_IOS) +long long context_get_transform(long long context); +#endif + +#if defined(TARGET_OS_IOS) +bool context_is_point_in_path(long long context, + long long path, + float x, + float y, + enum FillRule rule); +#endif + +#if defined(TARGET_OS_IOS) +bool context_is_point_in_stroke(long long context, long long path, float x, float y); +#endif + +#if defined(TARGET_OS_IOS) +void context_line_to(long long context, float x, float y); +#endif + +#if defined(TARGET_OS_IOS) +long long context_measure_text(long long context, const char *text); +#endif + +#if defined(TARGET_OS_IOS) +void context_move_to(long long context, float x, float y); +#endif + +#if defined(TARGET_OS_IOS) +void context_put_image_data(long long context, + long long image_data, + float dx, + float dy, + float dirty_x, + float dirty_y, + float dirty_width, + float dirty_height); +#endif + +#if defined(TARGET_OS_IOS) +void context_quadratic_curve_to(long long context, float cpx, float cpy, float x, float y); +#endif + +#if defined(TARGET_OS_IOS) +void context_rect(long long context, float x, float y, float width, float height); +#endif + +#if defined(TARGET_OS_IOS) +void context_reset_transform(long long context); +#endif + +#if defined(TARGET_OS_IOS) +void context_restore(long long context); +#endif + +#if defined(TARGET_OS_IOS) +void context_rotate(long long context, float angle); +#endif + +#if defined(TARGET_OS_IOS) +void context_save(long long context); +#endif + +#if defined(TARGET_OS_IOS) +void context_scale(long long context, float x, float y); +#endif + +#if defined(TARGET_OS_IOS) +void context_set_line_dash(long long context, const float *data, uintptr_t data_length); +#endif + +#if defined(TARGET_OS_IOS) +void context_set_transform(long long context, float a, float b, float c, float d, float e, float f); +#endif + +#if defined(TARGET_OS_IOS) +void context_set_transform_matrix(long long context, long long matrix); +#endif + +#if defined(TARGET_OS_IOS) +void context_stroke(long long context, long long path); +#endif + +#if defined(TARGET_OS_IOS) +void context_stroke_rect(long long context, float x, float y, float width, float height); +#endif + +#if defined(TARGET_OS_IOS) +void context_stroke_text(long long context, const char *text, float x, float y, float width); +#endif + +#if defined(TARGET_OS_IOS) +void context_transform(long long context, float a, float b, float c, float d, float e, float f); +#endif + +#if defined(TARGET_OS_IOS) +void context_translate(long long context, float x, float y); +#endif + +#if defined(TARGET_OS_IOS) +void gl_tex_image_2D_asset(unsigned int target, + int level, + int internalformat, + int border, + unsigned int format, + unsigned int image_type, + long long asset, + bool flip_y); +#endif + +#if defined(TARGET_OS_IOS) +void gl_tex_sub_image_2D_asset(unsigned int target, + int level, + int xoffset, + int yoffset, + unsigned int format, + unsigned int image_type, + long long asset, + bool flip_y); +#endif + +#if defined(TARGET_OS_IOS) +void gl_tex_image_3D_asset(unsigned int target, + int level, + int internalformat, + int width, + int height, + int depth, + int border, + unsigned int format, + unsigned int image_type, + long long asset, + bool flip_y); +#endif + +#if defined(TARGET_OS_IOS) +void gl_tex_sub_image_3D_asset(unsigned int target, + int level, + int xoffset, + int yoffset, + int zoffset, + int width, + int height, + int depth, + unsigned int format, + unsigned int image_type, + long long asset, + bool flip_y); +#endif + +#if defined(TARGET_OS_IOS) +void gl_vertex_attrib_pointer(unsigned int index, + int size, + unsigned int pointer_type, + bool normalized, + int stride, + long long offset); +#endif + +#if defined(TARGET_OS_IOS) +long long gl_get_vertex_attrib_offset(unsigned int index, unsigned int pname); +#endif + +#if defined(TARGET_OS_IOS) +void gradient_add_color_stop(long long style, float stop, const char *color); +#endif + +#if defined(TARGET_OS_IOS) +long long image_asset_create(void); +#endif + +#if defined(TARGET_OS_IOS) +bool image_asset_load_from_path(long long asset, const char *path); +#endif + +#if defined(TARGET_OS_IOS) +bool image_asset_load_from_raw(long long asset, const uint8_t *array, uintptr_t size); +#endif + +#if defined(TARGET_OS_IOS) +struct U8Array *image_asset_get_bytes(long long asset); +#endif + +#if defined(TARGET_OS_IOS) +struct U8Array *image_asset_get_rgba_bytes(long long asset); +#endif + +#if defined(TARGET_OS_IOS) +struct U8Array *image_asset_get_rgb_bytes(long long asset); +#endif + +#if defined(TARGET_OS_IOS) +unsigned int image_asset_width(long long asset); +#endif + +#if defined(TARGET_OS_IOS) +unsigned int image_asset_height(long long asset); +#endif + +#if defined(TARGET_OS_IOS) +const char *image_asset_get_error(long long asset); +#endif + +#if defined(TARGET_OS_IOS) +bool image_asset_has_error(long long asset); +#endif + +#if defined(TARGET_OS_IOS) +bool image_asset_scale(long long asset, unsigned int x, unsigned int y); +#endif + +#if defined(TARGET_OS_IOS) +bool image_asset_flip_x(long long asset); +#endif + +#if defined(TARGET_OS_IOS) +bool image_asset_flip_x_in_place(long long asset); +#endif + +#if defined(TARGET_OS_IOS) +bool image_asset_flip_y(long long asset); +#endif + +#if defined(TARGET_OS_IOS) +void image_asset_flip_y_in_place_owned(uint8_t *buf, uintptr_t length); +#endif + +#if defined(TARGET_OS_IOS) +void image_asset_flip_x_in_place_owned(uint8_t *buf, uintptr_t length); +#endif + +#if defined(TARGET_OS_IOS) +bool image_asset_flip_y_in_place(long long asset); +#endif + +#if defined(TARGET_OS_IOS) +bool image_asset_save_path(long long asset, const char *path, unsigned int format); +#endif + +#if defined(TARGET_OS_IOS) +void destroy_image_asset(long long asset); +#endif + +#if defined(TARGET_OS_IOS) +long long image_bitmap_create_from_bytes(const uint8_t *image_bytes, + uintptr_t image_size, + float image_width, + float image_height, + bool flip_y, + int32_t premultiply_alpha, + int32_t color_space_conversion, + int32_t resize_quality, + float resize_width, + float resize_height); +#endif + +#if defined(TARGET_OS_IOS) +long long image_bitmap_create_from_bytes_src_rect(const uint8_t *image_bytes, + uintptr_t image_size, + float image_width, + float image_height, + float sx, + float sy, + float s_width, + float s_height, + bool flip_y, + int32_t premultiply_alpha, + int32_t color_space_conversion, + int32_t resize_quality, + float resize_width, + float resize_height); +#endif + +#if defined(TARGET_OS_IOS) +long long image_bitmap_create_from_image_asset(long long asset, + bool flip_y, + int premultiply_alpha, + int color_space_conversion, + int resize_quality, + float resize_width, + float resize_height); +#endif + +#if defined(TARGET_OS_IOS) +long long image_bitmap_create_from_image_asset_src_rect(long long asset, + float sx, + float sy, + float s_width, + float s_height, + bool flip_y, + int premultiply_alpha, + int color_space_conversion, + int resize_quality, + float resize_width, + float resize_height); +#endif + +#if defined(TARGET_OS_IOS) +long long image_bitmap_create_from_bytes_encoded(const uint8_t *image_bytes, + uintptr_t image_size, + bool flip_y, + int32_t premultiply_alpha, + int32_t color_space_conversion, + int32_t resize_quality, + float resize_width, + float resize_height); +#endif + +#if defined(TARGET_OS_IOS) +long long image_bitmap_create_from_bytes_encoded_src_rect(const uint8_t *image_bytes, + uintptr_t image_size, + float sx, + float sy, + float s_width, + float s_height, + bool flip_y, + int32_t premultiply_alpha, + int32_t color_space_conversion, + int32_t resize_quality, + float resize_width, + float resize_height); +#endif + +#if defined(TARGET_OS_IOS) +long long image_bitmap_create_from_image_data(long long image_data, + bool flip_y, + int premultiply_alpha, + int color_space_conversion, + int resize_quality, + float resize_width, + float resize_height); +#endif + +#if defined(TARGET_OS_IOS) +long long image_bitmap_create_from_image_data_src_rect(long long image_data, + float sx, + float sy, + float s_width, + float s_height, + bool flip_y, + int premultiply_alpha, + int color_space_conversion, + int resize_quality, + float resize_width, + float resize_height); +#endif + +#if defined(TARGET_OS_IOS) +long long image_data_create(int width, int height); +#endif + +#if defined(TARGET_OS_IOS) +int image_data_width(long long image_data); +#endif + +#if defined(TARGET_OS_IOS) +int image_data_height(long long image_data); +#endif + +#if defined(TARGET_OS_IOS) +uint8_t *image_data_data(long long image_data); +#endif + +#if defined(TARGET_OS_IOS) +uintptr_t image_data_data_length(long long image_data); +#endif + +#if defined(TARGET_OS_IOS) +void destroy_image_data(long long image_data); +#endif + +#if defined(TARGET_OS_IOS) +long long matrix_create(void); +#endif + +#if defined(TARGET_OS_IOS) +void matrix_update(long long matrix, const float *data, uintptr_t data_len); +#endif + +#if defined(TARGET_OS_IOS) +float matrix_a(long long matrix); +#endif + +#if defined(TARGET_OS_IOS) +void matrix_set_a(long long matrix, float a); +#endif + +#if defined(TARGET_OS_IOS) +float matrix_b(long long matrix); +#endif + +#if defined(TARGET_OS_IOS) +void matrix_set_b(long long matrix, float b); +#endif + +#if defined(TARGET_OS_IOS) +float matrix_c(long long matrix); +#endif + +#if defined(TARGET_OS_IOS) +void matrix_set_c(long long matrix, float c); +#endif + +#if defined(TARGET_OS_IOS) +float matrix_d(long long matrix); +#endif + +#if defined(TARGET_OS_IOS) +void matrix_set_d(long long matrix, float d); +#endif + +#if defined(TARGET_OS_IOS) +float matrix_e(long long matrix); +#endif + +#if defined(TARGET_OS_IOS) +void matrix_set_e(long long matrix, float e); +#endif + +#if defined(TARGET_OS_IOS) +float matrix_f(long long matrix); +#endif + +#if defined(TARGET_OS_IOS) +void matrix_set_f(long long matrix, float f); +#endif + +#if defined(TARGET_OS_IOS) +float matrix_m11(long long matrix); +#endif + +#if defined(TARGET_OS_IOS) +void matrix_set_m11(long long matrix, float m11); +#endif + +#if defined(TARGET_OS_IOS) +float matrix_m12(long long matrix); +#endif + +#if defined(TARGET_OS_IOS) +void matrix_set_m12(long long matrix, float m12); +#endif + +#if defined(TARGET_OS_IOS) +float matrix_m13(long long matrix); +#endif + +#if defined(TARGET_OS_IOS) +void matrix_set_m13(long long matrix, float m13); +#endif + +#if defined(TARGET_OS_IOS) +float matrix_m14(long long matrix); +#endif + +#if defined(TARGET_OS_IOS) +void matrix_set_m14(long long matrix, float m14); +#endif + +#if defined(TARGET_OS_IOS) +float matrix_m21(long long matrix); +#endif + +#if defined(TARGET_OS_IOS) +void matrix_set_m21(long long matrix, float m21); +#endif + +#if defined(TARGET_OS_IOS) +float matrix_m22(long long matrix); +#endif + +#if defined(TARGET_OS_IOS) +void matrix_set_m22(long long matrix, float m22); +#endif + +#if defined(TARGET_OS_IOS) +float matrix_m23(long long matrix); +#endif + +#if defined(TARGET_OS_IOS) +void matrix_set_m23(long long matrix, float m23); +#endif + +#if defined(TARGET_OS_IOS) +float matrix_m24(long long matrix); +#endif + +#if defined(TARGET_OS_IOS) +void matrix_set_m24(long long matrix, float m24); +#endif + +#if defined(TARGET_OS_IOS) +float matrix_m31(long long matrix); +#endif + +#if defined(TARGET_OS_IOS) +void matrix_set_m31(long long matrix, float m31); +#endif + +#if defined(TARGET_OS_IOS) +float matrix_m32(long long matrix); +#endif + +#if defined(TARGET_OS_IOS) +void matrix_set_m32(long long matrix, float m32); +#endif + +#if defined(TARGET_OS_IOS) +float matrix_m33(long long matrix); +#endif + +#if defined(TARGET_OS_IOS) +void matrix_set_m33(long long matrix, float m33); +#endif + +#if defined(TARGET_OS_IOS) +float matrix_m34(long long matrix); +#endif + +#if defined(TARGET_OS_IOS) +void matrix_set_m34(long long matrix, float m34); +#endif + +#if defined(TARGET_OS_IOS) +float matrix_m41(long long matrix); +#endif + +#if defined(TARGET_OS_IOS) +void matrix_set_m41(long long matrix, float m41); +#endif + +#if defined(TARGET_OS_IOS) +float matrix_m42(long long matrix); +#endif + +#if defined(TARGET_OS_IOS) +void matrix_set_m42(long long matrix, float m42); +#endif + +#if defined(TARGET_OS_IOS) +float matrix_m43(long long matrix); +#endif + +#if defined(TARGET_OS_IOS) +void matrix_set_m43(long long matrix, float m43); +#endif + +#if defined(TARGET_OS_IOS) +float matrix_m44(long long matrix); +#endif + +#if defined(TARGET_OS_IOS) +void matrix_set_m44(long long matrix, float m44); +#endif + +#if defined(TARGET_OS_IOS) +void destroy_matrix(long long matrix); +#endif + +#if defined(TARGET_OS_IOS) +void paint_style_set_fill_color_with_string(long long context, const char *color); +#endif + +#if defined(TARGET_OS_IOS) +void paint_style_set_stroke_color_with_string(long long context, const char *color); +#endif + +#if defined(TARGET_OS_IOS) +const char *paint_style_get_color_string(long long color); +#endif + +#if defined(TARGET_OS_IOS) +long long path_create(void); +#endif + +#if defined(TARGET_OS_IOS) +long long path_create_with_path(long long path); +#endif + +#if defined(TARGET_OS_IOS) +long long path_create_with_string(const char *string); +#endif + +#if defined(TARGET_OS_IOS) +void path_add_path(long long path, long long path_to_add); +#endif + +#if defined(TARGET_OS_IOS) +void path_add_path_with_matrix(long long path, long long path_to_add, long long matrix); +#endif + +#if defined(TARGET_OS_IOS) +void path_close_path(long long path); +#endif + +#if defined(TARGET_OS_IOS) +void path_move_to(long long path, float x, float y); +#endif + +#if defined(TARGET_OS_IOS) +void path_line_to(long long path, float x, float y); +#endif + +#if defined(TARGET_OS_IOS) +void path_bezier_curve_to(long long path, + float cp1x, + float cp1y, + float cp2x, + float cp2y, + float x, + float y); +#endif + +#if defined(TARGET_OS_IOS) +void path_quadratic_curve_to(long long path, float cpx, float cpy, float x, float y); +#endif + +#if defined(TARGET_OS_IOS) +void path_arc(long long path, + float x, + float y, + float radius, + float start_angle, + float end_angle, + bool anti_clockwise); +#endif + +#if defined(TARGET_OS_IOS) +void path_arc_to(long long path, float x1, float y1, float x2, float y2, float radius); +#endif + +#if defined(TARGET_OS_IOS) +void path_ellipse(long long path, + float x, + float y, + float radius_x, + float radius_y, + float rotation, + float start_angle, + float end_angle, + bool anticlockwise); +#endif + +#if defined(TARGET_OS_IOS) +void path_rect(long long path, float x, float y, float width, float height); +#endif + +#if defined(TARGET_OS_IOS) +void destroy_path(long long path); +#endif + +#if defined(TARGET_OS_IOS) +void pattern_set_transform(long long pattern, long long matrix); +#endif + +#if defined(TARGET_OS_IOS) +void svg_draw_from_string(long long context, const int8_t *svg); +#endif + +#if defined(TARGET_OS_IOS) +void svg_draw_from_path(long long context, const int8_t *path); +#endif + +#if defined(TARGET_OS_IOS) +long long text_decoder_create(const char *decoding); +#endif + +#if defined(TARGET_OS_IOS) +const char *text_decoder_get_encoding(long long decoder); +#endif + +#if defined(TARGET_OS_IOS) +const char *text_decoder_decode(long long decoder, const uint8_t *data, uintptr_t len); +#endif + +#if defined(TARGET_OS_IOS) +const struct U8Array *text_decoder_decode_to_bytes(long long decoder, + const uint8_t *data, + uintptr_t len); +#endif + +#if defined(TARGET_OS_IOS) +const char *text_decoder_decode_u16(long long decoder, const uint16_t *data, uintptr_t len); +#endif + +#if defined(TARGET_OS_IOS) +const char *text_decoder_decode_i16(long long decoder, const int16_t *data, uintptr_t len); +#endif + +#if defined(TARGET_OS_IOS) +const char *text_decoder_decode_i32(long long decoder, const int32_t *data, uintptr_t len); +#endif + +#if defined(TARGET_OS_IOS) +void destroy_text_decoder(long long decoder); +#endif + +#if defined(TARGET_OS_IOS) +struct U8Array *text_decoder_decode_bytes(long long decoder, const uint8_t *data, uintptr_t len); +#endif + +#if defined(TARGET_OS_IOS) +struct U8Array *text_decoder_decode_u16_bytes(long long decoder, + const uint16_t *data, + uintptr_t len); +#endif + +#if defined(TARGET_OS_IOS) +struct U8Array *text_decoder_decode_i16_bytes(long long decoder, + const int16_t *data, + uintptr_t len); +#endif + +#if defined(TARGET_OS_IOS) +struct U8Array *text_decoder_decode_i32_bytes(long long decoder, + const int32_t *data, + uintptr_t len); +#endif + +#if defined(TARGET_OS_IOS) +struct U8Array *text_decoder_decode_u32_bytes(long long decoder, + const uint32_t *data, + uintptr_t len); +#endif + +#if defined(TARGET_OS_IOS) +long long text_encoder_create(const char *encoding); +#endif + +#if defined(TARGET_OS_IOS) +const char *text_encoder_get_encoding(long long encoder); +#endif + +#if defined(TARGET_OS_IOS) +struct U8Array *text_encoder_encode(long long encoder, const char *text); +#endif + +#if defined(TARGET_OS_IOS) +void destroy_text_encoder(long long encoder); +#endif + +#if defined(TARGET_OS_IOS) +float text_metrics_get_width(long long metrics); +#endif + +#if defined(TARGET_OS_IOS) +float text_metrics_get_actual_bounding_box_left(long long metrics); +#endif + +#if defined(TARGET_OS_IOS) +float text_metrics_get_actual_bounding_box_right(long long metrics); +#endif + +#if defined(TARGET_OS_IOS) +float text_metrics_get_actual_bounding_box_ascent(long long metrics); +#endif + +#if defined(TARGET_OS_IOS) +float text_metrics_get_actual_bounding_box_descent(long long metrics); +#endif + +#if defined(TARGET_OS_IOS) +float text_metrics_get_font_bounding_box_ascent(long long metrics); +#endif + +#if defined(TARGET_OS_IOS) +float text_metrics_get_font_bounding_box_descent(long long metrics); +#endif + +#if defined(TARGET_OS_IOS) +float text_metrics_get_em_height_ascent(long long metrics); +#endif + +#if defined(TARGET_OS_IOS) +float text_metrics_get_em_height_descent(long long metrics); +#endif + +#if defined(TARGET_OS_IOS) +float text_metrics_get_hanging_baseline(long long metrics); +#endif + +#if defined(TARGET_OS_IOS) +float text_metrics_get_alphabetic_baseline(long long metrics); +#endif + +#if defined(TARGET_OS_IOS) +float text_metrics_get_ideographic_baseline(long long metrics); +#endif + +#if defined(TARGET_OS_IOS) +void flip_y_in_place(uint8_t *data, uintptr_t length, uintptr_t bytes_per_row, uintptr_t height); +#endif + +#if defined(TARGET_OS_IOS) +void flip_y_in_place_3d(uint8_t *data, + uintptr_t length, + uintptr_t bytes_per_row, + uintptr_t height, + uintptr_t depth); +#endif + +#if defined(TARGET_OS_IOS) +void flip_y_in_place_3d_i8(int8_t *data, + uintptr_t length, + uintptr_t bytes_per_row, + uintptr_t height, + uintptr_t depth); +#endif + +#if defined(TARGET_OS_IOS) +void flip_y_in_place_3d_u16(uint16_t *data, + uintptr_t length, + uintptr_t bytes_per_row, + uintptr_t height, + uintptr_t depth); +#endif + +#if defined(TARGET_OS_IOS) +void flip_y_in_place_3d_i16(int16_t *data, + uintptr_t length, + uintptr_t bytes_per_row, + uintptr_t height, + uintptr_t depth); +#endif + +#if defined(TARGET_OS_IOS) +void flip_y_in_place_3d_u32(uint32_t *data, + uintptr_t length, + uintptr_t bytes_per_row, + uintptr_t height, + uintptr_t depth); +#endif + +#if defined(TARGET_OS_IOS) +void flip_y_in_place_3d_i32(int32_t *data, + uintptr_t length, + uintptr_t bytes_per_row, + uintptr_t height, + uintptr_t depth); +#endif + +#if defined(TARGET_OS_IOS) +void flip_y_in_place_3d_f32(float *data, + uintptr_t length, + uintptr_t bytes_per_row, + uintptr_t height, + uintptr_t depth); +#endif + +#if defined(TARGET_OS_IOS) +void flip_y_in_place_3d_f64(double *data, + uintptr_t length, + uintptr_t bytes_per_row, + uintptr_t height, + uintptr_t depth); +#endif + +#if defined(TARGET_OS_IOS) +void flip_y_in_place_i8(int8_t *data, uintptr_t length, uintptr_t bytes_per_row, uintptr_t height); +#endif + +#if defined(TARGET_OS_IOS) +void flip_y_in_place_u16(uint16_t *data, + uintptr_t length, + uintptr_t bytes_per_row, + uintptr_t height); +#endif + +#if defined(TARGET_OS_IOS) +void flip_y_in_place_i16(int16_t *data, + uintptr_t length, + uintptr_t bytes_per_row, + uintptr_t height); +#endif + +#if defined(TARGET_OS_IOS) +void flip_y_in_place_u32(uint32_t *data, + uintptr_t length, + uintptr_t bytes_per_row, + uintptr_t height); +#endif + +#if defined(TARGET_OS_IOS) +void flip_y_in_place_i32(int32_t *data, + uintptr_t length, + uintptr_t bytes_per_row, + uintptr_t height); +#endif + +#if defined(TARGET_OS_IOS) +void flip_y_in_place_f32(float *data, uintptr_t length, uintptr_t bytes_per_row, uintptr_t height); +#endif + +#if defined(TARGET_OS_IOS) +void flip_y_in_place_f64(double *data, uintptr_t length, uintptr_t bytes_per_row, uintptr_t height); +#endif + +#endif /* CBINDGEN_BINDINGS_H */ diff --git a/packages/canvas/src-native/canvas-ios/CanvasNative/Dist/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Info.plist b/packages/canvas/src-native/canvas-ios/dist/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Info.plist similarity index 60% rename from packages/canvas/src-native/canvas-ios/CanvasNative/Dist/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Info.plist rename to packages/canvas/src-native/canvas-ios/dist/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Info.plist index bc0c7c66..cf6c85af 100644 Binary files a/packages/canvas/src-native/canvas-ios/CanvasNative/Dist/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Info.plist and b/packages/canvas/src-native/canvas-ios/dist/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Info.plist differ diff --git a/packages/canvas/src-native/canvas-ios/CanvasNative/Dist/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64-apple-ios.swiftdoc b/packages/canvas/src-native/canvas-ios/dist/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64-apple-ios.swiftdoc similarity index 56% rename from packages/canvas/src-native/canvas-ios/CanvasNative/Dist/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64-apple-ios.swiftdoc rename to packages/canvas/src-native/canvas-ios/dist/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64-apple-ios.swiftdoc index 7a6687b0..6519fe7e 100644 Binary files a/packages/canvas/src-native/canvas-ios/CanvasNative/Dist/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64-apple-ios.swiftdoc and b/packages/canvas/src-native/canvas-ios/dist/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64-apple-ios.swiftdoc differ diff --git a/packages/canvas/src-native/canvas-ios/CanvasNative/Dist/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64-apple-ios.swiftinterface b/packages/canvas/src-native/canvas-ios/dist/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64-apple-ios.swiftinterface similarity index 96% rename from packages/canvas/src-native/canvas-ios/CanvasNative/Dist/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64-apple-ios.swiftinterface rename to packages/canvas/src-native/canvas-ios/dist/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64-apple-ios.swiftinterface index ca4c1838..5175733d 100644 --- a/packages/canvas/src-native/canvas-ios/CanvasNative/Dist/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64-apple-ios.swiftinterface +++ b/packages/canvas/src-native/canvas-ios/dist/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64-apple-ios.swiftinterface @@ -1,6 +1,6 @@ // swift-interface-format-version: 1.0 -// swift-compiler-version: Apple Swift version 5.4 (swiftlang-1205.0.26.9 clang-1205.0.19.55) -// swift-module-flags: -target arm64-apple-ios10.0 -enable-objc-interop -enable-library-evolution -swift-version 5 -enforce-exclusivity=checked -O -module-name CanvasNative +// swift-compiler-version: Apple Swift version 5.5.1 (swiftlang-1300.0.31.4 clang-1300.0.29.6) +// swift-module-flags: -target arm64-apple-ios11.0 -enable-objc-interop -enable-library-evolution -swift-version 5 -enforce-exclusivity=checked -O -module-name CanvasNative import AVFoundation @_exported import CanvasNative import CoreVideo @@ -10,6 +10,7 @@ import MetalKit import OpenGLES import Swift import UIKit +import _Concurrency @_inheritsConvenienceInitializers @_hasMissingDesignatedInitializers @objcMembers @objc(TNSDOMMatrix) public class TNSDOMMatrix : ObjectiveC.NSObject { @objc override dynamic public init() @objc public var a: Swift.Float { @@ -180,7 +181,6 @@ import UIKit @objc get } @objc deinit - @objc override dynamic public init() } @objc(TNSTextDirection) public enum TNSTextDirection : Swift.Int, Swift.RawRepresentable { case Ltr @@ -216,7 +216,6 @@ import UIKit @objc public func drawArraysInstancedANGLE(mode: Swift.Int32, first: Swift.Int32, count: Swift.Int32, primcount: Swift.Int32) @objc public func drawElementsInstancedANGLE(mode: Swift.Int32, count: Swift.Int32, type: Swift.Int32, offset: Swift.Int32, primcount: Swift.Int32) @objc public func vertexAttribDivisorANGLE(index: Swift.Int32, divisor: Swift.Int32) - @objc override dynamic public init() @objc deinit } @_inheritsConvenienceInitializers @objcMembers @objc(TNS_EXT_blend_minmax) public class TNS_EXT_blend_minmax : ObjectiveC.NSObject { @@ -229,59 +228,58 @@ import UIKit } @objc deinit } -@_hasMissingDesignatedInitializers @objcMembers @objc(TNSCanvas) public class TNSCanvas : UIKit.UIView, CanvasNative.RenderListener { - @objc public static func getViews() -> Foundation.NSMapTable - @objc public func getViewPtr() -> Swift.UnsafeMutableRawPointer? - @objc public var ignorePixelScaling: Swift.Bool { +@_hasMissingDesignatedInitializers @objcMembers @objc(TNSCanvas) @_Concurrency.MainActor(unsafe) public class TNSCanvas : UIKit.UIView, CanvasNative.RenderListener { + @objc @_Concurrency.MainActor(unsafe) public static func getViews() -> Foundation.NSMapTable + @objc @_Concurrency.MainActor(unsafe) public func getViewPtr() -> Swift.UnsafeMutableRawPointer? + @objc @_Concurrency.MainActor(unsafe) public var ignorePixelScaling: Swift.Bool { @objc get @objc set } - @objc public static func createSVGMatrix() -> CanvasNative.TNSDOMMatrix - @objc public var handleInvalidationManually: Swift.Bool { + @objc @_Concurrency.MainActor(unsafe) public static func createSVGMatrix() -> CanvasNative.TNSDOMMatrix + @objc @_Concurrency.MainActor(unsafe) public var handleInvalidationManually: Swift.Bool { @objc get @objc set } - @objc public func didDraw() - @objc public func toDataURL() -> Swift.String - @objc public func toDataURL(_ type: Swift.String) -> Swift.String - @objc public func toDataURL(_ type: Swift.String, _ format: Swift.Float) -> Swift.String - @objc public func toDataURLAsync(_ callback: @escaping (Swift.String) -> Swift.Void) - @objc public func toDataURLAsync(_ type: Swift.String, _ callback: @escaping (Swift.String) -> Swift.Void) - @objc public func toDataURLAsync(_ type: Swift.String, _ format: Swift.Float, _ callback: @escaping (Swift.String) -> Swift.Void) - @objc public func snapshot() -> [Swift.UInt8] - @objc public var isGL: Swift.Bool { + @objc @_Concurrency.MainActor(unsafe) public func didDraw() + @objc @_Concurrency.MainActor(unsafe) public func toDataURL() -> Swift.String + @objc @_Concurrency.MainActor(unsafe) public func toDataURL(_ type: Swift.String) -> Swift.String + @objc @_Concurrency.MainActor(unsafe) public func toDataURL(_ type: Swift.String, _ format: Swift.Float) -> Swift.String + @objc @_Concurrency.MainActor(unsafe) public func toDataURLAsync(_ callback: @escaping (Swift.String) -> Swift.Void) + @objc @_Concurrency.MainActor(unsafe) public func toDataURLAsync(_ type: Swift.String, _ callback: @escaping (Swift.String) -> Swift.Void) + @objc @_Concurrency.MainActor(unsafe) public func toDataURLAsync(_ type: Swift.String, _ format: Swift.Float, _ callback: @escaping (Swift.String) -> Swift.Void) + @objc @_Concurrency.MainActor(unsafe) public func snapshot() -> [Swift.UInt8] + @objc @_Concurrency.MainActor(unsafe) public var isGL: Swift.Bool { @objc get } - @objc public func getId() -> OpenGLES.GLint - @objc public var width: Swift.Float { + @objc @_Concurrency.MainActor(unsafe) public func getId() -> OpenGLES.GLint + @objc @_Concurrency.MainActor(unsafe) public var width: Swift.Float { @objc get } - @objc public var height: Swift.Float { + @objc @_Concurrency.MainActor(unsafe) public var height: Swift.Float { @objc get } - @objc public func updateDirection(_ direction: Swift.String) - @objc public var context: Swift.Int64 { + @objc @_Concurrency.MainActor(unsafe) public func updateDirection(_ direction: Swift.String) + @objc @_Concurrency.MainActor(unsafe) public var context: Swift.Int64 { @objc get @objc set } - @objc public func doDraw() - @objc public func flush() - @objc public init(frame: CoreGraphics.CGRect, useCpu: Swift.Bool) - @objc public func setListener(_ listener: CanvasNative.TNSCanvasListener?) - @objc public var fps: Swift.Float { + @objc @_Concurrency.MainActor(unsafe) public func doDraw() + @objc @_Concurrency.MainActor(unsafe) public func flush() + @objc @_Concurrency.MainActor(unsafe) public init(frame: CoreGraphics.CGRect, useCpu: Swift.Bool) + @objc @_Concurrency.MainActor(unsafe) public func setListener(_ listener: CanvasNative.TNSCanvasListener?) + @objc @_Concurrency.MainActor(unsafe) public var fps: Swift.Float { @objc get } - @objc override dynamic public func layoutSubviews() + @_Concurrency.MainActor(unsafe) @objc override dynamic public func layoutSubviews() @objc deinit - @objc public func resume() - @objc public func pause() - @objc public func moveToMain() - @objc public func moveOffMain() - @objc public func handleMoveOffMain() - @objc public func handleMoveToMain() - @objc public func getContext(_ type: Swift.String) -> CanvasNative.TNSCanvasRenderingContext? - @objc public func getContext(_ type: Swift.String, contextAttributes: Foundation.NSDictionary) -> CanvasNative.TNSCanvasRenderingContext? - @objc override dynamic public init(frame: CoreGraphics.CGRect) + @objc @_Concurrency.MainActor(unsafe) public func resume() + @objc @_Concurrency.MainActor(unsafe) public func pause() + @objc @_Concurrency.MainActor(unsafe) public func moveToMain() + @objc @_Concurrency.MainActor(unsafe) public func moveOffMain() + @objc @_Concurrency.MainActor(unsafe) public func handleMoveOffMain() + @objc @_Concurrency.MainActor(unsafe) public func handleMoveToMain() + @objc @_Concurrency.MainActor(unsafe) public func getContext(_ type: Swift.String) -> CanvasNative.TNSCanvasRenderingContext? + @objc @_Concurrency.MainActor(unsafe) public func getContext(_ type: Swift.String, contextAttributes: Foundation.NSDictionary) -> CanvasNative.TNSCanvasRenderingContext? } @_inheritsConvenienceInitializers @objcMembers @objc(TNSTextEncoder) public class TNSTextEncoder : ObjectiveC.NSObject { @objc override dynamic public init() @@ -321,7 +319,7 @@ import UIKit } @objc deinit } -extension RangeReplaceableCollection { +extension Swift.RangeReplaceableCollection { public mutating func resize(_ size: Swift.Int, fillWith value: Self.Iterator.Element) } @objc(TNSLineJoin) public enum TNSLineJoin : Swift.Int, Swift.RawRepresentable { @@ -444,6 +442,8 @@ extension RangeReplaceableCollection { @objc public func samplerParameterf(_ sampler: Swift.UInt32, _ pname: Swift.UInt32, _ param: Swift.Float) @objc public func texImage3D(_ target: Swift.UInt32, _ level: Swift.Int32, _ internalformat: Swift.Int32, _ width: Swift.Int32, _ height: Swift.Int32, _ depth: Swift.Int32, _ border: Swift.Int32, _ format: Swift.UInt32, _ type: Swift.UInt32, data: Foundation.NSData) @objc public func texImage3D(_ target: Swift.UInt32, _ level: Swift.Int32, _ internalformat: Swift.Int32, _ width: Swift.Int32, _ height: Swift.Int32, _ depth: Swift.Int32, _ border: Swift.Int32, _ format: Swift.UInt32, _ type: Swift.UInt32, offset: Swift.Int) + @objc public func texImage3D(_ target: Swift.UInt32, _ level: Swift.Int32, _ internalformat: Swift.Int32, _ width: Swift.Int32, _ height: Swift.Int32, _ depth: Swift.Int32, _ border: Swift.Int32, _ format: Swift.UInt32, _ type: Swift.UInt32, pixels: Swift.UnsafeRawPointer, size: Swift.Int) + @objc public func texImage3D(_ target: Swift.UInt32, _ level: Swift.Int32, _ internalformat: Swift.Int32, _ width: Swift.Int32, _ height: Swift.Int32, _ depth: Swift.Int32, _ border: Swift.Int32, _ format: Swift.UInt32, _ type: Swift.UInt32, pixels: Swift.UnsafeRawPointer, size: Swift.Int, pixelOffset: Swift.Int, srcOffset: Swift.Int32) @objc public func texImage3D(_ target: Swift.UInt32, _ level: Swift.Int32, _ internalformat: Swift.Int32, _ width: Swift.Int32, _ height: Swift.Int32, _ depth: Swift.Int32, _ border: Swift.Int32, _ format: Swift.UInt32, _ type: Swift.UInt32, i8 source: [Swift.Int8]) @objc public func texImage3D(_ target: Swift.UInt32, _ level: Swift.Int32, _ internalformat: Swift.Int32, _ width: Swift.Int32, _ height: Swift.Int32, _ depth: Swift.Int32, _ border: Swift.Int32, _ format: Swift.UInt32, _ type: Swift.UInt32, u8 source: [Swift.UInt8]) @objc public func texImage3D(_ target: Swift.UInt32, _ level: Swift.Int32, _ internalformat: Swift.Int32, _ width: Swift.Int32, _ height: Swift.Int32, _ depth: Swift.Int32, _ border: Swift.Int32, _ format: Swift.UInt32, _ type: Swift.UInt32, i16 source: [Swift.Int16]) @@ -1411,7 +1411,6 @@ extension RangeReplaceableCollection { @objc get } @objc public init(name: Swift.String, size: Swift.Int32, type: Swift.UInt32) - @objc override dynamic public init() @objc deinit } @_inheritsConvenienceInitializers @objcMembers @objc(TNSRender) public class TNSRender : ObjectiveC.NSObject { @@ -1419,22 +1418,22 @@ extension RangeReplaceableCollection { @objc public func createSurface() @objc deinit } -@_inheritsConvenienceInitializers @_hasMissingDesignatedInitializers @objcMembers @objc(TNSSVG) public class TNSSVG : UIKit.UIView { - @objc public var ignorePixelScaling: Swift.Bool { +@_inheritsConvenienceInitializers @_hasMissingDesignatedInitializers @objcMembers @objc(TNSSVG) @_Concurrency.MainActor(unsafe) public class TNSSVG : UIKit.UIView { + @objc @_Concurrency.MainActor(unsafe) public var ignorePixelScaling: Swift.Bool { @objc get @objc set } - @objc public var src: Swift.String? { + @objc @_Concurrency.MainActor(unsafe) public var src: Swift.String? { @objc get @objc set } - @objc public var srcPath: Swift.String? { + @objc @_Concurrency.MainActor(unsafe) public var srcPath: Swift.String? { @objc get @objc set } - @objc override dynamic public func layoutSubviews() - @objc override dynamic public init(frame: CoreGraphics.CGRect) - @objc override dynamic public func draw(_ rect: CoreGraphics.CGRect) + @_Concurrency.MainActor(unsafe) @objc override dynamic public func layoutSubviews() + @_Concurrency.MainActor(unsafe) @objc override dynamic public init(frame: CoreGraphics.CGRect) + @_Concurrency.MainActor(unsafe) @objc override dynamic public func draw(_ rect: CoreGraphics.CGRect) @objc deinit } @objcMembers @objc(TNSWebGLRenderingContext) public class TNSWebGLRenderingContext : CanvasNative.TNSCanvasRenderingContext { @@ -2532,7 +2531,6 @@ extension RangeReplaceableCollection { @objc public var UNPACK_PREMULTIPLY_ALPHA_WEBGL: Swift.UInt32 { @objc get } - @objc override dynamic public init() @objc deinit } @_hasMissingDesignatedInitializers @objcMembers @objc(TNSImageBitmap) public class TNSImageBitmap : ObjectiveC.NSObject { @@ -2568,7 +2566,6 @@ extension RangeReplaceableCollection { @objc get } @objc deinit - @objc override dynamic public init() } @_inheritsConvenienceInitializers @objcMembers @objc(TNS_OES_fbo_render_mipmap) public class TNS_OES_fbo_render_mipmap : ObjectiveC.NSObject { @objc override dynamic public init() @@ -2604,7 +2601,6 @@ extension RangeReplaceableCollection { @objc get } @objc public init(rangeMin: Swift.Int32, rangeMax: Swift.Int32, precision: Swift.Int32) - @objc override dynamic public init() @objc deinit } @_inheritsConvenienceInitializers @objcMembers @objc(TNS_OES_texture_half_float_linear) public class TNS_OES_texture_half_float_linear : ObjectiveC.NSObject { @@ -2764,14 +2760,12 @@ extension RangeReplaceableCollection { @objc public func isPointInPath(_ path: CanvasNative.TNSPath2D, _ x: Swift.Float, _ y: Swift.Float, _ fillRule: CanvasNative.TNSFillRule) -> Swift.Bool @objc public func isPointInStroke(_ x: Swift.Float, _ y: Swift.Float) -> Swift.Bool @objc public func isPointInStroke(_ path: CanvasNative.TNSPath2D, _ x: Swift.Float, _ y: Swift.Float) -> Swift.Bool - @objc override dynamic public init() @objc deinit } @objcMembers @objc(TNS_WEBGL_lose_context) public class TNS_WEBGL_lose_context : ObjectiveC.NSObject { @objc public init(canvas: CanvasNative.TNSCanvas) @objc public func loseContext() @objc public func restoreContext() - @objc override dynamic public init() @objc deinit } @_inheritsConvenienceInitializers @objcMembers @objc(TNS_WEBGL_compressed_texture_etc) public class TNS_WEBGL_compressed_texture_etc : ObjectiveC.NSObject { @@ -2838,19 +2832,18 @@ extension RangeReplaceableCollection { public init?(rawValue: CanvasNative.TNSTextBaseLine.RawValue) public init?(string: Swift.String) } -@_hasMissingDesignatedInitializers @objcMembers @objc(CanvasGLKView) public class CanvasGLKView : GLKit.GLKView { +@_hasMissingDesignatedInitializers @objcMembers @objc(CanvasGLKView) @_Concurrency.MainActor(unsafe) public class CanvasGLKView : GLKit.GLKView { @objc dynamic public init() - @objc override dynamic public init(frame: CoreGraphics.CGRect) - @objc override dynamic public func setNeedsDisplay() - @objc override dynamic public func setNeedsDisplay(_ rect: CoreGraphics.CGRect) - @objc override dynamic public init(frame: CoreGraphics.CGRect, context: OpenGLES.EAGLContext) + @_Concurrency.MainActor(unsafe) @objc override dynamic public init(frame: CoreGraphics.CGRect) + @_Concurrency.MainActor(unsafe) @objc override dynamic public func setNeedsDisplay() + @_Concurrency.MainActor(unsafe) @objc override dynamic public func setNeedsDisplay(_ rect: CoreGraphics.CGRect) @objc deinit } -@_inheritsConvenienceInitializers @_hasMissingDesignatedInitializers @objcMembers @objc(CanvasCPUView) public class CanvasCPUView : UIKit.UIView { - @objc public var ignorePixelScaling: Swift.Bool +@_inheritsConvenienceInitializers @_hasMissingDesignatedInitializers @objcMembers @objc(CanvasCPUView) @_Concurrency.MainActor(unsafe) public class CanvasCPUView : UIKit.UIView { + @objc @_Concurrency.MainActor(unsafe) public var ignorePixelScaling: Swift.Bool @objc dynamic public init() - @objc override dynamic public init(frame: CoreGraphics.CGRect) - @objc override dynamic public func draw(_ rect: CoreGraphics.CGRect) + @_Concurrency.MainActor(unsafe) @objc override dynamic public init(frame: CoreGraphics.CGRect) + @_Concurrency.MainActor(unsafe) @objc override dynamic public func draw(_ rect: CoreGraphics.CGRect) @objc deinit } public protocol RenderListener { @@ -2909,7 +2902,6 @@ public enum ContextType : Swift.Int, Swift.RawRepresentable { public func pause() public func resume() @objc public func glkView(_ view: GLKit.GLKView, drawIn rect: CoreGraphics.CGRect) - @objc override dynamic public init() } @_inheritsConvenienceInitializers @_hasMissingDesignatedInitializers @objcMembers @objc(TNSIndexedParameter) public class TNSIndexedParameter : ObjectiveC.NSObject { @objc deinit @@ -3173,13 +3165,11 @@ public enum ContextType : Swift.Int, Swift.RawRepresentable { @objc get } @objc public func getStyleType() -> CanvasNative.CanvasColorStyleType - @objc override dynamic public init() @objc deinit } @_hasMissingDesignatedInitializers @objcMembers @objc(TNSGradient) public class TNSGradient : ObjectiveC.NSObject, CanvasNative.ICanvasColorStyle { @objc public func getStyleType() -> CanvasNative.CanvasColorStyleType @objc public func addColorStop(_ offset: Swift.Float, _ color: Swift.String) - @objc override dynamic public init() @objc deinit } @_inheritsConvenienceInitializers @_hasMissingDesignatedInitializers @objcMembers @objc(TNSLinearGradient) public class TNSLinearGradient : CanvasNative.TNSColorStyle.TNSGradient { @@ -3192,7 +3182,6 @@ public enum ContextType : Swift.Int, Swift.RawRepresentable { @objc public func setTransform(matrix: CanvasNative.TNSDOMMatrix) @objc deinit @objc public func getStyleType() -> CanvasNative.CanvasColorStyleType - @objc override dynamic public init() } @objc override dynamic public init() @objc deinit @@ -3235,7 +3224,6 @@ public enum ContextType : Swift.Int, Swift.RawRepresentable { @objc public var ideographicBaseline: Swift.Float { @objc get } - @objc override dynamic public init() } extension CanvasNative.TNSTextAlignment : Swift.Equatable {} extension CanvasNative.TNSTextAlignment : Swift.Hashable {} diff --git a/packages/canvas/src-native/canvas-ios/CanvasNative/Dist/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64.swiftdoc b/packages/canvas/src-native/canvas-ios/dist/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64.swiftdoc similarity index 56% rename from packages/canvas/src-native/canvas-ios/CanvasNative/Dist/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64.swiftdoc rename to packages/canvas/src-native/canvas-ios/dist/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64.swiftdoc index 7a6687b0..6519fe7e 100644 Binary files a/packages/canvas/src-native/canvas-ios/CanvasNative/Dist/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64.swiftdoc and b/packages/canvas/src-native/canvas-ios/dist/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64.swiftdoc differ diff --git a/packages/canvas/src-native/canvas-ios/CanvasNative/Dist/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64.swiftinterface b/packages/canvas/src-native/canvas-ios/dist/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64.swiftinterface similarity index 96% rename from packages/canvas/src-native/canvas-ios/CanvasNative/Dist/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64.swiftinterface rename to packages/canvas/src-native/canvas-ios/dist/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64.swiftinterface index ca4c1838..5175733d 100644 --- a/packages/canvas/src-native/canvas-ios/CanvasNative/Dist/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64.swiftinterface +++ b/packages/canvas/src-native/canvas-ios/dist/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64.swiftinterface @@ -1,6 +1,6 @@ // swift-interface-format-version: 1.0 -// swift-compiler-version: Apple Swift version 5.4 (swiftlang-1205.0.26.9 clang-1205.0.19.55) -// swift-module-flags: -target arm64-apple-ios10.0 -enable-objc-interop -enable-library-evolution -swift-version 5 -enforce-exclusivity=checked -O -module-name CanvasNative +// swift-compiler-version: Apple Swift version 5.5.1 (swiftlang-1300.0.31.4 clang-1300.0.29.6) +// swift-module-flags: -target arm64-apple-ios11.0 -enable-objc-interop -enable-library-evolution -swift-version 5 -enforce-exclusivity=checked -O -module-name CanvasNative import AVFoundation @_exported import CanvasNative import CoreVideo @@ -10,6 +10,7 @@ import MetalKit import OpenGLES import Swift import UIKit +import _Concurrency @_inheritsConvenienceInitializers @_hasMissingDesignatedInitializers @objcMembers @objc(TNSDOMMatrix) public class TNSDOMMatrix : ObjectiveC.NSObject { @objc override dynamic public init() @objc public var a: Swift.Float { @@ -180,7 +181,6 @@ import UIKit @objc get } @objc deinit - @objc override dynamic public init() } @objc(TNSTextDirection) public enum TNSTextDirection : Swift.Int, Swift.RawRepresentable { case Ltr @@ -216,7 +216,6 @@ import UIKit @objc public func drawArraysInstancedANGLE(mode: Swift.Int32, first: Swift.Int32, count: Swift.Int32, primcount: Swift.Int32) @objc public func drawElementsInstancedANGLE(mode: Swift.Int32, count: Swift.Int32, type: Swift.Int32, offset: Swift.Int32, primcount: Swift.Int32) @objc public func vertexAttribDivisorANGLE(index: Swift.Int32, divisor: Swift.Int32) - @objc override dynamic public init() @objc deinit } @_inheritsConvenienceInitializers @objcMembers @objc(TNS_EXT_blend_minmax) public class TNS_EXT_blend_minmax : ObjectiveC.NSObject { @@ -229,59 +228,58 @@ import UIKit } @objc deinit } -@_hasMissingDesignatedInitializers @objcMembers @objc(TNSCanvas) public class TNSCanvas : UIKit.UIView, CanvasNative.RenderListener { - @objc public static func getViews() -> Foundation.NSMapTable - @objc public func getViewPtr() -> Swift.UnsafeMutableRawPointer? - @objc public var ignorePixelScaling: Swift.Bool { +@_hasMissingDesignatedInitializers @objcMembers @objc(TNSCanvas) @_Concurrency.MainActor(unsafe) public class TNSCanvas : UIKit.UIView, CanvasNative.RenderListener { + @objc @_Concurrency.MainActor(unsafe) public static func getViews() -> Foundation.NSMapTable + @objc @_Concurrency.MainActor(unsafe) public func getViewPtr() -> Swift.UnsafeMutableRawPointer? + @objc @_Concurrency.MainActor(unsafe) public var ignorePixelScaling: Swift.Bool { @objc get @objc set } - @objc public static func createSVGMatrix() -> CanvasNative.TNSDOMMatrix - @objc public var handleInvalidationManually: Swift.Bool { + @objc @_Concurrency.MainActor(unsafe) public static func createSVGMatrix() -> CanvasNative.TNSDOMMatrix + @objc @_Concurrency.MainActor(unsafe) public var handleInvalidationManually: Swift.Bool { @objc get @objc set } - @objc public func didDraw() - @objc public func toDataURL() -> Swift.String - @objc public func toDataURL(_ type: Swift.String) -> Swift.String - @objc public func toDataURL(_ type: Swift.String, _ format: Swift.Float) -> Swift.String - @objc public func toDataURLAsync(_ callback: @escaping (Swift.String) -> Swift.Void) - @objc public func toDataURLAsync(_ type: Swift.String, _ callback: @escaping (Swift.String) -> Swift.Void) - @objc public func toDataURLAsync(_ type: Swift.String, _ format: Swift.Float, _ callback: @escaping (Swift.String) -> Swift.Void) - @objc public func snapshot() -> [Swift.UInt8] - @objc public var isGL: Swift.Bool { + @objc @_Concurrency.MainActor(unsafe) public func didDraw() + @objc @_Concurrency.MainActor(unsafe) public func toDataURL() -> Swift.String + @objc @_Concurrency.MainActor(unsafe) public func toDataURL(_ type: Swift.String) -> Swift.String + @objc @_Concurrency.MainActor(unsafe) public func toDataURL(_ type: Swift.String, _ format: Swift.Float) -> Swift.String + @objc @_Concurrency.MainActor(unsafe) public func toDataURLAsync(_ callback: @escaping (Swift.String) -> Swift.Void) + @objc @_Concurrency.MainActor(unsafe) public func toDataURLAsync(_ type: Swift.String, _ callback: @escaping (Swift.String) -> Swift.Void) + @objc @_Concurrency.MainActor(unsafe) public func toDataURLAsync(_ type: Swift.String, _ format: Swift.Float, _ callback: @escaping (Swift.String) -> Swift.Void) + @objc @_Concurrency.MainActor(unsafe) public func snapshot() -> [Swift.UInt8] + @objc @_Concurrency.MainActor(unsafe) public var isGL: Swift.Bool { @objc get } - @objc public func getId() -> OpenGLES.GLint - @objc public var width: Swift.Float { + @objc @_Concurrency.MainActor(unsafe) public func getId() -> OpenGLES.GLint + @objc @_Concurrency.MainActor(unsafe) public var width: Swift.Float { @objc get } - @objc public var height: Swift.Float { + @objc @_Concurrency.MainActor(unsafe) public var height: Swift.Float { @objc get } - @objc public func updateDirection(_ direction: Swift.String) - @objc public var context: Swift.Int64 { + @objc @_Concurrency.MainActor(unsafe) public func updateDirection(_ direction: Swift.String) + @objc @_Concurrency.MainActor(unsafe) public var context: Swift.Int64 { @objc get @objc set } - @objc public func doDraw() - @objc public func flush() - @objc public init(frame: CoreGraphics.CGRect, useCpu: Swift.Bool) - @objc public func setListener(_ listener: CanvasNative.TNSCanvasListener?) - @objc public var fps: Swift.Float { + @objc @_Concurrency.MainActor(unsafe) public func doDraw() + @objc @_Concurrency.MainActor(unsafe) public func flush() + @objc @_Concurrency.MainActor(unsafe) public init(frame: CoreGraphics.CGRect, useCpu: Swift.Bool) + @objc @_Concurrency.MainActor(unsafe) public func setListener(_ listener: CanvasNative.TNSCanvasListener?) + @objc @_Concurrency.MainActor(unsafe) public var fps: Swift.Float { @objc get } - @objc override dynamic public func layoutSubviews() + @_Concurrency.MainActor(unsafe) @objc override dynamic public func layoutSubviews() @objc deinit - @objc public func resume() - @objc public func pause() - @objc public func moveToMain() - @objc public func moveOffMain() - @objc public func handleMoveOffMain() - @objc public func handleMoveToMain() - @objc public func getContext(_ type: Swift.String) -> CanvasNative.TNSCanvasRenderingContext? - @objc public func getContext(_ type: Swift.String, contextAttributes: Foundation.NSDictionary) -> CanvasNative.TNSCanvasRenderingContext? - @objc override dynamic public init(frame: CoreGraphics.CGRect) + @objc @_Concurrency.MainActor(unsafe) public func resume() + @objc @_Concurrency.MainActor(unsafe) public func pause() + @objc @_Concurrency.MainActor(unsafe) public func moveToMain() + @objc @_Concurrency.MainActor(unsafe) public func moveOffMain() + @objc @_Concurrency.MainActor(unsafe) public func handleMoveOffMain() + @objc @_Concurrency.MainActor(unsafe) public func handleMoveToMain() + @objc @_Concurrency.MainActor(unsafe) public func getContext(_ type: Swift.String) -> CanvasNative.TNSCanvasRenderingContext? + @objc @_Concurrency.MainActor(unsafe) public func getContext(_ type: Swift.String, contextAttributes: Foundation.NSDictionary) -> CanvasNative.TNSCanvasRenderingContext? } @_inheritsConvenienceInitializers @objcMembers @objc(TNSTextEncoder) public class TNSTextEncoder : ObjectiveC.NSObject { @objc override dynamic public init() @@ -321,7 +319,7 @@ import UIKit } @objc deinit } -extension RangeReplaceableCollection { +extension Swift.RangeReplaceableCollection { public mutating func resize(_ size: Swift.Int, fillWith value: Self.Iterator.Element) } @objc(TNSLineJoin) public enum TNSLineJoin : Swift.Int, Swift.RawRepresentable { @@ -444,6 +442,8 @@ extension RangeReplaceableCollection { @objc public func samplerParameterf(_ sampler: Swift.UInt32, _ pname: Swift.UInt32, _ param: Swift.Float) @objc public func texImage3D(_ target: Swift.UInt32, _ level: Swift.Int32, _ internalformat: Swift.Int32, _ width: Swift.Int32, _ height: Swift.Int32, _ depth: Swift.Int32, _ border: Swift.Int32, _ format: Swift.UInt32, _ type: Swift.UInt32, data: Foundation.NSData) @objc public func texImage3D(_ target: Swift.UInt32, _ level: Swift.Int32, _ internalformat: Swift.Int32, _ width: Swift.Int32, _ height: Swift.Int32, _ depth: Swift.Int32, _ border: Swift.Int32, _ format: Swift.UInt32, _ type: Swift.UInt32, offset: Swift.Int) + @objc public func texImage3D(_ target: Swift.UInt32, _ level: Swift.Int32, _ internalformat: Swift.Int32, _ width: Swift.Int32, _ height: Swift.Int32, _ depth: Swift.Int32, _ border: Swift.Int32, _ format: Swift.UInt32, _ type: Swift.UInt32, pixels: Swift.UnsafeRawPointer, size: Swift.Int) + @objc public func texImage3D(_ target: Swift.UInt32, _ level: Swift.Int32, _ internalformat: Swift.Int32, _ width: Swift.Int32, _ height: Swift.Int32, _ depth: Swift.Int32, _ border: Swift.Int32, _ format: Swift.UInt32, _ type: Swift.UInt32, pixels: Swift.UnsafeRawPointer, size: Swift.Int, pixelOffset: Swift.Int, srcOffset: Swift.Int32) @objc public func texImage3D(_ target: Swift.UInt32, _ level: Swift.Int32, _ internalformat: Swift.Int32, _ width: Swift.Int32, _ height: Swift.Int32, _ depth: Swift.Int32, _ border: Swift.Int32, _ format: Swift.UInt32, _ type: Swift.UInt32, i8 source: [Swift.Int8]) @objc public func texImage3D(_ target: Swift.UInt32, _ level: Swift.Int32, _ internalformat: Swift.Int32, _ width: Swift.Int32, _ height: Swift.Int32, _ depth: Swift.Int32, _ border: Swift.Int32, _ format: Swift.UInt32, _ type: Swift.UInt32, u8 source: [Swift.UInt8]) @objc public func texImage3D(_ target: Swift.UInt32, _ level: Swift.Int32, _ internalformat: Swift.Int32, _ width: Swift.Int32, _ height: Swift.Int32, _ depth: Swift.Int32, _ border: Swift.Int32, _ format: Swift.UInt32, _ type: Swift.UInt32, i16 source: [Swift.Int16]) @@ -1411,7 +1411,6 @@ extension RangeReplaceableCollection { @objc get } @objc public init(name: Swift.String, size: Swift.Int32, type: Swift.UInt32) - @objc override dynamic public init() @objc deinit } @_inheritsConvenienceInitializers @objcMembers @objc(TNSRender) public class TNSRender : ObjectiveC.NSObject { @@ -1419,22 +1418,22 @@ extension RangeReplaceableCollection { @objc public func createSurface() @objc deinit } -@_inheritsConvenienceInitializers @_hasMissingDesignatedInitializers @objcMembers @objc(TNSSVG) public class TNSSVG : UIKit.UIView { - @objc public var ignorePixelScaling: Swift.Bool { +@_inheritsConvenienceInitializers @_hasMissingDesignatedInitializers @objcMembers @objc(TNSSVG) @_Concurrency.MainActor(unsafe) public class TNSSVG : UIKit.UIView { + @objc @_Concurrency.MainActor(unsafe) public var ignorePixelScaling: Swift.Bool { @objc get @objc set } - @objc public var src: Swift.String? { + @objc @_Concurrency.MainActor(unsafe) public var src: Swift.String? { @objc get @objc set } - @objc public var srcPath: Swift.String? { + @objc @_Concurrency.MainActor(unsafe) public var srcPath: Swift.String? { @objc get @objc set } - @objc override dynamic public func layoutSubviews() - @objc override dynamic public init(frame: CoreGraphics.CGRect) - @objc override dynamic public func draw(_ rect: CoreGraphics.CGRect) + @_Concurrency.MainActor(unsafe) @objc override dynamic public func layoutSubviews() + @_Concurrency.MainActor(unsafe) @objc override dynamic public init(frame: CoreGraphics.CGRect) + @_Concurrency.MainActor(unsafe) @objc override dynamic public func draw(_ rect: CoreGraphics.CGRect) @objc deinit } @objcMembers @objc(TNSWebGLRenderingContext) public class TNSWebGLRenderingContext : CanvasNative.TNSCanvasRenderingContext { @@ -2532,7 +2531,6 @@ extension RangeReplaceableCollection { @objc public var UNPACK_PREMULTIPLY_ALPHA_WEBGL: Swift.UInt32 { @objc get } - @objc override dynamic public init() @objc deinit } @_hasMissingDesignatedInitializers @objcMembers @objc(TNSImageBitmap) public class TNSImageBitmap : ObjectiveC.NSObject { @@ -2568,7 +2566,6 @@ extension RangeReplaceableCollection { @objc get } @objc deinit - @objc override dynamic public init() } @_inheritsConvenienceInitializers @objcMembers @objc(TNS_OES_fbo_render_mipmap) public class TNS_OES_fbo_render_mipmap : ObjectiveC.NSObject { @objc override dynamic public init() @@ -2604,7 +2601,6 @@ extension RangeReplaceableCollection { @objc get } @objc public init(rangeMin: Swift.Int32, rangeMax: Swift.Int32, precision: Swift.Int32) - @objc override dynamic public init() @objc deinit } @_inheritsConvenienceInitializers @objcMembers @objc(TNS_OES_texture_half_float_linear) public class TNS_OES_texture_half_float_linear : ObjectiveC.NSObject { @@ -2764,14 +2760,12 @@ extension RangeReplaceableCollection { @objc public func isPointInPath(_ path: CanvasNative.TNSPath2D, _ x: Swift.Float, _ y: Swift.Float, _ fillRule: CanvasNative.TNSFillRule) -> Swift.Bool @objc public func isPointInStroke(_ x: Swift.Float, _ y: Swift.Float) -> Swift.Bool @objc public func isPointInStroke(_ path: CanvasNative.TNSPath2D, _ x: Swift.Float, _ y: Swift.Float) -> Swift.Bool - @objc override dynamic public init() @objc deinit } @objcMembers @objc(TNS_WEBGL_lose_context) public class TNS_WEBGL_lose_context : ObjectiveC.NSObject { @objc public init(canvas: CanvasNative.TNSCanvas) @objc public func loseContext() @objc public func restoreContext() - @objc override dynamic public init() @objc deinit } @_inheritsConvenienceInitializers @objcMembers @objc(TNS_WEBGL_compressed_texture_etc) public class TNS_WEBGL_compressed_texture_etc : ObjectiveC.NSObject { @@ -2838,19 +2832,18 @@ extension RangeReplaceableCollection { public init?(rawValue: CanvasNative.TNSTextBaseLine.RawValue) public init?(string: Swift.String) } -@_hasMissingDesignatedInitializers @objcMembers @objc(CanvasGLKView) public class CanvasGLKView : GLKit.GLKView { +@_hasMissingDesignatedInitializers @objcMembers @objc(CanvasGLKView) @_Concurrency.MainActor(unsafe) public class CanvasGLKView : GLKit.GLKView { @objc dynamic public init() - @objc override dynamic public init(frame: CoreGraphics.CGRect) - @objc override dynamic public func setNeedsDisplay() - @objc override dynamic public func setNeedsDisplay(_ rect: CoreGraphics.CGRect) - @objc override dynamic public init(frame: CoreGraphics.CGRect, context: OpenGLES.EAGLContext) + @_Concurrency.MainActor(unsafe) @objc override dynamic public init(frame: CoreGraphics.CGRect) + @_Concurrency.MainActor(unsafe) @objc override dynamic public func setNeedsDisplay() + @_Concurrency.MainActor(unsafe) @objc override dynamic public func setNeedsDisplay(_ rect: CoreGraphics.CGRect) @objc deinit } -@_inheritsConvenienceInitializers @_hasMissingDesignatedInitializers @objcMembers @objc(CanvasCPUView) public class CanvasCPUView : UIKit.UIView { - @objc public var ignorePixelScaling: Swift.Bool +@_inheritsConvenienceInitializers @_hasMissingDesignatedInitializers @objcMembers @objc(CanvasCPUView) @_Concurrency.MainActor(unsafe) public class CanvasCPUView : UIKit.UIView { + @objc @_Concurrency.MainActor(unsafe) public var ignorePixelScaling: Swift.Bool @objc dynamic public init() - @objc override dynamic public init(frame: CoreGraphics.CGRect) - @objc override dynamic public func draw(_ rect: CoreGraphics.CGRect) + @_Concurrency.MainActor(unsafe) @objc override dynamic public init(frame: CoreGraphics.CGRect) + @_Concurrency.MainActor(unsafe) @objc override dynamic public func draw(_ rect: CoreGraphics.CGRect) @objc deinit } public protocol RenderListener { @@ -2909,7 +2902,6 @@ public enum ContextType : Swift.Int, Swift.RawRepresentable { public func pause() public func resume() @objc public func glkView(_ view: GLKit.GLKView, drawIn rect: CoreGraphics.CGRect) - @objc override dynamic public init() } @_inheritsConvenienceInitializers @_hasMissingDesignatedInitializers @objcMembers @objc(TNSIndexedParameter) public class TNSIndexedParameter : ObjectiveC.NSObject { @objc deinit @@ -3173,13 +3165,11 @@ public enum ContextType : Swift.Int, Swift.RawRepresentable { @objc get } @objc public func getStyleType() -> CanvasNative.CanvasColorStyleType - @objc override dynamic public init() @objc deinit } @_hasMissingDesignatedInitializers @objcMembers @objc(TNSGradient) public class TNSGradient : ObjectiveC.NSObject, CanvasNative.ICanvasColorStyle { @objc public func getStyleType() -> CanvasNative.CanvasColorStyleType @objc public func addColorStop(_ offset: Swift.Float, _ color: Swift.String) - @objc override dynamic public init() @objc deinit } @_inheritsConvenienceInitializers @_hasMissingDesignatedInitializers @objcMembers @objc(TNSLinearGradient) public class TNSLinearGradient : CanvasNative.TNSColorStyle.TNSGradient { @@ -3192,7 +3182,6 @@ public enum ContextType : Swift.Int, Swift.RawRepresentable { @objc public func setTransform(matrix: CanvasNative.TNSDOMMatrix) @objc deinit @objc public func getStyleType() -> CanvasNative.CanvasColorStyleType - @objc override dynamic public init() } @objc override dynamic public init() @objc deinit @@ -3235,7 +3224,6 @@ public enum ContextType : Swift.Int, Swift.RawRepresentable { @objc public var ideographicBaseline: Swift.Float { @objc get } - @objc override dynamic public init() } extension CanvasNative.TNSTextAlignment : Swift.Equatable {} extension CanvasNative.TNSTextAlignment : Swift.Hashable {} diff --git a/packages/canvas/src-native/canvas-ios/CanvasNative/Dist/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Modules/module.modulemap b/packages/canvas/src-native/canvas-ios/dist/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Modules/module.modulemap similarity index 100% rename from packages/canvas/src-native/canvas-ios/CanvasNative/Dist/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Modules/module.modulemap rename to packages/canvas/src-native/canvas-ios/dist/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Modules/module.modulemap diff --git a/packages/canvas/src-native/canvas-ios/dist/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/TNSCanvas.nib b/packages/canvas/src-native/canvas-ios/dist/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/TNSCanvas.nib new file mode 100644 index 00000000..8af10a4e Binary files /dev/null and b/packages/canvas/src-native/canvas-ios/dist/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/TNSCanvas.nib differ diff --git a/packages/canvas/src-native/canvas-ios/dist/CanvasNative.xcframework/ios-arm64/dSYMs/CanvasNative.framework.dSYM/Contents/Info.plist b/packages/canvas/src-native/canvas-ios/dist/CanvasNative.xcframework/ios-arm64/dSYMs/CanvasNative.framework.dSYM/Contents/Info.plist new file mode 100644 index 00000000..509a6635 --- /dev/null +++ b/packages/canvas/src-native/canvas-ios/dist/CanvasNative.xcframework/ios-arm64/dSYMs/CanvasNative.framework.dSYM/Contents/Info.plist @@ -0,0 +1,20 @@ + + + + + CFBundleDevelopmentRegion + English + CFBundleIdentifier + com.apple.xcode.dsym.com.github.triniwiz.CanvasNative + CFBundleInfoDictionaryVersion + 6.0 + CFBundlePackageType + dSYM + CFBundleSignature + ???? + CFBundleShortVersionString + 1.0 + CFBundleVersion + 1 + + diff --git a/packages/canvas/src-native/canvas-ios/dist/CanvasNative.xcframework/ios-arm64/dSYMs/CanvasNative.framework.dSYM/Contents/Resources/DWARF/CanvasNative b/packages/canvas/src-native/canvas-ios/dist/CanvasNative.xcframework/ios-arm64/dSYMs/CanvasNative.framework.dSYM/Contents/Resources/DWARF/CanvasNative new file mode 100644 index 00000000..35fea814 Binary files /dev/null and b/packages/canvas/src-native/canvas-ios/dist/CanvasNative.xcframework/ios-arm64/dSYMs/CanvasNative.framework.dSYM/Contents/Resources/DWARF/CanvasNative differ diff --git a/packages/canvas/src-native/canvas-ios/CanvasNative/Dist/CanvasNative.xcframework/ios-x86_64-simulator/CanvasNative.framework/CanvasNative b/packages/canvas/src-native/canvas-ios/dist/CanvasNative.xcframework/ios-x86_64-simulator/CanvasNative.framework/CanvasNative similarity index 58% rename from packages/canvas/src-native/canvas-ios/CanvasNative/Dist/CanvasNative.xcframework/ios-x86_64-simulator/CanvasNative.framework/CanvasNative rename to packages/canvas/src-native/canvas-ios/dist/CanvasNative.xcframework/ios-x86_64-simulator/CanvasNative.framework/CanvasNative index fe3dbd52..9ce7d118 100755 Binary files a/packages/canvas/src-native/canvas-ios/CanvasNative/Dist/CanvasNative.xcframework/ios-x86_64-simulator/CanvasNative.framework/CanvasNative and b/packages/canvas/src-native/canvas-ios/dist/CanvasNative.xcframework/ios-x86_64-simulator/CanvasNative.framework/CanvasNative differ diff --git a/packages/canvas/src-native/canvas-ios/CanvasNative/Dist/CanvasNative.xcframework/ios-x86_64-simulator/CanvasNative.framework/Headers/CanvasNative-Swift.h b/packages/canvas/src-native/canvas-ios/dist/CanvasNative.xcframework/ios-x86_64-simulator/CanvasNative.framework/Headers/CanvasNative-Swift.h similarity index 99% rename from packages/canvas/src-native/canvas-ios/CanvasNative/Dist/CanvasNative.xcframework/ios-x86_64-simulator/CanvasNative.framework/Headers/CanvasNative-Swift.h rename to packages/canvas/src-native/canvas-ios/dist/CanvasNative.xcframework/ios-x86_64-simulator/CanvasNative.framework/Headers/CanvasNative-Swift.h index 98f9a876..73c24e58 100644 --- a/packages/canvas/src-native/canvas-ios/CanvasNative/Dist/CanvasNative.xcframework/ios-x86_64-simulator/CanvasNative.framework/Headers/CanvasNative-Swift.h +++ b/packages/canvas/src-native/canvas-ios/dist/CanvasNative.xcframework/ios-x86_64-simulator/CanvasNative.framework/Headers/CanvasNative-Swift.h @@ -1,4 +1,4 @@ -// Generated by Apple Swift version 5.4 (swiftlang-1205.0.26.9 clang-1205.0.19.55) +// Generated by Apple Swift version 5.5.1 (swiftlang-1300.0.31.4 clang-1300.0.29.6) #ifndef CANVASNATIVE_SWIFT_H #define CANVASNATIVE_SWIFT_H #pragma clang diagnostic push @@ -1385,6 +1385,8 @@ SWIFT_CLASS_NAMED("TNSWebGL2RenderingContext") - (void)samplerParameterf:(uint32_t)sampler :(uint32_t)pname :(float)param; - (void)texImage3D:(uint32_t)target :(int32_t)level :(int32_t)internalformat :(int32_t)width :(int32_t)height :(int32_t)depth :(int32_t)border :(uint32_t)format :(uint32_t)type data:(NSData * _Nonnull)data; - (void)texImage3D:(uint32_t)target :(int32_t)level :(int32_t)internalformat :(int32_t)width :(int32_t)height :(int32_t)depth :(int32_t)border :(uint32_t)format :(uint32_t)type offset:(NSInteger)offset; +- (void)texImage3D:(uint32_t)target :(int32_t)level :(int32_t)internalformat :(int32_t)width :(int32_t)height :(int32_t)depth :(int32_t)border :(uint32_t)format :(uint32_t)type pixels:(void const * _Nonnull)pixels size:(NSInteger)size; +- (void)texImage3D:(uint32_t)target :(int32_t)level :(int32_t)internalformat :(int32_t)width :(int32_t)height :(int32_t)depth :(int32_t)border :(uint32_t)format :(uint32_t)type pixels:(void const * _Nonnull)pixels size:(NSInteger)size pixelOffset:(NSInteger)pixelOffset srcOffset:(int32_t)srcOffset; - (void)texImage3D:(uint32_t)target :(int32_t)level :(int32_t)internalformat :(int32_t)width :(int32_t)height :(int32_t)depth :(int32_t)border :(uint32_t)format :(uint32_t)type i8:(NSArray * _Nonnull)source; - (void)texImage3D:(uint32_t)target :(int32_t)level :(int32_t)internalformat :(int32_t)width :(int32_t)height :(int32_t)depth :(int32_t)border :(uint32_t)format :(uint32_t)type u8:(NSArray * _Nonnull)source; - (void)texImage3D:(uint32_t)target :(int32_t)level :(int32_t)internalformat :(int32_t)width :(int32_t)height :(int32_t)depth :(int32_t)border :(uint32_t)format :(uint32_t)type i16:(NSArray * _Nonnull)source; diff --git a/packages/canvas/src-native/canvas-ios/CanvasNative/Dist/CanvasNative.xcframework/ios-x86_64-simulator/CanvasNative.framework/Headers/CanvasNative.h b/packages/canvas/src-native/canvas-ios/dist/CanvasNative.xcframework/ios-x86_64-simulator/CanvasNative.framework/Headers/CanvasNative.h similarity index 100% rename from packages/canvas/src-native/canvas-ios/CanvasNative/Dist/CanvasNative.xcframework/ios-x86_64-simulator/CanvasNative.framework/Headers/CanvasNative.h rename to packages/canvas/src-native/canvas-ios/dist/CanvasNative.xcframework/ios-x86_64-simulator/CanvasNative.framework/Headers/CanvasNative.h diff --git a/packages/canvas/src-native/canvas-ios/CanvasNative/Dist/CanvasNative.xcframework/ios-x86_64-simulator/CanvasNative.framework/Headers/Utils.h b/packages/canvas/src-native/canvas-ios/dist/CanvasNative.xcframework/ios-x86_64-simulator/CanvasNative.framework/Headers/Utils.h similarity index 100% rename from packages/canvas/src-native/canvas-ios/CanvasNative/Dist/CanvasNative.xcframework/ios-x86_64-simulator/CanvasNative.framework/Headers/Utils.h rename to packages/canvas/src-native/canvas-ios/dist/CanvasNative.xcframework/ios-x86_64-simulator/CanvasNative.framework/Headers/Utils.h diff --git a/packages/canvas/src-native/canvas-ios/dist/CanvasNative.xcframework/ios-x86_64-simulator/CanvasNative.framework/Headers/canvas_native.h b/packages/canvas/src-native/canvas-ios/dist/CanvasNative.xcframework/ios-x86_64-simulator/CanvasNative.framework/Headers/canvas_native.h new file mode 100644 index 00000000..188377c1 --- /dev/null +++ b/packages/canvas/src-native/canvas-ios/dist/CanvasNative.xcframework/ios-x86_64-simulator/CanvasNative.framework/Headers/canvas_native.h @@ -0,0 +1,3873 @@ +#ifndef CBINDGEN_BINDINGS_H +#define CBINDGEN_BINDINGS_H + +/* Warning, this file is autogenerated by cbindgen. Don't modify this manually. */ + +#include +#include +#include +#include + +typedef enum CompositeOperationType { + SourceOver = 0, + SourceIn = 1, + SourceOut = 2, + SourceAtop = 3, + DestinationOver = 4, + DestinationIn = 5, + DestinationOut = 6, + DestinationAtop = 7, + Lighter = 8, + Copy = 9, + Xor = 10, + Multiply = 11, + Screen = 12, + Overlay = 13, + Darken = 14, + Lighten = 15, + ColorDodge = 16, + ColorBurn = 17, + HardLight = 18, + SoftLight = 19, + Difference = 20, + Exclusion = 21, + Hue = 22, + Saturation = 23, + Color = 24, + Luminosity = 25, +} CompositeOperationType; + +typedef enum FillRule { + NonZero = 0, + EvenOdd = 1, +} FillRule; + +typedef enum ImageSmoothingQuality { + Low = 0, + Medium = 1, + High = 2, +} ImageSmoothingQuality; + +typedef enum LineCap { + CapButt = 0, + CapRound = 1, + CapSquare = 2, +} LineCap; + +typedef enum LineJoin { + JoinRound = 0, + JoinBevel = 1, + JoinMiter = 2, +} LineJoin; + +typedef enum PaintStyleValueType { + PaintStyleValueTypeColor = 0, + PaintStyleValueTypeGradient = 1, + PaintStyleValueTypePattern = 2, +} PaintStyleValueType; + +typedef enum Repetition { + Repeat = 0, + RepeatX = 1, + RepeatY = 2, + NoRepeat = 3, +} Repetition; + +typedef enum TextAlign { + START = 0, + LEFT = 1, + CENTER = 2, + RIGHT = 3, + END = 4, +} TextAlign; + +typedef enum TextBaseLine { + TOP = 0, + HANGING = 1, + MIDDLE = 2, + ALPHABETIC = 3, + IDEOGRAPHIC = 4, + BOTTOM = 5, +} TextBaseLine; + +typedef enum TextDirection { + LTR = 0, + RTL = 1, +} TextDirection; + +typedef struct Context Context; + +typedef struct F32Array { + float *data; + uintptr_t data_len; +} F32Array; + +typedef struct F64Array { + double *data; + uintptr_t data_len; +} F64Array; + +typedef struct I16Array { + int16_t *data; + uintptr_t data_len; +} I16Array; + +typedef struct I32Array { + int32_t *data; + uintptr_t data_len; +} I32Array; + +typedef struct I8Array { + int8_t *data; + uintptr_t data_len; +} I8Array; + +typedef struct U16Array { + uint16_t *data; + uintptr_t data_len; +} U16Array; + +typedef struct U32Array { + uint32_t *data; + uintptr_t data_len; +} U32Array; + +typedef struct U8Array { + uint8_t *data; + uintptr_t data_len; +} U8Array; + +typedef struct PaintStyleValue { + long long value; + enum PaintStyleValueType value_type; +} PaintStyleValue; + +#if defined(TARGET_OS_ANDROID) +/** + * AndroidBitmap functions result code. + */ +typedef int32_t _bindgen_ty_1; +#endif + +#if defined(TARGET_OS_ANDROID) +/** + * Bitmap pixel format. + */ +typedef uint32_t AndroidBitmapFormat; +#endif + +#if defined(TARGET_OS_ANDROID) +/** + * Operation was successful. + */ +#define ANDROID_BITMAP_RESULT_SUCCESS 0 +#endif + +#if defined(TARGET_OS_ANDROID) +/** + * Bad parameter. + */ +#define ANDROID_BITMAP_RESULT_BAD_PARAMETER -1 +#endif + +#if defined(TARGET_OS_ANDROID) +/** + * JNI exception occured. + */ +#define ANDROID_BITMAP_RESULT_JNI_EXCEPTION -2 +#endif + +#if defined(TARGET_OS_ANDROID) +/** + * Allocation failed. + */ +#define ANDROID_BITMAP_RESULT_ALLOCATION_FAILED -3 +#endif + +#if defined(TARGET_OS_ANDROID) +/** + * No format. + */ +#define AndroidBitmapFormat_ANDROID_BITMAP_FORMAT_NONE 0 +#endif + +#if defined(TARGET_OS_ANDROID) +/** + * Red: 8 bits, Green: 8 bits, Blue: 8 bits, Alpha: 8 bits. + */ +#define AndroidBitmapFormat_ANDROID_BITMAP_FORMAT_RGBA_8888 1 +#endif + +#if defined(TARGET_OS_ANDROID) +/** + * Red: 5 bits, Green: 6 bits, Blue: 5 bits. + */ +#define AndroidBitmapFormat_ANDROID_BITMAP_FORMAT_RGB_565 4 +#endif + +#if defined(TARGET_OS_ANDROID) +/** + * Deprecated in API level 13. Because of the poor quality of this configuration, it is advised to use ARGB_8888 instead. + */ +#define AndroidBitmapFormat_ANDROID_BITMAP_FORMAT_RGBA_4444 7 +#endif + +#if defined(TARGET_OS_ANDROID) +/** + * Alpha: 8 bits. + */ +#define AndroidBitmapFormat_ANDROID_BITMAP_FORMAT_A_8 8 +#endif + +void destroy_f32_array(struct F32Array *array); + +void destroy_f64_array(struct F64Array *array); + +void destroy_i16_array(struct I16Array *array); + +void destroy_i32_array(struct I32Array *array); + +void destroy_i8_array(struct I8Array *array); + +void destroy_paint_style_value(long long value); + +void destroy_u16_array(struct U16Array *array); + +void destroy_u32_array(struct U32Array *array); + +void destroy_u8_array(struct U8Array *array); + +#if defined(TARGET_OS_ANDROID) +jlong Java_org_nativescript_canvas_TNSCanvas_nativeInitContext(JNIEnv, + JClass, + jfloat width, + jfloat height, + jfloat density, + jint buffer_id, + jint samples, + jboolean alpha, + jint font_color, + jfloat ppi, + jint direction); +#endif + +#if defined(TARGET_OS_ANDROID) +jlong Java_org_nativescript_canvas_TNSCanvas_nativeInitContextWithCustomSurface(JNIEnv, + JClass, + jfloat width, + jfloat height, + jfloat density, + jboolean alpha, + jint font_color, + jfloat ppi, + jint direction); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSCanvas_nativeDestroyContext(JNIEnv, JClass, jlong context); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSCanvas_nativeResizeSurface(JNIEnv, + JClass, + jlong context, + jfloat width, + jfloat height, + jfloat density, + jint buffer_id, + jint samples, + jboolean alpha, + jfloat ppi); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSCanvas_nativeResizeCustomSurface(JNIEnv, + JClass, + jlong context, + jfloat width, + jfloat height, + jfloat density, + jboolean alpha, + jfloat ppi); +#endif + +#if defined(TARGET_OS_ANDROID) +jstring Java_org_nativescript_canvas_TNSCanvas_nativeDataURL(JNIEnv env, + JClass, + jlong context, + JString format, + jfloat quality); +#endif + +#if defined(TARGET_OS_ANDROID) +jbyteArray Java_org_nativescript_canvas_TNSCanvas_nativeSnapshotCanvas(JNIEnv env, + JClass, + jlong context); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSCanvas_nativeFlush(JNIEnv, JClass, jlong context); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSCanvas_nativeCustomWithBitmapFlush(JNIEnv env, + JClass, + jlong context, + JObject bitmap); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeSetDirection(JNIEnv, + JClass, + jlong context, + jint direction); +#endif + +#if defined(TARGET_OS_ANDROID) +jint Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeGetDirection(JNIEnv, + JClass, + jlong context); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeSetFillStyle(JNIEnv, + JClass, + jlong context, + jlong style); +#endif + +#if defined(TARGET_OS_ANDROID) +jobject Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeGetFillStyle(JNIEnv env, + JClass, + jlong context); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeSetFilter(JNIEnv env, + JClass, + jlong context, + JString filter); +#endif + +#if defined(TARGET_OS_ANDROID) +jstring Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeGetFilter(JNIEnv env, + JClass, + jlong context); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeSetFont(JNIEnv env, + JClass, + jlong context, + JString filter); +#endif + +#if defined(TARGET_OS_ANDROID) +jstring Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeGetFont(JNIEnv env, + JClass, + jlong context); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeSetGlobalAlpha(JNIEnv, + JClass, + jlong context, + jfloat alpha); +#endif + +#if defined(TARGET_OS_ANDROID) +jfloat Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeGetGlobalAlpha(JNIEnv, + JClass, + jlong context); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeSetGlobalCompositeOperation(JNIEnv, + JClass, + jlong context, + jint operation); +#endif + +#if defined(TARGET_OS_ANDROID) +jint Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeGetGlobalCompositeOperation(JNIEnv, + JClass, + jlong context); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeSetImageSmoothingEnabled(JNIEnv, + JClass, + jlong context, + jboolean enabled); +#endif + +#if defined(TARGET_OS_ANDROID) +jboolean Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeGetImageSmoothingEnabled(JNIEnv, + JClass, + jlong context); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeSetImageSmoothingQuality(JNIEnv, + JClass, + jlong context, + jint quality); +#endif + +#if defined(TARGET_OS_ANDROID) +jint Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeGetImageSmoothingQuality(JNIEnv, + JClass, + jlong context); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeSetLineCap(JNIEnv, + JClass, + jlong context, + jint cap); +#endif + +#if defined(TARGET_OS_ANDROID) +jint Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeGetLineCap(JNIEnv, + JClass, + jlong context); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeSetLineDashOffset(JNIEnv, + JClass, + jlong context, + jfloat offset); +#endif + +#if defined(TARGET_OS_ANDROID) +jfloat Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeGetLineDashOffset(JNIEnv, + JClass, + jlong context); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeSetLineJoin(JNIEnv, + JClass, + jlong context, + jint join); +#endif + +#if defined(TARGET_OS_ANDROID) +jint Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeGetLineJoin(JNIEnv, + JClass, + jlong context); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeSetLineWidth(JNIEnv, + JClass, + jlong context, + jfloat width); +#endif + +#if defined(TARGET_OS_ANDROID) +jfloat Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeGetLineWidth(JNIEnv, + JClass, + jlong context); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeSetMiterLimit(JNIEnv, + JClass, + jlong context, + jfloat limit); +#endif + +#if defined(TARGET_OS_ANDROID) +jfloat Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeGetMiterLimit(JNIEnv, + JClass, + jlong context); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeSetShadowBlur(JNIEnv, + JClass, + jlong context, + jfloat blur); +#endif + +#if defined(TARGET_OS_ANDROID) +jfloat Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeGetShadowBlur(JNIEnv, + JClass, + jlong context); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeSetShadowColor(JNIEnv, + JClass, + jlong context, + uint8_t r, + uint8_t g, + uint8_t b, + uint8_t a); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeSetShadowColorString(JNIEnv env, + JClass, + jlong context, + JString color); +#endif + +#if defined(TARGET_OS_ANDROID) +jstring Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeGetShadowColor(JNIEnv env, + JClass, + jlong context); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeSetShadowOffsetX(JNIEnv, + JClass, + jlong context, + jfloat x); +#endif + +#if defined(TARGET_OS_ANDROID) +jfloat Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeGetShadowOffsetX(JNIEnv, + JClass, + jlong context); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeSetShadowOffsetY(JNIEnv, + JClass, + jlong context, + jfloat y); +#endif + +#if defined(TARGET_OS_ANDROID) +jfloat Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeGetShadowOffsetY(JNIEnv, + JClass, + jlong context); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeSetStrokeStyle(JNIEnv, + JClass, + jlong context, + jlong style); +#endif + +#if defined(TARGET_OS_ANDROID) +jobject Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeGetStrokeStyle(JNIEnv env, + JClass, + jlong context); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeSetTextAlign(JNIEnv, + JClass, + jlong context, + jint align); +#endif + +#if defined(TARGET_OS_ANDROID) +jint Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeGetTextAlign(JNIEnv, + JClass, + jlong context); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeSetTextBaseline(JNIEnv, + JClass, + jlong context, + jint baseline); +#endif + +#if defined(TARGET_OS_ANDROID) +jint Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeGetTextBaseline(JNIEnv, + JClass, + jlong context); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeArc(JNIEnv, + JClass, + jlong context, + jfloat x, + jfloat y, + jfloat radius, + jfloat start_angle, + jfloat end_angle, + jboolean anti_clockwise); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeArcTo(JNIEnv, + JClass, + jlong context, + jfloat x1, + jfloat y1, + jfloat x2, + jfloat y2, + jfloat radius); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeBeginPath(JNIEnv, + JClass, + jlong context); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeBezierCurveTo(JNIEnv, + JClass, + jlong context, + jfloat cp1x, + jfloat cp1y, + jfloat cp2x, + jfloat cp2y, + jfloat x, + jfloat y); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeClearRect(JNIEnv, + JClass, + jlong context, + jfloat x, + jfloat y, + jfloat width, + jfloat height); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeClip(JNIEnv, + JClass, + jlong context, + jlong path, + jint rule); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeClipRule(JNIEnv, + JClass, + jlong context, + jint rule); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeClosePath(JNIEnv, + JClass, + jlong context); +#endif + +#if defined(TARGET_OS_ANDROID) +jlong Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeCreateImageData(JNIEnv, + JClass, + jint width, + jint height); +#endif + +#if defined(TARGET_OS_ANDROID) +jlong Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeCreateLinearGradient(JNIEnv, + JClass, + jlong context, + jfloat x0, + jfloat y0, + jfloat x1, + jfloat y1); +#endif + +#if defined(TARGET_OS_ANDROID) +jlong Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeCreatePatternEncoded(JNIEnv env, + JClass, + jlong context, + jbyteArray image_data, + jint repetition); +#endif + +#if defined(TARGET_OS_ANDROID) +jlong Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeCreatePattern(JNIEnv env, + JClass, + jlong context, + jbyteArray image_data, + jint width, + jint height, + jint repetition); +#endif + +#if defined(TARGET_OS_ANDROID) +jlong Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeCreatePatternWithAsset(JNIEnv, + JClass, + jlong context, + jlong asset, + jint repetition); +#endif + +#if defined(TARGET_OS_ANDROID) +jlong Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeCreateRadialGradient(JNIEnv, + JClass, + jlong context, + jfloat x0, + jfloat y0, + jfloat r0, + jfloat x1, + jfloat y1, + jfloat r1); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeDrawImageDxDyWithBitmap(JNIEnv env, + JClass, + jlong context, + JObject bitmap, + jfloat width, + jfloat height, + jfloat dx, + jfloat dy); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeDrawImageDxDy(JNIEnv env, + JClass, + jlong context, + jbyteArray image_data, + jfloat width, + jfloat height, + jfloat dx, + jfloat dy); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeDrawImageDxDyWithAsset(JNIEnv, + JClass, + jlong context, + jlong asset, + jfloat dx, + jfloat dy); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeDrawImageDxDyDwDhWithBitmap(JNIEnv env, + JClass, + jlong context, + JObject bitmap, + jfloat width, + jfloat height, + jfloat dx, + jfloat dy, + jfloat d_width, + jfloat d_height); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeDrawImageDxDyDwDh(JNIEnv env, + JClass, + jlong context, + jbyteArray image_data, + jfloat width, + jfloat height, + jfloat dx, + jfloat dy, + jfloat d_width, + jfloat d_height); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeDrawImageDxDyDwDhWithAsset(JNIEnv, + JClass, + jlong context, + jlong asset, + jfloat dx, + jfloat dy, + jfloat d_width, + jfloat d_height); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeDrawImageWithBitmap(JNIEnv env, + JClass, + jlong context, + JObject bitmap, + jfloat width, + jfloat height, + jfloat sx, + jfloat sy, + jfloat s_width, + jfloat s_height, + jfloat dx, + jfloat dy, + jfloat d_width, + jfloat d_height); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeDrawImageWithAsset(JNIEnv, + JClass, + jlong context, + jlong asset, + jfloat sx, + jfloat sy, + jfloat s_width, + jfloat s_height, + jfloat dx, + jfloat dy, + jfloat d_width, + jfloat d_height); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeDrawImage(JNIEnv env, + JClass, + jlong context, + jbyteArray image_data, + jfloat width, + jfloat height, + jfloat sx, + jfloat sy, + jfloat s_width, + jfloat s_height, + jfloat dx, + jfloat dy, + jfloat d_width, + jfloat d_height); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeEllipse(JNIEnv, + JClass, + jlong context, + jfloat x, + jfloat y, + jfloat radius_x, + jfloat radius_y, + jfloat rotation, + jfloat start_angle, + jfloat end_angle, + jboolean anticlockwise); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeFill(JNIEnv, + JClass, + jlong context, + jlong path, + jint rule); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeFillRect(JNIEnv, + JClass, + jlong context, + jfloat x, + jfloat y, + jfloat width, + jfloat height); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeFillText(JNIEnv env, + JClass, + jlong context, + JString text, + jfloat x, + jfloat y, + jfloat width); +#endif + +#if defined(TARGET_OS_ANDROID) +jlong Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeGetImageData(JNIEnv, + JClass, + jlong context, + jfloat sx, + jfloat sy, + jfloat sw, + jfloat sh); +#endif + +#if defined(TARGET_OS_ANDROID) +jfloatArray Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeGetLineDash(JNIEnv env, + JClass, + jlong context); +#endif + +#if defined(TARGET_OS_ANDROID) +jlong Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeGetTansform(JNIEnv, + JClass, + jlong context); +#endif + +#if defined(TARGET_OS_ANDROID) +bool Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeIsPointInPath(JNIEnv, + JClass, + jlong context, + jlong path, + jfloat x, + jfloat y, + jint rule); +#endif + +#if defined(TARGET_OS_ANDROID) +bool Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeIsPointInStroke(JNIEnv, + JClass, + jlong context, + jlong path, + jfloat x, + jfloat y); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeLineTo(JNIEnv, + JClass, + jlong context, + jfloat x, + jfloat y); +#endif + +#if defined(TARGET_OS_ANDROID) +jlong Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeMeasureText(JNIEnv env, + JClass, + jlong context, + JString text); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeMoveTo(JNIEnv, + JClass, + jlong context, + jfloat x, + jfloat y); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativePutImageData(JNIEnv, + JClass, + jlong context, + jlong image_data, + jfloat dx, + jfloat dy, + jfloat dirty_x, + jfloat dirty_y, + jfloat dirty_width, + jfloat dirty_height); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeQuadraticCurveTo(JNIEnv, + JClass, + jlong context, + jfloat cpx, + jfloat cpy, + jfloat x, + jfloat y); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeRect(JNIEnv, + JClass, + jlong context, + jfloat x, + jfloat y, + jfloat width, + jfloat height); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeResetTransform(JNIEnv, + JClass, + jlong context); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeRestore(JNIEnv, + JClass, + jlong context); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeRotate(JNIEnv, + JClass, + jlong context, + jfloat angle); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeSave(JNIEnv, + JClass, + jlong context); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeScale(JNIEnv, + JClass, + jlong context, + jfloat x, + jfloat y); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeSetLineDash(JNIEnv env, + JClass, + jlong context, + jfloatArray dash); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeSetTransform(JNIEnv, + JClass, + jlong context, + jfloat a, + jfloat b, + jfloat c, + jfloat d, + jfloat e, + jfloat f); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeSetTransformMatrix(JNIEnv, + JClass, + jlong context, + jlong matrix); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeStroke(JNIEnv, + JClass, + jlong context, + jlong path); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeStrokeRect(JNIEnv, + JClass, + jlong context, + jfloat x, + jfloat y, + jfloat width, + jfloat height); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeStrokeText(JNIEnv env, + JClass, + jlong context, + JString text, + jfloat x, + jfloat y, + jfloat width); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeTransform(JNIEnv, + JClass, + jlong context, + jfloat a, + jfloat b, + jfloat c, + jfloat d, + jfloat e, + jfloat f); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeTranslate(JNIEnv, + JClass, + jlong context, + jfloat x, + jfloat y); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TextureRender_nativeDrawFrame(JNIEnv env, + JClass, + JObject surface_texture_object, + bool flip_y_web_gl, + jint fbo, + jint rbo, + jint program, + jint external_texture, + jint sampler_pos, + jint array_buffer, + jint pos, + jfloatArray matrix, + jint matrix_pos, + jint width, + jint height, + jint render_width, + jint render_height, + jint internal_format, + jint format, + jint draw_count); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSWebGL2RenderingContext_nativeFlipInPlace3D(JNIEnv env, + JClass, + JByteBuffer pixels, + jint bytesPerPixel, + jint height, + jint depth); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSWebGL2RenderingContext_nativeTexImage3DBuffer(JNIEnv env, + JClass, + jint target, + jint level, + jint internalformat, + jint width, + jint height, + jint depth, + jint border, + jint format, + jint image_type, + JByteBuffer buffer, + jboolean flipY); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSWebGL2RenderingContext_nativeTexImage3DByteArray(JNIEnv env, + JClass, + jint target, + jint level, + jint internalformat, + jint width, + jint height, + jint depth, + jint border, + jint format, + jint image_type, + jbyteArray byteArray, + jboolean flipY); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSWebGL2RenderingContext_nativeTexImage3DShortArray(JNIEnv env, + JClass, + jint target, + jint level, + jint internalformat, + jint width, + jint height, + jint depth, + jint border, + jint format, + jint image_type, + jshortArray shortArray, + jboolean flipY); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSWebGL2RenderingContext_nativeTexImage3DIntArray(JNIEnv env, + JClass, + jint target, + jint level, + jint internalformat, + jint width, + jint height, + jint depth, + jint border, + jint format, + jint image_type, + jintArray intArray, + jboolean flipY); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSWebGL2RenderingContext_nativeTexImage3DFloatArray(JNIEnv env, + JClass, + jint target, + jint level, + jint internalformat, + jint width, + jint height, + jint depth, + jint border, + jint format, + jint image_type, + jfloatArray floatArray, + jboolean flipY); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSWebGL2RenderingContext_nativeTexImage3DDoubleArray(JNIEnv env, + JClass, + jint target, + jint level, + jint internalformat, + jint width, + jint height, + jint depth, + jint border, + jint format, + jint image_type, + jdoubleArray doubleArray, + jboolean flipY); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSWebGL2RenderingContext_nativeTexImage3DLongArray(JNIEnv env, + JClass, + jint target, + jint level, + jint internalformat, + jint width, + jint height, + jint depth, + jint border, + jint format, + jint image_type, + jlongArray longArray, + jboolean flipY); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSWebGL2RenderingContext_nativeTexImage3DAsset(JNIEnv _env, + JClass, + jint target, + jint level, + jint internalformat, + jint width, + jint height, + jint depth, + jint border, + jint format, + jint image_type, + jlong asset, + jboolean flipY); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSWebGL2RenderingContext_nativeTexImage3DBitmap(JNIEnv env, + JClass, + jint target, + jint level, + jint internalformat, + jint width, + jint height, + jint depth, + jint border, + jint format, + jint image_type, + JObject bitmap, + jboolean flipY); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSWebGL2RenderingContext_nativeTexSubImage3DBuffer(JNIEnv env, + JClass, + jint target, + jint level, + jint xoffset, + jint yoffset, + jint zoffset, + jint width, + jint height, + jint depth, + jint format, + jint image_type, + JByteBuffer buffer, + jboolean flipY); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSWebGL2RenderingContext_nativeTexSubImage3DByteArray(JNIEnv env, + JClass, + jint target, + jint level, + jint xoffset, + jint yoffset, + jint zoffset, + jint width, + jint height, + jint depth, + jint format, + jint image_type, + jbyteArray byteArray, + jboolean flipY); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSWebGL2RenderingContext_nativeTexSubImage3DShortArray(JNIEnv env, + JClass, + jint target, + jint level, + jint xoffset, + jint yoffset, + jint zoffset, + jint width, + jint height, + jint depth, + jint format, + jint image_type, + jshortArray shortArray, + jboolean flipY); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSWebGL2RenderingContext_nativeTexSubImage3DIntArray(JNIEnv env, + JClass, + jint target, + jint level, + jint xoffset, + jint yoffset, + jint zoffset, + jint width, + jint height, + jint depth, + jint format, + jint image_type, + jintArray intArray, + jboolean flipY); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSWebGL2RenderingContext_nativeTexSubImage3DLongArray(JNIEnv env, + JClass, + jint target, + jint level, + jint xoffset, + jint yoffset, + jint zoffset, + jint width, + jint height, + jint depth, + jint format, + jint image_type, + jlongArray longArray, + jboolean flipY); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSWebGL2RenderingContext_nativeTexSubImage3DFloatArray(JNIEnv env, + JClass, + jint target, + jint level, + jint xoffset, + jint yoffset, + jint zoffset, + jint width, + jint height, + jint depth, + jint format, + jint image_type, + jfloatArray floatArray, + jboolean flipY); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSWebGL2RenderingContext_nativeTexSubImage3DDoubleArray(JNIEnv env, + JClass, + jint target, + jint level, + jint xoffset, + jint yoffset, + jint zoffset, + jint width, + jint height, + jint depth, + jint format, + jint image_type, + jdoubleArray doubleArray, + jboolean flipY); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSWebGL2RenderingContext_nativeTexSubImage3DAsset(JNIEnv _env, + JClass, + jint target, + jint level, + jint xoffset, + jint yoffset, + jint zoffset, + jint width, + jint height, + jint depth, + jint format, + jint image_type, + jlong asset, + jboolean flipY); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSWebGL2RenderingContext_nativeTexSubImage3DBitmap(JNIEnv env, + JClass, + jint target, + jint level, + jint xoffset, + jint yoffset, + jint zoffset, + jint width, + jint height, + jint depth, + jint format, + jint image_type, + JObject bitmap, + jboolean flipY); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSWebGLRenderingContext_nativeTexImage2DTexture(JNIEnv _env, + JClass, + jint width, + jint height, + jint src_texture); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSWebGLRenderingContext_nativeFlipBufferInPlace(JNIEnv env, + JClass, + JByteBuffer pixels, + jint bytesPerPixel, + jint height); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSWebGLRenderingContext_nativeGetVertexAttribOffset(JNIEnv env, + JClass, + jint index, + jint pname, + JByteBuffer buffer); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSWebGLRenderingContext_nativeBindBuffer(JNIEnv _env, + JClass, + jint target, + jint buffer); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSWebGLRenderingContext_nativeReadPixels(JNIEnv _env, + JClass, + jint x, + jint y, + jint width, + jint height, + jint format, + jint pixel_type); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSWebGLRenderingContext_nativeTexImage2DByteArray(JNIEnv env, + JClass, + jint target, + jint level, + jint internalformat, + jint width, + jint height, + jint border, + jint format, + jint image_type, + jbyteArray byteArray, + jboolean flipY); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSWebGLRenderingContext_nativeTexImage2DShortArray(JNIEnv env, + JClass, + jint target, + jint level, + jint internalformat, + jint width, + jint height, + jint border, + jint format, + jint image_type, + jshortArray shortArray, + jboolean flipY); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSWebGLRenderingContext_nativeTexImage2DIntArray(JNIEnv env, + JClass, + jint target, + jint level, + jint internalformat, + jint width, + jint height, + jint border, + jint format, + jint image_type, + jintArray intArray, + jboolean flipY); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSWebGLRenderingContext_nativeTexImage2DFloatArray(JNIEnv env, + JClass, + jint target, + jint level, + jint internalformat, + jint width, + jint height, + jint border, + jint format, + jint image_type, + jfloatArray floatArray, + jboolean flipY); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSWebGLRenderingContext_nativeTexImage2DBuffer(JNIEnv env, + JClass, + jint target, + jint level, + jint internalformat, + jint width, + jint height, + jint border, + jint format, + jint image_type, + JByteBuffer buffer, + jboolean flipY); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSWebGLRenderingContext_nativeTexImage2DAsset(JNIEnv _env, + JClass, + jint target, + jint level, + jint internalformat, + jint border, + jint format, + jint image_type, + jlong asset, + jboolean flipY); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSWebGLRenderingContext_nativeTexImage2DBitmap(JNIEnv env, + JClass, + jint target, + jint level, + jint internalformat, + jint width, + jint height, + jint border, + jint format, + jint image_type, + JObject bitmap, + jboolean flipY); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSWebGLRenderingContext_nativeTexSubImage2DByteArray(JNIEnv env, + JClass, + jint target, + jint level, + jint xoffset, + jint yoffset, + jint width, + jint height, + jint format, + jint image_type, + jbyteArray byteArray, + jboolean flip_y); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSWebGLRenderingContext_nativeTexSubImage2DShortArray(JNIEnv env, + JClass, + jint target, + jint level, + jint xoffset, + jint yoffset, + jint width, + jint height, + jint format, + jint image_type, + jshortArray shortArray, + jboolean flip_y); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSWebGLRenderingContext_nativeTexSubImage2DIntArray(JNIEnv env, + JClass, + jint target, + jint level, + jint xoffset, + jint yoffset, + jint width, + jint height, + jint format, + jint image_type, + jintArray intArray, + jboolean flip_y); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSWebGLRenderingContext_nativeTexSubImage2DFloatArray(JNIEnv env, + JClass, + jint target, + jint level, + jint xoffset, + jint yoffset, + jint width, + jint height, + jint format, + jint image_type, + jfloatArray floatArray, + jboolean flip_y); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSWebGLRenderingContext_nativeTexSubImage2DBuffer(JNIEnv env, + JClass, + jint target, + jint level, + jint xoffset, + jint yoffset, + jint width, + jint height, + jint format, + jint image_type, + JByteBuffer buffer, + jboolean flip_y); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSWebGLRenderingContext_nativeTexSubImage2DAsset(JNIEnv _env, + JClass, + jint target, + jint level, + jint xoffset, + jint yoffset, + jint width, + jint height, + jint format, + jint image_type, + jlong asset, + jboolean flip_y); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSWebGLRenderingContext_nativeTexSubImage2DBitmap(JNIEnv env, + JClass, + jint target, + jint level, + jint xoffset, + jint yoffset, + jint width, + jint height, + jint format, + jint image_type, + JObject bitmap, + jboolean flip_y); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSWebGLRenderingContext_nativeVertexAttribPointer(JNIEnv _env, + JClass, + jint index, + jint size, + jint pointer_type, + jboolean normalized, + jint stride, + jlong offset); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSCanvasGradient_nativeAddColorStop(JNIEnv env, + JClass, + long long style, + float stop, + JString color); +#endif + +#if defined(TARGET_OS_ANDROID) +jlong Java_org_nativescript_canvas_TNSImageAsset_nativeInit(JNIEnv, JClass); +#endif + +#if defined(TARGET_OS_ANDROID) +jbyteArray Java_org_nativescript_canvas_TNSImageAsset_nativeGetBytes(JNIEnv env, + JClass, + jlong asset); +#endif + +#if defined(TARGET_OS_ANDROID) +jint Java_org_nativescript_canvas_TNSImageAsset_nativeGetWidth(JNIEnv _env, JClass, jlong asset); +#endif + +#if defined(TARGET_OS_ANDROID) +jint Java_org_nativescript_canvas_TNSImageAsset_nativeGetHeight(JNIEnv _env, JClass, jlong asset); +#endif + +#if defined(TARGET_OS_ANDROID) +jboolean Java_org_nativescript_canvas_TNSImageAsset_nativeScale(JNIEnv _env, + JClass, + jlong asset, + jint x, + jint y); +#endif + +#if defined(TARGET_OS_ANDROID) +jboolean Java_org_nativescript_canvas_TNSImageAsset_nativeFlipX(JNIEnv _env, JClass, jlong asset); +#endif + +#if defined(TARGET_OS_ANDROID) +jboolean Java_org_nativescript_canvas_TNSImageAsset_nativeFlipY(JNIEnv _env, JClass, jlong asset); +#endif + +#if defined(TARGET_OS_ANDROID) +jboolean Java_org_nativescript_canvas_TNSImageAsset_nativeSave(JNIEnv env, + JClass, + jlong asset, + JString path, + jint format); +#endif + +#if defined(TARGET_OS_ANDROID) +jstring Java_org_nativescript_canvas_TNSImageAsset_nativeGetError(JNIEnv env, JClass, jlong asset); +#endif + +#if defined(TARGET_OS_ANDROID) +jboolean Java_org_nativescript_canvas_TNSImageAsset_nativeHasError(JNIEnv _env, + JClass, + jlong asset); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSImageAsset_nativeDestroy(JNIEnv _env, JClass, jlong asset); +#endif + +#if defined(TARGET_OS_ANDROID) +jboolean Java_org_nativescript_canvas_TNSImageAsset_nativeLoadAssetPath(JNIEnv env, + JClass, + jlong asset, + JString path); +#endif + +#if defined(TARGET_OS_ANDROID) +jboolean Java_org_nativescript_canvas_TNSImageAsset_nativeLoadAssetBytes(JNIEnv env, + JClass, + jlong asset, + jbyteArray buffer); +#endif + +#if defined(TARGET_OS_ANDROID) +jlong Java_org_nativescript_canvas_TNSImageBitmap_nativeCreateFromBuffer(JNIEnv env, + JClass, + JByteBuffer image_buffer, + jfloat image_width, + jfloat image_height, + jboolean flip_y, + jint premultiply_alpha, + jint color_space_conversion, + jint resize_quality, + jfloat resize_width, + jfloat resize_height); +#endif + +#if defined(TARGET_OS_ANDROID) +jlong Java_org_nativescript_canvas_TNSImageBitmap_nativeCreateFromBufferSrcRect(JNIEnv env, + JClass, + JByteBuffer image_buffer, + jfloat image_width, + jfloat image_height, + jfloat sx, + jfloat sy, + jfloat s_width, + jfloat s_height, + jboolean flip_y, + jint premultiply_alpha, + jint color_space_conversion, + jint resize_quality, + jfloat resize_width, + jfloat resize_height); +#endif + +#if defined(TARGET_OS_ANDROID) +jlong Java_org_nativescript_canvas_TNSImageBitmap_nativeCreateFromBufferEncoded(JNIEnv env, + JClass, + JByteBuffer image_buffer, + jboolean flip_y, + jint premultiply_alpha, + jint color_space_conversion, + jint resize_quality, + jfloat resize_width, + jfloat resize_height); +#endif + +#if defined(TARGET_OS_ANDROID) +jlong Java_org_nativescript_canvas_TNSImageBitmap_nativeCreateFromBufferEncodedSrcRect(JNIEnv env, + JClass, + JByteBuffer image_buffer, + jfloat sx, + jfloat sy, + jfloat s_width, + jfloat s_height, + jboolean flip_y, + jint premultiply_alpha, + jint color_space_conversion, + jint resize_quality, + jfloat resize_width, + jfloat resize_height); +#endif + +#if defined(TARGET_OS_ANDROID) +jlong Java_org_nativescript_canvas_TNSImageBitmap_nativeCreateFromBytes(JNIEnv env, + JClass, + jbyteArray image_bytes, + jfloat image_width, + jfloat image_height, + jboolean flip_y, + jint premultiply_alpha, + jint color_space_conversion, + jint resize_quality, + jfloat resize_width, + jfloat resize_height); +#endif + +#if defined(TARGET_OS_ANDROID) +jlong Java_org_nativescript_canvas_TNSImageBitmap_nativeCreateFromBytesSrcRect(JNIEnv env, + JClass, + jbyteArray image_bytes, + jfloat image_width, + jfloat image_height, + jfloat sx, + jfloat sy, + jfloat s_width, + jfloat s_height, + jboolean flip_y, + jint premultiply_alpha, + jint color_space_conversion, + jint resize_quality, + jfloat resize_width, + jfloat resize_height); +#endif + +#if defined(TARGET_OS_ANDROID) +jlong Java_org_nativescript_canvas_TNSImageBitmap_nativeCreateFromBytesEncoded(JNIEnv env, + JClass, + jbyteArray image_bytes, + jboolean flip_y, + jint premultiply_alpha, + jint color_space_conversion, + jint resize_quality, + jfloat resize_width, + jfloat resize_height); +#endif + +#if defined(TARGET_OS_ANDROID) +jlong Java_org_nativescript_canvas_TNSImageBitmap_nativeCreateFromBytesEncodedSrcRect(JNIEnv env, + JClass, + jbyteArray image_bytes, + jfloat sx, + jfloat sy, + jfloat s_width, + jfloat s_height, + jboolean flip_y, + jint premultiply_alpha, + jint color_space_conversion, + jint resize_quality, + jfloat resize_width, + jfloat resize_height); +#endif + +#if defined(TARGET_OS_ANDROID) +jlong Java_org_nativescript_canvas_TNSImageBitmap_nativeCreateFromAsset(JNIEnv, + JClass, + jlong asset, + jboolean flip_y, + jint premultiply_alpha, + jint color_space_conversion, + jint resize_quality, + jfloat resize_width, + jfloat resize_height); +#endif + +#if defined(TARGET_OS_ANDROID) +jlong Java_org_nativescript_canvas_TNSImageBitmap_nativeCreateFromAssetSrcRect(JNIEnv, + JClass, + jlong asset, + jfloat sx, + jfloat sy, + jfloat s_width, + jfloat s_height, + jboolean flip_y, + jint premultiply_alpha, + jint color_space_conversion, + jint resize_quality, + jfloat resize_width, + jfloat resize_height); +#endif + +#if defined(TARGET_OS_ANDROID) +jlong Java_org_nativescript_canvas_TNSImageBitmap_nativeCreateFromBitmap(JNIEnv env, + JClass, + JObject bitmap, + jboolean flip_y, + jint premultiply_alpha, + jint color_space_conversion, + jint resize_quality, + jfloat resize_width, + jfloat resize_height); +#endif + +#if defined(TARGET_OS_ANDROID) +jlong Java_org_nativescript_canvas_TNSImageBitmap_nativeCreateFromBitmapSrcRect(JNIEnv env, + JClass, + JObject bitmap, + jfloat sx, + jfloat sy, + jfloat s_width, + jfloat s_height, + jboolean flip_y, + jint premultiply_alpha, + jint color_space_conversion, + jint resize_quality, + jfloat resize_width, + jfloat resize_height); +#endif + +#if defined(TARGET_OS_ANDROID) +jlong Java_org_nativescript_canvas_TNSImageBitmap_nativeCreateFromImageData(JNIEnv, + JClass, + jlong image_data, + jboolean flip_y, + jint premultiply_alpha, + jint color_space_conversion, + jint resize_quality, + jfloat resize_width, + jfloat resize_height); +#endif + +#if defined(TARGET_OS_ANDROID) +jlong Java_org_nativescript_canvas_TNSImageBitmap_nativeCreateFromImageDataSrcRect(JNIEnv, + JClass, + jlong image_data, + jfloat sx, + jfloat sy, + jfloat s_width, + jfloat s_height, + jboolean flip_y, + jint premultiply_alpha, + jint color_space_conversion, + jint resize_quality, + jfloat resize_width, + jfloat resize_height); +#endif + +#if defined(TARGET_OS_ANDROID) +jlong Java_org_nativescript_canvas_TNSImageData_nativeInit(JNIEnv, JClass, jint width, jint height); +#endif + +#if defined(TARGET_OS_ANDROID) +jint Java_org_nativescript_canvas_TNSImageData_nativeWidth(JNIEnv, JClass, jlong image_data); +#endif + +#if defined(TARGET_OS_ANDROID) +jint Java_org_nativescript_canvas_TNSImageData_nativeHeight(JNIEnv, JClass, jlong image_data); +#endif + +#if defined(TARGET_OS_ANDROID) +jobject Java_org_nativescript_canvas_TNSImageData_nativeData(JNIEnv env, JClass, jlong image_data); +#endif + +#if defined(TARGET_OS_ANDROID) +jint Java_org_nativescript_canvas_TNSImageData_nativeDataLength(JNIEnv, JClass, jlong image_data); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSImageData_nativeDestroy(JNIEnv, JClass, jlong image_data); +#endif + +#if defined(TARGET_OS_ANDROID) +jlong Java_org_nativescript_canvas_TNSDOMMatrix_nativeInit(JNIEnv, JClass); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSDOMMatrix_nativeUpdate(JNIEnv env, + JClass, + jlong matrix, + jfloatArray data); +#endif + +#if defined(TARGET_OS_ANDROID) +jfloat Java_org_nativescript_canvas_TNSDOMMatrix_nativeA(JNIEnv, JClass, jlong matrix); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSDOMMatrix_nativeSetA(JNIEnv, JClass, jlong matrix, jfloat a); +#endif + +#if defined(TARGET_OS_ANDROID) +jfloat Java_org_nativescript_canvas_TNSDOMMatrix_nativeB(JNIEnv, JClass, jlong matrix); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSDOMMatrix_nativeSetB(JNIEnv, JClass, jlong matrix, jfloat b); +#endif + +#if defined(TARGET_OS_ANDROID) +jfloat Java_org_nativescript_canvas_TNSDOMMatrix_nativeC(JNIEnv, JClass, jlong matrix); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSDOMMatrix_nativeSetC(JNIEnv, JClass, jlong matrix, jfloat c); +#endif + +#if defined(TARGET_OS_ANDROID) +jfloat Java_org_nativescript_canvas_TNSDOMMatrix_nativeD(JNIEnv, JClass, jlong matrix); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSDOMMatrix_nativeSetD(JNIEnv, JClass, jlong matrix, jfloat d); +#endif + +#if defined(TARGET_OS_ANDROID) +jfloat Java_org_nativescript_canvas_TNSDOMMatrix_nativeE(JNIEnv, JClass, jlong matrix); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSDOMMatrix_nativeSetE(JNIEnv, JClass, jlong matrix, jfloat e); +#endif + +#if defined(TARGET_OS_ANDROID) +jfloat Java_org_nativescript_canvas_TNSDOMMatrix_nativeF(JNIEnv, JClass, jlong matrix); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSDOMMatrix_nativeSetF(JNIEnv, JClass, jlong matrix, jfloat f); +#endif + +#if defined(TARGET_OS_ANDROID) +jfloat Java_org_nativescript_canvas_TNSDOMMatrix_nativeM11(JNIEnv, JClass, jlong matrix); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSDOMMatrix_nativeSetM11(JNIEnv, + JClass, + jlong matrix, + jfloat m11); +#endif + +#if defined(TARGET_OS_ANDROID) +jfloat Java_org_nativescript_canvas_TNSDOMMatrix_nativeM12(JNIEnv, JClass, jlong matrix); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSDOMMatrix_nativeSetM12(JNIEnv, + JClass, + jlong matrix, + jfloat m12); +#endif + +#if defined(TARGET_OS_ANDROID) +jfloat Java_org_nativescript_canvas_TNSDOMMatrix_nativeM13(JNIEnv, JClass, jlong matrix); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSDOMMatrix_nativeSetM13(JNIEnv, + JClass, + jlong matrix, + jfloat m13); +#endif + +#if defined(TARGET_OS_ANDROID) +jfloat Java_org_nativescript_canvas_TNSDOMMatrix_nativeM14(JNIEnv, JClass, jlong matrix); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSDOMMatrix_nativeSetM14(JNIEnv, + JClass, + jlong matrix, + jfloat m14); +#endif + +#if defined(TARGET_OS_ANDROID) +jfloat Java_org_nativescript_canvas_TNSDOMMatrix_nativeM21(JNIEnv, JClass, jlong matrix); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSDOMMatrix_nativeSetM21(JNIEnv, + JClass, + jlong matrix, + jfloat m21); +#endif + +#if defined(TARGET_OS_ANDROID) +jfloat Java_org_nativescript_canvas_TNSDOMMatrix_nativeM22(JNIEnv, JClass, jlong matrix); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSDOMMatrix_nativeSetM22(JNIEnv, + JClass, + jlong matrix, + jfloat m22); +#endif + +#if defined(TARGET_OS_ANDROID) +jfloat Java_org_nativescript_canvas_TNSDOMMatrix_nativeM23(JNIEnv, JClass, jlong matrix); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSDOMMatrix_nativeSetM23(JNIEnv, + JClass, + jlong matrix, + jfloat m23); +#endif + +#if defined(TARGET_OS_ANDROID) +jfloat Java_org_nativescript_canvas_TNSDOMMatrix_nativeM24(JNIEnv, JClass, jlong matrix); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSDOMMatrix_nativeSetM24(JNIEnv, + JClass, + jlong matrix, + jfloat m24); +#endif + +#if defined(TARGET_OS_ANDROID) +jfloat Java_org_nativescript_canvas_TNSDOMMatrix_nativeM31(JNIEnv, JClass, jlong matrix); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSDOMMatrix_nativeSetM31(JNIEnv, + JClass, + jlong matrix, + jfloat m31); +#endif + +#if defined(TARGET_OS_ANDROID) +jfloat Java_org_nativescript_canvas_TNSDOMMatrix_nativeM32(JNIEnv, JClass, jlong matrix); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSDOMMatrix_nativeSetM32(JNIEnv, + JClass, + jlong matrix, + jfloat m32); +#endif + +#if defined(TARGET_OS_ANDROID) +jfloat Java_org_nativescript_canvas_TNSDOMMatrix_nativeM33(JNIEnv, JClass, jlong matrix); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSDOMMatrix_nativeSetM33(JNIEnv, + JClass, + jlong matrix, + jfloat m33); +#endif + +#if defined(TARGET_OS_ANDROID) +jfloat Java_org_nativescript_canvas_TNSDOMMatrix_nativeM34(JNIEnv, JClass, jlong matrix); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSDOMMatrix_nativeSetM34(JNIEnv, + JClass, + jlong matrix, + jfloat m34); +#endif + +#if defined(TARGET_OS_ANDROID) +jfloat Java_org_nativescript_canvas_TNSDOMMatrix_nativeM41(JNIEnv, JClass, jlong matrix); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSDOMMatrix_nativeSetM41(JNIEnv, + JClass, + jlong matrix, + jfloat m41); +#endif + +#if defined(TARGET_OS_ANDROID) +jfloat Java_org_nativescript_canvas_TNSDOMMatrix_nativeM42(JNIEnv, JClass, jlong matrix); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSDOMMatrix_nativeSetM42(JNIEnv, + JClass, + jlong matrix, + jfloat m42); +#endif + +#if defined(TARGET_OS_ANDROID) +jfloat Java_org_nativescript_canvas_TNSDOMMatrix_nativeM43(JNIEnv, JClass, jlong matrix); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSDOMMatrix_nativeSetM43(JNIEnv, + JClass, + jlong matrix, + jfloat m43); +#endif + +#if defined(TARGET_OS_ANDROID) +jfloat Java_org_nativescript_canvas_TNSDOMMatrix_nativeM44(JNIEnv, JClass, jlong matrix); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSDOMMatrix_nativeSetM44(JNIEnv, + JClass, + jlong matrix, + jfloat m44); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSDOMMatrix_nativeDestroy(JNIEnv, JClass, jlong matrix); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeSetFillColorWithString(JNIEnv env, + JClass, + jlong context, + JString color); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativeSetStrokeColorWithString(JNIEnv env, + JClass, + jlong context, + JString color); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSColorStyle_nativeDestroy(JNIEnv, JClass, jlong style); +#endif + +#if defined(TARGET_OS_ANDROID) +jstring Java_org_nativescript_canvas_TNSColor_nativeGetColorString(JNIEnv env, JClass, jlong color); +#endif + +#if defined(TARGET_OS_ANDROID) +jlong Java_org_nativescript_canvas_TNSPath2D_nativeInit(JNIEnv, JClass); +#endif + +#if defined(TARGET_OS_ANDROID) +jlong Java_org_nativescript_canvas_TNSPath2D_nativeCreateWithPath(JNIEnv, JClass, jlong path); +#endif + +#if defined(TARGET_OS_ANDROID) +jlong Java_org_nativescript_canvas_TNSPath2D_nativeCreateWithString(JNIEnv env, + JClass, + JString string); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSPath2D_nativeAddPath(JNIEnv, + JClass, + jlong path, + jlong path_to_add); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSPath2D_nativeAddPathWithMatrix(JNIEnv, + JClass, + jlong path, + jlong path_to_add, + jlong matrix); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSPath2D_nativeClosePath(JNIEnv, JClass, jlong path); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSPath2D_nativeMoveTo(JNIEnv, + JClass, + jlong path, + jfloat x, + jfloat y); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSPath2D_nativeLineTo(JNIEnv, + JClass, + jlong path, + jfloat x, + jfloat y); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSPath2D_nativeBezierCurveTo(JNIEnv, + JClass, + jlong path, + jfloat cp1x, + jfloat cp1y, + jfloat cp2x, + jfloat cp2y, + jfloat x, + jfloat y); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSPath2D_nativeQuadraticCurveTo(JNIEnv, + JClass, + jlong path, + jfloat cpx, + jfloat cpy, + jfloat x, + jfloat y); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSPath2D_nativeArc(JNIEnv, + JClass, + jlong path, + jfloat x, + jfloat y, + jfloat radius, + jfloat start_angle, + jfloat end_angle, + bool anti_clockwise); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSPath2D_nativeArcTo(JNIEnv, + JClass, + jlong path, + jfloat x1, + jfloat y1, + jfloat x2, + jfloat y2, + jfloat radius); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSPath2D_nativeEllipse(JNIEnv, + JClass, + jlong path, + jfloat x, + jfloat y, + jfloat radius_x, + jfloat radius_y, + jfloat rotation, + jfloat start_angle, + jfloat end_angle, + bool anticlockwise); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSPath2D_nativeRect(JNIEnv, + JClass, + jlong path, + jfloat x, + jfloat y, + jfloat width, + jfloat height); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSPath2D_nativeDestroy(JNIEnv, JClass, jlong path); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSPattern_nativeSetTransform(JNIEnv, + JClass, + jlong pattern, + jlong matrix); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSSVG_nativeDrawSVG(JNIEnv env, + JClass, + jlong context, + JString svg); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSSVG_nativeDrawSVGFromPath(JNIEnv env, + JClass, + jlong context, + JString path); +#endif + +#if defined(TARGET_OS_ANDROID) +jlong Java_org_nativescript_canvas_TNSTextDecoder_nativeInit(JNIEnv env, JClass, JString decoding); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSTextDecoder_nativeDestroy(JNIEnv, JClass, jlong decoder); +#endif + +#if defined(TARGET_OS_ANDROID) +jstring Java_org_nativescript_canvas_TNSTextDecoder_nativeGetEncoding(JNIEnv env, + JClass, + jlong decoder); +#endif + +#if defined(TARGET_OS_ANDROID) +jstring Java_org_nativescript_canvas_TNSTextDecoder_nativeDecodeBuffer(JNIEnv env, + JClass, + jlong decoder, + JByteBuffer data); +#endif + +#if defined(TARGET_OS_ANDROID) +jbyteArray Java_org_nativescript_canvas_TNSTextDecoder_nativeDecodeBufferToBytes(JNIEnv env, + JClass, + jlong decoder, + JByteBuffer data); +#endif + +#if defined(TARGET_OS_ANDROID) +jstring Java_org_nativescript_canvas_TNSTextDecoder_nativeDecode(JNIEnv env, + JClass, + jlong decoder, + jbyteArray data); +#endif + +#if defined(TARGET_OS_ANDROID) +jbyteArray Java_org_nativescript_canvas_TNSTextDecoder_nativeDecodeToBytes(JNIEnv env, + JClass, + jlong decoder, + jbyteArray data); +#endif + +#if defined(TARGET_OS_ANDROID) +jlong Java_org_nativescript_canvas_TNSTextEncoder_nativeInit(JNIEnv env, JClass, JString encoding); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSTextEncoder_nativeDestroy(JNIEnv, JClass, jlong encoder); +#endif + +#if defined(TARGET_OS_ANDROID) +jstring Java_org_nativescript_canvas_TNSTextEncoder_nativeGetEncoding(JNIEnv env, + JClass, + jlong encoder); +#endif + +#if defined(TARGET_OS_ANDROID) +jbyteArray Java_org_nativescript_canvas_TNSTextEncoder_nativeEncode(JNIEnv env, + JClass, + jlong encoder, + JString text); +#endif + +#if defined(TARGET_OS_ANDROID) +jfloat Java_org_nativescript_canvas_TNSTextMetrics_nativeGetWidth(JNIEnv, JClass, jlong metrics); +#endif + +#if defined(TARGET_OS_ANDROID) +jfloat Java_org_nativescript_canvas_TNSTextMetrics_nativeGetActualBoundingBoxLeft(JNIEnv, + JClass, + jlong metrics); +#endif + +#if defined(TARGET_OS_ANDROID) +jfloat Java_org_nativescript_canvas_TNSTextMetrics_nativeGetActualBoundingBoxRight(JNIEnv, + JClass, + jlong metrics); +#endif + +#if defined(TARGET_OS_ANDROID) +jfloat Java_org_nativescript_canvas_TNSTextMetrics_nativeGetActualBoundingBoxAscent(JNIEnv, + JClass, + jlong metrics); +#endif + +#if defined(TARGET_OS_ANDROID) +jfloat Java_org_nativescript_canvas_TNSTextMetrics_nativeGetActualBoundingBoxDescent(JNIEnv, + JClass, + jlong metrics); +#endif + +#if defined(TARGET_OS_ANDROID) +jfloat Java_org_nativescript_canvas_TNSTextMetrics_nativeGetFontBoundingBoxAscent(JNIEnv, + JClass, + jlong metrics); +#endif + +#if defined(TARGET_OS_ANDROID) +jfloat Java_org_nativescript_canvas_TNSTextMetrics_nativeGetFontBoundingBoxDescent(JNIEnv, + JClass, + jlong metrics); +#endif + +#if defined(TARGET_OS_ANDROID) +jfloat Java_org_nativescript_canvas_TNSTextMetrics_nativeGetEmHeightAscent(JNIEnv, + JClass, + jlong metrics); +#endif + +#if defined(TARGET_OS_ANDROID) +jfloat Java_org_nativescript_canvas_TNSTextMetrics_nativeGetEmHeightDescent(JNIEnv, + JClass, + jlong metrics); +#endif + +#if defined(TARGET_OS_ANDROID) +jfloat Java_org_nativescript_canvas_TNSTextMetrics_nativeGetHangingBaseline(JNIEnv, + JClass, + jlong metrics); +#endif + +#if defined(TARGET_OS_ANDROID) +jfloat Java_org_nativescript_canvas_TNSTextMetrics_nativeGetAlphabeticBaseline(JNIEnv, + JClass, + jlong metrics); +#endif + +#if defined(TARGET_OS_ANDROID) +jfloat Java_org_nativescript_canvas_TNSTextMetrics_nativeGetIdeographicBaseline(JNIEnv, + JClass, + jlong metrics); +#endif + +#if defined(TARGET_OS_ANDROID) +void Java_org_nativescript_canvas_TNSTextMetrics_nativeDestroy(JNIEnv, JClass, jlong metrics); +#endif + +#if defined(TARGET_OS_ANDROID) +jbyteArray Java_org_nativescript_canvas_Utils_nativeGetByteBufferFromBitmap(JNIEnv env, + JClass, + JObject bitmap); +#endif + +#if defined(TARGET_OS_IOS) +void destroy_string(const char *string); +#endif + +#if defined(TARGET_OS_IOS) +void destroy_context(long long context); +#endif + +#if defined(TARGET_OS_IOS) +void destroy_paint_style(long long style); +#endif + +#if defined(TARGET_OS_IOS) +void destroy_text_metrics(long long metrics); +#endif + +#if defined(TARGET_OS_IOS) +long long context_init_context(float width, + float height, + float density, + int buffer_id, + uintptr_t samples, + bool alpha, + unsigned int font_color, + float ppi, + enum TextDirection direction); +#endif + +#if defined(TARGET_OS_IOS) +long long context_init_context_with_custom_surface(float width, + float height, + float density, + bool alpha, + int font_color, + float ppi, + enum TextDirection direction); +#endif + +#if defined(TARGET_OS_IOS) +void context_resize_custom_surface(long long context, + float width, + float height, + float density, + bool alpha, + float ppi); +#endif + +#if defined(TARGET_OS_IOS) +void context_resize_surface(long long context, + float width, + float height, + float density, + int buffer_id, + uintptr_t samples, + bool alpha, + float ppi); +#endif + +#if defined(TARGET_OS_IOS) +const char *context_data_url(long long context, const char *format, float quality); +#endif + +#if defined(TARGET_OS_IOS) +struct U8Array *context_snapshot_canvas(long long context); +#endif + +#if defined(TARGET_OS_IOS) +void context_flush(long long context); +#endif + +#if defined(TARGET_OS_IOS) +void context_custom_with_buffer_flush(long long context, + uint8_t *buf, + uintptr_t buf_size, + float width, + float height); +#endif + +#if defined(TARGET_OS_IOS) +void context_set_direction(long long context, enum TextDirection direction); +#endif + +#if defined(TARGET_OS_IOS) +enum TextDirection context_get_direction(const struct Context *context); +#endif + +#if defined(TARGET_OS_IOS) +void context_set_fill_style(long long context, long long style); +#endif + +#if defined(TARGET_OS_IOS) +struct PaintStyleValue *context_get_fill_style(long long context); +#endif + +#if defined(TARGET_OS_IOS) +void context_set_filter(long long context, const char *filter); +#endif + +#if defined(TARGET_OS_IOS) +const char *context_get_filter(long long context); +#endif + +#if defined(TARGET_OS_IOS) +void context_set_font(long long context, const char *filter); +#endif + +#if defined(TARGET_OS_IOS) +const char *context_get_font(long long context); +#endif + +#if defined(TARGET_OS_IOS) +void context_set_global_alpha(long long context, float alpha); +#endif + +#if defined(TARGET_OS_IOS) +float context_get_global_alpha(long long context); +#endif + +#if defined(TARGET_OS_IOS) +void context_set_global_composite_operation(long long context, + enum CompositeOperationType operation); +#endif + +#if defined(TARGET_OS_IOS) +enum CompositeOperationType context_get_global_composite_operation(long long context); +#endif + +#if defined(TARGET_OS_IOS) +void context_set_image_smoothing_enabled(long long context, bool enabled); +#endif + +#if defined(TARGET_OS_IOS) +bool context_get_image_smoothing_enabled(long long context); +#endif + +#if defined(TARGET_OS_IOS) +void context_set_image_smoothing_quality(long long context, enum ImageSmoothingQuality quality); +#endif + +#if defined(TARGET_OS_IOS) +enum ImageSmoothingQuality context_get_image_smoothing_quality(long long context); +#endif + +#if defined(TARGET_OS_IOS) +void context_set_line_cap(long long context, enum LineCap cap); +#endif + +#if defined(TARGET_OS_IOS) +enum LineCap context_get_line_cap(long long context); +#endif + +#if defined(TARGET_OS_IOS) +void context_set_line_dash_offset(long long context, float offset); +#endif + +#if defined(TARGET_OS_IOS) +float context_get_line_dash_offset(long long context); +#endif + +#if defined(TARGET_OS_IOS) +void context_set_line_join(long long context, enum LineJoin join); +#endif + +#if defined(TARGET_OS_IOS) +enum LineJoin context_get_line_join(long long context); +#endif + +#if defined(TARGET_OS_IOS) +void context_set_line_width(long long context, float width); +#endif + +#if defined(TARGET_OS_IOS) +float context_get_line_width(long long context); +#endif + +#if defined(TARGET_OS_IOS) +void context_set_miter_limit(long long context, float limit); +#endif + +#if defined(TARGET_OS_IOS) +float context_get_miter_limit(long long context); +#endif + +#if defined(TARGET_OS_IOS) +void context_set_shadow_blur(long long context, float blur); +#endif + +#if defined(TARGET_OS_IOS) +float context_get_shadow_blur(long long context); +#endif + +#if defined(TARGET_OS_IOS) +void context_set_shadow_color(long long context, uint8_t r, uint8_t g, uint8_t b, uint8_t a); +#endif + +#if defined(TARGET_OS_IOS) +void context_set_shadow_color_string(long long context, const char *color); +#endif + +#if defined(TARGET_OS_IOS) +const char *context_get_shadow_color(long long context); +#endif + +#if defined(TARGET_OS_IOS) +void context_set_shadow_offset_x(long long context, float x); +#endif + +#if defined(TARGET_OS_IOS) +float context_get_shadow_offset_x(long long context); +#endif + +#if defined(TARGET_OS_IOS) +void context_set_shadow_offset_y(long long context, float y); +#endif + +#if defined(TARGET_OS_IOS) +float context_get_shadow_offset_y(long long context); +#endif + +#if defined(TARGET_OS_IOS) +void context_set_stroke_style(long long context, long long style); +#endif + +#if defined(TARGET_OS_IOS) +struct PaintStyleValue *context_get_stroke_style(long long context); +#endif + +#if defined(TARGET_OS_IOS) +void context_set_text_align(long long context, enum TextAlign align); +#endif + +#if defined(TARGET_OS_IOS) +enum TextAlign context_get_text_align(long long context); +#endif + +#if defined(TARGET_OS_IOS) +void context_set_text_baseline(long long context, enum TextBaseLine baseline); +#endif + +#if defined(TARGET_OS_IOS) +enum TextBaseLine context_get_text_baseline(long long context); +#endif + +#if defined(TARGET_OS_IOS) +void context_arc(long long context, + float x, + float y, + float radius, + float start_angle, + float end_angle, + bool anti_clockwise); +#endif + +#if defined(TARGET_OS_IOS) +void context_arc_to(long long context, float x1, float y1, float x2, float y2, float radius); +#endif + +#if defined(TARGET_OS_IOS) +void context_begin_path(long long context); +#endif + +#if defined(TARGET_OS_IOS) +void context_bezier_curve_to(long long context, + float cp1x, + float cp1y, + float cp2x, + float cp2y, + float x, + float y); +#endif + +#if defined(TARGET_OS_IOS) +void context_clear_rect(long long context, float x, float y, float width, float height); +#endif + +#if defined(TARGET_OS_IOS) +void context_clip(long long context, long long path, enum FillRule rule); +#endif + +#if defined(TARGET_OS_IOS) +void context_clip_rule(long long context, enum FillRule rule); +#endif + +#if defined(TARGET_OS_IOS) +void context_close_path(long long context); +#endif + +#if defined(TARGET_OS_IOS) +long long context_create_image_data(int width, int height); +#endif + +#if defined(TARGET_OS_IOS) +long long context_create_linear_gradient(long long context, float x0, float y0, float x1, float y1); +#endif + +#if defined(TARGET_OS_IOS) +long long context_create_pattern(long long context, + const uint8_t *image_data, + uintptr_t image_len, + int width, + int height, + enum Repetition repetition); +#endif + +#if defined(TARGET_OS_IOS) +long long context_create_pattern_asset(long long context, + long long asset, + enum Repetition repetition); +#endif + +#if defined(TARGET_OS_IOS) +long long context_create_pattern_encoded(long long context, + const uint8_t *image_data, + uintptr_t image_len, + enum Repetition repetition); +#endif + +#if defined(TARGET_OS_IOS) +long long context_create_radial_gradient(long long context, + float x0, + float y0, + float r0, + float x1, + float y1, + float r1); +#endif + +#if defined(TARGET_OS_IOS) +void context_draw_image_dx_dy(long long context, + const uint8_t *image_data, + uintptr_t image_len, + float width, + float height, + float dx, + float dy); +#endif + +#if defined(TARGET_OS_IOS) +void context_draw_image_dx_dy_dw_dh(long long context, + const uint8_t *image_data, + uintptr_t image_len, + float width, + float height, + float dx, + float dy, + float d_width, + float d_height); +#endif + +#if defined(TARGET_OS_IOS) +void context_draw_image(long long context, + const uint8_t *image_data, + uintptr_t image_len, + float width, + float height, + float sx, + float sy, + float s_width, + float s_height, + float dx, + float dy, + float d_width, + float d_height); +#endif + +#if defined(TARGET_OS_IOS) +void context_draw_image_encoded_dx_dy(long long context, + const uint8_t *image_data, + uintptr_t image_len, + float dx, + float dy); +#endif + +#if defined(TARGET_OS_IOS) +void context_draw_image_encoded_dx_dy_dw_dh(long long context, + const uint8_t *image_data, + uintptr_t image_len, + float dx, + float dy, + float d_width, + float d_height); +#endif + +#if defined(TARGET_OS_IOS) +void context_draw_image_encoded(long long context, + const uint8_t *image_data, + uintptr_t image_len, + float sx, + float sy, + float s_width, + float s_height, + float dx, + float dy, + float d_width, + float d_height); +#endif + +#if defined(TARGET_OS_IOS) +void context_draw_image_dx_dy_asset(long long context, long long asset, float dx, float dy); +#endif + +#if defined(TARGET_OS_IOS) +void context_draw_image_dx_dy_dw_dh_asset(long long context, + long long asset, + float dx, + float dy, + float d_width, + float d_height); +#endif + +#if defined(TARGET_OS_IOS) +void context_draw_image_asset(long long context, + long long asset, + float sx, + float sy, + float s_width, + float s_height, + float dx, + float dy, + float d_width, + float d_height); +#endif + +#if defined(TARGET_OS_IOS) +void context_ellipse(long long context, + float x, + float y, + float radius_x, + float radius_y, + float rotation, + float start_angle, + float end_angle, + bool anticlockwise); +#endif + +#if defined(TARGET_OS_IOS) +void context_fill(long long context, long long path, enum FillRule rule); +#endif + +#if defined(TARGET_OS_IOS) +void context_fill_rect(long long context, float x, float y, float width, float height); +#endif + +#if defined(TARGET_OS_IOS) +void context_fill_text(long long context, const char *text, float x, float y, float width); +#endif + +#if defined(TARGET_OS_IOS) +long long context_get_image_data(long long context, float sx, float sy, float sw, float sh); +#endif + +#if defined(TARGET_OS_IOS) +struct F32Array *context_get_line_dash(long long context); +#endif + +#if defined(TARGET_OS_IOS) +long long context_get_transform(long long context); +#endif + +#if defined(TARGET_OS_IOS) +bool context_is_point_in_path(long long context, + long long path, + float x, + float y, + enum FillRule rule); +#endif + +#if defined(TARGET_OS_IOS) +bool context_is_point_in_stroke(long long context, long long path, float x, float y); +#endif + +#if defined(TARGET_OS_IOS) +void context_line_to(long long context, float x, float y); +#endif + +#if defined(TARGET_OS_IOS) +long long context_measure_text(long long context, const char *text); +#endif + +#if defined(TARGET_OS_IOS) +void context_move_to(long long context, float x, float y); +#endif + +#if defined(TARGET_OS_IOS) +void context_put_image_data(long long context, + long long image_data, + float dx, + float dy, + float dirty_x, + float dirty_y, + float dirty_width, + float dirty_height); +#endif + +#if defined(TARGET_OS_IOS) +void context_quadratic_curve_to(long long context, float cpx, float cpy, float x, float y); +#endif + +#if defined(TARGET_OS_IOS) +void context_rect(long long context, float x, float y, float width, float height); +#endif + +#if defined(TARGET_OS_IOS) +void context_reset_transform(long long context); +#endif + +#if defined(TARGET_OS_IOS) +void context_restore(long long context); +#endif + +#if defined(TARGET_OS_IOS) +void context_rotate(long long context, float angle); +#endif + +#if defined(TARGET_OS_IOS) +void context_save(long long context); +#endif + +#if defined(TARGET_OS_IOS) +void context_scale(long long context, float x, float y); +#endif + +#if defined(TARGET_OS_IOS) +void context_set_line_dash(long long context, const float *data, uintptr_t data_length); +#endif + +#if defined(TARGET_OS_IOS) +void context_set_transform(long long context, float a, float b, float c, float d, float e, float f); +#endif + +#if defined(TARGET_OS_IOS) +void context_set_transform_matrix(long long context, long long matrix); +#endif + +#if defined(TARGET_OS_IOS) +void context_stroke(long long context, long long path); +#endif + +#if defined(TARGET_OS_IOS) +void context_stroke_rect(long long context, float x, float y, float width, float height); +#endif + +#if defined(TARGET_OS_IOS) +void context_stroke_text(long long context, const char *text, float x, float y, float width); +#endif + +#if defined(TARGET_OS_IOS) +void context_transform(long long context, float a, float b, float c, float d, float e, float f); +#endif + +#if defined(TARGET_OS_IOS) +void context_translate(long long context, float x, float y); +#endif + +#if defined(TARGET_OS_IOS) +void gl_tex_image_2D_asset(unsigned int target, + int level, + int internalformat, + int border, + unsigned int format, + unsigned int image_type, + long long asset, + bool flip_y); +#endif + +#if defined(TARGET_OS_IOS) +void gl_tex_sub_image_2D_asset(unsigned int target, + int level, + int xoffset, + int yoffset, + unsigned int format, + unsigned int image_type, + long long asset, + bool flip_y); +#endif + +#if defined(TARGET_OS_IOS) +void gl_tex_image_3D_asset(unsigned int target, + int level, + int internalformat, + int width, + int height, + int depth, + int border, + unsigned int format, + unsigned int image_type, + long long asset, + bool flip_y); +#endif + +#if defined(TARGET_OS_IOS) +void gl_tex_sub_image_3D_asset(unsigned int target, + int level, + int xoffset, + int yoffset, + int zoffset, + int width, + int height, + int depth, + unsigned int format, + unsigned int image_type, + long long asset, + bool flip_y); +#endif + +#if defined(TARGET_OS_IOS) +void gl_vertex_attrib_pointer(unsigned int index, + int size, + unsigned int pointer_type, + bool normalized, + int stride, + long long offset); +#endif + +#if defined(TARGET_OS_IOS) +long long gl_get_vertex_attrib_offset(unsigned int index, unsigned int pname); +#endif + +#if defined(TARGET_OS_IOS) +void gradient_add_color_stop(long long style, float stop, const char *color); +#endif + +#if defined(TARGET_OS_IOS) +long long image_asset_create(void); +#endif + +#if defined(TARGET_OS_IOS) +bool image_asset_load_from_path(long long asset, const char *path); +#endif + +#if defined(TARGET_OS_IOS) +bool image_asset_load_from_raw(long long asset, const uint8_t *array, uintptr_t size); +#endif + +#if defined(TARGET_OS_IOS) +struct U8Array *image_asset_get_bytes(long long asset); +#endif + +#if defined(TARGET_OS_IOS) +struct U8Array *image_asset_get_rgba_bytes(long long asset); +#endif + +#if defined(TARGET_OS_IOS) +struct U8Array *image_asset_get_rgb_bytes(long long asset); +#endif + +#if defined(TARGET_OS_IOS) +unsigned int image_asset_width(long long asset); +#endif + +#if defined(TARGET_OS_IOS) +unsigned int image_asset_height(long long asset); +#endif + +#if defined(TARGET_OS_IOS) +const char *image_asset_get_error(long long asset); +#endif + +#if defined(TARGET_OS_IOS) +bool image_asset_has_error(long long asset); +#endif + +#if defined(TARGET_OS_IOS) +bool image_asset_scale(long long asset, unsigned int x, unsigned int y); +#endif + +#if defined(TARGET_OS_IOS) +bool image_asset_flip_x(long long asset); +#endif + +#if defined(TARGET_OS_IOS) +bool image_asset_flip_x_in_place(long long asset); +#endif + +#if defined(TARGET_OS_IOS) +bool image_asset_flip_y(long long asset); +#endif + +#if defined(TARGET_OS_IOS) +void image_asset_flip_y_in_place_owned(uint8_t *buf, uintptr_t length); +#endif + +#if defined(TARGET_OS_IOS) +void image_asset_flip_x_in_place_owned(uint8_t *buf, uintptr_t length); +#endif + +#if defined(TARGET_OS_IOS) +bool image_asset_flip_y_in_place(long long asset); +#endif + +#if defined(TARGET_OS_IOS) +bool image_asset_save_path(long long asset, const char *path, unsigned int format); +#endif + +#if defined(TARGET_OS_IOS) +void destroy_image_asset(long long asset); +#endif + +#if defined(TARGET_OS_IOS) +long long image_bitmap_create_from_bytes(const uint8_t *image_bytes, + uintptr_t image_size, + float image_width, + float image_height, + bool flip_y, + int32_t premultiply_alpha, + int32_t color_space_conversion, + int32_t resize_quality, + float resize_width, + float resize_height); +#endif + +#if defined(TARGET_OS_IOS) +long long image_bitmap_create_from_bytes_src_rect(const uint8_t *image_bytes, + uintptr_t image_size, + float image_width, + float image_height, + float sx, + float sy, + float s_width, + float s_height, + bool flip_y, + int32_t premultiply_alpha, + int32_t color_space_conversion, + int32_t resize_quality, + float resize_width, + float resize_height); +#endif + +#if defined(TARGET_OS_IOS) +long long image_bitmap_create_from_image_asset(long long asset, + bool flip_y, + int premultiply_alpha, + int color_space_conversion, + int resize_quality, + float resize_width, + float resize_height); +#endif + +#if defined(TARGET_OS_IOS) +long long image_bitmap_create_from_image_asset_src_rect(long long asset, + float sx, + float sy, + float s_width, + float s_height, + bool flip_y, + int premultiply_alpha, + int color_space_conversion, + int resize_quality, + float resize_width, + float resize_height); +#endif + +#if defined(TARGET_OS_IOS) +long long image_bitmap_create_from_bytes_encoded(const uint8_t *image_bytes, + uintptr_t image_size, + bool flip_y, + int32_t premultiply_alpha, + int32_t color_space_conversion, + int32_t resize_quality, + float resize_width, + float resize_height); +#endif + +#if defined(TARGET_OS_IOS) +long long image_bitmap_create_from_bytes_encoded_src_rect(const uint8_t *image_bytes, + uintptr_t image_size, + float sx, + float sy, + float s_width, + float s_height, + bool flip_y, + int32_t premultiply_alpha, + int32_t color_space_conversion, + int32_t resize_quality, + float resize_width, + float resize_height); +#endif + +#if defined(TARGET_OS_IOS) +long long image_bitmap_create_from_image_data(long long image_data, + bool flip_y, + int premultiply_alpha, + int color_space_conversion, + int resize_quality, + float resize_width, + float resize_height); +#endif + +#if defined(TARGET_OS_IOS) +long long image_bitmap_create_from_image_data_src_rect(long long image_data, + float sx, + float sy, + float s_width, + float s_height, + bool flip_y, + int premultiply_alpha, + int color_space_conversion, + int resize_quality, + float resize_width, + float resize_height); +#endif + +#if defined(TARGET_OS_IOS) +long long image_data_create(int width, int height); +#endif + +#if defined(TARGET_OS_IOS) +int image_data_width(long long image_data); +#endif + +#if defined(TARGET_OS_IOS) +int image_data_height(long long image_data); +#endif + +#if defined(TARGET_OS_IOS) +uint8_t *image_data_data(long long image_data); +#endif + +#if defined(TARGET_OS_IOS) +uintptr_t image_data_data_length(long long image_data); +#endif + +#if defined(TARGET_OS_IOS) +void destroy_image_data(long long image_data); +#endif + +#if defined(TARGET_OS_IOS) +long long matrix_create(void); +#endif + +#if defined(TARGET_OS_IOS) +void matrix_update(long long matrix, const float *data, uintptr_t data_len); +#endif + +#if defined(TARGET_OS_IOS) +float matrix_a(long long matrix); +#endif + +#if defined(TARGET_OS_IOS) +void matrix_set_a(long long matrix, float a); +#endif + +#if defined(TARGET_OS_IOS) +float matrix_b(long long matrix); +#endif + +#if defined(TARGET_OS_IOS) +void matrix_set_b(long long matrix, float b); +#endif + +#if defined(TARGET_OS_IOS) +float matrix_c(long long matrix); +#endif + +#if defined(TARGET_OS_IOS) +void matrix_set_c(long long matrix, float c); +#endif + +#if defined(TARGET_OS_IOS) +float matrix_d(long long matrix); +#endif + +#if defined(TARGET_OS_IOS) +void matrix_set_d(long long matrix, float d); +#endif + +#if defined(TARGET_OS_IOS) +float matrix_e(long long matrix); +#endif + +#if defined(TARGET_OS_IOS) +void matrix_set_e(long long matrix, float e); +#endif + +#if defined(TARGET_OS_IOS) +float matrix_f(long long matrix); +#endif + +#if defined(TARGET_OS_IOS) +void matrix_set_f(long long matrix, float f); +#endif + +#if defined(TARGET_OS_IOS) +float matrix_m11(long long matrix); +#endif + +#if defined(TARGET_OS_IOS) +void matrix_set_m11(long long matrix, float m11); +#endif + +#if defined(TARGET_OS_IOS) +float matrix_m12(long long matrix); +#endif + +#if defined(TARGET_OS_IOS) +void matrix_set_m12(long long matrix, float m12); +#endif + +#if defined(TARGET_OS_IOS) +float matrix_m13(long long matrix); +#endif + +#if defined(TARGET_OS_IOS) +void matrix_set_m13(long long matrix, float m13); +#endif + +#if defined(TARGET_OS_IOS) +float matrix_m14(long long matrix); +#endif + +#if defined(TARGET_OS_IOS) +void matrix_set_m14(long long matrix, float m14); +#endif + +#if defined(TARGET_OS_IOS) +float matrix_m21(long long matrix); +#endif + +#if defined(TARGET_OS_IOS) +void matrix_set_m21(long long matrix, float m21); +#endif + +#if defined(TARGET_OS_IOS) +float matrix_m22(long long matrix); +#endif + +#if defined(TARGET_OS_IOS) +void matrix_set_m22(long long matrix, float m22); +#endif + +#if defined(TARGET_OS_IOS) +float matrix_m23(long long matrix); +#endif + +#if defined(TARGET_OS_IOS) +void matrix_set_m23(long long matrix, float m23); +#endif + +#if defined(TARGET_OS_IOS) +float matrix_m24(long long matrix); +#endif + +#if defined(TARGET_OS_IOS) +void matrix_set_m24(long long matrix, float m24); +#endif + +#if defined(TARGET_OS_IOS) +float matrix_m31(long long matrix); +#endif + +#if defined(TARGET_OS_IOS) +void matrix_set_m31(long long matrix, float m31); +#endif + +#if defined(TARGET_OS_IOS) +float matrix_m32(long long matrix); +#endif + +#if defined(TARGET_OS_IOS) +void matrix_set_m32(long long matrix, float m32); +#endif + +#if defined(TARGET_OS_IOS) +float matrix_m33(long long matrix); +#endif + +#if defined(TARGET_OS_IOS) +void matrix_set_m33(long long matrix, float m33); +#endif + +#if defined(TARGET_OS_IOS) +float matrix_m34(long long matrix); +#endif + +#if defined(TARGET_OS_IOS) +void matrix_set_m34(long long matrix, float m34); +#endif + +#if defined(TARGET_OS_IOS) +float matrix_m41(long long matrix); +#endif + +#if defined(TARGET_OS_IOS) +void matrix_set_m41(long long matrix, float m41); +#endif + +#if defined(TARGET_OS_IOS) +float matrix_m42(long long matrix); +#endif + +#if defined(TARGET_OS_IOS) +void matrix_set_m42(long long matrix, float m42); +#endif + +#if defined(TARGET_OS_IOS) +float matrix_m43(long long matrix); +#endif + +#if defined(TARGET_OS_IOS) +void matrix_set_m43(long long matrix, float m43); +#endif + +#if defined(TARGET_OS_IOS) +float matrix_m44(long long matrix); +#endif + +#if defined(TARGET_OS_IOS) +void matrix_set_m44(long long matrix, float m44); +#endif + +#if defined(TARGET_OS_IOS) +void destroy_matrix(long long matrix); +#endif + +#if defined(TARGET_OS_IOS) +void paint_style_set_fill_color_with_string(long long context, const char *color); +#endif + +#if defined(TARGET_OS_IOS) +void paint_style_set_stroke_color_with_string(long long context, const char *color); +#endif + +#if defined(TARGET_OS_IOS) +const char *paint_style_get_color_string(long long color); +#endif + +#if defined(TARGET_OS_IOS) +long long path_create(void); +#endif + +#if defined(TARGET_OS_IOS) +long long path_create_with_path(long long path); +#endif + +#if defined(TARGET_OS_IOS) +long long path_create_with_string(const char *string); +#endif + +#if defined(TARGET_OS_IOS) +void path_add_path(long long path, long long path_to_add); +#endif + +#if defined(TARGET_OS_IOS) +void path_add_path_with_matrix(long long path, long long path_to_add, long long matrix); +#endif + +#if defined(TARGET_OS_IOS) +void path_close_path(long long path); +#endif + +#if defined(TARGET_OS_IOS) +void path_move_to(long long path, float x, float y); +#endif + +#if defined(TARGET_OS_IOS) +void path_line_to(long long path, float x, float y); +#endif + +#if defined(TARGET_OS_IOS) +void path_bezier_curve_to(long long path, + float cp1x, + float cp1y, + float cp2x, + float cp2y, + float x, + float y); +#endif + +#if defined(TARGET_OS_IOS) +void path_quadratic_curve_to(long long path, float cpx, float cpy, float x, float y); +#endif + +#if defined(TARGET_OS_IOS) +void path_arc(long long path, + float x, + float y, + float radius, + float start_angle, + float end_angle, + bool anti_clockwise); +#endif + +#if defined(TARGET_OS_IOS) +void path_arc_to(long long path, float x1, float y1, float x2, float y2, float radius); +#endif + +#if defined(TARGET_OS_IOS) +void path_ellipse(long long path, + float x, + float y, + float radius_x, + float radius_y, + float rotation, + float start_angle, + float end_angle, + bool anticlockwise); +#endif + +#if defined(TARGET_OS_IOS) +void path_rect(long long path, float x, float y, float width, float height); +#endif + +#if defined(TARGET_OS_IOS) +void destroy_path(long long path); +#endif + +#if defined(TARGET_OS_IOS) +void pattern_set_transform(long long pattern, long long matrix); +#endif + +#if defined(TARGET_OS_IOS) +void svg_draw_from_string(long long context, const int8_t *svg); +#endif + +#if defined(TARGET_OS_IOS) +void svg_draw_from_path(long long context, const int8_t *path); +#endif + +#if defined(TARGET_OS_IOS) +long long text_decoder_create(const char *decoding); +#endif + +#if defined(TARGET_OS_IOS) +const char *text_decoder_get_encoding(long long decoder); +#endif + +#if defined(TARGET_OS_IOS) +const char *text_decoder_decode(long long decoder, const uint8_t *data, uintptr_t len); +#endif + +#if defined(TARGET_OS_IOS) +const struct U8Array *text_decoder_decode_to_bytes(long long decoder, + const uint8_t *data, + uintptr_t len); +#endif + +#if defined(TARGET_OS_IOS) +const char *text_decoder_decode_u16(long long decoder, const uint16_t *data, uintptr_t len); +#endif + +#if defined(TARGET_OS_IOS) +const char *text_decoder_decode_i16(long long decoder, const int16_t *data, uintptr_t len); +#endif + +#if defined(TARGET_OS_IOS) +const char *text_decoder_decode_i32(long long decoder, const int32_t *data, uintptr_t len); +#endif + +#if defined(TARGET_OS_IOS) +void destroy_text_decoder(long long decoder); +#endif + +#if defined(TARGET_OS_IOS) +struct U8Array *text_decoder_decode_bytes(long long decoder, const uint8_t *data, uintptr_t len); +#endif + +#if defined(TARGET_OS_IOS) +struct U8Array *text_decoder_decode_u16_bytes(long long decoder, + const uint16_t *data, + uintptr_t len); +#endif + +#if defined(TARGET_OS_IOS) +struct U8Array *text_decoder_decode_i16_bytes(long long decoder, + const int16_t *data, + uintptr_t len); +#endif + +#if defined(TARGET_OS_IOS) +struct U8Array *text_decoder_decode_i32_bytes(long long decoder, + const int32_t *data, + uintptr_t len); +#endif + +#if defined(TARGET_OS_IOS) +struct U8Array *text_decoder_decode_u32_bytes(long long decoder, + const uint32_t *data, + uintptr_t len); +#endif + +#if defined(TARGET_OS_IOS) +long long text_encoder_create(const char *encoding); +#endif + +#if defined(TARGET_OS_IOS) +const char *text_encoder_get_encoding(long long encoder); +#endif + +#if defined(TARGET_OS_IOS) +struct U8Array *text_encoder_encode(long long encoder, const char *text); +#endif + +#if defined(TARGET_OS_IOS) +void destroy_text_encoder(long long encoder); +#endif + +#if defined(TARGET_OS_IOS) +float text_metrics_get_width(long long metrics); +#endif + +#if defined(TARGET_OS_IOS) +float text_metrics_get_actual_bounding_box_left(long long metrics); +#endif + +#if defined(TARGET_OS_IOS) +float text_metrics_get_actual_bounding_box_right(long long metrics); +#endif + +#if defined(TARGET_OS_IOS) +float text_metrics_get_actual_bounding_box_ascent(long long metrics); +#endif + +#if defined(TARGET_OS_IOS) +float text_metrics_get_actual_bounding_box_descent(long long metrics); +#endif + +#if defined(TARGET_OS_IOS) +float text_metrics_get_font_bounding_box_ascent(long long metrics); +#endif + +#if defined(TARGET_OS_IOS) +float text_metrics_get_font_bounding_box_descent(long long metrics); +#endif + +#if defined(TARGET_OS_IOS) +float text_metrics_get_em_height_ascent(long long metrics); +#endif + +#if defined(TARGET_OS_IOS) +float text_metrics_get_em_height_descent(long long metrics); +#endif + +#if defined(TARGET_OS_IOS) +float text_metrics_get_hanging_baseline(long long metrics); +#endif + +#if defined(TARGET_OS_IOS) +float text_metrics_get_alphabetic_baseline(long long metrics); +#endif + +#if defined(TARGET_OS_IOS) +float text_metrics_get_ideographic_baseline(long long metrics); +#endif + +#if defined(TARGET_OS_IOS) +void flip_y_in_place(uint8_t *data, uintptr_t length, uintptr_t bytes_per_row, uintptr_t height); +#endif + +#if defined(TARGET_OS_IOS) +void flip_y_in_place_3d(uint8_t *data, + uintptr_t length, + uintptr_t bytes_per_row, + uintptr_t height, + uintptr_t depth); +#endif + +#if defined(TARGET_OS_IOS) +void flip_y_in_place_3d_i8(int8_t *data, + uintptr_t length, + uintptr_t bytes_per_row, + uintptr_t height, + uintptr_t depth); +#endif + +#if defined(TARGET_OS_IOS) +void flip_y_in_place_3d_u16(uint16_t *data, + uintptr_t length, + uintptr_t bytes_per_row, + uintptr_t height, + uintptr_t depth); +#endif + +#if defined(TARGET_OS_IOS) +void flip_y_in_place_3d_i16(int16_t *data, + uintptr_t length, + uintptr_t bytes_per_row, + uintptr_t height, + uintptr_t depth); +#endif + +#if defined(TARGET_OS_IOS) +void flip_y_in_place_3d_u32(uint32_t *data, + uintptr_t length, + uintptr_t bytes_per_row, + uintptr_t height, + uintptr_t depth); +#endif + +#if defined(TARGET_OS_IOS) +void flip_y_in_place_3d_i32(int32_t *data, + uintptr_t length, + uintptr_t bytes_per_row, + uintptr_t height, + uintptr_t depth); +#endif + +#if defined(TARGET_OS_IOS) +void flip_y_in_place_3d_f32(float *data, + uintptr_t length, + uintptr_t bytes_per_row, + uintptr_t height, + uintptr_t depth); +#endif + +#if defined(TARGET_OS_IOS) +void flip_y_in_place_3d_f64(double *data, + uintptr_t length, + uintptr_t bytes_per_row, + uintptr_t height, + uintptr_t depth); +#endif + +#if defined(TARGET_OS_IOS) +void flip_y_in_place_i8(int8_t *data, uintptr_t length, uintptr_t bytes_per_row, uintptr_t height); +#endif + +#if defined(TARGET_OS_IOS) +void flip_y_in_place_u16(uint16_t *data, + uintptr_t length, + uintptr_t bytes_per_row, + uintptr_t height); +#endif + +#if defined(TARGET_OS_IOS) +void flip_y_in_place_i16(int16_t *data, + uintptr_t length, + uintptr_t bytes_per_row, + uintptr_t height); +#endif + +#if defined(TARGET_OS_IOS) +void flip_y_in_place_u32(uint32_t *data, + uintptr_t length, + uintptr_t bytes_per_row, + uintptr_t height); +#endif + +#if defined(TARGET_OS_IOS) +void flip_y_in_place_i32(int32_t *data, + uintptr_t length, + uintptr_t bytes_per_row, + uintptr_t height); +#endif + +#if defined(TARGET_OS_IOS) +void flip_y_in_place_f32(float *data, uintptr_t length, uintptr_t bytes_per_row, uintptr_t height); +#endif + +#if defined(TARGET_OS_IOS) +void flip_y_in_place_f64(double *data, uintptr_t length, uintptr_t bytes_per_row, uintptr_t height); +#endif + +#endif /* CBINDGEN_BINDINGS_H */ diff --git a/packages/canvas/src-native/canvas-ios/CanvasNative/Dist/CanvasNative.xcframework/ios-x86_64-simulator/CanvasNative.framework/Info.plist b/packages/canvas/src-native/canvas-ios/dist/CanvasNative.xcframework/ios-x86_64-simulator/CanvasNative.framework/Info.plist similarity index 62% rename from packages/canvas/src-native/canvas-ios/CanvasNative/Dist/CanvasNative.xcframework/ios-x86_64-simulator/CanvasNative.framework/Info.plist rename to packages/canvas/src-native/canvas-ios/dist/CanvasNative.xcframework/ios-x86_64-simulator/CanvasNative.framework/Info.plist index 58e502af..91097456 100644 Binary files a/packages/canvas/src-native/canvas-ios/CanvasNative/Dist/CanvasNative.xcframework/ios-x86_64-simulator/CanvasNative.framework/Info.plist and b/packages/canvas/src-native/canvas-ios/dist/CanvasNative.xcframework/ios-x86_64-simulator/CanvasNative.framework/Info.plist differ diff --git a/packages/canvas/src-native/canvas-ios/CanvasNative/Dist/CanvasNative.xcframework/ios-x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/x86_64-apple-ios-simulator.swiftdoc b/packages/canvas/src-native/canvas-ios/dist/CanvasNative.xcframework/ios-x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/x86_64-apple-ios-simulator.swiftdoc similarity index 55% rename from packages/canvas/src-native/canvas-ios/CanvasNative/Dist/CanvasNative.xcframework/ios-x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/x86_64-apple-ios-simulator.swiftdoc rename to packages/canvas/src-native/canvas-ios/dist/CanvasNative.xcframework/ios-x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/x86_64-apple-ios-simulator.swiftdoc index 06b7167c..7ec0b68a 100644 Binary files a/packages/canvas/src-native/canvas-ios/CanvasNative/Dist/CanvasNative.xcframework/ios-x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/x86_64-apple-ios-simulator.swiftdoc and b/packages/canvas/src-native/canvas-ios/dist/CanvasNative.xcframework/ios-x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/x86_64-apple-ios-simulator.swiftdoc differ diff --git a/packages/canvas/src-native/canvas-ios/CanvasNative/Dist/CanvasNative.xcframework/ios-x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/x86_64-apple-ios-simulator.swiftinterface b/packages/canvas/src-native/canvas-ios/dist/CanvasNative.xcframework/ios-x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/x86_64-apple-ios-simulator.swiftinterface similarity index 96% rename from packages/canvas/src-native/canvas-ios/CanvasNative/Dist/CanvasNative.xcframework/ios-x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/x86_64-apple-ios-simulator.swiftinterface rename to packages/canvas/src-native/canvas-ios/dist/CanvasNative.xcframework/ios-x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/x86_64-apple-ios-simulator.swiftinterface index 9fbf1572..15a418b4 100644 --- a/packages/canvas/src-native/canvas-ios/CanvasNative/Dist/CanvasNative.xcframework/ios-x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/x86_64-apple-ios-simulator.swiftinterface +++ b/packages/canvas/src-native/canvas-ios/dist/CanvasNative.xcframework/ios-x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/x86_64-apple-ios-simulator.swiftinterface @@ -1,6 +1,6 @@ // swift-interface-format-version: 1.0 -// swift-compiler-version: Apple Swift version 5.4 (swiftlang-1205.0.26.9 clang-1205.0.19.55) -// swift-module-flags: -target x86_64-apple-ios10.0-simulator -enable-objc-interop -enable-library-evolution -swift-version 5 -enforce-exclusivity=checked -O -module-name CanvasNative +// swift-compiler-version: Apple Swift version 5.5.1 (swiftlang-1300.0.31.4 clang-1300.0.29.6) +// 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 import AVFoundation @_exported import CanvasNative import CoreVideo @@ -10,6 +10,7 @@ import MetalKit import OpenGLES import Swift import UIKit +import _Concurrency @_inheritsConvenienceInitializers @_hasMissingDesignatedInitializers @objcMembers @objc(TNSDOMMatrix) public class TNSDOMMatrix : ObjectiveC.NSObject { @objc override dynamic public init() @objc public var a: Swift.Float { @@ -180,7 +181,6 @@ import UIKit @objc get } @objc deinit - @objc override dynamic public init() } @objc(TNSTextDirection) public enum TNSTextDirection : Swift.Int, Swift.RawRepresentable { case Ltr @@ -216,7 +216,6 @@ import UIKit @objc public func drawArraysInstancedANGLE(mode: Swift.Int32, first: Swift.Int32, count: Swift.Int32, primcount: Swift.Int32) @objc public func drawElementsInstancedANGLE(mode: Swift.Int32, count: Swift.Int32, type: Swift.Int32, offset: Swift.Int32, primcount: Swift.Int32) @objc public func vertexAttribDivisorANGLE(index: Swift.Int32, divisor: Swift.Int32) - @objc override dynamic public init() @objc deinit } @_inheritsConvenienceInitializers @objcMembers @objc(TNS_EXT_blend_minmax) public class TNS_EXT_blend_minmax : ObjectiveC.NSObject { @@ -229,59 +228,58 @@ import UIKit } @objc deinit } -@_hasMissingDesignatedInitializers @objcMembers @objc(TNSCanvas) public class TNSCanvas : UIKit.UIView, CanvasNative.RenderListener { - @objc public static func getViews() -> Foundation.NSMapTable - @objc public func getViewPtr() -> Swift.UnsafeMutableRawPointer? - @objc public var ignorePixelScaling: Swift.Bool { +@_hasMissingDesignatedInitializers @objcMembers @objc(TNSCanvas) @_Concurrency.MainActor(unsafe) public class TNSCanvas : UIKit.UIView, CanvasNative.RenderListener { + @objc @_Concurrency.MainActor(unsafe) public static func getViews() -> Foundation.NSMapTable + @objc @_Concurrency.MainActor(unsafe) public func getViewPtr() -> Swift.UnsafeMutableRawPointer? + @objc @_Concurrency.MainActor(unsafe) public var ignorePixelScaling: Swift.Bool { @objc get @objc set } - @objc public static func createSVGMatrix() -> CanvasNative.TNSDOMMatrix - @objc public var handleInvalidationManually: Swift.Bool { + @objc @_Concurrency.MainActor(unsafe) public static func createSVGMatrix() -> CanvasNative.TNSDOMMatrix + @objc @_Concurrency.MainActor(unsafe) public var handleInvalidationManually: Swift.Bool { @objc get @objc set } - @objc public func didDraw() - @objc public func toDataURL() -> Swift.String - @objc public func toDataURL(_ type: Swift.String) -> Swift.String - @objc public func toDataURL(_ type: Swift.String, _ format: Swift.Float) -> Swift.String - @objc public func toDataURLAsync(_ callback: @escaping (Swift.String) -> Swift.Void) - @objc public func toDataURLAsync(_ type: Swift.String, _ callback: @escaping (Swift.String) -> Swift.Void) - @objc public func toDataURLAsync(_ type: Swift.String, _ format: Swift.Float, _ callback: @escaping (Swift.String) -> Swift.Void) - @objc public func snapshot() -> [Swift.UInt8] - @objc public var isGL: Swift.Bool { + @objc @_Concurrency.MainActor(unsafe) public func didDraw() + @objc @_Concurrency.MainActor(unsafe) public func toDataURL() -> Swift.String + @objc @_Concurrency.MainActor(unsafe) public func toDataURL(_ type: Swift.String) -> Swift.String + @objc @_Concurrency.MainActor(unsafe) public func toDataURL(_ type: Swift.String, _ format: Swift.Float) -> Swift.String + @objc @_Concurrency.MainActor(unsafe) public func toDataURLAsync(_ callback: @escaping (Swift.String) -> Swift.Void) + @objc @_Concurrency.MainActor(unsafe) public func toDataURLAsync(_ type: Swift.String, _ callback: @escaping (Swift.String) -> Swift.Void) + @objc @_Concurrency.MainActor(unsafe) public func toDataURLAsync(_ type: Swift.String, _ format: Swift.Float, _ callback: @escaping (Swift.String) -> Swift.Void) + @objc @_Concurrency.MainActor(unsafe) public func snapshot() -> [Swift.UInt8] + @objc @_Concurrency.MainActor(unsafe) public var isGL: Swift.Bool { @objc get } - @objc public func getId() -> OpenGLES.GLint - @objc public var width: Swift.Float { + @objc @_Concurrency.MainActor(unsafe) public func getId() -> OpenGLES.GLint + @objc @_Concurrency.MainActor(unsafe) public var width: Swift.Float { @objc get } - @objc public var height: Swift.Float { + @objc @_Concurrency.MainActor(unsafe) public var height: Swift.Float { @objc get } - @objc public func updateDirection(_ direction: Swift.String) - @objc public var context: Swift.Int64 { + @objc @_Concurrency.MainActor(unsafe) public func updateDirection(_ direction: Swift.String) + @objc @_Concurrency.MainActor(unsafe) public var context: Swift.Int64 { @objc get @objc set } - @objc public func doDraw() - @objc public func flush() - @objc public init(frame: CoreGraphics.CGRect, useCpu: Swift.Bool) - @objc public func setListener(_ listener: CanvasNative.TNSCanvasListener?) - @objc public var fps: Swift.Float { + @objc @_Concurrency.MainActor(unsafe) public func doDraw() + @objc @_Concurrency.MainActor(unsafe) public func flush() + @objc @_Concurrency.MainActor(unsafe) public init(frame: CoreGraphics.CGRect, useCpu: Swift.Bool) + @objc @_Concurrency.MainActor(unsafe) public func setListener(_ listener: CanvasNative.TNSCanvasListener?) + @objc @_Concurrency.MainActor(unsafe) public var fps: Swift.Float { @objc get } - @objc override dynamic public func layoutSubviews() + @_Concurrency.MainActor(unsafe) @objc override dynamic public func layoutSubviews() @objc deinit - @objc public func resume() - @objc public func pause() - @objc public func moveToMain() - @objc public func moveOffMain() - @objc public func handleMoveOffMain() - @objc public func handleMoveToMain() - @objc public func getContext(_ type: Swift.String) -> CanvasNative.TNSCanvasRenderingContext? - @objc public func getContext(_ type: Swift.String, contextAttributes: Foundation.NSDictionary) -> CanvasNative.TNSCanvasRenderingContext? - @objc override dynamic public init(frame: CoreGraphics.CGRect) + @objc @_Concurrency.MainActor(unsafe) public func resume() + @objc @_Concurrency.MainActor(unsafe) public func pause() + @objc @_Concurrency.MainActor(unsafe) public func moveToMain() + @objc @_Concurrency.MainActor(unsafe) public func moveOffMain() + @objc @_Concurrency.MainActor(unsafe) public func handleMoveOffMain() + @objc @_Concurrency.MainActor(unsafe) public func handleMoveToMain() + @objc @_Concurrency.MainActor(unsafe) public func getContext(_ type: Swift.String) -> CanvasNative.TNSCanvasRenderingContext? + @objc @_Concurrency.MainActor(unsafe) public func getContext(_ type: Swift.String, contextAttributes: Foundation.NSDictionary) -> CanvasNative.TNSCanvasRenderingContext? } @_inheritsConvenienceInitializers @objcMembers @objc(TNSTextEncoder) public class TNSTextEncoder : ObjectiveC.NSObject { @objc override dynamic public init() @@ -321,7 +319,7 @@ import UIKit } @objc deinit } -extension RangeReplaceableCollection { +extension Swift.RangeReplaceableCollection { public mutating func resize(_ size: Swift.Int, fillWith value: Self.Iterator.Element) } @objc(TNSLineJoin) public enum TNSLineJoin : Swift.Int, Swift.RawRepresentable { @@ -444,6 +442,8 @@ extension RangeReplaceableCollection { @objc public func samplerParameterf(_ sampler: Swift.UInt32, _ pname: Swift.UInt32, _ param: Swift.Float) @objc public func texImage3D(_ target: Swift.UInt32, _ level: Swift.Int32, _ internalformat: Swift.Int32, _ width: Swift.Int32, _ height: Swift.Int32, _ depth: Swift.Int32, _ border: Swift.Int32, _ format: Swift.UInt32, _ type: Swift.UInt32, data: Foundation.NSData) @objc public func texImage3D(_ target: Swift.UInt32, _ level: Swift.Int32, _ internalformat: Swift.Int32, _ width: Swift.Int32, _ height: Swift.Int32, _ depth: Swift.Int32, _ border: Swift.Int32, _ format: Swift.UInt32, _ type: Swift.UInt32, offset: Swift.Int) + @objc public func texImage3D(_ target: Swift.UInt32, _ level: Swift.Int32, _ internalformat: Swift.Int32, _ width: Swift.Int32, _ height: Swift.Int32, _ depth: Swift.Int32, _ border: Swift.Int32, _ format: Swift.UInt32, _ type: Swift.UInt32, pixels: Swift.UnsafeRawPointer, size: Swift.Int) + @objc public func texImage3D(_ target: Swift.UInt32, _ level: Swift.Int32, _ internalformat: Swift.Int32, _ width: Swift.Int32, _ height: Swift.Int32, _ depth: Swift.Int32, _ border: Swift.Int32, _ format: Swift.UInt32, _ type: Swift.UInt32, pixels: Swift.UnsafeRawPointer, size: Swift.Int, pixelOffset: Swift.Int, srcOffset: Swift.Int32) @objc public func texImage3D(_ target: Swift.UInt32, _ level: Swift.Int32, _ internalformat: Swift.Int32, _ width: Swift.Int32, _ height: Swift.Int32, _ depth: Swift.Int32, _ border: Swift.Int32, _ format: Swift.UInt32, _ type: Swift.UInt32, i8 source: [Swift.Int8]) @objc public func texImage3D(_ target: Swift.UInt32, _ level: Swift.Int32, _ internalformat: Swift.Int32, _ width: Swift.Int32, _ height: Swift.Int32, _ depth: Swift.Int32, _ border: Swift.Int32, _ format: Swift.UInt32, _ type: Swift.UInt32, u8 source: [Swift.UInt8]) @objc public func texImage3D(_ target: Swift.UInt32, _ level: Swift.Int32, _ internalformat: Swift.Int32, _ width: Swift.Int32, _ height: Swift.Int32, _ depth: Swift.Int32, _ border: Swift.Int32, _ format: Swift.UInt32, _ type: Swift.UInt32, i16 source: [Swift.Int16]) @@ -1411,7 +1411,6 @@ extension RangeReplaceableCollection { @objc get } @objc public init(name: Swift.String, size: Swift.Int32, type: Swift.UInt32) - @objc override dynamic public init() @objc deinit } @_inheritsConvenienceInitializers @objcMembers @objc(TNSRender) public class TNSRender : ObjectiveC.NSObject { @@ -1419,22 +1418,22 @@ extension RangeReplaceableCollection { @objc public func createSurface() @objc deinit } -@_inheritsConvenienceInitializers @_hasMissingDesignatedInitializers @objcMembers @objc(TNSSVG) public class TNSSVG : UIKit.UIView { - @objc public var ignorePixelScaling: Swift.Bool { +@_inheritsConvenienceInitializers @_hasMissingDesignatedInitializers @objcMembers @objc(TNSSVG) @_Concurrency.MainActor(unsafe) public class TNSSVG : UIKit.UIView { + @objc @_Concurrency.MainActor(unsafe) public var ignorePixelScaling: Swift.Bool { @objc get @objc set } - @objc public var src: Swift.String? { + @objc @_Concurrency.MainActor(unsafe) public var src: Swift.String? { @objc get @objc set } - @objc public var srcPath: Swift.String? { + @objc @_Concurrency.MainActor(unsafe) public var srcPath: Swift.String? { @objc get @objc set } - @objc override dynamic public func layoutSubviews() - @objc override dynamic public init(frame: CoreGraphics.CGRect) - @objc override dynamic public func draw(_ rect: CoreGraphics.CGRect) + @_Concurrency.MainActor(unsafe) @objc override dynamic public func layoutSubviews() + @_Concurrency.MainActor(unsafe) @objc override dynamic public init(frame: CoreGraphics.CGRect) + @_Concurrency.MainActor(unsafe) @objc override dynamic public func draw(_ rect: CoreGraphics.CGRect) @objc deinit } @objcMembers @objc(TNSWebGLRenderingContext) public class TNSWebGLRenderingContext : CanvasNative.TNSCanvasRenderingContext { @@ -2532,7 +2531,6 @@ extension RangeReplaceableCollection { @objc public var UNPACK_PREMULTIPLY_ALPHA_WEBGL: Swift.UInt32 { @objc get } - @objc override dynamic public init() @objc deinit } @_hasMissingDesignatedInitializers @objcMembers @objc(TNSImageBitmap) public class TNSImageBitmap : ObjectiveC.NSObject { @@ -2568,7 +2566,6 @@ extension RangeReplaceableCollection { @objc get } @objc deinit - @objc override dynamic public init() } @_inheritsConvenienceInitializers @objcMembers @objc(TNS_OES_fbo_render_mipmap) public class TNS_OES_fbo_render_mipmap : ObjectiveC.NSObject { @objc override dynamic public init() @@ -2604,7 +2601,6 @@ extension RangeReplaceableCollection { @objc get } @objc public init(rangeMin: Swift.Int32, rangeMax: Swift.Int32, precision: Swift.Int32) - @objc override dynamic public init() @objc deinit } @_inheritsConvenienceInitializers @objcMembers @objc(TNS_OES_texture_half_float_linear) public class TNS_OES_texture_half_float_linear : ObjectiveC.NSObject { @@ -2764,14 +2760,12 @@ extension RangeReplaceableCollection { @objc public func isPointInPath(_ path: CanvasNative.TNSPath2D, _ x: Swift.Float, _ y: Swift.Float, _ fillRule: CanvasNative.TNSFillRule) -> Swift.Bool @objc public func isPointInStroke(_ x: Swift.Float, _ y: Swift.Float) -> Swift.Bool @objc public func isPointInStroke(_ path: CanvasNative.TNSPath2D, _ x: Swift.Float, _ y: Swift.Float) -> Swift.Bool - @objc override dynamic public init() @objc deinit } @objcMembers @objc(TNS_WEBGL_lose_context) public class TNS_WEBGL_lose_context : ObjectiveC.NSObject { @objc public init(canvas: CanvasNative.TNSCanvas) @objc public func loseContext() @objc public func restoreContext() - @objc override dynamic public init() @objc deinit } @_inheritsConvenienceInitializers @objcMembers @objc(TNS_WEBGL_compressed_texture_etc) public class TNS_WEBGL_compressed_texture_etc : ObjectiveC.NSObject { @@ -2838,19 +2832,18 @@ extension RangeReplaceableCollection { public init?(rawValue: CanvasNative.TNSTextBaseLine.RawValue) public init?(string: Swift.String) } -@_hasMissingDesignatedInitializers @objcMembers @objc(CanvasGLKView) public class CanvasGLKView : GLKit.GLKView { +@_hasMissingDesignatedInitializers @objcMembers @objc(CanvasGLKView) @_Concurrency.MainActor(unsafe) public class CanvasGLKView : GLKit.GLKView { @objc dynamic public init() - @objc override dynamic public init(frame: CoreGraphics.CGRect) - @objc override dynamic public func setNeedsDisplay() - @objc override dynamic public func setNeedsDisplay(_ rect: CoreGraphics.CGRect) - @objc override dynamic public init(frame: CoreGraphics.CGRect, context: OpenGLES.EAGLContext) + @_Concurrency.MainActor(unsafe) @objc override dynamic public init(frame: CoreGraphics.CGRect) + @_Concurrency.MainActor(unsafe) @objc override dynamic public func setNeedsDisplay() + @_Concurrency.MainActor(unsafe) @objc override dynamic public func setNeedsDisplay(_ rect: CoreGraphics.CGRect) @objc deinit } -@_inheritsConvenienceInitializers @_hasMissingDesignatedInitializers @objcMembers @objc(CanvasCPUView) public class CanvasCPUView : UIKit.UIView { - @objc public var ignorePixelScaling: Swift.Bool +@_inheritsConvenienceInitializers @_hasMissingDesignatedInitializers @objcMembers @objc(CanvasCPUView) @_Concurrency.MainActor(unsafe) public class CanvasCPUView : UIKit.UIView { + @objc @_Concurrency.MainActor(unsafe) public var ignorePixelScaling: Swift.Bool @objc dynamic public init() - @objc override dynamic public init(frame: CoreGraphics.CGRect) - @objc override dynamic public func draw(_ rect: CoreGraphics.CGRect) + @_Concurrency.MainActor(unsafe) @objc override dynamic public init(frame: CoreGraphics.CGRect) + @_Concurrency.MainActor(unsafe) @objc override dynamic public func draw(_ rect: CoreGraphics.CGRect) @objc deinit } public protocol RenderListener { @@ -2909,7 +2902,6 @@ public enum ContextType : Swift.Int, Swift.RawRepresentable { public func pause() public func resume() @objc public func glkView(_ view: GLKit.GLKView, drawIn rect: CoreGraphics.CGRect) - @objc override dynamic public init() } @_inheritsConvenienceInitializers @_hasMissingDesignatedInitializers @objcMembers @objc(TNSIndexedParameter) public class TNSIndexedParameter : ObjectiveC.NSObject { @objc deinit @@ -3173,13 +3165,11 @@ public enum ContextType : Swift.Int, Swift.RawRepresentable { @objc get } @objc public func getStyleType() -> CanvasNative.CanvasColorStyleType - @objc override dynamic public init() @objc deinit } @_hasMissingDesignatedInitializers @objcMembers @objc(TNSGradient) public class TNSGradient : ObjectiveC.NSObject, CanvasNative.ICanvasColorStyle { @objc public func getStyleType() -> CanvasNative.CanvasColorStyleType @objc public func addColorStop(_ offset: Swift.Float, _ color: Swift.String) - @objc override dynamic public init() @objc deinit } @_inheritsConvenienceInitializers @_hasMissingDesignatedInitializers @objcMembers @objc(TNSLinearGradient) public class TNSLinearGradient : CanvasNative.TNSColorStyle.TNSGradient { @@ -3192,7 +3182,6 @@ public enum ContextType : Swift.Int, Swift.RawRepresentable { @objc public func setTransform(matrix: CanvasNative.TNSDOMMatrix) @objc deinit @objc public func getStyleType() -> CanvasNative.CanvasColorStyleType - @objc override dynamic public init() } @objc override dynamic public init() @objc deinit @@ -3235,7 +3224,6 @@ public enum ContextType : Swift.Int, Swift.RawRepresentable { @objc public var ideographicBaseline: Swift.Float { @objc get } - @objc override dynamic public init() } extension CanvasNative.TNSTextAlignment : Swift.Equatable {} extension CanvasNative.TNSTextAlignment : Swift.Hashable {} diff --git a/packages/canvas/src-native/canvas-ios/CanvasNative/Dist/CanvasNative.xcframework/ios-x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/x86_64.swiftdoc b/packages/canvas/src-native/canvas-ios/dist/CanvasNative.xcframework/ios-x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/x86_64.swiftdoc similarity index 55% rename from packages/canvas/src-native/canvas-ios/CanvasNative/Dist/CanvasNative.xcframework/ios-x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/x86_64.swiftdoc rename to packages/canvas/src-native/canvas-ios/dist/CanvasNative.xcframework/ios-x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/x86_64.swiftdoc index 06b7167c..7ec0b68a 100644 Binary files a/packages/canvas/src-native/canvas-ios/CanvasNative/Dist/CanvasNative.xcframework/ios-x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/x86_64.swiftdoc and b/packages/canvas/src-native/canvas-ios/dist/CanvasNative.xcframework/ios-x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/x86_64.swiftdoc differ diff --git a/packages/canvas/src-native/canvas-ios/CanvasNative/Dist/CanvasNative.xcframework/ios-x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/x86_64.swiftinterface b/packages/canvas/src-native/canvas-ios/dist/CanvasNative.xcframework/ios-x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/x86_64.swiftinterface similarity index 96% rename from packages/canvas/src-native/canvas-ios/CanvasNative/Dist/CanvasNative.xcframework/ios-x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/x86_64.swiftinterface rename to packages/canvas/src-native/canvas-ios/dist/CanvasNative.xcframework/ios-x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/x86_64.swiftinterface index 9fbf1572..15a418b4 100644 --- a/packages/canvas/src-native/canvas-ios/CanvasNative/Dist/CanvasNative.xcframework/ios-x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/x86_64.swiftinterface +++ b/packages/canvas/src-native/canvas-ios/dist/CanvasNative.xcframework/ios-x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/x86_64.swiftinterface @@ -1,6 +1,6 @@ // swift-interface-format-version: 1.0 -// swift-compiler-version: Apple Swift version 5.4 (swiftlang-1205.0.26.9 clang-1205.0.19.55) -// swift-module-flags: -target x86_64-apple-ios10.0-simulator -enable-objc-interop -enable-library-evolution -swift-version 5 -enforce-exclusivity=checked -O -module-name CanvasNative +// swift-compiler-version: Apple Swift version 5.5.1 (swiftlang-1300.0.31.4 clang-1300.0.29.6) +// 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 import AVFoundation @_exported import CanvasNative import CoreVideo @@ -10,6 +10,7 @@ import MetalKit import OpenGLES import Swift import UIKit +import _Concurrency @_inheritsConvenienceInitializers @_hasMissingDesignatedInitializers @objcMembers @objc(TNSDOMMatrix) public class TNSDOMMatrix : ObjectiveC.NSObject { @objc override dynamic public init() @objc public var a: Swift.Float { @@ -180,7 +181,6 @@ import UIKit @objc get } @objc deinit - @objc override dynamic public init() } @objc(TNSTextDirection) public enum TNSTextDirection : Swift.Int, Swift.RawRepresentable { case Ltr @@ -216,7 +216,6 @@ import UIKit @objc public func drawArraysInstancedANGLE(mode: Swift.Int32, first: Swift.Int32, count: Swift.Int32, primcount: Swift.Int32) @objc public func drawElementsInstancedANGLE(mode: Swift.Int32, count: Swift.Int32, type: Swift.Int32, offset: Swift.Int32, primcount: Swift.Int32) @objc public func vertexAttribDivisorANGLE(index: Swift.Int32, divisor: Swift.Int32) - @objc override dynamic public init() @objc deinit } @_inheritsConvenienceInitializers @objcMembers @objc(TNS_EXT_blend_minmax) public class TNS_EXT_blend_minmax : ObjectiveC.NSObject { @@ -229,59 +228,58 @@ import UIKit } @objc deinit } -@_hasMissingDesignatedInitializers @objcMembers @objc(TNSCanvas) public class TNSCanvas : UIKit.UIView, CanvasNative.RenderListener { - @objc public static func getViews() -> Foundation.NSMapTable - @objc public func getViewPtr() -> Swift.UnsafeMutableRawPointer? - @objc public var ignorePixelScaling: Swift.Bool { +@_hasMissingDesignatedInitializers @objcMembers @objc(TNSCanvas) @_Concurrency.MainActor(unsafe) public class TNSCanvas : UIKit.UIView, CanvasNative.RenderListener { + @objc @_Concurrency.MainActor(unsafe) public static func getViews() -> Foundation.NSMapTable + @objc @_Concurrency.MainActor(unsafe) public func getViewPtr() -> Swift.UnsafeMutableRawPointer? + @objc @_Concurrency.MainActor(unsafe) public var ignorePixelScaling: Swift.Bool { @objc get @objc set } - @objc public static func createSVGMatrix() -> CanvasNative.TNSDOMMatrix - @objc public var handleInvalidationManually: Swift.Bool { + @objc @_Concurrency.MainActor(unsafe) public static func createSVGMatrix() -> CanvasNative.TNSDOMMatrix + @objc @_Concurrency.MainActor(unsafe) public var handleInvalidationManually: Swift.Bool { @objc get @objc set } - @objc public func didDraw() - @objc public func toDataURL() -> Swift.String - @objc public func toDataURL(_ type: Swift.String) -> Swift.String - @objc public func toDataURL(_ type: Swift.String, _ format: Swift.Float) -> Swift.String - @objc public func toDataURLAsync(_ callback: @escaping (Swift.String) -> Swift.Void) - @objc public func toDataURLAsync(_ type: Swift.String, _ callback: @escaping (Swift.String) -> Swift.Void) - @objc public func toDataURLAsync(_ type: Swift.String, _ format: Swift.Float, _ callback: @escaping (Swift.String) -> Swift.Void) - @objc public func snapshot() -> [Swift.UInt8] - @objc public var isGL: Swift.Bool { + @objc @_Concurrency.MainActor(unsafe) public func didDraw() + @objc @_Concurrency.MainActor(unsafe) public func toDataURL() -> Swift.String + @objc @_Concurrency.MainActor(unsafe) public func toDataURL(_ type: Swift.String) -> Swift.String + @objc @_Concurrency.MainActor(unsafe) public func toDataURL(_ type: Swift.String, _ format: Swift.Float) -> Swift.String + @objc @_Concurrency.MainActor(unsafe) public func toDataURLAsync(_ callback: @escaping (Swift.String) -> Swift.Void) + @objc @_Concurrency.MainActor(unsafe) public func toDataURLAsync(_ type: Swift.String, _ callback: @escaping (Swift.String) -> Swift.Void) + @objc @_Concurrency.MainActor(unsafe) public func toDataURLAsync(_ type: Swift.String, _ format: Swift.Float, _ callback: @escaping (Swift.String) -> Swift.Void) + @objc @_Concurrency.MainActor(unsafe) public func snapshot() -> [Swift.UInt8] + @objc @_Concurrency.MainActor(unsafe) public var isGL: Swift.Bool { @objc get } - @objc public func getId() -> OpenGLES.GLint - @objc public var width: Swift.Float { + @objc @_Concurrency.MainActor(unsafe) public func getId() -> OpenGLES.GLint + @objc @_Concurrency.MainActor(unsafe) public var width: Swift.Float { @objc get } - @objc public var height: Swift.Float { + @objc @_Concurrency.MainActor(unsafe) public var height: Swift.Float { @objc get } - @objc public func updateDirection(_ direction: Swift.String) - @objc public var context: Swift.Int64 { + @objc @_Concurrency.MainActor(unsafe) public func updateDirection(_ direction: Swift.String) + @objc @_Concurrency.MainActor(unsafe) public var context: Swift.Int64 { @objc get @objc set } - @objc public func doDraw() - @objc public func flush() - @objc public init(frame: CoreGraphics.CGRect, useCpu: Swift.Bool) - @objc public func setListener(_ listener: CanvasNative.TNSCanvasListener?) - @objc public var fps: Swift.Float { + @objc @_Concurrency.MainActor(unsafe) public func doDraw() + @objc @_Concurrency.MainActor(unsafe) public func flush() + @objc @_Concurrency.MainActor(unsafe) public init(frame: CoreGraphics.CGRect, useCpu: Swift.Bool) + @objc @_Concurrency.MainActor(unsafe) public func setListener(_ listener: CanvasNative.TNSCanvasListener?) + @objc @_Concurrency.MainActor(unsafe) public var fps: Swift.Float { @objc get } - @objc override dynamic public func layoutSubviews() + @_Concurrency.MainActor(unsafe) @objc override dynamic public func layoutSubviews() @objc deinit - @objc public func resume() - @objc public func pause() - @objc public func moveToMain() - @objc public func moveOffMain() - @objc public func handleMoveOffMain() - @objc public func handleMoveToMain() - @objc public func getContext(_ type: Swift.String) -> CanvasNative.TNSCanvasRenderingContext? - @objc public func getContext(_ type: Swift.String, contextAttributes: Foundation.NSDictionary) -> CanvasNative.TNSCanvasRenderingContext? - @objc override dynamic public init(frame: CoreGraphics.CGRect) + @objc @_Concurrency.MainActor(unsafe) public func resume() + @objc @_Concurrency.MainActor(unsafe) public func pause() + @objc @_Concurrency.MainActor(unsafe) public func moveToMain() + @objc @_Concurrency.MainActor(unsafe) public func moveOffMain() + @objc @_Concurrency.MainActor(unsafe) public func handleMoveOffMain() + @objc @_Concurrency.MainActor(unsafe) public func handleMoveToMain() + @objc @_Concurrency.MainActor(unsafe) public func getContext(_ type: Swift.String) -> CanvasNative.TNSCanvasRenderingContext? + @objc @_Concurrency.MainActor(unsafe) public func getContext(_ type: Swift.String, contextAttributes: Foundation.NSDictionary) -> CanvasNative.TNSCanvasRenderingContext? } @_inheritsConvenienceInitializers @objcMembers @objc(TNSTextEncoder) public class TNSTextEncoder : ObjectiveC.NSObject { @objc override dynamic public init() @@ -321,7 +319,7 @@ import UIKit } @objc deinit } -extension RangeReplaceableCollection { +extension Swift.RangeReplaceableCollection { public mutating func resize(_ size: Swift.Int, fillWith value: Self.Iterator.Element) } @objc(TNSLineJoin) public enum TNSLineJoin : Swift.Int, Swift.RawRepresentable { @@ -444,6 +442,8 @@ extension RangeReplaceableCollection { @objc public func samplerParameterf(_ sampler: Swift.UInt32, _ pname: Swift.UInt32, _ param: Swift.Float) @objc public func texImage3D(_ target: Swift.UInt32, _ level: Swift.Int32, _ internalformat: Swift.Int32, _ width: Swift.Int32, _ height: Swift.Int32, _ depth: Swift.Int32, _ border: Swift.Int32, _ format: Swift.UInt32, _ type: Swift.UInt32, data: Foundation.NSData) @objc public func texImage3D(_ target: Swift.UInt32, _ level: Swift.Int32, _ internalformat: Swift.Int32, _ width: Swift.Int32, _ height: Swift.Int32, _ depth: Swift.Int32, _ border: Swift.Int32, _ format: Swift.UInt32, _ type: Swift.UInt32, offset: Swift.Int) + @objc public func texImage3D(_ target: Swift.UInt32, _ level: Swift.Int32, _ internalformat: Swift.Int32, _ width: Swift.Int32, _ height: Swift.Int32, _ depth: Swift.Int32, _ border: Swift.Int32, _ format: Swift.UInt32, _ type: Swift.UInt32, pixels: Swift.UnsafeRawPointer, size: Swift.Int) + @objc public func texImage3D(_ target: Swift.UInt32, _ level: Swift.Int32, _ internalformat: Swift.Int32, _ width: Swift.Int32, _ height: Swift.Int32, _ depth: Swift.Int32, _ border: Swift.Int32, _ format: Swift.UInt32, _ type: Swift.UInt32, pixels: Swift.UnsafeRawPointer, size: Swift.Int, pixelOffset: Swift.Int, srcOffset: Swift.Int32) @objc public func texImage3D(_ target: Swift.UInt32, _ level: Swift.Int32, _ internalformat: Swift.Int32, _ width: Swift.Int32, _ height: Swift.Int32, _ depth: Swift.Int32, _ border: Swift.Int32, _ format: Swift.UInt32, _ type: Swift.UInt32, i8 source: [Swift.Int8]) @objc public func texImage3D(_ target: Swift.UInt32, _ level: Swift.Int32, _ internalformat: Swift.Int32, _ width: Swift.Int32, _ height: Swift.Int32, _ depth: Swift.Int32, _ border: Swift.Int32, _ format: Swift.UInt32, _ type: Swift.UInt32, u8 source: [Swift.UInt8]) @objc public func texImage3D(_ target: Swift.UInt32, _ level: Swift.Int32, _ internalformat: Swift.Int32, _ width: Swift.Int32, _ height: Swift.Int32, _ depth: Swift.Int32, _ border: Swift.Int32, _ format: Swift.UInt32, _ type: Swift.UInt32, i16 source: [Swift.Int16]) @@ -1411,7 +1411,6 @@ extension RangeReplaceableCollection { @objc get } @objc public init(name: Swift.String, size: Swift.Int32, type: Swift.UInt32) - @objc override dynamic public init() @objc deinit } @_inheritsConvenienceInitializers @objcMembers @objc(TNSRender) public class TNSRender : ObjectiveC.NSObject { @@ -1419,22 +1418,22 @@ extension RangeReplaceableCollection { @objc public func createSurface() @objc deinit } -@_inheritsConvenienceInitializers @_hasMissingDesignatedInitializers @objcMembers @objc(TNSSVG) public class TNSSVG : UIKit.UIView { - @objc public var ignorePixelScaling: Swift.Bool { +@_inheritsConvenienceInitializers @_hasMissingDesignatedInitializers @objcMembers @objc(TNSSVG) @_Concurrency.MainActor(unsafe) public class TNSSVG : UIKit.UIView { + @objc @_Concurrency.MainActor(unsafe) public var ignorePixelScaling: Swift.Bool { @objc get @objc set } - @objc public var src: Swift.String? { + @objc @_Concurrency.MainActor(unsafe) public var src: Swift.String? { @objc get @objc set } - @objc public var srcPath: Swift.String? { + @objc @_Concurrency.MainActor(unsafe) public var srcPath: Swift.String? { @objc get @objc set } - @objc override dynamic public func layoutSubviews() - @objc override dynamic public init(frame: CoreGraphics.CGRect) - @objc override dynamic public func draw(_ rect: CoreGraphics.CGRect) + @_Concurrency.MainActor(unsafe) @objc override dynamic public func layoutSubviews() + @_Concurrency.MainActor(unsafe) @objc override dynamic public init(frame: CoreGraphics.CGRect) + @_Concurrency.MainActor(unsafe) @objc override dynamic public func draw(_ rect: CoreGraphics.CGRect) @objc deinit } @objcMembers @objc(TNSWebGLRenderingContext) public class TNSWebGLRenderingContext : CanvasNative.TNSCanvasRenderingContext { @@ -2532,7 +2531,6 @@ extension RangeReplaceableCollection { @objc public var UNPACK_PREMULTIPLY_ALPHA_WEBGL: Swift.UInt32 { @objc get } - @objc override dynamic public init() @objc deinit } @_hasMissingDesignatedInitializers @objcMembers @objc(TNSImageBitmap) public class TNSImageBitmap : ObjectiveC.NSObject { @@ -2568,7 +2566,6 @@ extension RangeReplaceableCollection { @objc get } @objc deinit - @objc override dynamic public init() } @_inheritsConvenienceInitializers @objcMembers @objc(TNS_OES_fbo_render_mipmap) public class TNS_OES_fbo_render_mipmap : ObjectiveC.NSObject { @objc override dynamic public init() @@ -2604,7 +2601,6 @@ extension RangeReplaceableCollection { @objc get } @objc public init(rangeMin: Swift.Int32, rangeMax: Swift.Int32, precision: Swift.Int32) - @objc override dynamic public init() @objc deinit } @_inheritsConvenienceInitializers @objcMembers @objc(TNS_OES_texture_half_float_linear) public class TNS_OES_texture_half_float_linear : ObjectiveC.NSObject { @@ -2764,14 +2760,12 @@ extension RangeReplaceableCollection { @objc public func isPointInPath(_ path: CanvasNative.TNSPath2D, _ x: Swift.Float, _ y: Swift.Float, _ fillRule: CanvasNative.TNSFillRule) -> Swift.Bool @objc public func isPointInStroke(_ x: Swift.Float, _ y: Swift.Float) -> Swift.Bool @objc public func isPointInStroke(_ path: CanvasNative.TNSPath2D, _ x: Swift.Float, _ y: Swift.Float) -> Swift.Bool - @objc override dynamic public init() @objc deinit } @objcMembers @objc(TNS_WEBGL_lose_context) public class TNS_WEBGL_lose_context : ObjectiveC.NSObject { @objc public init(canvas: CanvasNative.TNSCanvas) @objc public func loseContext() @objc public func restoreContext() - @objc override dynamic public init() @objc deinit } @_inheritsConvenienceInitializers @objcMembers @objc(TNS_WEBGL_compressed_texture_etc) public class TNS_WEBGL_compressed_texture_etc : ObjectiveC.NSObject { @@ -2838,19 +2832,18 @@ extension RangeReplaceableCollection { public init?(rawValue: CanvasNative.TNSTextBaseLine.RawValue) public init?(string: Swift.String) } -@_hasMissingDesignatedInitializers @objcMembers @objc(CanvasGLKView) public class CanvasGLKView : GLKit.GLKView { +@_hasMissingDesignatedInitializers @objcMembers @objc(CanvasGLKView) @_Concurrency.MainActor(unsafe) public class CanvasGLKView : GLKit.GLKView { @objc dynamic public init() - @objc override dynamic public init(frame: CoreGraphics.CGRect) - @objc override dynamic public func setNeedsDisplay() - @objc override dynamic public func setNeedsDisplay(_ rect: CoreGraphics.CGRect) - @objc override dynamic public init(frame: CoreGraphics.CGRect, context: OpenGLES.EAGLContext) + @_Concurrency.MainActor(unsafe) @objc override dynamic public init(frame: CoreGraphics.CGRect) + @_Concurrency.MainActor(unsafe) @objc override dynamic public func setNeedsDisplay() + @_Concurrency.MainActor(unsafe) @objc override dynamic public func setNeedsDisplay(_ rect: CoreGraphics.CGRect) @objc deinit } -@_inheritsConvenienceInitializers @_hasMissingDesignatedInitializers @objcMembers @objc(CanvasCPUView) public class CanvasCPUView : UIKit.UIView { - @objc public var ignorePixelScaling: Swift.Bool +@_inheritsConvenienceInitializers @_hasMissingDesignatedInitializers @objcMembers @objc(CanvasCPUView) @_Concurrency.MainActor(unsafe) public class CanvasCPUView : UIKit.UIView { + @objc @_Concurrency.MainActor(unsafe) public var ignorePixelScaling: Swift.Bool @objc dynamic public init() - @objc override dynamic public init(frame: CoreGraphics.CGRect) - @objc override dynamic public func draw(_ rect: CoreGraphics.CGRect) + @_Concurrency.MainActor(unsafe) @objc override dynamic public init(frame: CoreGraphics.CGRect) + @_Concurrency.MainActor(unsafe) @objc override dynamic public func draw(_ rect: CoreGraphics.CGRect) @objc deinit } public protocol RenderListener { @@ -2909,7 +2902,6 @@ public enum ContextType : Swift.Int, Swift.RawRepresentable { public func pause() public func resume() @objc public func glkView(_ view: GLKit.GLKView, drawIn rect: CoreGraphics.CGRect) - @objc override dynamic public init() } @_inheritsConvenienceInitializers @_hasMissingDesignatedInitializers @objcMembers @objc(TNSIndexedParameter) public class TNSIndexedParameter : ObjectiveC.NSObject { @objc deinit @@ -3173,13 +3165,11 @@ public enum ContextType : Swift.Int, Swift.RawRepresentable { @objc get } @objc public func getStyleType() -> CanvasNative.CanvasColorStyleType - @objc override dynamic public init() @objc deinit } @_hasMissingDesignatedInitializers @objcMembers @objc(TNSGradient) public class TNSGradient : ObjectiveC.NSObject, CanvasNative.ICanvasColorStyle { @objc public func getStyleType() -> CanvasNative.CanvasColorStyleType @objc public func addColorStop(_ offset: Swift.Float, _ color: Swift.String) - @objc override dynamic public init() @objc deinit } @_inheritsConvenienceInitializers @_hasMissingDesignatedInitializers @objcMembers @objc(TNSLinearGradient) public class TNSLinearGradient : CanvasNative.TNSColorStyle.TNSGradient { @@ -3192,7 +3182,6 @@ public enum ContextType : Swift.Int, Swift.RawRepresentable { @objc public func setTransform(matrix: CanvasNative.TNSDOMMatrix) @objc deinit @objc public func getStyleType() -> CanvasNative.CanvasColorStyleType - @objc override dynamic public init() } @objc override dynamic public init() @objc deinit @@ -3235,7 +3224,6 @@ public enum ContextType : Swift.Int, Swift.RawRepresentable { @objc public var ideographicBaseline: Swift.Float { @objc get } - @objc override dynamic public init() } extension CanvasNative.TNSTextAlignment : Swift.Equatable {} extension CanvasNative.TNSTextAlignment : Swift.Hashable {} diff --git a/packages/canvas/src-native/canvas-ios/CanvasNative/Dist/CanvasNative.xcframework/ios-x86_64-simulator/CanvasNative.framework/Modules/module.modulemap b/packages/canvas/src-native/canvas-ios/dist/CanvasNative.xcframework/ios-x86_64-simulator/CanvasNative.framework/Modules/module.modulemap similarity index 100% rename from packages/canvas/src-native/canvas-ios/CanvasNative/Dist/CanvasNative.xcframework/ios-x86_64-simulator/CanvasNative.framework/Modules/module.modulemap rename to packages/canvas/src-native/canvas-ios/dist/CanvasNative.xcframework/ios-x86_64-simulator/CanvasNative.framework/Modules/module.modulemap diff --git a/packages/canvas/src-native/canvas-ios/dist/CanvasNative.xcframework/ios-x86_64-simulator/CanvasNative.framework/TNSCanvas.nib b/packages/canvas/src-native/canvas-ios/dist/CanvasNative.xcframework/ios-x86_64-simulator/CanvasNative.framework/TNSCanvas.nib new file mode 100644 index 00000000..8af10a4e Binary files /dev/null and b/packages/canvas/src-native/canvas-ios/dist/CanvasNative.xcframework/ios-x86_64-simulator/CanvasNative.framework/TNSCanvas.nib differ diff --git a/packages/canvas/src-native/canvas-ios/CanvasNative/Dist/CanvasNative.xcframework/ios-x86_64-simulator/CanvasNative.framework/_CodeSignature/CodeResources b/packages/canvas/src-native/canvas-ios/dist/CanvasNative.xcframework/ios-x86_64-simulator/CanvasNative.framework/_CodeSignature/CodeResources similarity index 72% rename from packages/canvas/src-native/canvas-ios/CanvasNative/Dist/CanvasNative.xcframework/ios-x86_64-simulator/CanvasNative.framework/_CodeSignature/CodeResources rename to packages/canvas/src-native/canvas-ios/dist/CanvasNative.xcframework/ios-x86_64-simulator/CanvasNative.framework/_CodeSignature/CodeResources index cb9d44b6..4d6756fb 100644 --- a/packages/canvas/src-native/canvas-ios/CanvasNative/Dist/CanvasNative.xcframework/ios-x86_64-simulator/CanvasNative.framework/_CodeSignature/CodeResources +++ b/packages/canvas/src-native/canvas-ios/dist/CanvasNative.xcframework/ios-x86_64-simulator/CanvasNative.framework/_CodeSignature/CodeResources @@ -6,7 +6,7 @@ Headers/CanvasNative-Swift.h - JMWeYNrpIfO6pzS2Oc7rsAHS2rA= + oEtyMu08/CoN5+/zgIeWhbGTiHs= Headers/CanvasNative.h @@ -18,35 +18,35 @@ Headers/canvas_native.h - l02LsGzuUJYjCERKxkX4JxaRm5A= + /FLolk7Uo+gGsbuXqdIg23yvuYw= Info.plist - xZUhVT/S76IiuyBJD4xRxHMGg0o= + rz/VAJUW6k34lAWyOmUQhl6XGiU= Modules/CanvasNative.swiftmodule/x86_64-apple-ios-simulator.swiftdoc - MMUT9JI7kUS0uRhRPGG+Hk0WZ0g= + OdGxLHS1LC7q0zKX6RJEshqvzzY= Modules/CanvasNative.swiftmodule/x86_64-apple-ios-simulator.swiftinterface - adE/I5R9zKvcGm+lIttRD5+LsKc= + 2OVsYpaYr8vbF4ZvxdDYw+V/0VM= Modules/CanvasNative.swiftmodule/x86_64-apple-ios-simulator.swiftmodule - kJ41lnYhILnEdsD3yiqF00OvyYM= + dDZ1rAAV8G/N3wWE6yDNqXxs2BM= Modules/CanvasNative.swiftmodule/x86_64.swiftdoc - MMUT9JI7kUS0uRhRPGG+Hk0WZ0g= + OdGxLHS1LC7q0zKX6RJEshqvzzY= Modules/CanvasNative.swiftmodule/x86_64.swiftinterface - adE/I5R9zKvcGm+lIttRD5+LsKc= + 2OVsYpaYr8vbF4ZvxdDYw+V/0VM= Modules/CanvasNative.swiftmodule/x86_64.swiftmodule - kJ41lnYhILnEdsD3yiqF00OvyYM= + dDZ1rAAV8G/N3wWE6yDNqXxs2BM= Modules/module.modulemap @@ -54,28 +54,20 @@ TNSCanvas.nib - +8rMBPhP9t1f1bM4Bm48DbFUFTo= + UAhwoslGeDCqnvroh+eu0Kemoyk= files2 Headers/CanvasNative-Swift.h - hash - - JMWeYNrpIfO6pzS2Oc7rsAHS2rA= - hash2 - vvrsjRmfLUu/ck2CkPYIILEur65ieBHd75t7vai+otM= + ePHdJAGSiMZy+3Zh5tZRYB3ATaAUKqWX023TLBRN7No= Headers/CanvasNative.h - hash - - GM+nvF4TA1+0Ao4kBbZ3VqqD7tw= - hash2 Vvkp0TlPm1xhJBzEuSCLV6GoKLFJL578OcNbKKIuJvY= @@ -83,10 +75,6 @@ Headers/Utils.h - hash - - iXZ3qr3/+WiSXgv5Lah/QMixGOQ= - hash2 EOmMU+bRK1XbWu3t/+AJNjORBBFlA5I94/1l3F8RxRc= @@ -94,87 +82,55 @@ Headers/canvas_native.h - hash - - l02LsGzuUJYjCERKxkX4JxaRm5A= - hash2 - 0KuwX/WeX2o8zbHzyrzfOZqTpUfR6rM0DzIhy3P7ih8= + ym9g0wLvKAmRvNIsjipEux7d5ku0fw/dKe5qDe417nw= Modules/CanvasNative.swiftmodule/x86_64-apple-ios-simulator.swiftdoc - hash - - MMUT9JI7kUS0uRhRPGG+Hk0WZ0g= - hash2 - Frz3Pni1xpvTV1IE/FLRxoiFvqaqdbglzJdQ2XKh0ww= + h0+odS/sIK43hIdRlNkAzU6EGGCqKuVDrkA2Oa7fpMQ= Modules/CanvasNative.swiftmodule/x86_64-apple-ios-simulator.swiftinterface - hash - - adE/I5R9zKvcGm+lIttRD5+LsKc= - hash2 - qJqOSnVQEBl44tcRT331cJDy7uWzusKuk/50788JeIo= + i15Faid1LVKY77i0NemqGEg+X0RqAu5Gz7b/jBvGubQ= Modules/CanvasNative.swiftmodule/x86_64-apple-ios-simulator.swiftmodule - hash - - kJ41lnYhILnEdsD3yiqF00OvyYM= - hash2 - HJYz/wNS9QrR89ojBNhgIoDF7MjLEJH8cn6G7dXt2eE= + eU0qvs2dd/Zaep445gXbrjK8rmA22O7waIgUyP2Zp5s= Modules/CanvasNative.swiftmodule/x86_64.swiftdoc - hash - - MMUT9JI7kUS0uRhRPGG+Hk0WZ0g= - hash2 - Frz3Pni1xpvTV1IE/FLRxoiFvqaqdbglzJdQ2XKh0ww= + h0+odS/sIK43hIdRlNkAzU6EGGCqKuVDrkA2Oa7fpMQ= Modules/CanvasNative.swiftmodule/x86_64.swiftinterface - hash - - adE/I5R9zKvcGm+lIttRD5+LsKc= - hash2 - qJqOSnVQEBl44tcRT331cJDy7uWzusKuk/50788JeIo= + i15Faid1LVKY77i0NemqGEg+X0RqAu5Gz7b/jBvGubQ= Modules/CanvasNative.swiftmodule/x86_64.swiftmodule - hash - - kJ41lnYhILnEdsD3yiqF00OvyYM= - hash2 - HJYz/wNS9QrR89ojBNhgIoDF7MjLEJH8cn6G7dXt2eE= + eU0qvs2dd/Zaep445gXbrjK8rmA22O7waIgUyP2Zp5s= Modules/module.modulemap - hash - - XZvX+DI0zyNqirarGmz86QaqQDY= - hash2 8iIkhxd5OAnp5sHOd5hd0owVgZ7+uSOi+vgsgZ/0fC8= @@ -182,13 +138,9 @@ TNSCanvas.nib - hash - - +8rMBPhP9t1f1bM4Bm48DbFUFTo= - hash2 - CLvnlP0qr9q+wTuSMpnmxyrM6E/9c9f3cUshNZdbIM8= + xsFdekn46TUXi24LiYKgnN2oZDR8aHxVSMqLhBHn/Pw= diff --git a/packages/canvas/src-native/canvas-ios/dist/CanvasNative.xcframework/ios-x86_64-simulator/dSYMs/CanvasNative.framework.dSYM/Contents/Info.plist b/packages/canvas/src-native/canvas-ios/dist/CanvasNative.xcframework/ios-x86_64-simulator/dSYMs/CanvasNative.framework.dSYM/Contents/Info.plist new file mode 100644 index 00000000..509a6635 --- /dev/null +++ b/packages/canvas/src-native/canvas-ios/dist/CanvasNative.xcframework/ios-x86_64-simulator/dSYMs/CanvasNative.framework.dSYM/Contents/Info.plist @@ -0,0 +1,20 @@ + + + + + CFBundleDevelopmentRegion + English + CFBundleIdentifier + com.apple.xcode.dsym.com.github.triniwiz.CanvasNative + CFBundleInfoDictionaryVersion + 6.0 + CFBundlePackageType + dSYM + CFBundleSignature + ???? + CFBundleShortVersionString + 1.0 + CFBundleVersion + 1 + + diff --git a/packages/canvas/src-native/canvas-ios/dist/CanvasNative.xcframework/ios-x86_64-simulator/dSYMs/CanvasNative.framework.dSYM/Contents/Resources/DWARF/CanvasNative b/packages/canvas/src-native/canvas-ios/dist/CanvasNative.xcframework/ios-x86_64-simulator/dSYMs/CanvasNative.framework.dSYM/Contents/Resources/DWARF/CanvasNative new file mode 100644 index 00000000..bcab4476 Binary files /dev/null and b/packages/canvas/src-native/canvas-ios/dist/CanvasNative.xcframework/ios-x86_64-simulator/dSYMs/CanvasNative.framework.dSYM/Contents/Resources/DWARF/CanvasNative differ diff --git a/packages/canvas/src-native/canvas-native/.idea/canvas-native.iml b/packages/canvas/src-native/canvas-native/.idea/canvas-native.iml index 2ea6c649..b0a7b985 100644 --- a/packages/canvas/src-native/canvas-native/.idea/canvas-native.iml +++ b/packages/canvas/src-native/canvas-native/.idea/canvas-native.iml @@ -621,6 +621,52 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/packages/canvas/src-native/canvas-native/.idea/dataSources.local.xml b/packages/canvas/src-native/canvas-native/.idea/dataSources.local.xml deleted file mode 100644 index 615e48c7..00000000 --- a/packages/canvas/src-native/canvas-native/.idea/dataSources.local.xml +++ /dev/null @@ -1,4 +0,0 @@ - - - - \ No newline at end of file diff --git a/packages/canvas/src-native/canvas-native/Cargo.toml b/packages/canvas/src-native/canvas-native/Cargo.toml index e762eba6..c0be7cc7 100644 --- a/packages/canvas/src-native/canvas-native/Cargo.toml +++ b/packages/canvas/src-native/canvas-native/Cargo.toml @@ -15,4 +15,5 @@ lto = true opt-level = "z" debug = false incremental = false + strip = "symbols" diff --git a/packages/canvas/src-native/canvas-native/canvas-core/Cargo.lock b/packages/canvas/src-native/canvas-native/canvas-core/Cargo.lock index 20e5fb41..3efbf368 100644 --- a/packages/canvas/src-native/canvas-native/canvas-core/Cargo.lock +++ b/packages/canvas/src-native/canvas-native/canvas-core/Cargo.lock @@ -12,7 +12,7 @@ version = "0.7.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "743ad5a418686aad3b87fd14c43badd828cf26e214a00f92a384291cf22e1811" dependencies = [ - "memchr", + "memchr", ] [[package]] @@ -27,10 +27,10 @@ version = "0.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8cbd542dd180566fad88fd2729a53a62a734843c626638006a9d63ec0688484e" dependencies = [ - "android_log-sys", - "env_logger", - "lazy_static", - "log", + "android_log-sys", + "env_logger", + "lazy_static", + "log", ] [[package]] @@ -39,7 +39,7 @@ version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ee49baf6cb617b853aa8d93bf420db2383fab46d314482ca2803b40d5fde979b" dependencies = [ - "winapi", + "winapi", ] [[package]] @@ -54,9 +54,9 @@ version = "0.2.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" dependencies = [ - "hermit-abi", - "libc", - "winapi", + "hermit-abi", + "libc", + "winapi", ] [[package]] @@ -77,22 +77,22 @@ version = "0.54.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "66c0bb6167449588ff70803f4127f0684f9063097eca5016f37eb52b92c2cf36" dependencies = [ - "bitflags", - "cexpr", - "cfg-if", - "clang-sys", - "clap", - "env_logger", - "lazy_static", - "lazycell", - "log", - "peeking_take_while", - "proc-macro2", - "quote", - "regex", - "rustc-hash", - "shlex", - "which", + "bitflags", + "cexpr", + "cfg-if", + "clang-sys", + "clap", + "env_logger", + "lazy_static", + "lazycell", + "log", + "peeking_take_while", + "proc-macro2", + "quote", + "regex", + "rustc-hash", + "shlex", + "which", ] [[package]] @@ -123,23 +123,23 @@ checksum = "08c48aae112d48ed9f069b33538ea9e3e90aa263cfa3d1c24309612b1f7472de" name = "canvas-native" version = "0.8.0" dependencies = [ - "android_logger", - "base64", - "bindgen", - "block", - "cc", - "cmake", - "cocoa", - "encoding_rs", - "image", - "jni", - "jni-sys", - "libc", - "log", - "objc", - "quick-xml", - "skia-bindings", - "skia-safe", + "android_logger", + "base64", + "bindgen", + "block", + "cc", + "cmake", + "cocoa", + "encoding_rs", + "image", + "jni", + "jni-sys", + "libc", + "log", + "objc", + "quick-xml", + "skia-bindings", + "skia-safe", ] [[package]] @@ -160,7 +160,7 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f4aedb84272dbe89af497cf81375129abda4fc0a9e7c5d317498c15cc30c0d27" dependencies = [ - "nom", + "nom", ] [[package]] @@ -175,9 +175,9 @@ version = "0.29.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f92986241798376849e1a007827041fed9bb36195822c2049d18e174420e0534" dependencies = [ - "glob", - "libc", - "libloading", + "glob", + "libc", + "libloading", ] [[package]] @@ -186,13 +186,13 @@ version = "2.33.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5067f5bb2d80ef5d68b4c87db81601f0b75bca627bc2ef76b141d7b846a3c6d9" dependencies = [ - "ansi_term", - "atty", - "bitflags", - "strsim", - "textwrap", - "unicode-width", - "vec_map", + "ansi_term", + "atty", + "bitflags", + "strsim", + "textwrap", + "unicode-width", + "vec_map", ] [[package]] @@ -201,7 +201,7 @@ version = "0.1.44" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0e56268c17a6248366d66d4a47a3381369d068cce8409bb1716ed77ea32163bb" dependencies = [ - "cc", + "cc", ] [[package]] @@ -210,13 +210,13 @@ version = "0.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0a4736c86d51bd878b474400d9ec888156f4037015f5d09794fab9f26eab1ad4" dependencies = [ - "bitflags", - "block", - "core-foundation", - "core-graphics", - "foreign-types", - "libc", - "objc", + "bitflags", + "block", + "core-foundation", + "core-graphics", + "foreign-types", + "libc", + "objc", ] [[package]] @@ -231,11 +231,11 @@ version = "3.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "da3da6baa321ec19e1cc41d31bf599f00c783d0517095cdaf0332e3fe8d20680" dependencies = [ - "ascii", - "byteorder", - "either", - "memchr", - "unreachable", + "ascii", + "byteorder", + "either", + "memchr", + "unreachable", ] [[package]] @@ -244,8 +244,8 @@ version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "57d24c7a13c43e870e37c1556b74555437870a04514f7685f5b354e090567171" dependencies = [ - "core-foundation-sys", - "libc", + "core-foundation-sys", + "libc", ] [[package]] @@ -260,10 +260,10 @@ version = "0.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "59e78b2e0aaf43f08e7ae0d6bc96895ef72ff0921c7d4ff4762201b2dba376dd" dependencies = [ - "bitflags", - "core-foundation", - "foreign-types", - "libc", + "bitflags", + "core-foundation", + "foreign-types", + "libc", ] [[package]] @@ -272,7 +272,7 @@ version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ba125de2af0df55319f41944744ad91c71113bf74a4646efff39afe1f6842db1" dependencies = [ - "cfg-if", + "cfg-if", ] [[package]] @@ -281,9 +281,9 @@ version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9f02af974daeee82218205558e51ec8768b48cf524bd01d550abe5573a608285" dependencies = [ - "crossbeam-epoch", - "crossbeam-utils", - "maybe-uninit", + "crossbeam-epoch", + "crossbeam-utils", + "maybe-uninit", ] [[package]] @@ -292,13 +292,13 @@ version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "058ed274caafc1f60c4997b5fc07bf7dc7cca454af7c6e81edffe5f33f70dace" dependencies = [ - "autocfg", - "cfg-if", - "crossbeam-utils", - "lazy_static", - "maybe-uninit", - "memoffset", - "scopeguard", + "autocfg", + "cfg-if", + "crossbeam-utils", + "lazy_static", + "maybe-uninit", + "memoffset", + "scopeguard", ] [[package]] @@ -307,8 +307,8 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c695eeca1e7173472a32221542ae469b3e9aac3a4fc81f7696bcad82029493db" dependencies = [ - "cfg-if", - "crossbeam-utils", + "cfg-if", + "crossbeam-utils", ] [[package]] @@ -317,9 +317,9 @@ version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c3c7c73a2d1e9fc0886a08b93e98eb643461230d5f1925e4036204d5f2e261a8" dependencies = [ - "autocfg", - "cfg-if", - "lazy_static", + "autocfg", + "cfg-if", + "lazy_static", ] [[package]] @@ -328,13 +328,13 @@ version = "0.4.25" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "06aa71e9208a54def20792d877bc663d6aae0732b9852e612c4a933177c31283" dependencies = [ - "curl-sys", - "libc", - "openssl-probe", - "openssl-sys", - "schannel", - "socket2", - "winapi", + "curl-sys", + "libc", + "openssl-probe", + "openssl-sys", + "schannel", + "socket2", + "winapi", ] [[package]] @@ -343,13 +343,13 @@ version = "0.4.26" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0853fe2a575bb381b1f173610372c7722d9fa9bc4056512ed99fe6a644c388c6" dependencies = [ - "cc", - "libc", - "libz-sys", - "openssl-sys", - "pkg-config", - "vcpkg", - "winapi", + "cc", + "libc", + "libz-sys", + "openssl-sys", + "pkg-config", + "vcpkg", + "winapi", ] [[package]] @@ -358,8 +358,8 @@ version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e7e5d2a2273fed52a7f947ee55b092c4057025d7a3e04e5ecdbd25d6c3fb1bd7" dependencies = [ - "adler32", - "byteorder", + "adler32", + "byteorder", ] [[package]] @@ -374,7 +374,7 @@ version = "0.8.23" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e8ac63f94732332f44fe654443c46f6375d1939684c17b0afb6cb56b0456e171" dependencies = [ - "cfg-if", + "cfg-if", ] [[package]] @@ -383,11 +383,11 @@ version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "44533bbbb3bb3c1fa17d9f2e4e38bbbaf8396ba82193c4cb1b6445d711445d36" dependencies = [ - "atty", - "humantime", - "log", - "regex", - "termcolor", + "atty", + "humantime", + "log", + "regex", + "termcolor", ] [[package]] @@ -396,7 +396,7 @@ version = "0.12.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d371106cc88ffdfb1eabd7111e432da544f16f3e2d7bf1dfe8bf575f1df045cd" dependencies = [ - "version_check", + "version_check", ] [[package]] @@ -405,10 +405,10 @@ version = "0.2.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1ff6d4dab0aa0c8e6346d46052e93b13a16cf847b54ed357087c35011048cc7d" dependencies = [ - "cfg-if", - "libc", - "redox_syscall", - "winapi", + "cfg-if", + "libc", + "redox_syscall", + "winapi", ] [[package]] @@ -417,10 +417,10 @@ version = "1.0.13" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6bd6d6f4752952feb71363cffc9ebac9411b75b87c6ab6058c40c8900cf43c0f" dependencies = [ - "cfg-if", - "crc32fast", - "libc", - "miniz_oxide", + "cfg-if", + "crc32fast", + "libc", + "miniz_oxide", ] [[package]] @@ -429,7 +429,7 @@ version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1" dependencies = [ - "foreign-types-shared", + "foreign-types-shared", ] [[package]] @@ -444,8 +444,8 @@ version = "0.10.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "471d90201b3b223f3451cd4ad53e34295f16a1df17b1edf3736d47761c3981af" dependencies = [ - "color_quant", - "lzw", + "color_quant", + "lzw", ] [[package]] @@ -460,7 +460,7 @@ version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "20564e78d53d2bb135c343b3f47714a56af2061f1c928fdb541dc7b9fdd94205" dependencies = [ - "unicode-segmentation", + "unicode-segmentation", ] [[package]] @@ -469,7 +469,7 @@ version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1010591b26bbfe835e9faeabeb11866061cc7dcebffd56ad7d0942d0e61aefd8" dependencies = [ - "libc", + "libc", ] [[package]] @@ -478,7 +478,7 @@ version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "df004cfca50ef23c36850aaaa59ad52cc70d0e90243c3c7737a4dd32dc7a3c4f" dependencies = [ - "quick-error", + "quick-error", ] [[package]] @@ -487,16 +487,16 @@ version = "0.23.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9117f4167a8f21fa2bb3f17a652a760acd7572645281c98e3b612a26242c96ee" dependencies = [ - "bytemuck", - "byteorder", - "gif", - "jpeg-decoder", - "num-iter", - "num-rational", - "num-traits", - "png", - "scoped_threadpool", - "tiff", + "bytemuck", + "byteorder", + "gif", + "jpeg-decoder", + "num-iter", + "num-rational", + "num-traits", + "png", + "scoped_threadpool", + "tiff", ] [[package]] @@ -505,7 +505,7 @@ version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1cdb29978cc5797bd8dcc8e5bf7de604891df2a8dc576973d71a281e916db2ff" dependencies = [ - "adler32", + "adler32", ] [[package]] @@ -520,12 +520,12 @@ version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "22bbdc25b49340bc4fc3d9c96dd84d878c4beeca35e3651efa53db51a68d7d4d" dependencies = [ - "cesu8", - "combine", - "error-chain", - "jni-sys", - "log", - "walkdir", + "cesu8", + "combine", + "error-chain", + "jni-sys", + "log", + "walkdir", ] [[package]] @@ -540,8 +540,8 @@ version = "0.1.19" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5b47b4c4e017b01abdc5bcc126d2d1002e5a75bbe3ce73f9f4f311a916363704" dependencies = [ - "byteorder", - "rayon", + "byteorder", + "rayon", ] [[package]] @@ -568,8 +568,8 @@ version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f2b111a074963af1d37a139918ac6d49ad1d0d5e47f72fd55388619691a7d753" dependencies = [ - "cc", - "winapi", + "cc", + "winapi", ] [[package]] @@ -578,10 +578,10 @@ version = "1.0.25" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2eb5e43362e38e2bca2fd5f5134c4d4564a23a5c28e9b95411652021a8675ebe" dependencies = [ - "cc", - "libc", - "pkg-config", - "vcpkg", + "cc", + "libc", + "pkg-config", + "vcpkg", ] [[package]] @@ -590,7 +590,7 @@ version = "0.4.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "14b6052be84e6b71ab17edffc2eeabf5c2c3ae1fdb464aae35ac50c67a44e1f7" dependencies = [ - "cfg-if", + "cfg-if", ] [[package]] @@ -605,7 +605,7 @@ version = "0.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "62bb907fe88d54d8d9ce32a3cceab4218ed2f6b7d35617cafe9adf84e43919cb" dependencies = [ - "libc", + "libc", ] [[package]] @@ -626,7 +626,7 @@ version = "0.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b4fc2c02a7e374099d4ee95a193111f72d2110197fe200272371758f6c3643d8" dependencies = [ - "autocfg", + "autocfg", ] [[package]] @@ -635,7 +635,7 @@ version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "aa679ff6578b1cddee93d7e82e263b94a575e0bfced07284eb0c037c1d2416a5" dependencies = [ - "adler32", + "adler32", ] [[package]] @@ -644,8 +644,8 @@ version = "5.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0b471253da97532da4b61552249c521e01e736071f71c1a4f7ebbfbf0a06aad6" dependencies = [ - "memchr", - "version_check", + "memchr", + "version_check", ] [[package]] @@ -654,8 +654,8 @@ version = "0.1.42" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3f6ea62e9d81a77cd3ee9a2a5b9b609447857f3d358704331e4ef39eb247fcba" dependencies = [ - "autocfg", - "num-traits", + "autocfg", + "num-traits", ] [[package]] @@ -664,9 +664,9 @@ version = "0.1.40" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dfb0800a0291891dd9f4fe7bd9c19384f98f7fbe0cd0f39a2c6b88b9868bbc00" dependencies = [ - "autocfg", - "num-integer", - "num-traits", + "autocfg", + "num-integer", + "num-traits", ] [[package]] @@ -675,9 +675,9 @@ version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5c000134b5dbf44adc5cb772486d335293351644b801551abe8f75c84cfa4aef" dependencies = [ - "autocfg", - "num-integer", - "num-traits", + "autocfg", + "num-integer", + "num-traits", ] [[package]] @@ -686,7 +686,7 @@ version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c62be47e61d1842b9170f0fdeec8eba98e60e90e5446449a0545e5152acd7096" dependencies = [ - "autocfg", + "autocfg", ] [[package]] @@ -695,8 +695,8 @@ version = "1.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "05499f3756671c15885fee9034446956fff3f243d6077b91e5767df161f766b3" dependencies = [ - "hermit-abi", - "libc", + "hermit-abi", + "libc", ] [[package]] @@ -705,7 +705,7 @@ version = "0.2.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "915b1b472bc21c53464d6c8461c9d3af805ba1ef837e1cac254428f4a77177b1" dependencies = [ - "malloc_buf", + "malloc_buf", ] [[package]] @@ -720,11 +720,11 @@ version = "0.9.54" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1024c0a59774200a555087a6da3f253a9095a5f344e353b212ac4c8b8e450986" dependencies = [ - "autocfg", - "cc", - "libc", - "pkg-config", - "vcpkg", + "autocfg", + "cc", + "libc", + "pkg-config", + "vcpkg", ] [[package]] @@ -745,10 +745,10 @@ version = "0.16.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2c68a431ed29933a4eb5709aca9800989758c97759345860fa5db3cfced0b65d" dependencies = [ - "bitflags", - "crc32fast", - "deflate", - "inflate", + "bitflags", + "crc32fast", + "deflate", + "inflate", ] [[package]] @@ -757,7 +757,7 @@ version = "1.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3acb317c6ff86a4e579dfa00fc5e6cca91ecbb4e7eb2df0468805b674eb88548" dependencies = [ - "unicode-xid", + "unicode-xid", ] [[package]] @@ -772,7 +772,7 @@ version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3cc440ee4802a86e357165021e3e255a9143724da31db1e2ea540214c96a0f82" dependencies = [ - "memchr", + "memchr", ] [[package]] @@ -781,7 +781,7 @@ version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "053a8c8bcc71fcce321828dc897a98ab9760bef03a4fc36693c231e5b3216cfe" dependencies = [ - "proc-macro2", + "proc-macro2", ] [[package]] @@ -790,9 +790,9 @@ version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "db6ce3297f9c85e16621bb8cca38a06779ffc31bb8184e1be4bed2be4678a098" dependencies = [ - "crossbeam-deque", - "either", - "rayon-core", + "crossbeam-deque", + "either", + "rayon-core", ] [[package]] @@ -801,11 +801,11 @@ version = "1.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "08a89b46efaf957e52b18062fb2f4660f8b8a4dde1807ca002690868ef2c85a9" dependencies = [ - "crossbeam-deque", - "crossbeam-queue", - "crossbeam-utils", - "lazy_static", - "num_cpus", + "crossbeam-deque", + "crossbeam-queue", + "crossbeam-utils", + "lazy_static", + "num_cpus", ] [[package]] @@ -820,10 +820,10 @@ version = "1.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "322cf97724bea3ee221b78fe25ac9c46114ebb51747ad5babd51a2fc6a8235a8" dependencies = [ - "aho-corasick", - "memchr", - "regex-syntax", - "thread_local", + "aho-corasick", + "memchr", + "regex-syntax", + "thread_local", ] [[package]] @@ -850,7 +850,7 @@ version = "1.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" dependencies = [ - "winapi-util", + "winapi-util", ] [[package]] @@ -859,8 +859,8 @@ version = "0.1.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "507a9e6e8ffe0a4e0ebb9a10293e62fdf7657c06f1b8bb07a8fcf697d2abf295" dependencies = [ - "lazy_static", - "winapi", + "lazy_static", + "winapi", ] [[package]] @@ -887,9 +887,9 @@ version = "1.0.48" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9371ade75d4c2d6cb154141b9752cf3781ec9c05e0e5cf35060e1e70ee7b9c25" dependencies = [ - "itoa", - "ryu", - "serde", + "itoa", + "ryu", + "serde", ] [[package]] @@ -903,15 +903,15 @@ name = "skia-bindings" version = "0.29.3" source = "git+https://github.com/rust-skia/rust-skia.git?rev=0308b9#0308b9778d026c066a459de1852516d06b06376e" dependencies = [ - "bindgen", - "cc", - "curl", - "flate2", - "heck", - "regex", - "serde_json", - "tar", - "toml", + "bindgen", + "cc", + "curl", + "flate2", + "heck", + "regex", + "serde_json", + "tar", + "toml", ] [[package]] @@ -919,9 +919,9 @@ name = "skia-safe" version = "0.29.3" source = "git+https://github.com/rust-skia/rust-skia.git?rev=0308b9#0308b9778d026c066a459de1852516d06b06376e" dependencies = [ - "bitflags", - "lazy_static", - "skia-bindings", + "bitflags", + "lazy_static", + "skia-bindings", ] [[package]] @@ -930,10 +930,10 @@ version = "0.3.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e8b74de517221a2cb01a53349cf54182acdc31a074727d3079068448c0676d85" dependencies = [ - "cfg-if", - "libc", - "redox_syscall", - "winapi", + "cfg-if", + "libc", + "redox_syscall", + "winapi", ] [[package]] @@ -948,10 +948,10 @@ version = "0.4.26" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b3196bfbffbba3e57481b6ea32249fbaf590396a52505a2615adbb79d9d826d3" dependencies = [ - "filetime", - "libc", - "redox_syscall", - "xattr", + "filetime", + "libc", + "redox_syscall", + "xattr", ] [[package]] @@ -960,7 +960,7 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bb6bfa289a4d7c5766392812c0a1f4c1ba45afa1ad47803c11e1f407d846d75f" dependencies = [ - "winapi-util", + "winapi-util", ] [[package]] @@ -969,7 +969,7 @@ version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d326610f408c7a4eb6f51c37c330e496b08506c9457c9d34287ecc38809fb060" dependencies = [ - "unicode-width", + "unicode-width", ] [[package]] @@ -978,7 +978,7 @@ version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d40c6d1b69745a6ec6fb1ca717914848da4b44ae29d9b3080cbee91d72a69b14" dependencies = [ - "lazy_static", + "lazy_static", ] [[package]] @@ -987,9 +987,9 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "002351e428db1eb1d8656d4ca61947c3519ac3191e1c804d4600cd32093b77ad" dependencies = [ - "byteorder", - "lzw", - "miniz_oxide", + "byteorder", + "lzw", + "miniz_oxide", ] [[package]] @@ -998,7 +998,7 @@ version = "0.5.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ffc92d160b1eef40665be3a05630d003936a3bc7da7421277846c2613e92c71a" dependencies = [ - "serde", + "serde", ] [[package]] @@ -1025,7 +1025,7 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "382810877fe448991dfc7f0dd6e3ae5d58088fd0ea5e35189655f84e6814fa56" dependencies = [ - "void", + "void", ] [[package]] @@ -1058,9 +1058,9 @@ version = "2.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "777182bc735b6424e1a57516d35ed72cb8019d85c8c9bf536dccb3445c1a2f7d" dependencies = [ - "same-file", - "winapi", - "winapi-util", + "same-file", + "winapi", + "winapi-util", ] [[package]] @@ -1069,7 +1069,7 @@ version = "3.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5475d47078209a02e60614f7ba5e645ef3ed60f771920ac1906d7c1cc65024c8" dependencies = [ - "libc", + "libc", ] [[package]] @@ -1078,8 +1078,8 @@ version = "0.3.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8093091eeb260906a183e6ae1abdba2ef5ef2257a21801128899c3fc699229c6" dependencies = [ - "winapi-i686-pc-windows-gnu", - "winapi-x86_64-pc-windows-gnu", + "winapi-i686-pc-windows-gnu", + "winapi-x86_64-pc-windows-gnu", ] [[package]] @@ -1094,7 +1094,7 @@ version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4ccfbf554c6ad11084fb7517daca16cfdcaccbdadba4fc336f032a8b12c2ad80" dependencies = [ - "winapi", + "winapi", ] [[package]] @@ -1109,5 +1109,5 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "244c3741f4240ef46274860397c7c74e50eb23624996930e484c16679633a54c" dependencies = [ - "libc", + "libc", ] diff --git a/packages/canvas/src-native/canvas-native/canvas-core/Cargo.toml b/packages/canvas/src-native/canvas-native/canvas-core/Cargo.toml index 67af675f..160b1214 100644 --- a/packages/canvas/src-native/canvas-native/canvas-core/Cargo.toml +++ b/packages/canvas/src-native/canvas-native/canvas-core/Cargo.toml @@ -5,6 +5,10 @@ authors = ["Osei Fortune "] edition = "2018" build = "build.rs" +[lib] +name = "canvasnative" +crate-type = ["staticlib", "cdylib"] + [build] rustc-wrapper = "sccache" @@ -23,25 +27,29 @@ gl-bindings = { version = "0.1.0", path = "../gl-bindings" } lazy_static = "1.4.0" css-color-parser = "0.1.2" reqwest = { version = "0.11", features = ["blocking"] } -openssl = { version = "0.10", features = ["vendored"] } -phf = {version = "0.8.0", features = ["macros"]} + +phf = { version = "0.8.0", features = ["macros"] } rgb = "0.8.25" log = "0.4.8" stringreader = "0.1.1" +rand = "0.8.4" + [target.'cfg(target_os="android")'.dependencies] +openssl = { version = "0.10", features = ["vendored"] } jni = { version = "0.19.0", default-features = false } android_logger = "0.9.0" -skia-safe = { version = "0.43.0", features = ["gl"] } +#skia-safe = { git = "https://github.com/triniwiz/rust-skia", branch="feat/svg" , features = ["gl"] } +#skia-safe = { version = "0.43.0", features = ["gl"] } +skia-safe = { path = "/Users/triniwiz/desktop/oss/rust-skia/skia-safe", features = ["gl"] } + [target.'cfg(target_os="ios")'.dependencies] -skia-safe = { version = "0.43.0", features = ["gl"] } +#skia-safe = { version = "0.43.0", features = ["gl"] } +#skia-safe = { git = "https://github.com/triniwiz/rust-skia", branch="feat/svg" , features = ["gl"] } +skia-safe = { path = "/Users/triniwiz/desktop/oss/rust-skia/skia-safe", features = ["gl"] } cocoa = { version = "0.24.0" } objc = { version = "0.2.4" } block = "0.1.6" -[lib] -name = "canvasnative" -crate-type = ["staticlib", "cdylib"] -rand = { git = "https://github.com/rust-lang-nursery/rand", branch = "next" } diff --git a/packages/canvas/src-native/canvas-native/canvas-core/build.rs b/packages/canvas/src-native/canvas-native/canvas-core/build.rs index ea3ec7d7..854b2a10 100644 --- a/packages/canvas/src-native/canvas-native/canvas-core/build.rs +++ b/packages/canvas/src-native/canvas-native/canvas-core/build.rs @@ -1,7 +1,7 @@ +use std::{env, fmt}; use std::borrow::Borrow; use std::fmt::{Display, Formatter}; use std::path::PathBuf; -use std::{env, fmt}; use bindgen; @@ -72,6 +72,8 @@ fn main() { "android" | "androideabi" => { let build_target; include_dir.push_str(&ndk()); + // after moving to newer ndk + // include_dir.push_str("/toolchains/llvm/prebuilt/darwin-x86_64"); if target.architecture.eq("armv7") { build_target = "armv7-linux-androideabi"; } else if target.architecture.eq("aarch64") { @@ -85,10 +87,11 @@ fn main() { } include_dir.push_str("/sysroot/usr/include"); + println!("target {:?}", build_target); println!("cargo:rustc-link-search=native={}", include_dir); println!("cargo:rustc-link-lib=jnigraphics"); // the "-l" flag println!("cargo:rustc-link-lib=android"); // the "-l" flag - // the resulting bindings. + // the resulting bindings. let bindings = bindgen::Builder::default() // The input header we would like to generate // bindings for. diff --git a/packages/canvas/src-native/canvas-native/canvas-core/cbindgen.toml b/packages/canvas/src-native/canvas-native/canvas-core/cbindgen.toml index 5b87af14..45a8e07b 100644 --- a/packages/canvas/src-native/canvas-native/canvas-core/cbindgen.toml +++ b/packages/canvas/src-native/canvas-native/canvas-core/cbindgen.toml @@ -1,8 +1,10 @@ autogen_warning = "/* Warning, this file is autogenerated by cbindgen. Don't modify this manually. */" -language = "C++" +language = "C" namespace = "ffi" include_guard = "CBINDGEN_BINDINGS_H" [defines] "target_os = ios" = "TARGET_OS_IOS" -#"target_os = macos" = "TARGET_OS_MACOS" \ No newline at end of file +"target_os = macos" = "TARGET_OS_MACOS" +"target_os = android" = "TARGET_OS_ANDROID" + diff --git a/packages/canvas/src-native/canvas-native/canvas-core/src/android/context.rs b/packages/canvas/src-native/canvas-native/canvas-core/src/android/context.rs index 6febea88..2e330e83 100644 --- a/packages/canvas/src-native/canvas-native/canvas-core/src/android/context.rs +++ b/packages/canvas/src-native/canvas-native/canvas-core/src/android/context.rs @@ -1,14 +1,15 @@ use std::str::FromStr; use jni::errors::Error; +use jni::JNIEnv; use jni::objects::{JClass, JObject, JString, JValue, ReleaseMode}; use jni::sys::{ - jboolean, jbyteArray, jfloat, jfloatArray, jint, jlong, jobject, jstring, JNI_FALSE, JNI_TRUE, + jboolean, jbyteArray, jfloat, jfloatArray, jint, jlong, JNI_FALSE, JNI_TRUE, jobject, jstring, }; -use jni::JNIEnv; use skia_safe::Rect; use crate::common::context::compositing::composite_operation_type::CompositeOperationType; +use crate::common::context::Context; use crate::common::context::drawing_paths::fill_rule::FillRule; use crate::common::context::fill_and_stroke_styles::paint::PaintStyle; use crate::common::context::fill_and_stroke_styles::pattern::Repetition; @@ -22,7 +23,6 @@ use crate::common::context::pixel_manipulation::image_data::ImageData; use crate::common::context::text_styles::text_align::TextAlign; use crate::common::context::text_styles::text_baseline::TextBaseLine; use crate::common::context::text_styles::text_direction::TextDirection; -use crate::common::context::Context; use crate::common::ffi::paint_style_value::{PaintStyleValue, PaintStyleValueType}; use crate::common::utils::color::to_parsed_color; use crate::common::utils::image::{from_image_slice, from_image_slice_encoded, to_image}; @@ -121,14 +121,14 @@ fn get_style(env: JNIEnv, context: jlong, is_fill: bool) -> jobject { "(Ljava/lang/String;J)Lorg/json/JSONObject;", value_args.as_slice(), ) - .unwrap(); + .unwrap(); env.call_method( json, "put", "(Ljava/lang/String;I)Lorg/json/JSONObject;", value_type_args.as_slice(), ) - .unwrap(); + .unwrap(); json.into_inner() } } @@ -967,6 +967,7 @@ pub extern "C" fn Java_org_nativescript_canvas_TNSCanvasRenderingContext2D_nativ std::mem::transmute::<*mut i8, *mut u8>(val.as_ptr()), length, ); + if let Some(image) = from_image_slice(buf, width, height) { return Box::into_raw(Box::new(PaintStyle::Pattern( context.create_pattern(image, Repetition::from(repetition)), diff --git a/packages/canvas/src-native/canvas-native/canvas-core/src/android/gl/mod.rs b/packages/canvas/src-native/canvas-native/canvas-core/src/android/gl/mod.rs index 7c59a3b3..6f3f8fa6 100644 --- a/packages/canvas/src-native/canvas-native/canvas-core/src/android/gl/mod.rs +++ b/packages/canvas/src-native/canvas-native/canvas-core/src/android/gl/mod.rs @@ -1,4 +1,4 @@ pub(crate) mod surface_texture; -mod texture_render; +pub mod texture_render; pub mod webgl2_rendering_context; pub mod webgl_rendering_context; diff --git a/packages/canvas/src-native/canvas-native/canvas-core/src/android/gl/surface_texture.rs b/packages/canvas/src-native/canvas-native/canvas-core/src/android/gl/surface_texture.rs index 2e6ad525..06974bc3 100644 --- a/packages/canvas/src-native/canvas-native/canvas-core/src/android/gl/surface_texture.rs +++ b/packages/canvas/src-native/canvas-native/canvas-core/src/android/gl/surface_texture.rs @@ -25,6 +25,7 @@ extern "system" { #[doc = " \\param st A ASurfaceTexture reference acquired with ASurfaceTexture_fromSurfaceTexture()"] pub fn ASurfaceTexture_release(st: *mut ASurfaceTexture); } + extern "system" { #[doc = " Returns a reference to an ANativeWindow (i.e. the Producer) for this SurfaceTexture."] #[doc = " This is equivalent to Java's: Surface sur = new Surface(surfaceTexture);"] @@ -37,6 +38,7 @@ extern "system" { #[doc = " returned if \\p st is null or if it's not an instance of android.graphics.SurfaceTexture"] pub fn ASurfaceTexture_acquireANativeWindow(st: *mut ASurfaceTexture) -> *mut ANativeWindow; } + extern "system" { #[doc = " Attach the SurfaceTexture to the OpenGL ES context that is current on the calling thread. A"] #[doc = " new OpenGL ES texture object is created and populated with the SurfaceTexture image frame"] @@ -58,6 +60,7 @@ extern "system" { texName: u32, ) -> ::std::os::raw::c_int; } + extern "system" { #[doc = " Detach the SurfaceTexture from the OpenGL ES context that owns the OpenGL ES texture object."] #[doc = " This call must be made with the OpenGL ES context current on the calling thread. The OpenGL"] @@ -75,6 +78,7 @@ extern "system" { #[doc = " \\return 0 on success, negative posix error code otherwise (see )"] pub fn ASurfaceTexture_detachFromGLContext(st: *mut ASurfaceTexture) -> ::std::os::raw::c_int; } + extern "system" { #[doc = " Update the texture image to the most recent frame from the image stream. This may only be"] #[doc = " called while the OpenGL ES context that owns the texture is current on the calling thread."] @@ -86,6 +90,7 @@ extern "system" { #[doc = " \\return 0 on success, negative posix error code otherwise (see )"] pub fn ASurfaceTexture_updateTexImage(st: *mut ASurfaceTexture) -> ::std::os::raw::c_int; } + extern "system" { #[doc = " Retrieve the 4x4 texture coordinate transform matrix associated with the texture image set by"] #[doc = " the most recent call to updateTexImage."] @@ -105,6 +110,7 @@ extern "system" { #[doc = " 16 elements."] pub fn ASurfaceTexture_getTransformMatrix(st: *mut ASurfaceTexture, mtx: *mut f32); } + extern "system" { #[doc = " Retrieve the timestamp associated with the texture image set by the most recent call to"] #[doc = " updateTexImage."] diff --git a/packages/canvas/src-native/canvas-native/canvas-core/src/android/gl/texture_render.rs b/packages/canvas/src-native/canvas-native/canvas-core/src/android/gl/texture_render.rs index 984c3d0c..ecf5b915 100644 --- a/packages/canvas/src-native/canvas-native/canvas-core/src/android/gl/texture_render.rs +++ b/packages/canvas/src-native/canvas-native/canvas-core/src/android/gl/texture_render.rs @@ -1,8 +1,8 @@ use std::os::raw::c_void; +use jni::JNIEnv; use jni::objects::{JClass, JObject, ReleaseMode}; use jni::sys::{jboolean, jfloatArray, jint}; -use jni::JNIEnv; const SURFACE_TEXTURE_CLASS: &'static str = "android/graphics/SurfaceTexture"; diff --git a/packages/canvas/src-native/canvas-native/canvas-core/src/android/gl/webgl2_rendering_context.rs b/packages/canvas/src-native/canvas-native/canvas-core/src/android/gl/webgl2_rendering_context.rs index 5f4b51f2..743b8f95 100644 --- a/packages/canvas/src-native/canvas-native/canvas-core/src/android/gl/webgl2_rendering_context.rs +++ b/packages/canvas/src-native/canvas-native/canvas-core/src/android/gl/webgl2_rendering_context.rs @@ -4,12 +4,12 @@ use std::os::raw::c_void; +use jni::JNIEnv; use jni::objects::{JByteBuffer, JClass, JObject, ReleaseMode}; use jni::sys::{ jboolean, jbyteArray, jdouble, jdoubleArray, jfloatArray, jint, jintArray, jlong, jlongArray, - jshortArray, JNI_TRUE, + JNI_TRUE, jshortArray, }; -use jni::JNIEnv; use crate::common::context::image_asset::ImageAsset; @@ -17,7 +17,7 @@ const RGBA: u32 = 0x1908; const RGBA_INTEGER: u32 = 0x8D99; #[no_mangle] -pub unsafe extern "C" fn Java_org_nativescript_canvas_TNSWebGLRenderingContext_nativeFlipInPlace3D( +pub unsafe extern "C" fn Java_org_nativescript_canvas_TNSWebGL2RenderingContext_nativeFlipInPlace3D( env: JNIEnv, _: JClass, pixels: JByteBuffer, @@ -76,7 +76,7 @@ fn texImage3D( } #[no_mangle] -pub unsafe extern "C" fn Java_org_nativescript_canvas_TNSWebGLRenderingContext_nativeTexImage3DBuffer( +pub unsafe extern "C" fn Java_org_nativescript_canvas_TNSWebGL2RenderingContext_nativeTexImage3DBuffer( env: JNIEnv, _: JClass, target: jint, @@ -109,7 +109,7 @@ pub unsafe extern "C" fn Java_org_nativescript_canvas_TNSWebGLRenderingContext_n } #[no_mangle] -pub unsafe extern "C" fn Java_org_nativescript_canvas_TNSWebGLRenderingContext_nativeTexImage3DByteArray( +pub unsafe extern "C" fn Java_org_nativescript_canvas_TNSWebGL2RenderingContext_nativeTexImage3DByteArray( env: JNIEnv, _: JClass, target: jint, @@ -152,7 +152,7 @@ pub unsafe extern "C" fn Java_org_nativescript_canvas_TNSWebGLRenderingContext_n } #[no_mangle] -pub unsafe extern "C" fn Java_org_nativescript_canvas_TNSWebGLRenderingContext_nativeTexImage3DShortArray( +pub unsafe extern "C" fn Java_org_nativescript_canvas_TNSWebGL2RenderingContext_nativeTexImage3DShortArray( env: JNIEnv, _: JClass, target: jint, @@ -198,7 +198,7 @@ pub unsafe extern "C" fn Java_org_nativescript_canvas_TNSWebGLRenderingContext_n } #[no_mangle] -pub unsafe extern "C" fn Java_org_nativescript_canvas_TNSWebGLRenderingContext_nativeTexImage3DIntArray( +pub unsafe extern "C" fn Java_org_nativescript_canvas_TNSWebGL2RenderingContext_nativeTexImage3DIntArray( env: JNIEnv, _: JClass, target: jint, @@ -241,7 +241,7 @@ pub unsafe extern "C" fn Java_org_nativescript_canvas_TNSWebGLRenderingContext_n } #[no_mangle] -pub unsafe extern "C" fn Java_org_nativescript_canvas_TNSWebGLRenderingContext_nativeTexImage3DFloatArray( +pub unsafe extern "C" fn Java_org_nativescript_canvas_TNSWebGL2RenderingContext_nativeTexImage3DFloatArray( env: JNIEnv, _: JClass, target: jint, @@ -287,7 +287,7 @@ pub unsafe extern "C" fn Java_org_nativescript_canvas_TNSWebGLRenderingContext_n } #[no_mangle] -pub unsafe extern "C" fn Java_org_nativescript_canvas_TNSWebGLRenderingContext_nativeTexImage3DDoubleArray( +pub unsafe extern "C" fn Java_org_nativescript_canvas_TNSWebGL2RenderingContext_nativeTexImage3DDoubleArray( env: JNIEnv, _: JClass, target: jint, @@ -333,7 +333,7 @@ pub unsafe extern "C" fn Java_org_nativescript_canvas_TNSWebGLRenderingContext_n } #[no_mangle] -pub unsafe extern "C" fn Java_org_nativescript_canvas_TNSWebGLRenderingContext_nativeTexImage3DLongArray( +pub unsafe extern "C" fn Java_org_nativescript_canvas_TNSWebGL2RenderingContext_nativeTexImage3DLongArray( env: JNIEnv, _: JClass, target: jint, @@ -379,7 +379,7 @@ pub unsafe extern "C" fn Java_org_nativescript_canvas_TNSWebGLRenderingContext_n } #[no_mangle] -pub unsafe extern "C" fn Java_org_nativescript_canvas_TNSWebGLRenderingContext_nativeTexImage3DAsset( +pub unsafe extern "C" fn Java_org_nativescript_canvas_TNSWebGL2RenderingContext_nativeTexImage3DAsset( _env: JNIEnv, _: JClass, target: jint, @@ -427,7 +427,7 @@ pub unsafe extern "C" fn Java_org_nativescript_canvas_TNSWebGLRenderingContext_n } #[no_mangle] -pub unsafe extern "C" fn Java_org_nativescript_canvas_TNSWebGLRenderingContext_nativeTexImage3DBitmap( +pub unsafe extern "C" fn Java_org_nativescript_canvas_TNSWebGL2RenderingContext_nativeTexImage3DBitmap( env: JNIEnv, _: JClass, target: jint, @@ -512,7 +512,7 @@ fn texSubImage3D( } #[no_mangle] -pub unsafe extern "C" fn Java_org_nativescript_canvas_TNSWebGLRenderingContext_nativeTexSubImage3DBuffer( +pub unsafe extern "C" fn Java_org_nativescript_canvas_TNSWebGL2RenderingContext_nativeTexSubImage3DBuffer( env: JNIEnv, _: JClass, target: jint, @@ -547,7 +547,7 @@ pub unsafe extern "C" fn Java_org_nativescript_canvas_TNSWebGLRenderingContext_n } #[no_mangle] -pub unsafe extern "C" fn Java_org_nativescript_canvas_TNSWebGLRenderingContext_nativeTexSubImage3DByteArray( +pub unsafe extern "C" fn Java_org_nativescript_canvas_TNSWebGL2RenderingContext_nativeTexSubImage3DByteArray( env: JNIEnv, _: JClass, target: jint, @@ -592,7 +592,7 @@ pub unsafe extern "C" fn Java_org_nativescript_canvas_TNSWebGLRenderingContext_n } #[no_mangle] -pub unsafe extern "C" fn Java_org_nativescript_canvas_TNSWebGLRenderingContext_nativeTexSubImage3DShortArray( +pub unsafe extern "C" fn Java_org_nativescript_canvas_TNSWebGL2RenderingContext_nativeTexSubImage3DShortArray( env: JNIEnv, _: JClass, target: jint, @@ -640,7 +640,7 @@ pub unsafe extern "C" fn Java_org_nativescript_canvas_TNSWebGLRenderingContext_n } #[no_mangle] -pub unsafe extern "C" fn Java_org_nativescript_canvas_TNSWebGLRenderingContext_nativeTexSubImage3DIntArray( +pub unsafe extern "C" fn Java_org_nativescript_canvas_TNSWebGL2RenderingContext_nativeTexSubImage3DIntArray( env: JNIEnv, _: JClass, target: jint, @@ -688,7 +688,7 @@ pub unsafe extern "C" fn Java_org_nativescript_canvas_TNSWebGLRenderingContext_n } #[no_mangle] -pub unsafe extern "C" fn Java_org_nativescript_canvas_TNSWebGLRenderingContext_nativeTexSubImage3DLongArray( +pub unsafe extern "C" fn Java_org_nativescript_canvas_TNSWebGL2RenderingContext_nativeTexSubImage3DLongArray( env: JNIEnv, _: JClass, target: jint, @@ -736,7 +736,7 @@ pub unsafe extern "C" fn Java_org_nativescript_canvas_TNSWebGLRenderingContext_n } #[no_mangle] -pub unsafe extern "C" fn Java_org_nativescript_canvas_TNSWebGLRenderingContext_nativeTexSubImage3DFloatArray( +pub unsafe extern "C" fn Java_org_nativescript_canvas_TNSWebGL2RenderingContext_nativeTexSubImage3DFloatArray( env: JNIEnv, _: JClass, target: jint, @@ -784,7 +784,7 @@ pub unsafe extern "C" fn Java_org_nativescript_canvas_TNSWebGLRenderingContext_n } #[no_mangle] -pub unsafe extern "C" fn Java_org_nativescript_canvas_TNSWebGLRenderingContext_nativeTexSubImage3DDoubleArray( +pub unsafe extern "C" fn Java_org_nativescript_canvas_TNSWebGL2RenderingContext_nativeTexSubImage3DDoubleArray( env: JNIEnv, _: JClass, target: jint, @@ -832,7 +832,7 @@ pub unsafe extern "C" fn Java_org_nativescript_canvas_TNSWebGLRenderingContext_n } #[no_mangle] -pub unsafe extern "C" fn Java_org_nativescript_canvas_TNSWebGLRenderingContext_nativeTexSubImage3DAsset( +pub unsafe extern "C" fn Java_org_nativescript_canvas_TNSWebGL2RenderingContext_nativeTexSubImage3DAsset( _env: JNIEnv, _: JClass, target: jint, @@ -882,7 +882,7 @@ pub unsafe extern "C" fn Java_org_nativescript_canvas_TNSWebGLRenderingContext_n } #[no_mangle] -pub unsafe extern "C" fn Java_org_nativescript_canvas_TNSWebGLRenderingContext_nativeTexSubImage3DBitmap( +pub unsafe extern "C" fn Java_org_nativescript_canvas_TNSWebGL2RenderingContext_nativeTexSubImage3DBitmap( env: JNIEnv, _: JClass, target: jint, diff --git a/packages/canvas/src-native/canvas-native/canvas-core/src/android/gl/webgl_rendering_context.rs b/packages/canvas/src-native/canvas-native/canvas-core/src/android/gl/webgl_rendering_context.rs index 56ca39cc..8a376bb4 100644 --- a/packages/canvas/src-native/canvas-native/canvas-core/src/android/gl/webgl_rendering_context.rs +++ b/packages/canvas/src-native/canvas-native/canvas-core/src/android/gl/webgl_rendering_context.rs @@ -5,11 +5,11 @@ use std::os::raw::c_void; use jni::errors::Error; +use jni::JNIEnv; use jni::objects::{AutoPrimitiveArray, JByteBuffer, JClass, JObject, ReleaseMode}; use jni::sys::{ - jboolean, jbyteArray, jfloatArray, jint, jintArray, jlong, jobject, jshortArray, JNI_TRUE, + jboolean, jbyteArray, jfloatArray, jint, jintArray, jlong, JNI_TRUE, jobject, jshortArray, }; -use jni::JNIEnv; use skia_safe::RCHandle; use crate::common::context::image_asset::ImageAsset; diff --git a/packages/canvas/src-native/canvas-native/canvas-core/src/android/gradient.rs b/packages/canvas/src-native/canvas-native/canvas-core/src/android/gradient.rs index bf2a8ad5..37d43965 100644 --- a/packages/canvas/src-native/canvas-native/canvas-core/src/android/gradient.rs +++ b/packages/canvas/src-native/canvas-native/canvas-core/src/android/gradient.rs @@ -1,8 +1,8 @@ use std::ffi::CStr; use std::os::raw::{c_char, c_float, c_longlong}; -use jni::objects::{JClass, JString}; use jni::JNIEnv; +use jni::objects::{JClass, JString}; use crate::common::context::fill_and_stroke_styles::paint::PaintStyle; diff --git a/packages/canvas/src-native/canvas-native/canvas-core/src/android/image_asset.rs b/packages/canvas/src-native/canvas-native/canvas-core/src/android/image_asset.rs index 8e9946f6..aa7a4b7c 100644 --- a/packages/canvas/src-native/canvas-native/canvas-core/src/android/image_asset.rs +++ b/packages/canvas/src-native/canvas-native/canvas-core/src/android/image_asset.rs @@ -2,9 +2,9 @@ #![allow(non_camel_case_types)] #![allow(non_snake_case)] -use jni::objects::{JClass, JString}; -use jni::sys::{jboolean, jbyteArray, jint, jlong, jobject, jstring, JNI_FALSE, JNI_TRUE}; use jni::JNIEnv; +use jni::objects::{JClass, JString}; +use jni::sys::{jboolean, jbyteArray, jint, jlong, JNI_FALSE, JNI_TRUE, jobject, jstring}; use crate::common::context::image_asset::{ImageAsset, OutputFormat}; @@ -242,7 +242,7 @@ pub extern "C" fn Java_org_nativescript_canvas_TNSImageAsset_nativeLoadAssetByte let mut buf = vec![0u8; size as usize]; unsafe { if let Ok(_) = - env.get_byte_array_region(buffer, 0, std::mem::transmute(buf.as_mut_slice())) + env.get_byte_array_region(buffer, 0, std::mem::transmute(buf.as_mut_slice())) { let asset: *mut ImageAsset = asset as _; let asset = &mut *asset; diff --git a/packages/canvas/src-native/canvas-native/canvas-core/src/android/image_bitmap.rs b/packages/canvas/src-native/canvas-native/canvas-core/src/android/image_bitmap.rs index dbadcf2c..8a0647d0 100644 --- a/packages/canvas/src-native/canvas-native/canvas-core/src/android/image_bitmap.rs +++ b/packages/canvas/src-native/canvas-native/canvas-core/src/android/image_bitmap.rs @@ -1,7 +1,7 @@ use jni::errors::Error; +use jni::JNIEnv; use jni::objects::{AutoPrimitiveArray, JByteBuffer, JClass, JObject, ReleaseMode}; use jni::sys::{jboolean, jbyteArray, jfloat, jint, jlong, JNI_TRUE}; -use jni::JNIEnv; use skia_safe::{RCHandle, Rect}; use crate::common::context::image_asset::ImageAsset; diff --git a/packages/canvas/src-native/canvas-native/canvas-core/src/android/image_data.rs b/packages/canvas/src-native/canvas-native/canvas-core/src/android/image_data.rs index 3c53ca4f..2a92d08b 100644 --- a/packages/canvas/src-native/canvas-native/canvas-core/src/android/image_data.rs +++ b/packages/canvas/src-native/canvas-native/canvas-core/src/android/image_data.rs @@ -1,6 +1,6 @@ +use jni::JNIEnv; use jni::objects::JClass; use jni::sys::{jint, jlong, jobject}; -use jni::JNIEnv; use crate::common::context::pixel_manipulation::image_data::ImageData; diff --git a/packages/canvas/src-native/canvas-native/canvas-core/src/android/matrix.rs b/packages/canvas/src-native/canvas-native/canvas-core/src/android/matrix.rs index 265de892..5bd54c18 100644 --- a/packages/canvas/src-native/canvas-native/canvas-core/src/android/matrix.rs +++ b/packages/canvas/src-native/canvas-native/canvas-core/src/android/matrix.rs @@ -1,6 +1,6 @@ +use jni::JNIEnv; use jni::objects::JClass; use jni::sys::{jfloat, jfloatArray, jlong}; -use jni::JNIEnv; use crate::common::context::matrix::Matrix; diff --git a/packages/canvas/src-native/canvas-native/canvas-core/src/android/mod.rs b/packages/canvas/src-native/canvas-native/canvas-core/src/android/mod.rs index 6c25d366..aefc7cbf 100644 --- a/packages/canvas/src-native/canvas-native/canvas-core/src/android/mod.rs +++ b/packages/canvas/src-native/canvas-native/canvas-core/src/android/mod.rs @@ -1,21 +1,19 @@ -use std::os::raw::c_void; - use android_logger::Config; -use jni::objects::{JByteBuffer, JClass, JObject, JString}; -use jni::sys::{jboolean, jbyteArray, jfloat, jint, jlong, jobject, jstring, JNI_FALSE, JNI_TRUE}; use jni::JNIEnv; +use jni::objects::{JClass, JObject, JString}; +use jni::sys::{jboolean, jbyteArray, jfloat, jint, jlong, JNI_FALSE, JNI_TRUE, jstring}; + use log::Level; -use log::{debug, info}; -use skia_safe::gpu::gl::Interface; -use skia_safe::image::CachingHint; use skia_safe::{ - AlphaType, Color, ColorType, EncodedImageFormat, IPoint, ISize, ImageInfo, PixelGeometry, + AlphaType, Color, ColorType, EncodedImageFormat, ImageInfo, IPoint, ISize, PixelGeometry, RCHandle, Rect, Size, Surface, }; +use skia_safe::gpu::gl::Interface; +use skia_safe::image::CachingHint; +use crate::common::context::{Context, Device, State}; use crate::common::context::paths::path::Path; use crate::common::context::text_styles::text_direction::TextDirection; -use crate::common::context::{Context, Device, State}; use crate::common::to_data_url; pub mod context; diff --git a/packages/canvas/src-native/canvas-native/canvas-core/src/android/paint.rs b/packages/canvas/src-native/canvas-native/canvas-core/src/android/paint.rs index 39a2a29b..b34cb25a 100644 --- a/packages/canvas/src-native/canvas-native/canvas-core/src/android/paint.rs +++ b/packages/canvas/src-native/canvas-native/canvas-core/src/android/paint.rs @@ -1,13 +1,13 @@ use std::str::FromStr; use css_color_parser::{Color, ColorParseError}; +use jni::JNIEnv; use jni::objects::{JClass, JString}; use jni::sys::{jlong, jstring}; -use jni::JNIEnv; use log::{debug, info}; -use crate::common::context::fill_and_stroke_styles::paint::PaintStyle; use crate::common::context::Context; +use crate::common::context::fill_and_stroke_styles::paint::PaintStyle; use crate::common::utils::color::to_parsed_color; pub(crate) fn paint_style_set_color_with_string( diff --git a/packages/canvas/src-native/canvas-native/canvas-core/src/android/path.rs b/packages/canvas/src-native/canvas-native/canvas-core/src/android/path.rs index 13086de2..e90e02ee 100644 --- a/packages/canvas/src-native/canvas-native/canvas-core/src/android/path.rs +++ b/packages/canvas/src-native/canvas-native/canvas-core/src/android/path.rs @@ -1,6 +1,6 @@ +use jni::JNIEnv; use jni::objects::{JClass, JString}; use jni::sys::{jfloat, jlong}; -use jni::JNIEnv; use crate::common::context::matrix::Matrix; use crate::common::context::paths::path::Path; diff --git a/packages/canvas/src-native/canvas-native/canvas-core/src/android/pattern.rs b/packages/canvas/src-native/canvas-native/canvas-core/src/android/pattern.rs index b5e9c526..b559c0c5 100644 --- a/packages/canvas/src-native/canvas-native/canvas-core/src/android/pattern.rs +++ b/packages/canvas/src-native/canvas-native/canvas-core/src/android/pattern.rs @@ -1,6 +1,6 @@ +use jni::JNIEnv; use jni::objects::JClass; use jni::sys::jlong; -use jni::JNIEnv; use crate::common::context::fill_and_stroke_styles::paint::PaintStyle; use crate::common::context::matrix::Matrix; diff --git a/packages/canvas/src-native/canvas-native/canvas-core/src/android/svg.rs b/packages/canvas/src-native/canvas-native/canvas-core/src/android/svg.rs index 5ca03851..c0682d23 100644 --- a/packages/canvas/src-native/canvas-native/canvas-core/src/android/svg.rs +++ b/packages/canvas/src-native/canvas-native/canvas-core/src/android/svg.rs @@ -1,6 +1,6 @@ +use jni::JNIEnv; use jni::objects::{JClass, JString}; use jni::sys::jlong; -use jni::JNIEnv; use crate::common::context::Context; diff --git a/packages/canvas/src-native/canvas-native/canvas-core/src/android/text_decoder.rs b/packages/canvas/src-native/canvas-native/canvas-core/src/android/text_decoder.rs index ec8f9578..d239619e 100644 --- a/packages/canvas/src-native/canvas-native/canvas-core/src/android/text_decoder.rs +++ b/packages/canvas/src-native/canvas-native/canvas-core/src/android/text_decoder.rs @@ -2,14 +2,14 @@ #![allow(non_camel_case_types)] #![allow(non_snake_case)] +use std::borrow::Borrow; use std::str::Utf8Error; +use jni::JNIEnv; use jni::objects::{JByteBuffer, JClass, JString, JValue, ReleaseMode}; use jni::sys::{jbyteArray, jlong, jstring}; -use jni::JNIEnv; use crate::common::context::text_decoder::TextDecoder; -use std::borrow::Borrow; #[no_mangle] pub extern "C" fn Java_org_nativescript_canvas_TNSTextDecoder_nativeInit( diff --git a/packages/canvas/src-native/canvas-native/canvas-core/src/android/text_encoder.rs b/packages/canvas/src-native/canvas-native/canvas-core/src/android/text_encoder.rs index 1bb7eb89..45059e21 100644 --- a/packages/canvas/src-native/canvas-native/canvas-core/src/android/text_encoder.rs +++ b/packages/canvas/src-native/canvas-native/canvas-core/src/android/text_encoder.rs @@ -2,9 +2,9 @@ #![allow(non_camel_case_types)] #![allow(non_snake_case)] +use jni::JNIEnv; use jni::objects::{JClass, JString}; use jni::sys::{jbyteArray, jlong, jobject, jstring}; -use jni::JNIEnv; use crate::common::context::text_encoder::TextEncoder; diff --git a/packages/canvas/src-native/canvas-native/canvas-core/src/android/text_metrics.rs b/packages/canvas/src-native/canvas-native/canvas-core/src/android/text_metrics.rs index 13190c95..84776ed0 100644 --- a/packages/canvas/src-native/canvas-native/canvas-core/src/android/text_metrics.rs +++ b/packages/canvas/src-native/canvas-native/canvas-core/src/android/text_metrics.rs @@ -1,6 +1,6 @@ +use jni::JNIEnv; use jni::objects::JClass; use jni::sys::{jfloat, jlong}; -use jni::JNIEnv; use crate::common::context::drawing_text::text_metrics::TextMetrics; diff --git a/packages/canvas/src-native/canvas-native/canvas-core/src/android/utils/image.rs b/packages/canvas/src-native/canvas-native/canvas-core/src/android/utils/image.rs index 3ac23592..931ee12e 100644 --- a/packages/canvas/src-native/canvas-native/canvas-core/src/android/utils/image.rs +++ b/packages/canvas/src-native/canvas-native/canvas-core/src/android/utils/image.rs @@ -1,12 +1,14 @@ +use std::borrow::Cow; use std::os::raw::c_void; -use super::bitmap::*; -use crate::android::utils::bitmap::AndroidBitmapInfo; +use jni::JNIEnv; use jni::objects::{JByteBuffer, JClass, JObject}; use jni::sys::{jbyteArray, jobject}; -use jni::JNIEnv; use log::{debug, info}; -use std::borrow::Cow; + +use crate::android::utils::bitmap::AndroidBitmapInfo; + +use super::bitmap::*; pub fn get_bytes_from_bitmap(env: JNIEnv, bitmap: JObject) -> (Vec, AndroidBitmapInfo) { let native_interface = env.get_native_interface(); diff --git a/packages/canvas/src-native/canvas-native/canvas-core/src/common/context/drawing_images/mod.rs b/packages/canvas/src-native/canvas-native/canvas-core/src/common/context/drawing_images/mod.rs index d43b1df0..850f5701 100644 --- a/packages/canvas/src-native/canvas-native/canvas-core/src/common/context/drawing_images/mod.rs +++ b/packages/canvas/src-native/canvas-native/canvas-core/src/common/context/drawing_images/mod.rs @@ -1,5 +1,5 @@ -use skia_safe::canvas::SrcRectConstraint; use skia_safe::{Image, Rect}; +use skia_safe::canvas::SrcRectConstraint; use crate::common::context::Context; diff --git a/packages/canvas/src-native/canvas-native/canvas-core/src/common/context/drawing_paths/mod.rs b/packages/canvas/src-native/canvas-native/canvas-core/src/common/context/drawing_paths/mod.rs index 4ecb057c..03b039f7 100644 --- a/packages/canvas/src-native/canvas-native/canvas-core/src/common/context/drawing_paths/mod.rs +++ b/packages/canvas/src-native/canvas-native/canvas-core/src/common/context/drawing_paths/mod.rs @@ -2,9 +2,9 @@ use std::borrow::BorrowMut; use skia_safe::{ClipOp, Matrix, Point}; +use crate::common::context::Context; use crate::common::context::drawing_paths::fill_rule::FillRule; use crate::common::context::paths::path::Path; -use crate::common::context::Context; pub mod fill_rule; diff --git a/packages/canvas/src-native/canvas-native/canvas-core/src/common/context/drawing_rectangles.rs b/packages/canvas/src-native/canvas-native/canvas-core/src/common/context/drawing_rectangles.rs index 5fd7d1b3..580f3a97 100644 --- a/packages/canvas/src-native/canvas-native/canvas-core/src/common/context/drawing_rectangles.rs +++ b/packages/canvas/src-native/canvas-native/canvas-core/src/common/context/drawing_rectangles.rs @@ -1,10 +1,10 @@ use std::os::raw::c_float; -use skia_safe::paint::Style; use skia_safe::{BlendMode, Paint, Rect}; +use skia_safe::paint::Style; use crate::common::context::Context; -use crate::common::prelude::*; + impl Context { pub fn clear_rect(&mut self, x: c_float, y: c_float, width: c_float, height: c_float) { diff --git a/packages/canvas/src-native/canvas-native/canvas-core/src/common/context/drawing_text/mod.rs b/packages/canvas/src-native/canvas-native/canvas-core/src/common/context/drawing_text/mod.rs index a8320beb..983f7841 100644 --- a/packages/canvas/src-native/canvas-native/canvas-core/src/common/context/drawing_text/mod.rs +++ b/packages/canvas/src-native/canvas-native/canvas-core/src/common/context/drawing_text/mod.rs @@ -1,12 +1,12 @@ use std::os::raw::c_float; -use skia_safe::paint::Style; use skia_safe::{Point, Size}; +use skia_safe::paint::Style; +use crate::common::context::Context; use crate::common::context::drawing_text::text_metrics::TextMetrics; use crate::common::context::drawing_text::typography::{get_font_baseline, to_real_text_align}; use crate::common::context::text_styles::text_align::TextAlign; -use crate::common::context::Context; use crate::common::utils::geometry::inflate_stroke_rect; pub mod text_metrics; diff --git a/packages/canvas/src-native/canvas-native/canvas-core/src/common/context/drawing_text/typography.rs b/packages/canvas/src-native/canvas-native/canvas-core/src/common/context/drawing_text/typography.rs index c4d4878b..fd5304c8 100644 --- a/packages/canvas/src-native/canvas-native/canvas-core/src/common/context/drawing_text/typography.rs +++ b/packages/canvas/src-native/canvas-native/canvas-core/src/common/context/drawing_text/typography.rs @@ -1,15 +1,15 @@ -use std::os::raw::c_float; + use skia_safe::{ font_style::{Slant, Weight, Width}, - typeface::Typeface, - FontMetrics, FontMgr, FontStyle, + FontMetrics, + FontMgr, FontStyle, typeface::Typeface, }; use crate::{ + common::context::Device, common::context::text_styles::text_align::TextAlign, - common::context::text_styles::text_baseline::TextBaseLine, - common::context::text_styles::text_direction::TextDirection, common::context::Device, + common::context::text_styles::text_baseline::TextBaseLine, common::context::text_styles::text_direction::TextDirection, common::utils::dimensions::parse_size, }; diff --git a/packages/canvas/src-native/canvas-native/canvas-core/src/common/context/fill_and_stroke_styles/gradient.rs b/packages/canvas/src-native/canvas-native/canvas-core/src/common/context/fill_and_stroke_styles/gradient.rs index 9080b7b8..ef616ccd 100644 --- a/packages/canvas/src-native/canvas-native/canvas-core/src/common/context/fill_and_stroke_styles/gradient.rs +++ b/packages/canvas/src-native/canvas-native/canvas-core/src/common/context/fill_and_stroke_styles/gradient.rs @@ -1,7 +1,7 @@ use std::os::raw::c_float; -use skia_safe::gradient_shader::GradientShaderColors; use skia_safe::{Color, Point, Shader, TileMode}; +use skia_safe::gradient_shader::GradientShaderColors; use crate::common::context::matrix::Matrix; diff --git a/packages/canvas/src-native/canvas-native/canvas-core/src/common/context/fill_and_stroke_styles/mod.rs b/packages/canvas/src-native/canvas-native/canvas-core/src/common/context/fill_and_stroke_styles/mod.rs index 14eba7cb..48b2ac9b 100644 --- a/packages/canvas/src-native/canvas-native/canvas-core/src/common/context/fill_and_stroke_styles/mod.rs +++ b/packages/canvas/src-native/canvas-native/canvas-core/src/common/context/fill_and_stroke_styles/mod.rs @@ -1,4 +1,4 @@ -use crate::{common::context::fill_and_stroke_styles::paint::PaintStyle, common::context::Context}; +use crate::{common::context::Context, common::context::fill_and_stroke_styles::paint::PaintStyle}; pub mod gradient; pub mod paint; diff --git a/packages/canvas/src-native/canvas-native/canvas-core/src/common/context/fill_and_stroke_styles/paint.rs b/packages/canvas/src-native/canvas-native/canvas-core/src/common/context/fill_and_stroke_styles/paint.rs index 9496f14a..09da5b01 100644 --- a/packages/canvas/src-native/canvas-native/canvas-core/src/common/context/fill_and_stroke_styles/paint.rs +++ b/packages/canvas/src-native/canvas-native/canvas-core/src/common/context/fill_and_stroke_styles/paint.rs @@ -1,7 +1,7 @@ use std::os::raw::c_float; -use skia_safe::paint::{Cap, Style}; use skia_safe::{Color, Point}; +use skia_safe::paint::{Cap, Style}; use crate::common::context::fill_and_stroke_styles::gradient::Gradient; use crate::common::context::fill_and_stroke_styles::pattern::Pattern; diff --git a/packages/canvas/src-native/canvas-native/canvas-core/src/common/context/fill_and_stroke_styles/pattern.rs b/packages/canvas/src-native/canvas-native/canvas-core/src/common/context/fill_and_stroke_styles/pattern.rs index 8d553b9e..ee35037e 100644 --- a/packages/canvas/src-native/canvas-native/canvas-core/src/common/context/fill_and_stroke_styles/pattern.rs +++ b/packages/canvas/src-native/canvas-native/canvas-core/src/common/context/fill_and_stroke_styles/pattern.rs @@ -53,9 +53,14 @@ impl Pattern { Repetition::RepeatY => (TileMode::Clamp, TileMode::Repeat), _ => (TileMode::Repeat, TileMode::Repeat), }; - pattern + match pattern .image() - .to_shader(Some(mode), image_smoothing_quality, Some(&pattern.matrix)) + .to_shader(Some(mode), image_smoothing_quality, None) { + Some(shader) => { + Some(shader.with_local_matrix(&pattern.matrix)) + } + None => None + } } pub fn new(image: Image, repetition: Repetition) -> Self { diff --git a/packages/canvas/src-native/canvas-native/canvas-core/src/common/context/filters.rs b/packages/canvas/src-native/canvas-native/canvas-core/src/common/context/filters.rs index 05ca2a1e..5d96592c 100644 --- a/packages/canvas/src-native/canvas-native/canvas-core/src/common/context/filters.rs +++ b/packages/canvas/src-native/canvas-native/canvas-core/src/common/context/filters.rs @@ -1,6 +1,6 @@ use std::f32::consts::PI; -use skia_safe::{color_filters, image_filters, table_color_filter, Point, TileMode}; +use skia_safe::{color_filters, image_filters, Point, table_color_filter, TileMode}; use crate::common::context::Context; use crate::common::utils::color::parse_color; diff --git a/packages/canvas/src-native/canvas-native/canvas-core/src/common/context/gradients_and_patterns.rs b/packages/canvas/src-native/canvas-native/canvas-core/src/common/context/gradients_and_patterns.rs index 7142513f..67eb1456 100644 --- a/packages/canvas/src-native/canvas-native/canvas-core/src/common/context/gradients_and_patterns.rs +++ b/packages/canvas/src-native/canvas-native/canvas-core/src/common/context/gradients_and_patterns.rs @@ -2,10 +2,10 @@ use std::os::raw::c_float; use skia_safe::{Image, Point, TileMode}; +use crate::common::context::Context; use crate::common::context::fill_and_stroke_styles::gradient::Gradient; use crate::common::context::fill_and_stroke_styles::pattern::{Pattern, Repetition}; use crate::common::context::matrix::Matrix; -use crate::common::context::Context; impl Context { pub fn create_linear_gradient( diff --git a/packages/canvas/src-native/canvas-native/canvas-core/src/common/context/image_asset.rs b/packages/canvas/src-native/canvas-native/canvas-core/src/common/context/image_asset.rs index fdecf55c..b8524831 100644 --- a/packages/canvas/src-native/canvas-native/canvas-core/src/common/context/image_asset.rs +++ b/packages/canvas/src-native/canvas-native/canvas-core/src/common/context/image_asset.rs @@ -3,8 +3,8 @@ use std::io::{Read, Seek, SeekFrom}; use std::os::raw::{c_char, c_uint}; use std::ptr::{null, null_mut}; -use image::imageops::FilterType; use image::{GenericImageView, ImageFormat}; +use image::imageops::FilterType; use crate::common::ffi::u8_array::U8Array; @@ -87,7 +87,7 @@ impl ImageAsset { } } - pub fn load_from_path(&mut self, path: *const c_char) -> bool { + pub unsafe fn load_from_path(&mut self, path: *const c_char) -> bool { if !self.error.is_empty() { self.error.clear() } @@ -141,7 +141,7 @@ impl ImageAsset { } } - pub fn load_from_raw(&mut self, buffer: *const u8, size: usize) -> bool { + pub unsafe fn load_from_raw(&mut self, buffer: *const u8, size: usize) -> bool { if !self.error.is_empty() { self.error.clear() } @@ -289,11 +289,11 @@ impl ImageAsset { let raw; match byte_type { ByteType::RGB => { - let image_ref = image.to_rgb(); + let image_ref = image.to_rgb8(); raw = image_ref.into_raw(); } ByteType::RGBA => { - let image_ref = image.to_rgba(); + let image_ref = image.to_rgba8(); raw = image_ref.into_raw(); } ByteType::Default => { @@ -330,11 +330,11 @@ impl ImageAsset { let raw; match byte_type { ByteType::RGB => { - let image_ref = image.to_rgb(); + let image_ref = image.to_rgb8(); raw = image_ref.into_raw(); } ByteType::RGBA => { - let image_ref = image.to_rgba(); + let image_ref = image.to_rgba8(); raw = image_ref.into_raw(); } ByteType::Default => { @@ -369,7 +369,7 @@ impl ImageAsset { self.bytes_with(ByteType::RGB) } - pub fn save_path(&mut self, path: *const c_char, format: OutputFormat) -> bool { + pub unsafe fn save_path(&mut self, path: *const c_char, format: OutputFormat) -> bool { if !self.error.is_empty() { self.error.clear() } @@ -396,7 +396,7 @@ impl ImageAsset { } } - pub fn free_image_data(data: *mut U8Array) { + pub unsafe fn free_image_data(data: *mut U8Array) { unsafe { let _ = Box::from_raw(data); } diff --git a/packages/canvas/src-native/canvas-native/canvas-core/src/common/context/image_smoothing.rs b/packages/canvas/src-native/canvas-native/canvas-core/src/common/context/image_smoothing.rs index 904098b7..5dff5218 100644 --- a/packages/canvas/src-native/canvas-native/canvas-core/src/common/context/image_smoothing.rs +++ b/packages/canvas/src-native/canvas-native/canvas-core/src/common/context/image_smoothing.rs @@ -1,7 +1,8 @@ -use crate::common::context::filter_quality::FilterQuality; -use crate::common::context::Context; use skia_safe::SamplingOptions; +use crate::common::context::Context; +use crate::common::context::filter_quality::FilterQuality; + #[repr(C)] #[derive(Copy, Clone, Debug)] pub enum ImageSmoothingQuality { diff --git a/packages/canvas/src-native/canvas-native/canvas-core/src/common/context/line_styles/mod.rs b/packages/canvas/src-native/canvas-native/canvas-core/src/common/context/line_styles/mod.rs index 32c32cbb..2ee74692 100644 --- a/packages/canvas/src-native/canvas-native/canvas-core/src/common/context/line_styles/mod.rs +++ b/packages/canvas/src-native/canvas-native/canvas-core/src/common/context/line_styles/mod.rs @@ -1,11 +1,11 @@ +use std::borrow::Cow; use std::os::raw::c_float; use skia_safe::PathEffect; +use crate::common::context::Context; use crate::common::context::line_styles::line_cap::LineCap; use crate::common::context::line_styles::line_join::LineJoin; -use crate::common::context::Context; -use std::borrow::Cow; pub mod line_cap; pub mod line_join; diff --git a/packages/canvas/src-native/canvas-native/canvas-core/src/common/context/mod.rs b/packages/canvas/src-native/canvas-native/canvas-core/src/common/context/mod.rs index 34f6a1d3..c79ff49b 100644 --- a/packages/canvas/src-native/canvas-native/canvas-core/src/common/context/mod.rs +++ b/packages/canvas/src-native/canvas-native/canvas-core/src/common/context/mod.rs @@ -1,8 +1,7 @@ use std::os::raw::c_float; -use skia_safe::{Color, Point, SamplingOptions, Surface}; +use skia_safe::{Color, Point, Surface}; -use crate::common::context::filter_quality::FilterQuality; use crate::{ common::context::compositing::composite_operation_type::CompositeOperationType, common::context::drawing_text::typography::Font, @@ -15,6 +14,7 @@ use crate::{ text_align::TextAlign, text_baseline::TextBaseLine, text_direction::TextDirection, }, }; +use crate::common::context::filter_quality::FilterQuality; pub mod drawing_images; pub mod drawing_text; diff --git a/packages/canvas/src-native/canvas-native/canvas-core/src/common/context/pixel_manipulation/mod.rs b/packages/canvas/src-native/canvas-native/canvas-core/src/common/context/pixel_manipulation/mod.rs index 9ccae9ba..ed4e36cc 100644 --- a/packages/canvas/src-native/canvas-native/canvas-core/src/common/context/pixel_manipulation/mod.rs +++ b/packages/canvas/src-native/canvas-native/canvas-core/src/common/context/pixel_manipulation/mod.rs @@ -1,9 +1,9 @@ use std::os::raw::{c_float, c_int}; -use skia_safe::{AlphaType, ColorType, IPoint, ISize, IVector, ImageInfo, Rect}; +use skia_safe::{AlphaType, ColorType, ImageInfo, IPoint, ISize, IVector, Rect}; -use crate::common::context::pixel_manipulation::image_data::ImageData; use crate::common::context::Context; +use crate::common::context::pixel_manipulation::image_data::ImageData; pub mod image_data; diff --git a/packages/canvas/src-native/canvas-native/canvas-core/src/common/context/text_styles/mod.rs b/packages/canvas/src-native/canvas-native/canvas-core/src/common/context/text_styles/mod.rs index d0f880d4..35cf2611 100644 --- a/packages/canvas/src-native/canvas-native/canvas-core/src/common/context/text_styles/mod.rs +++ b/packages/canvas/src-native/canvas-native/canvas-core/src/common/context/text_styles/mod.rs @@ -1,9 +1,9 @@ -use crate::common::context::drawing_text::typography::parse_font; use crate::{ + common::context::Context, common::context::text_styles::text_align::TextAlign, - common::context::text_styles::text_baseline::TextBaseLine, - common::context::text_styles::text_direction::TextDirection, common::context::Context, + common::context::text_styles::text_baseline::TextBaseLine, common::context::text_styles::text_direction::TextDirection, }; +use crate::common::context::drawing_text::typography::parse_font; pub mod text_align; pub mod text_baseline; diff --git a/packages/canvas/src-native/canvas-native/canvas-core/src/common/context/transformations.rs b/packages/canvas/src-native/canvas-native/canvas-core/src/common/context/transformations.rs index b79b28c3..15c3e478 100644 --- a/packages/canvas/src-native/canvas-native/canvas-core/src/common/context/transformations.rs +++ b/packages/canvas/src-native/canvas-native/canvas-core/src/common/context/transformations.rs @@ -1,7 +1,7 @@ use std::f32::consts::PI; use std::os::raw::c_float; -use skia_safe::{Matrix, Point, M44}; +use skia_safe::{M44, Matrix, Point}; use crate::common::context::Context; diff --git a/packages/canvas/src-native/canvas-native/canvas-core/src/common/image_bitmap.rs b/packages/canvas/src-native/canvas-native/canvas-core/src/common/image_bitmap.rs index 47543ab1..23a7da79 100644 --- a/packages/canvas/src-native/canvas-native/canvas-core/src/common/image_bitmap.rs +++ b/packages/canvas/src-native/canvas-native/canvas-core/src/common/image_bitmap.rs @@ -1,7 +1,7 @@ use core::convert::{From, Into}; use skia_safe::{ - CubicResampler, EncodedImageFormat, FilterMode, MipmapMode, Point, RCHandle, Rect, + EncodedImageFormat }; use crate::common::context::filter_quality::FilterQuality; diff --git a/packages/canvas/src-native/canvas-native/canvas-core/src/common/mod.rs b/packages/canvas/src-native/canvas-native/canvas-core/src/common/mod.rs index 0ee19c6e..b2ffb1e7 100644 --- a/packages/canvas/src-native/canvas-native/canvas-core/src/common/mod.rs +++ b/packages/canvas/src-native/canvas-native/canvas-core/src/common/mod.rs @@ -1,12 +1,12 @@ use std::os::raw::c_int; -use skia_safe::image::CachingHint; use skia_safe::{ - AlphaType, ColorType, EncodedImageFormat, IPoint, ISize, ImageInfo, Point, Surface, + AlphaType, ColorType, EncodedImageFormat, ImageInfo, IPoint, ISize, Point, Surface, }; +use skia_safe::image::CachingHint; -use crate::common::context::filter_quality::FilterQuality; use crate::common::context::Context; +use crate::common::context::filter_quality::FilterQuality; pub mod context; pub mod ffi; diff --git a/packages/canvas/src-native/canvas-native/canvas-core/src/common/svg/attribute_names.rs b/packages/canvas/src-native/canvas-native/canvas-core/src/common/svg/attribute_names.rs index 803735ff..4ff940f1 100644 --- a/packages/canvas/src-native/canvas-native/canvas-core/src/common/svg/attribute_names.rs +++ b/packages/canvas/src-native/canvas-native/canvas-core/src/common/svg/attribute_names.rs @@ -1,18 +1,16 @@ -use std::hash::{Hash, Hasher}; -use std::str::FromStr; - use phf::phf_map; use roxmltree::Node; +use std::hash::{Hash, Hasher}; +use std::str::FromStr; +use crate::common::svg::elements::element_names::ElementName; use crate::common::svg::elements::parser::StyleMap; use crate::common::svg::elements::prelude::*; use crate::common::svg::enums::preserve_aspect_ratio::{ AlignMeetOrSlice, AspectRatioAlign, AspectRatioMeetOrSlice, }; - use crate::common::svg::units::length::Length; use crate::common::svg::view_box::ViewBox; -use crate::common::{svg::elements::element_names::ElementName}; #[derive(Copy, Clone, Debug, PartialEq, Eq, Hash)] pub enum Attribute { diff --git a/packages/canvas/src-native/canvas-native/canvas-core/src/common/svg/elements/clip_path/mod.rs b/packages/canvas/src-native/canvas-native/canvas-core/src/common/svg/elements/clip_path/mod.rs index 3a0768fa..267de281 100644 --- a/packages/canvas/src-native/canvas-native/canvas-core/src/common/svg/elements/clip_path/mod.rs +++ b/packages/canvas/src-native/canvas-native/canvas-core/src/common/svg/elements/clip_path/mod.rs @@ -1,5 +1,3 @@ - - use crate::common::svg::elements::clip_path::shapes::ClipShape; use crate::common::svg::units::Units; diff --git a/packages/canvas/src-native/canvas-native/canvas-core/src/common/svg/elements/gradients/radial.rs b/packages/canvas/src-native/canvas-native/canvas-core/src/common/svg/elements/gradients/radial.rs index 42e48a70..902828b2 100644 --- a/packages/canvas/src-native/canvas-native/canvas-core/src/common/svg/elements/gradients/radial.rs +++ b/packages/canvas/src-native/canvas-native/canvas-core/src/common/svg/elements/gradients/radial.rs @@ -1,18 +1,15 @@ -use std::str::FromStr; - use roxmltree::Node; use skia_safe::{Color, Matrix}; +use std::str::FromStr; use crate::common::svg::attribute_names::{Attribute, NodeExt}; use crate::common::svg::elements::element_names::ElementName; use crate::common::svg::elements::gradients::utils::handle_stop; - use crate::common::svg::elements::reference_element::ReferenceElement; use crate::common::svg::enums::spread_method::SpreadMethod; use crate::common::svg::units::length::{Length, LengthUnit}; use crate::common::svg::units::Units; - #[derive(Clone, Debug)] pub struct RadialGradient { id: String, diff --git a/packages/canvas/src-native/canvas-native/canvas-core/src/common/svg/elements/gradients/utils.rs b/packages/canvas/src-native/canvas-native/canvas-core/src/common/svg/elements/gradients/utils.rs index 4eef4dc6..217d73e7 100644 --- a/packages/canvas/src-native/canvas-native/canvas-core/src/common/svg/elements/gradients/utils.rs +++ b/packages/canvas/src-native/canvas-native/canvas-core/src/common/svg/elements/gradients/utils.rs @@ -1,7 +1,6 @@ -use std::str::FromStr; - use roxmltree::Children; use skia_safe::Color; +use std::str::FromStr; use crate::common::svg::attribute_names::Attribute; use crate::common::svg::elements::element_names::ElementName; diff --git a/packages/canvas/src-native/canvas-native/canvas-core/src/common/svg/elements/marker.rs b/packages/canvas/src-native/canvas-native/canvas-core/src/common/svg/elements/marker.rs index 3a68436c..afa96c33 100644 --- a/packages/canvas/src-native/canvas-native/canvas-core/src/common/svg/elements/marker.rs +++ b/packages/canvas/src-native/canvas-native/canvas-core/src/common/svg/elements/marker.rs @@ -1,7 +1,6 @@ -use std::num::ParseIntError; - use roxmltree::Node; use skia_safe::Point; +use std::num::ParseIntError; use crate::common::context::Context; use crate::common::context::paths::path::Path; @@ -240,7 +239,7 @@ impl Marker { if point_count > 0 { for i in 1..point_count - 1 { if let (Some(point), Some(value)) = - (markers.0.get(i), markers.1.get(i)) + (markers.0.get(i), markers.1.get(i)) { context.save(); context.rotate(*value); diff --git a/packages/canvas/src-native/canvas-native/canvas-core/src/common/svg/elements/mask.rs b/packages/canvas/src-native/canvas-native/canvas-core/src/common/svg/elements/mask.rs index 3b29f729..d3367bfb 100644 --- a/packages/canvas/src-native/canvas-native/canvas-core/src/common/svg/elements/mask.rs +++ b/packages/canvas/src-native/canvas-native/canvas-core/src/common/svg/elements/mask.rs @@ -1,9 +1,8 @@ -use std::str::FromStr; - use image::{DynamicImage, GenericImageView, ImageError}; use rgb::FromSlice; use roxmltree::{Document, Node}; use skia_safe::SamplingOptions; +use std::str::FromStr; use crate::common::context::compositing::composite_operation_type::CompositeOperationType; use crate::common::context::Context; diff --git a/packages/canvas/src-native/canvas-native/canvas-core/src/common/svg/elements/parser.rs b/packages/canvas/src-native/canvas-native/canvas-core/src/common/svg/elements/parser.rs index 9f55e749..9474ba34 100644 --- a/packages/canvas/src-native/canvas-native/canvas-core/src/common/svg/elements/parser.rs +++ b/packages/canvas/src-native/canvas-native/canvas-core/src/common/svg/elements/parser.rs @@ -1,8 +1,7 @@ -use std::collections::HashMap; -use std::f32::consts::PI; - use roxmltree::Node; use skia_safe::Vector; +use std::collections::HashMap; +use std::f32::consts::PI; use crate::common::svg::attribute_names::Attribute; diff --git a/packages/canvas/src-native/canvas-native/canvas-core/src/common/svg/elements/pattern.rs b/packages/canvas/src-native/canvas-native/canvas-core/src/common/svg/elements/pattern.rs index 1f3eff82..7986a236 100644 --- a/packages/canvas/src-native/canvas-native/canvas-core/src/common/svg/elements/pattern.rs +++ b/packages/canvas/src-native/canvas-native/canvas-core/src/common/svg/elements/pattern.rs @@ -1,7 +1,6 @@ -use std::{cell::RefCell, rc::Rc, str::FromStr}; - use roxmltree::Node; use skia_safe::Matrix; +use std::{cell::RefCell, rc::Rc, str::FromStr}; use crate::common::context::Context; use crate::common::context::fill_and_stroke_styles::pattern::Repetition; diff --git a/packages/canvas/src-native/canvas-native/canvas-core/src/common/svg/elements/reference_element.rs b/packages/canvas/src-native/canvas-native/canvas-core/src/common/svg/elements/reference_element.rs index a44bd13f..fa6e53e9 100644 --- a/packages/canvas/src-native/canvas-native/canvas-core/src/common/svg/elements/reference_element.rs +++ b/packages/canvas/src-native/canvas-native/canvas-core/src/common/svg/elements/reference_element.rs @@ -1,8 +1,7 @@ +use roxmltree::Node; use std::collections::hash_map::RandomState; use std::collections::HashMap; -use roxmltree::Node; - use crate::common::svg::attribute_names::{Attribute, NodeExt}; use crate::common::svg::elements::element_names::ElementName; use crate::common::svg::elements::parser::StyleMap; diff --git a/packages/canvas/src-native/canvas-native/canvas-core/src/common/svg/elements/renderer.rs b/packages/canvas/src-native/canvas-native/canvas-core/src/common/svg/elements/renderer.rs index e1905107..f490a613 100644 --- a/packages/canvas/src-native/canvas-native/canvas-core/src/common/svg/elements/renderer.rs +++ b/packages/canvas/src-native/canvas-native/canvas-core/src/common/svg/elements/renderer.rs @@ -1,7 +1,6 @@ -use std::f32::consts::PI; - use roxmltree::{Children, Document, Node}; use skia_safe::{Color, Image, SamplingOptions, Vector}; +use std::f32::consts::PI; use crate::common::context::compositing::composite_operation_type::CompositeOperationType; use crate::common::context::Context; diff --git a/packages/canvas/src-native/canvas-native/canvas-core/src/common/svg/elements/shapes/circle.rs b/packages/canvas/src-native/canvas-native/canvas-core/src/common/svg/elements/shapes/circle.rs index f704c9f7..e44d04c2 100644 --- a/packages/canvas/src-native/canvas-native/canvas-core/src/common/svg/elements/shapes/circle.rs +++ b/packages/canvas/src-native/canvas-native/canvas-core/src/common/svg/elements/shapes/circle.rs @@ -1,21 +1,14 @@ +use roxmltree::Node; use std::collections::HashMap; use std::f32::consts::PI; -use roxmltree::{Node}; - use crate::common::context::{Context, Device}; - - - - use crate::common::svg::attribute_names::Attribute; use crate::common::svg::bounding_box::BoundingBox; use crate::common::svg::elements::parser::{Parser, StyleMap}; use crate::common::svg::elements::renderer::{ handle_style_data, render_mask, Renderer, set_filters, set_mask, }; - - use crate::common::svg::units::length::{convert_length, Length}; use crate::common::svg::units::Units; use crate::common::svg::view_box::ViewBox; diff --git a/packages/canvas/src-native/canvas-native/canvas-core/src/common/svg/elements/shapes/ellipse.rs b/packages/canvas/src-native/canvas-native/canvas-core/src/common/svg/elements/shapes/ellipse.rs index 05d3f529..a494fd87 100644 --- a/packages/canvas/src-native/canvas-native/canvas-core/src/common/svg/elements/shapes/ellipse.rs +++ b/packages/canvas/src-native/canvas-native/canvas-core/src/common/svg/elements/shapes/ellipse.rs @@ -1,19 +1,15 @@ +use roxmltree::Node; +use skia_safe::{RCHandle, Rect}; use std::collections::HashMap; use std::f32::consts::PI; -use roxmltree::{Node}; -use skia_safe::{RCHandle, Rect}; - use crate::common::context::{Context, Device}; use crate::common::svg::attribute_names::Attribute; use crate::common::svg::bounding_box::BoundingBox; - use crate::common::svg::elements::parser::{Parser, StyleMap}; use crate::common::svg::elements::renderer::{ handle_style_data, render_mask, Renderer, set_filters, set_mask, }; - - use crate::common::svg::units::length::{convert_length, Length}; use crate::common::svg::units::Units; use crate::common::svg::view_box::ViewBox; diff --git a/packages/canvas/src-native/canvas-native/canvas-core/src/common/svg/elements/shapes/line.rs b/packages/canvas/src-native/canvas-native/canvas-core/src/common/svg/elements/shapes/line.rs index 074ef960..4954beee 100644 --- a/packages/canvas/src-native/canvas-native/canvas-core/src/common/svg/elements/shapes/line.rs +++ b/packages/canvas/src-native/canvas-native/canvas-core/src/common/svg/elements/shapes/line.rs @@ -1,21 +1,17 @@ -use std::collections::HashMap; - -use roxmltree::{Node}; +use roxmltree::Node; use skia_safe::{Point, RCHandle, Rect}; +use std::collections::HashMap; use crate::common::context::{Context, Device}; use crate::common::context::paths::path::Path; use crate::common::svg::attribute_names::Attribute; use crate::common::svg::bounding_box::BoundingBox; use crate::common::svg::elements::marker::{Marker, MarkerPosition}; - use crate::common::svg::elements::parser::{Parser, StyleMap}; use crate::common::svg::elements::reference_element::ReferenceElement; use crate::common::svg::elements::renderer::{ handle_style_data, render_mask, Renderer, set_filters, set_mask, }; - - use crate::common::svg::units::length::{convert_length, Length}; use crate::common::svg::units::Units; use crate::common::svg::view_box::ViewBox; diff --git a/packages/canvas/src-native/canvas-native/canvas-core/src/common/svg/elements/shapes/path.rs b/packages/canvas/src-native/canvas-native/canvas-core/src/common/svg/elements/shapes/path.rs index 4a1210f6..29df7639 100644 --- a/packages/canvas/src-native/canvas-native/canvas-core/src/common/svg/elements/shapes/path.rs +++ b/packages/canvas/src-native/canvas-native/canvas-core/src/common/svg/elements/shapes/path.rs @@ -1,16 +1,13 @@ +use roxmltree::Node; use std::collections::HashMap; -use roxmltree::{ Node}; - use crate::common::context::{Context, Device}; use crate::common::svg::attribute_names::Attribute; use crate::common::svg::bounding_box::BoundingBox; - use crate::common::svg::elements::parser::{Parser, StyleMap}; use crate::common::svg::elements::renderer::{ - handle_style_data, render_mask, Renderer, set_filters, set_mask, + handle_style_data, render_mask, Renderer, set_filters, set_mask, }; - use crate::common::svg::view_box::ViewBox; #[derive(Clone, Debug)] diff --git a/packages/canvas/src-native/canvas-native/canvas-core/src/common/svg/elements/shapes/polyshape.rs b/packages/canvas/src-native/canvas-native/canvas-core/src/common/svg/elements/shapes/polyshape.rs index cd28b34b..29a6a44e 100644 --- a/packages/canvas/src-native/canvas-native/canvas-core/src/common/svg/elements/shapes/polyshape.rs +++ b/packages/canvas/src-native/canvas-native/canvas-core/src/common/svg/elements/shapes/polyshape.rs @@ -1,7 +1,6 @@ +use roxmltree::Node; use std::collections::HashMap; -use roxmltree::{Node}; - use crate::common::context::{Context, Device}; use crate::common::context::paths::path::Path; use crate::common::svg::attribute_names::Attribute; @@ -13,7 +12,6 @@ use crate::common::svg::elements::reference_element::ReferenceElement; use crate::common::svg::elements::renderer::{ handle_style_data, render_mask, Renderer, set_filters, set_mask, }; - use crate::common::svg::view_box::ViewBox; #[derive(Clone, Debug)] diff --git a/packages/canvas/src-native/canvas-native/canvas-core/src/common/svg/elements/shapes/rect.rs b/packages/canvas/src-native/canvas-native/canvas-core/src/common/svg/elements/shapes/rect.rs index 73562395..1762c8cc 100644 --- a/packages/canvas/src-native/canvas-native/canvas-core/src/common/svg/elements/shapes/rect.rs +++ b/packages/canvas/src-native/canvas-native/canvas-core/src/common/svg/elements/shapes/rect.rs @@ -1,27 +1,14 @@ +use roxmltree::Node; use std::collections::HashMap; - -use roxmltree::{Node}; - use crate::common::context::{Context, Device}; - -use crate::common::svg::attribute_names::{Attribute}; +use crate::common::svg::attribute_names::Attribute; use crate::common::svg::bounding_box::BoundingBox; - - - - - - use crate::common::svg::elements::parser::{Parser, StyleMap}; - use crate::common::svg::elements::renderer::{ handle_style_data, render_mask, Renderer, set_filters, set_mask, }; - - - use crate::common::svg::units::length::{convert_length, Length}; use crate::common::svg::units::Units; use crate::common::svg::view_box::ViewBox; diff --git a/packages/canvas/src-native/canvas-native/canvas-core/src/common/svg/elements/svg.rs b/packages/canvas/src-native/canvas-native/canvas-core/src/common/svg/elements/svg.rs index a0aac603..012ff03d 100644 --- a/packages/canvas/src-native/canvas-native/canvas-core/src/common/svg/elements/svg.rs +++ b/packages/canvas/src-native/canvas-native/canvas-core/src/common/svg/elements/svg.rs @@ -1,13 +1,13 @@ use roxmltree::Node; use skia_safe::{Color, ISize, Point, SamplingOptions, Surface, Vector}; +use crate::common::context::{Context, Device, State}; use crate::common::context::paths::path::Path; use crate::common::context::text_styles::text_direction::TextDirection; -use crate::common::context::{Context, Device, State}; use crate::common::svg::attribute_names::{Attribute, NodeExt}; use crate::common::svg::elements::element_names::ElementName; use crate::common::svg::elements::renderer::handle_render_children; -use crate::common::svg::enums::preserve_aspect_ratio::{view_box_to_transform, AlignMeetOrSlice}; +use crate::common::svg::enums::preserve_aspect_ratio::{AlignMeetOrSlice, view_box_to_transform}; use crate::common::svg::units::length::{convert_length, Length, LengthUnit}; use crate::common::svg::units::Units; use crate::common::svg::view_box::ViewBox; @@ -48,7 +48,7 @@ pub fn create_context<'a>( (width * density) as i32, (height * density) as i32, )) - .unwrap(), + .unwrap(), path: Path::default(), state: State::from_device(device, direction), state_stack: vec![], diff --git a/packages/canvas/src-native/canvas-native/canvas-core/src/common/svg/elements/symbol.rs b/packages/canvas/src-native/canvas-native/canvas-core/src/common/svg/elements/symbol.rs index e65ef02b..47a11391 100644 --- a/packages/canvas/src-native/canvas-native/canvas-core/src/common/svg/elements/symbol.rs +++ b/packages/canvas/src-native/canvas-native/canvas-core/src/common/svg/elements/symbol.rs @@ -120,7 +120,7 @@ impl Symbol { parent_view_box.width(), parent_view_box.height(), device.density, device.alpha, context.font_color.to_int() as i32, device.ppi, context.direction(), ); - let bounding_box = BoundingBox::new(x,y,width,height); + let bounding_box = BoundingBox::new(x, y, width, height); let parsed = handle_style_data(&style, context, root_element, bounding_box); if !parsed.is_visible() { return; @@ -155,7 +155,7 @@ impl Symbol { } let ss = symbol_ctx.surface.image_snapshot(); - + context.draw_image_with_points(&ss, 0.0, 0.0) } } diff --git a/packages/canvas/src-native/canvas-native/canvas-core/src/common/svg/elements/text.rs b/packages/canvas/src-native/canvas-native/canvas-core/src/common/svg/elements/text.rs index c9000e94..1572629f 100644 --- a/packages/canvas/src-native/canvas-native/canvas-core/src/common/svg/elements/text.rs +++ b/packages/canvas/src-native/canvas-native/canvas-core/src/common/svg/elements/text.rs @@ -1,6 +1,5 @@ -use std::collections::HashMap; - use roxmltree::{Document, Node}; +use std::collections::HashMap; use crate::common::context::{Context, Device}; use crate::common::svg::attribute_names::{Attribute, NodeExt}; diff --git a/packages/canvas/src-native/canvas-native/canvas-core/src/common/svg/elements/use_element.rs b/packages/canvas/src-native/canvas-native/canvas-core/src/common/svg/elements/use_element.rs index e7ade733..8f76419c 100644 --- a/packages/canvas/src-native/canvas-native/canvas-core/src/common/svg/elements/use_element.rs +++ b/packages/canvas/src-native/canvas-native/canvas-core/src/common/svg/elements/use_element.rs @@ -1,4 +1,4 @@ -use roxmltree::{Node}; +use roxmltree::Node; use crate::common::{ context::Context, diff --git a/packages/canvas/src-native/canvas-native/canvas-core/src/common/svg/prelude.rs b/packages/canvas/src-native/canvas-native/canvas-core/src/common/svg/prelude.rs index 8e7ceab3..7f8d8f69 100644 --- a/packages/canvas/src-native/canvas-native/canvas-core/src/common/svg/prelude.rs +++ b/packages/canvas/src-native/canvas-native/canvas-core/src/common/svg/prelude.rs @@ -1,10 +1,8 @@ use skia_safe::{Rect, Size}; - use crate::common::svg::enums::preserve_aspect_ratio::{ AlignMeetOrSlice, AspectRatioAlign, AspectRatioMeetOrSlice, }; - use crate::common::svg::view_box::ViewBox; pub trait ColorConversation { diff --git a/packages/canvas/src-native/canvas-native/canvas-core/src/common/svg/view_box.rs b/packages/canvas/src-native/canvas-native/canvas-core/src/common/svg/view_box.rs index 3a305303..ea840e34 100644 --- a/packages/canvas/src-native/canvas-native/canvas-core/src/common/svg/view_box.rs +++ b/packages/canvas/src-native/canvas-native/canvas-core/src/common/svg/view_box.rs @@ -1,4 +1,3 @@ - use std::str::FromStr; use crate::common::context::Context; diff --git a/packages/canvas/src-native/canvas-native/canvas-core/src/common/utils/geometry.rs b/packages/canvas/src-native/canvas-native/canvas-core/src/common/utils/geometry.rs index 21b53296..0c365ca2 100644 --- a/packages/canvas/src-native/canvas-native/canvas-core/src/common/utils/geometry.rs +++ b/packages/canvas/src-native/canvas-native/canvas-core/src/common/utils/geometry.rs @@ -1,7 +1,7 @@ use std::f32::consts::PI; -use skia_safe::paint::{Cap, Join}; use skia_safe::{Paint, Point, Size}; +use skia_safe::paint::{Cap, Join}; pub fn almost_equal(a: f32, b: f32) -> bool { (a - b).abs() < 0.00001 diff --git a/packages/canvas/src-native/canvas-native/canvas-core/src/common/utils/image.rs b/packages/canvas/src-native/canvas-native/canvas-core/src/common/utils/image.rs index 277f18e1..b9b0acca 100644 --- a/packages/canvas/src-native/canvas-native/canvas-core/src/common/utils/image.rs +++ b/packages/canvas/src-native/canvas-native/canvas-core/src/common/utils/image.rs @@ -1,6 +1,6 @@ use std::os::raw::c_int; -use skia_safe::{AlphaType, ColorType, Data, ISize, Image, ImageInfo}; +use skia_safe::{AlphaType, ColorType, Data, Image, ImageInfo, ISize}; pub(crate) fn to_image( image_array: *const u8, diff --git a/packages/canvas/src-native/canvas-native/canvas-core/src/ios/context.rs b/packages/canvas/src-native/canvas-native/canvas-core/src/ios/context.rs index c4589f1e..d280ef8a 100644 --- a/packages/canvas/src-native/canvas-native/canvas-core/src/ios/context.rs +++ b/packages/canvas/src-native/canvas-native/canvas-core/src/ios/context.rs @@ -2,13 +2,14 @@ use std::ffi::{CStr, CString}; use std::os::raw::{c_char, c_float, c_int, c_longlong, c_uint}; use std::str::FromStr; -use skia_safe::gpu::gl::Interface; -use skia_safe::image::CachingHint; use skia_safe::{ - AlphaType, Color, ColorType, EncodedImageFormat, IPoint, ISize, ImageInfo, PixelGeometry, Rect, - Surface, M44, + AlphaType, Color, ColorType, EncodedImageFormat, ImageInfo, IPoint, ISize, M44, PixelGeometry, + Rect, Surface, }; +use skia_safe::gpu::gl::Interface; +use skia_safe::image::CachingHint; +use crate::common::context::{Context, Device, State}; use crate::common::context::compositing::composite_operation_type::CompositeOperationType; use crate::common::context::drawing_paths::fill_rule::FillRule; use crate::common::context::fill_and_stroke_styles::paint::PaintStyle; @@ -23,7 +24,6 @@ use crate::common::context::pixel_manipulation::image_data::ImageData; use crate::common::context::text_styles::text_align::TextAlign; use crate::common::context::text_styles::text_baseline::TextBaseLine; use crate::common::context::text_styles::text_direction::TextDirection; -use crate::common::context::{Context, Device, State}; use crate::common::ffi::f32_array::F32Array; use crate::common::ffi::paint_style_value::{PaintStyleValue, PaintStyleValueType}; use crate::common::ffi::u8_array::U8Array; @@ -290,8 +290,8 @@ pub extern "C" fn context_data_url( format.as_ref(), (quality * 100 as f32) as i32, )) - .unwrap() - .into_raw() + .unwrap() + .into_raw() } } diff --git a/packages/canvas/src-native/canvas-native/canvas-core/src/ios/image_asset.rs b/packages/canvas/src-native/canvas-native/canvas-core/src/ios/image_asset.rs index 59dc7649..b1d23a79 100644 --- a/packages/canvas/src-native/canvas-native/canvas-core/src/ios/image_asset.rs +++ b/packages/canvas/src-native/canvas-native/canvas-core/src/ios/image_asset.rs @@ -174,7 +174,7 @@ pub extern "C" fn image_asset_flip_y(asset: c_longlong) -> bool { #[no_mangle] pub extern "C" fn image_asset_flip_y_in_place_owned(buf: *mut u8, length: usize) { if let Ok(mut image) = - image::load_from_memory(unsafe { std::slice::from_raw_parts_mut(buf, length) }) + image::load_from_memory(unsafe { std::slice::from_raw_parts_mut(buf, length) }) { image::imageops::flip_vertical_in_place(&mut image); } @@ -183,7 +183,7 @@ pub extern "C" fn image_asset_flip_y_in_place_owned(buf: *mut u8, length: usize) #[no_mangle] pub extern "C" fn image_asset_flip_x_in_place_owned(buf: *mut u8, length: usize) { if let Ok(mut image) = - image::load_from_memory(unsafe { std::slice::from_raw_parts_mut(buf, length) }) + image::load_from_memory(unsafe { std::slice::from_raw_parts_mut(buf, length) }) { image::imageops::flip_horizontal_in_place(&mut image); } diff --git a/packages/canvas/src-native/canvas-native/canvas-core/src/ios/mod.rs b/packages/canvas/src-native/canvas-native/canvas-core/src/ios/mod.rs index a56d602a..4fd744d3 100644 --- a/packages/canvas/src-native/canvas-native/canvas-core/src/ios/mod.rs +++ b/packages/canvas/src-native/canvas-native/canvas-core/src/ios/mod.rs @@ -1,9 +1,9 @@ use std::ffi::CString; use std::os::raw::{c_char, c_longlong}; +use crate::common::context::Context; use crate::common::context::drawing_text::text_metrics::TextMetrics; use crate::common::context::fill_and_stroke_styles::paint::PaintStyle; -use crate::common::context::Context; pub mod context; pub mod gl; diff --git a/packages/canvas/src-native/canvas-native/canvas-core/src/ios/paint.rs b/packages/canvas/src-native/canvas-native/canvas-core/src/ios/paint.rs index a4ec0330..d37211ff 100644 --- a/packages/canvas/src-native/canvas-native/canvas-core/src/ios/paint.rs +++ b/packages/canvas/src-native/canvas-native/canvas-core/src/ios/paint.rs @@ -4,8 +4,8 @@ use std::str::FromStr; use css_color_parser::{Color, ColorParseError}; -use crate::common::context::fill_and_stroke_styles::paint::PaintStyle; use crate::common::context::Context; +use crate::common::context::fill_and_stroke_styles::paint::PaintStyle; use crate::common::utils::color::to_parsed_color; pub(crate) fn paint_style_set_color_with_string( diff --git a/packages/canvas/src-native/canvas-native/canvas-core/src/lib.rs b/packages/canvas/src-native/canvas-native/canvas-core/src/lib.rs index 8960ed4d..865fce7b 100644 --- a/packages/canvas/src-native/canvas-native/canvas-core/src/lib.rs +++ b/packages/canvas/src-native/canvas-native/canvas-core/src/lib.rs @@ -1,9 +1,9 @@ -#[allow(deprecated, dead_code)] -pub mod common; - #[cfg(target_os = "ios")] extern crate objc; +#[allow(deprecated, dead_code)] +pub mod common; + #[cfg(target_os = "android")] #[allow(non_snake_case)] pub mod android; diff --git a/packages/canvas/src-native/canvas-native/gl-bindings/build.rs b/packages/canvas/src-native/canvas-native/gl-bindings/build.rs index 9b89555f..c23f0c0f 100644 --- a/packages/canvas/src-native/canvas-native/gl-bindings/build.rs +++ b/packages/canvas/src-native/canvas-native/gl-bindings/build.rs @@ -2,8 +2,6 @@ use std::borrow::Borrow; use std::fmt; use std::fmt::{Display, Formatter}; -use bindgen; - const _IOS_SRC_BINDINGS_RS: &str = "src/bindings.rs"; const _ANDROID_SRC_BINDINGS_RS: &str = "src/bindings.rs"; @@ -21,7 +19,7 @@ impl Target { self.architecture.as_str(), self.vendor.as_str(), self.system.as_str(), - self.abi.as_ref().map(|s| s.as_str()), + self.abi.as_deref(), ) } } @@ -49,9 +47,9 @@ pub fn ndk() -> String { fn main() { let target_str = std::env::var("TARGET").unwrap(); let mut include_dir = String::from("-I"); - let target: Vec = target_str.split("-").map(|s| s.into()).collect(); + let target: Vec = target_str.split('-').map(|s| s.into()).collect(); if target.len() < 3 { - panic!("Failed to parse TARGET {}", target_str); + assert!(!(target.len() < 3), "Failed to parse TARGET {}", target_str); } let abi = if target.len() > 3 { @@ -68,31 +66,39 @@ fn main() { }; println!("cargo:rerun-if-changed=build.rs"); + println!("system {:?}", &target.system); + println!("target {:?}", &target); match target.system.borrow() { "android" | "androideabi" => { // println!("cargo:rustc-link-lib=jnigraphics"); // the "-l" flag let build_target; include_dir.push_str(&ndk()); + // after moving to newer ndk + // include_dir.push_str("/toolchains/llvm/prebuilt/darwin-x86_64"); + + + include_dir.push_str("/sysroot/usr/include"); + println!("cargo:rustc-link-search=native={}", include_dir); + if target.architecture.eq("armv7") { build_target = "armv7-linux-androideabi"; } else if target.architecture.eq("aarch64") { build_target = "aarch64-linux-android"; + println!("cargo:rustc-link-lib=GLESv3"); // the "-l" flag } else if target.architecture.eq("i686") { build_target = "i686-linux-android"; } else if target.architecture.eq("x86_64") { build_target = "x86_64-linux-android"; + println!("cargo:rustc-link-lib=GLESv3"); // the "-l" flag } else { return; } println!("target {:?}", build_target); - - include_dir.push_str("/sysroot/usr/include"); - println!("cargo:rustc-link-search=native={}", include_dir); println!("cargo:rustc-link-lib=jnigraphics"); // the "-l" flag println!("cargo:rustc-link-lib=EGL"); // the "-l" flag println!("cargo:rustc-link-lib=GLESv2"); // the "-l" flag - println!("cargo:rustc-link-lib=GLESv3"); // the "-l" flag + // The bindgen::Builder is the main entry point // to bindgen, and lets you build up options for // the resulting bindings. @@ -126,10 +132,9 @@ fn main() { fn sdk_path(target: &str) -> Result { use std::process::Command; - let sdk = if target.contains("apple-darwin") { "macosx" - } else if target == "x86_64-apple-ios" || target == "i386-apple-ios" { + } else if target == "x86_64-apple-ios" || target == "i386-apple-ios" || target == "aarch64-apple-ios-sim" { "iphonesimulator" } else if target == "aarch64-apple-ios" || target == "armv7-apple-ios" diff --git a/packages/canvas/typings/objc!CanvasNative.d.ts b/packages/canvas/typings/objc!CanvasNative.d.ts index 70012c72..a101f8f0 100644 --- a/packages/canvas/typings/objc!CanvasNative.d.ts +++ b/packages/canvas/typings/objc!CanvasNative.d.ts @@ -1748,7 +1748,7 @@ declare class TNSWebGL2RenderingContext extends TNSWebGLRenderingContext { texImage3DData(target: number, level: number, internalformat: number, width: number, height: number, depth: number, border: number, format: number, type: number, data: NSData): void; - texImage3DF32(target: number, level: number, internalformat: number, width: number, height: number, depth: number, border: number, format: number, type: number, source: NSArray | number[], srcOffset: number): void; + texImage3DF32(target: number, level: number, internalformat: number, width: number, height: number, depth: number, border: number, format: number, type: number, source: NSArray | number[]): void; texImage3DF64(target: number, level: number, internalformat: number, width: number, height: number, depth: number, border: number, format: number, type: number, source: NSArray | number[], srcOffset: number): void; @@ -1760,13 +1760,17 @@ declare class TNSWebGL2RenderingContext extends TNSWebGLRenderingContext { texImage3DOffset(target: number, level: number, internalformat: number, width: number, height: number, depth: number, border: number, format: number, type: number, offset: number): void; + texImage3DPixelsSize(target: number, level: number, internalformat: number, width: number, height: number, depth: number, border: number, format: number, type: number, pixels: interop.Pointer | interop.Reference, size: number): void; + + texImage3DPixelsSizePixelOffsetSrcOffset(target: number, level: number, internalformat: number, width: number, height: number, depth: number, border: number, format: number, type: number, pixels: interop.Pointer | interop.Reference, size: number, pixelOffset: number, srcOffset: number): void; + texImage3DSource(target: number, level: number, internalformat: number, width: number, height: number, depth: number, border: number, format: number, type: number, source: UIImage): void; - texImage3DU16(target: number, level: number, internalformat: number, width: number, height: number, depth: number, border: number, format: number, type: number, source: NSArray | number[], srcOffset: number): void; + texImage3DU16(target: number, level: number, internalformat: number, width: number, height: number, depth: number, border: number, format: number, type: number, source: NSArray | number[]): void; texImage3DU32(target: number, level: number, internalformat: number, width: number, height: number, depth: number, border: number, format: number, type: number, source: NSArray | number[], srcOffset: number): void; - texImage3DU8(target: number, level: number, internalformat: number, width: number, height: number, depth: number, border: number, format: number, type: number, source: NSArray | number[]): void; + texImage3DU8(target: number, level: number, internalformat: number, width: number, height: number, depth: number, border: number, format: number, type: number, source: NSArray | number[], srcOffset: number): void; texStorage2D(target: number, levels: number, internalformat: number, width: number, height: number): void; @@ -1794,11 +1798,11 @@ declare class TNSWebGL2RenderingContext extends TNSWebGLRenderingContext { texSubImage3DSrcData(target: number, level: number, xoffset: number, yoffset: number, zoffset: number, width: number, height: number, depth: number, format: number, type: number, srcData: UIImage): void; - texSubImage3DU16(target: number, level: number, xoffset: number, yoffset: number, zoffset: number, width: number, height: number, depth: number, format: number, type: number, srcData: NSArray | number[], srcOffset: number): void; + texSubImage3DU16(target: number, level: number, xoffset: number, yoffset: number, zoffset: number, width: number, height: number, depth: number, format: number, type: number, srcData: NSArray | number[]): void; texSubImage3DU32(target: number, level: number, xoffset: number, yoffset: number, zoffset: number, width: number, height: number, depth: number, format: number, type: number, srcData: NSArray | number[]): void; - texSubImage3DU8(target: number, level: number, xoffset: number, yoffset: number, zoffset: number, width: number, height: number, depth: number, format: number, type: number, srcData: NSArray | number[]): void; + texSubImage3DU8(target: number, level: number, xoffset: number, yoffset: number, zoffset: number, width: number, height: number, depth: number, format: number, type: number, srcData: NSArray | number[], srcOffset: number): void; transformFeedbackVaryings(program: number, varyings: NSArray | string[], bufferMode: number): void; diff --git a/tools/assets/App_Resources/iOS/build.xcconfig b/tools/assets/App_Resources/iOS/build.xcconfig index 34993f3c..752d7e14 100644 --- a/tools/assets/App_Resources/iOS/build.xcconfig +++ b/tools/assets/App_Resources/iOS/build.xcconfig @@ -2,7 +2,7 @@ // for example you can uncomment the following line to force distribution code signing // CODE_SIGN_IDENTITY = iPhone Distribution // To build for device with Xcode 8 you need to specify your development team. More info: https://developer.apple.com/library/prerelease/content/releasenotes/DeveloperTools/RN-Xcode/Introduction.html -DEVELOPMENT_TEAM = TG7LSJHB64; +// DEVELOPMENT_TEAM = YOUR_TEAM_ID; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; VALIDATE_WORKSPACE = YES diff --git a/tools/demo/canvas-babylon/index.ts b/tools/demo/canvas-babylon/index.ts index 4f6c9eab..7ffe48c7 100644 --- a/tools/demo/canvas-babylon/index.ts +++ b/tools/demo/canvas-babylon/index.ts @@ -33,14 +33,14 @@ export class DemoSharedCanvasBabylon extends DemoSharedBase { // You must at least define a camera engine = createDefaultEngine(); if (!engine) throw 'engine should not be null.'; - this.createMDN(engine) + //this.createMDN(engine) //sceneToRender = this.createChart(engine); //sceneToRender = this.createWaterScene(engine); //sceneToRender = this.createScene(engine); //sceneToRender = this.createSkullScene(engine); //sceneToRender = this.createLightTexture(engine); - //sceneToRender = this.createParticleScene(engine); + sceneToRender = this.createParticleScene(engine); engine.runRenderLoop(function () { if (sceneToRender) { sceneToRender.render(); @@ -260,8 +260,8 @@ export class DemoSharedCanvasBabylon extends DemoSharedBase { } if (useGPUVersion && BABYLON.GPUParticleSystem.IsSupported) { - particleSystem = new BABYLON.GPUParticleSystem('particles', { capacity: 1000000 }, scene); - particleSystem.activeParticleCount = 2000; + particleSystem = new BABYLON.GPUParticleSystem('particles', { capacity: 100000 }, scene); + particleSystem.activeParticleCount = 10000; } else { particleSystem = new BABYLON.ParticleSystem('particles', 10000, scene); } diff --git a/tools/demo/canvas-three/custom/DRACOLoader.js b/tools/demo/canvas-three/custom/DRACOLoader.js index 7c909c12..c983dd8d 100644 --- a/tools/demo/canvas-three/custom/DRACOLoader.js +++ b/tools/demo/canvas-three/custom/DRACOLoader.js @@ -1,14 +1,43 @@ import { BufferAttribute, BufferGeometry, FileLoader, Loader } from 'three'; -var DRACOLoader = function (manager) { - Loader.call(this, manager); +// var DRACOLoader = function (manager) { +// Loader.call(this, manager); + +// this.decoderPath = ''; +// this.decoderConfig = {}; +// this.decoderBinary = null; +// this.decoderPending = null; + +// this.workerLimit = 5; +// this.workerPool = []; +// this.workerNextTaskID = 1; +// this.workerSourceURL = ''; + +// this.defaultAttributeIDs = { +// position: 'POSITION', +// normal: 'NORMAL', +// color: 'COLOR', +// uv: 'TEX_COORD', +// }; +// this.defaultAttributeTypes = { +// position: 'Float32Array', +// normal: 'Float32Array', +// color: 'Float32Array', +// uv: 'Float32Array', +// }; +// }; + + +class DRACOLoader extends Loader { + constructor(manager){ + super(manager); this.decoderPath = ''; this.decoderConfig = {}; this.decoderBinary = null; this.decoderPending = null; - this.workerLimit = 5; + this.workerLimit = 1; this.workerPool = []; this.workerNextTaskID = 1; this.workerSourceURL = ''; @@ -25,45 +54,43 @@ var DRACOLoader = function (manager) { color: 'Float32Array', uv: 'Float32Array', }; -}; + } -DRACOLoader.prototype = Object.assign(Object.create(Loader.prototype), { - constructor: DRACOLoader, - setDecoderPath: function (path) { + setDecoderPath(path) { this.decoderPath = path; return this; - }, + } - setDecoderConfig: function (config) { + setDecoderConfig(config) { this.decoderConfig = config; return this; - }, + } - setWorkerLimit: function (workerLimit) { + setWorkerLimit(workerLimit) { this.workerLimit = workerLimit; return this; - }, + } /** @deprecated */ - setVerbosity: function () { + setVerbosity() { console.warn('THREE.DRACOLoader: The .setVerbosity() method has been removed.'); - }, + } /** @deprecated */ - setDrawMode: function () { + setDrawMode() { console.warn('THREE.DRACOLoader: The .setDrawMode() method has been removed.'); - }, + } /** @deprecated */ - setSkipDequantization: function () { + setSkipDequantization() { console.warn('THREE.DRACOLoader: The .setSkipDequantization() method has been removed.'); - }, + } - load: function (url, onLoad, onProgress, onError) { + load(url, onLoad, onProgress, onError) { var loader = new FileLoader(this.manager); loader.setPath(this.path); @@ -88,10 +115,10 @@ DRACOLoader.prototype = Object.assign(Object.create(Loader.prototype), { onProgress, onError ); - }, + } /** @deprecated Kept for backward-compatibility with previous DRACOLoader versions. */ - decodeDracoFile: function (buffer, callback, attributeIDs, attributeTypes) { + decodeDracoFile(buffer, callback, attributeIDs, attributeTypes) { var taskConfig = { attributeIDs: attributeIDs || this.defaultAttributeIDs, attributeTypes: attributeTypes || this.defaultAttributeTypes, @@ -99,9 +126,9 @@ DRACOLoader.prototype = Object.assign(Object.create(Loader.prototype), { }; this.decodeGeometry(buffer, taskConfig).then(callback); - }, + } - decodeGeometry: function (buffer, taskConfig) { + decodeGeometry(buffer, taskConfig) { // TODO: For backward-compatibility, support 'attributeTypes' objects containing // references (rather than names) to typed array constructors. These must be // serialized before sending them to the worker. @@ -193,9 +220,9 @@ DRACOLoader.prototype = Object.assign(Object.create(Loader.prototype), { }); return geometryPending; - }, + } - _createGeometry: function (geometryData) { + _createGeometry(geometryData) { try { var geometry = new BufferGeometry(); var getBuffer = function (buf, type) { @@ -234,9 +261,9 @@ DRACOLoader.prototype = Object.assign(Object.create(Loader.prototype), { } return geometry; - }, + } - _loadLibrary: function (url, responseType) { + _loadLibrary(url, responseType) { var loader = new FileLoader(this.manager); loader.setPath(this.decoderPath); loader.setResponseType(responseType); @@ -244,15 +271,15 @@ DRACOLoader.prototype = Object.assign(Object.create(Loader.prototype), { return new Promise((resolve, reject) => { loader.load(url, resolve, undefined, reject); }); - }, + } - preload: function () { + preload() { this._initDecoder(); return this; - }, + } - _initDecoder: function () { + _initDecoder() { if (this.decoderPending) return this.decoderPending; var useJS = this.decoderConfig.type === 'js'; @@ -277,7 +304,7 @@ DRACOLoader.prototype = Object.assign(Object.create(Loader.prototype), { var body = ['/* draco decoder */', jsContent, '', '/* worker */', fn.substring(fn.indexOf('{') + 1, fn.lastIndexOf('}'))].join('\n'); try { - this.workerSourceURL = URL.createObjectURL(new Blob([body], { type: 'text/javascript' })); + this.workerSourceURL = URL.createObjectURL(new Blob([body], { type: 'text/javascript' }), {appendExt: true, ext: 'js'}); //require(this.workerSourceURL); } catch (e) { console.log('require fail', e); @@ -285,13 +312,14 @@ DRACOLoader.prototype = Object.assign(Object.create(Loader.prototype), { }); return this.decoderPending; - }, + } - _getWorker: function (taskID, taskCost) { + _getWorker(taskID, taskCost) { return this._initDecoder().then(() => { if (this.workerPool.length < this.workerLimit) { try { - var worker = new Worker(this.workerSourceURL); + console.log(this.workerSourceURL); + var worker = new Worker(URL.InternalAccessor.getPath(this.workerSourceURL)); worker._callbacks = {}; worker._taskCosts = {}; @@ -330,9 +358,9 @@ DRACOLoader.prototype = Object.assign(Object.create(Loader.prototype), { worker._taskLoad += taskCost; return worker; }); - }, + } - _releaseTask: function (worker, taskID) { + _releaseTask(worker, taskID) { try { worker._taskLoad -= worker._taskCosts[taskID]; delete worker._callbacks[taskID]; @@ -340,16 +368,16 @@ DRACOLoader.prototype = Object.assign(Object.create(Loader.prototype), { } catch (e) { console.log('_releaseTask', e); } - }, + } - debug: function () { + debug() { console.log( 'Task load: ', this.workerPool.map((worker) => worker._taskLoad) ); - }, + } - dispose: function () { + dispose() { for (var i = 0; i < this.workerPool.length; ++i) { this.workerPool[i].terminate(); } @@ -357,8 +385,10 @@ DRACOLoader.prototype = Object.assign(Object.create(Loader.prototype), { this.workerPool.length = 0; return this; - }, -}); + } +}; + + /* WEB WORKER */ diff --git a/tools/demo/canvas-three/index.ts b/tools/demo/canvas-three/index.ts index be9a9799..1d0b3311 100644 --- a/tools/demo/canvas-three/index.ts +++ b/tools/demo/canvas-three/index.ts @@ -9,12 +9,12 @@ import { OrbitControls } from 'three/examples/jsm/controls/OrbitControls'; import { VertexNormalsHelper } from 'three/examples/jsm/helpers/VertexNormalsHelper'; import { VertexTangentsHelper } from 'three/examples/jsm/helpers/VertexTangentsHelper'; import { DRACOLoader } from './custom/DRACOLoader'; +//import {DRACOLoader} from 'three/examples/jsm/loaders/DRACOLoader'; import { FirstPersonControls } from 'three/examples/jsm/controls/FirstPersonControls'; import { Points } from 'three'; -import { TypedArrayUtils } from 'three/examples/jsm/utils/TypedArrayUtils'; import { Water } from 'three/examples/jsm/objects/Water'; import { Sky } from 'three/examples/jsm/objects/Sky'; -import { BufferGeometryUtils } from 'three/examples/jsm/utils/BufferGeometryUtils'; +//import { BufferGeometryUtils } from 'three/examples/jsm/utils/BufferGeometryUtils'; import { RoomEnvironment } from "three/examples/jsm/environments/RoomEnvironment"; import { GPUComputationRenderer } from 'three/examples/jsm/misc/GPUComputationRenderer'; // import {ThreeMFLoader} from "three/examples/jsm/loaders/3MFLoader"; @@ -24,7 +24,7 @@ class IconMesh extends THREE.Mesh { } } -global.console.warn = ()=>{} +global.console.warn = () => { } export class DemoSharedCanvasThree extends DemoSharedBase { canvas: any; @@ -65,17 +65,17 @@ export class DemoSharedCanvasThree extends DemoSharedBase { //this.webgl_buffergeometry_drawrange(this.canvas); } - renderVideo(){ + renderVideo() { const ctx = this.canvas.getContext('webgl2'); const video = document.createElement('video'); video.loop = true; video.autoplay = true; video.src = "https://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ElephantsDream.mp4"; - function update(){ + function update() { //@ts-ignore video.requestVideoFrameCallback(update); //@ts-ignore - video._video.getCurrentFrame(ctx.native); + video._video.getCurrentFrame(ctx.native); } //@ts-ignore video.requestVideoFrameCallback(update); @@ -85,6 +85,7 @@ export class DemoSharedCanvasThree extends DemoSharedBase { gtlfLoader(canvas) { var container, controls, context, width, height; var camera, scene, renderer; + var mouseX = 0, mouseY = 0, windowHalfX = 0, windowHalfY = 0; const init = () => { context = canvas.getContext('webgl2'); @@ -144,18 +145,21 @@ export class DemoSharedCanvasThree extends DemoSharedBase { pmremGenerator.compileEquirectangularShader(); controls = new OrbitControls(camera, canvas); - controls.addEventListener('change', render); // use if there is no animation loop + + canvas.addEventListener('change', render); controls.minDistance = 2; controls.maxDistance = 10; controls.target.set(0, 0, -0.2); controls.update(); + onWindowResize(); window.addEventListener('resize', onWindowResize, false); }; + function onWindowResize() { - width = context.drawingBufferWidth; - height = context.drawingBufferHeight; + const width = context.drawingBufferWidth; + const height = context.drawingBufferHeight; camera.aspect = width / height; camera.updateProjectionMatrix(); @@ -170,8 +174,17 @@ export class DemoSharedCanvasThree extends DemoSharedBase { renderer.render(scene, camera); } + function animate() { + + requestAnimationFrame(animate); + + render(); + //stats.update(); + + } + init(); - render(); + animate(); } gtlfTonemapping(canvas) { @@ -898,121 +911,122 @@ export class DemoSharedCanvasThree extends DemoSharedBase { init(); animate(); } - - webGLHelpers(canvas) { - var scene, renderer; - var camera, light; - var vnh; - var vth; - - const init = () => { - const context = canvas.getContext('webgl2'); - renderer = new THREE.WebGLRenderer({ context }); - renderer.setPixelRatio(window.devicePixelRatio); - renderer.setSize(window.innerWidth, window.innerHeight); - - // - - camera = new THREE.PerspectiveCamera(100, window.innerWidth / window.innerHeight, 1, 1000); - camera.position.z = 400; - - scene = new THREE.Scene(); - - light = new THREE.PointLight(); - light.position.set(200, 100, 150); - scene.add(light); - - scene.add(new THREE.PointLightHelper(light, 15)); - - var gridHelper = new THREE.GridHelper(400, 40, 0x0000ff, 0x808080); - gridHelper.position.y = -150; - gridHelper.position.x = -150; - scene.add(gridHelper); - - var polarGridHelper = new THREE.PolarGridHelper(200, 16, 8, 64, 0x0000ff, 0x808080); - polarGridHelper.position.y = -150; - polarGridHelper.position.x = 200; - scene.add(polarGridHelper); - - var loader = new GLTFLoader(); - loader.load(this.root + '/models/gltf/LeePerrySmith/LeePerrySmith.glb', function (gltf) { - var mesh: any = gltf.scene.children[0]; - - BufferGeometryUtils.computeTangents(mesh.geometry); // generates bad data due to degenerate UVs - - var group = new THREE.Group(); - group.scale.multiplyScalar(50); - scene.add(group); - - // To make sure that the matrixWorld is up to date for the boxhelpers - group.updateMatrixWorld(true); - - group.add(mesh); - - vnh = new VertexNormalsHelper(mesh, 5); - scene.add(vnh); - - vth = new VertexTangentsHelper(mesh, 5); - scene.add(vth); - - scene.add(new THREE.BoxHelper(mesh)); - - var wireframe = new THREE.WireframeGeometry(mesh.geometry); - var line = new THREE.LineSegments(wireframe) as any; - line.material.depthTest = false; - line.material.opacity = 0.25; - line.material.transparent = true; - line.position.x = 4; - group.add(line); - scene.add(new THREE.BoxHelper(line)); - - var edges = new THREE.EdgesGeometry(mesh.geometry); - var line = new THREE.LineSegments(edges) as any; - line.material.depthTest = false; - line.material.opacity = 0.25; - line.material.transparent = true; - line.position.x = -4; - group.add(line); - scene.add(new THREE.BoxHelper(line)); - - scene.add(new THREE.BoxHelper(group)); - scene.add(new THREE.BoxHelper(scene)); - }); - - // - - window.addEventListener('resize', onWindowResize, false); - }; - - function onWindowResize() { - camera.aspect = window.innerWidth / window.innerHeight; - camera.updateProjectionMatrix(); - - renderer.setSize(window.innerWidth, window.innerHeight); - } - - function animate() { - requestAnimationFrame(animate); - - var time = -performance.now() * 0.0003; - - camera.position.x = 400 * Math.cos(time); - camera.position.z = 400 * Math.sin(time); - camera.lookAt(scene.position); - - light.position.x = Math.sin(time * 1.7) * 300; - light.position.y = Math.cos(time * 1.5) * 400; - light.position.z = Math.cos(time * 1.3) * 300; - - if (vnh) vnh.update(); - if (vth) vth.update(); - - renderer.render(scene, camera); + /* + webGLHelpers(canvas) { + var scene, renderer; + var camera, light; + var vnh; + var vth; + + const init = () => { + const context = canvas.getContext('webgl2'); + renderer = new THREE.WebGLRenderer({ context }); + renderer.setPixelRatio(window.devicePixelRatio); + renderer.setSize(window.innerWidth, window.innerHeight); + + // + + camera = new THREE.PerspectiveCamera(100, window.innerWidth / window.innerHeight, 1, 1000); + camera.position.z = 400; + + scene = new THREE.Scene(); + + light = new THREE.PointLight(); + light.position.set(200, 100, 150); + scene.add(light); + + scene.add(new THREE.PointLightHelper(light, 15)); + + var gridHelper = new THREE.GridHelper(400, 40, 0x0000ff, 0x808080); + gridHelper.position.y = -150; + gridHelper.position.x = -150; + scene.add(gridHelper); + + var polarGridHelper = new THREE.PolarGridHelper(200, 16, 8, 64, 0x0000ff, 0x808080); + polarGridHelper.position.y = -150; + polarGridHelper.position.x = 200; + scene.add(polarGridHelper); + + var loader = new GLTFLoader(); + loader.load(this.root + '/models/gltf/LeePerrySmith/LeePerrySmith.glb', function (gltf) { + var mesh: any = gltf.scene.children[0]; + + //BufferGeometryUtils.computeTangents(mesh.geometry); // generates bad data due to degenerate UVs + + var group = new THREE.Group(); + group.scale.multiplyScalar(50); + scene.add(group); + + // To make sure that the matrixWorld is up to date for the boxhelpers + group.updateMatrixWorld(true); + + group.add(mesh); + + vnh = new VertexNormalsHelper(mesh, 5); + scene.add(vnh); + + vth = new VertexTangentsHelper(mesh, 5); + scene.add(vth); + + scene.add(new THREE.BoxHelper(mesh)); + + var wireframe = new THREE.WireframeGeometry(mesh.geometry); + var line = new THREE.LineSegments(wireframe) as any; + line.material.depthTest = false; + line.material.opacity = 0.25; + line.material.transparent = true; + line.position.x = 4; + group.add(line); + scene.add(new THREE.BoxHelper(line)); + + var edges = new THREE.EdgesGeometry(mesh.geometry); + var line = new THREE.LineSegments(edges) as any; + line.material.depthTest = false; + line.material.opacity = 0.25; + line.material.transparent = true; + line.position.x = -4; + group.add(line); + scene.add(new THREE.BoxHelper(line)); + + scene.add(new THREE.BoxHelper(group)); + scene.add(new THREE.BoxHelper(scene)); + }); + + // + + window.addEventListener('resize', onWindowResize, false); + }; + + function onWindowResize() { + camera.aspect = window.innerWidth / window.innerHeight; + camera.updateProjectionMatrix(); + + renderer.setSize(window.innerWidth, window.innerHeight); + } + + function animate() { + requestAnimationFrame(animate); + + var time = -performance.now() * 0.0003; + + camera.position.x = 400 * Math.cos(time); + camera.position.z = 400 * Math.sin(time); + camera.lookAt(scene.position); + + light.position.x = Math.sin(time * 1.7) * 300; + light.position.y = Math.cos(time * 1.5) * 400; + light.position.z = Math.cos(time * 1.3) * 300; + + if (vnh) vnh.update(); + if (vth) vth.update(); + + renderer.render(scene, camera); + } + + init(); + animate(); } - - init(); - animate(); - } + */ geoTextShapes(canvas) { var camera, scene, renderer; @@ -1310,7 +1324,7 @@ export class DemoSharedCanvasThree extends DemoSharedBase { scene = new THREE.Scene(); - + geometry = new THREE.BoxGeometry(0.2, 0.2, 0.2); material = new THREE.MeshBasicMaterial(); material.map = new THREE.VideoTexture(texture); @@ -1517,19 +1531,19 @@ export class DemoSharedCanvasThree extends DemoSharedBase { renderer.setSize(window.innerWidth, window.innerHeight); renderer.outputEncoding = THREE.sRGBEncoding; - const pmremGenerator = new THREE.PMREMGenerator( renderer ); + const pmremGenerator = new THREE.PMREMGenerator(renderer); const scene = new THREE.Scene(); const light = new THREE.SpotLight(); - light.position.set(-1.8, 0.6, 2.7 * 1.2); - scene.add(light); + light.position.set(-1.8, 0.6, 2.7 * 1.2); + scene.add(light); scene.background = new THREE.Color(0xbfe3dd); - scene.environment = pmremGenerator.fromScene( new RoomEnvironment(), 0.04 ).texture; + scene.environment = pmremGenerator.fromScene(new RoomEnvironment(), 0.04).texture; const camera = new THREE.PerspectiveCamera(40, window.innerWidth / window.innerHeight, .1, 1000); camera.position.set(5, 2, 8); @@ -2200,7 +2214,7 @@ export class DemoSharedCanvasThree extends DemoSharedBase { bufferGeo(canvas) { - const context = canvas.getContext('webgl2',{ antialias: false}) as any; + const context = canvas.getContext('webgl2', { antialias: false }) as any; let container, stats; @@ -2352,35 +2366,36 @@ export class DemoSharedCanvasThree extends DemoSharedBase { } } + /* nearestNeighbour(canvas) { const vertexShader = `//uniform float zoom; - attribute float alpha; + attribute float alpha; - varying float vAlpha; + varying float vAlpha; - void main() { + void main() { - vAlpha = 1.0 - alpha; + vAlpha = 1.0 - alpha; - vec4 mvPosition = modelViewMatrix * vec4( position, 1.0 ); + vec4 mvPosition = modelViewMatrix * vec4( position, 1.0 ); - gl_PointSize = 4.0 * ( 300.0 / -mvPosition.z ); + gl_PointSize = 4.0 * ( 300.0 / -mvPosition.z ); - gl_Position = projectionMatrix * mvPosition; + gl_Position = projectionMatrix * mvPosition; - }`; + }`; const fragmentShader = `uniform sampler2D tex1; - varying float vAlpha; + varying float vAlpha; - void main() { + void main() { - gl_FragColor = texture2D( tex1, gl_PointCoord ); - gl_FragColor.r = ( 1.0 - gl_FragColor.r ) * vAlpha + gl_FragColor.r; + gl_FragColor = texture2D( tex1, gl_PointCoord ); + gl_FragColor.r = ( 1.0 - gl_FragColor.r ) * vAlpha + gl_FragColor.r; - }`; + }`; const context = canvas.getContext('webgl2') as any; @@ -2521,6 +2536,7 @@ export class DemoSharedCanvasThree extends DemoSharedBase { init(); animate(); } + */ skinningAndMorphing(canvas) { const context = canvas.getContext('webgl2') as any; @@ -2741,7 +2757,7 @@ export class DemoSharedCanvasThree extends DemoSharedBase { var container, stats; var camera, scene, renderer; var controls, water, sun, mesh, mesh2, mesh3; - const context = canvas.getContext('webgl2', {antialias: false}) as any; + const context = canvas.getContext('webgl2', { antialias: false }) as any; renderer = new THREE.WebGLRenderer({ context, antialias: false }); renderer.setPixelRatio(1); renderer.setSize(context.drawingBufferWidth, context.drawingBufferHeight); @@ -2781,7 +2797,7 @@ export class DemoSharedCanvasThree extends DemoSharedBase { var sky = new Sky(); sky.scale.setScalar(10000); scene.add(sky); - + var uniforms = sky.material.uniforms; @@ -2814,13 +2830,13 @@ export class DemoSharedCanvasThree extends DemoSharedBase { updateSun(); // -/* - const texture = document.createElement('video'); - texture.loop = true; - texture.muted = true; - texture.src = 'https://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4'; - texture.play(); - */ + /* + const texture = document.createElement('video'); + texture.loop = true; + texture.muted = true; + texture.src = 'https://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4'; + texture.play(); + */ var geometry = new THREE.BoxBufferGeometry(30, 30, 30); @@ -3038,265 +3054,265 @@ export class DemoSharedCanvasThree extends DemoSharedBase { renderer.render(scene, camera); } - webgl_buffergeometry_drawrange(canvas){ - let group; - let container, stats; - const particlesData = []; - let camera, scene, renderer; - let positions, colors; - let particles; - let pointCloud; - let particlePositions; - let linesMesh; - - const maxParticleCount = 1000; - let particleCount = 500; - const r = 800; - const rHalf = r / 2; - - const effectController = { - showDots: true, - showLines: true, - minDistance: 150, - limitConnections: false, - maxConnections: 20, - particleCount: 500 - }; - - init(); - animate(); + webgl_buffergeometry_drawrange(canvas) { + let group; + let container, stats; + const particlesData = []; + let camera, scene, renderer; + let positions, colors; + let particles; + let pointCloud; + let particlePositions; + let linesMesh; + + const maxParticleCount = 1000; + let particleCount = 500; + const r = 800; + const rHalf = r / 2; + + const effectController = { + showDots: true, + showLines: true, + minDistance: 150, + limitConnections: false, + maxConnections: 20, + particleCount: 500 + }; - function initGUI() { + init(); + animate(); - /*const gui = new GUI(); + function initGUI() { - gui.add( effectController, "showDots" ).onChange( function ( value ) { + /*const gui = new GUI(); - pointCloud.visible = value; + gui.add( effectController, "showDots" ).onChange( function ( value ) { - } ); - gui.add( effectController, "showLines" ).onChange( function ( value ) { + pointCloud.visible = value; - linesMesh.visible = value; + } ); + gui.add( effectController, "showLines" ).onChange( function ( value ) { - } ); - gui.add( effectController, "minDistance", 10, 300 ); - gui.add( effectController, "limitConnections" ); - gui.add( effectController, "maxConnections", 0, 30, 1 ); - gui.add( effectController, "particleCount", 0, maxParticleCount, 1 ).onChange( function ( value ) { + linesMesh.visible = value; - particleCount = parseInt( value ); - particles.setDrawRange( 0, particleCount ); + } ); + gui.add( effectController, "minDistance", 10, 300 ); + gui.add( effectController, "limitConnections" ); + gui.add( effectController, "maxConnections", 0, 30, 1 ); + gui.add( effectController, "particleCount", 0, maxParticleCount, 1 ).onChange( function ( value ) { - } ); - */ + particleCount = parseInt( value ); + particles.setDrawRange( 0, particleCount ); - } + } ); + */ - function init() { + } - initGUI(); + function init() { - container = canvas + initGUI(); - camera = new THREE.PerspectiveCamera( 45, window.innerWidth / window.innerHeight, 1, 4000 ); - camera.position.z = 1750; + container = canvas - const controls = new OrbitControls( camera, container ); - controls.minDistance = 1000; - controls.maxDistance = 3000; + camera = new THREE.PerspectiveCamera(45, window.innerWidth / window.innerHeight, 1, 4000); + camera.position.z = 1750; - scene = new THREE.Scene(); + const controls = new OrbitControls(camera, container); + controls.minDistance = 1000; + controls.maxDistance = 3000; + scene = new THREE.Scene(); - group = new THREE.Group(); - scene.add( group ); - const helper = new THREE.BoxHelper( new THREE.Mesh( new THREE.BoxGeometry( r, r, r ) ) ) as any; - helper.material.color.setHex( 0x101010 ); - helper.material.blending = THREE.AdditiveBlending; - helper.material.transparent = true; - group.add( helper ); + group = new THREE.Group(); + scene.add(group); - const segments = maxParticleCount * maxParticleCount; + const helper = new THREE.BoxHelper(new THREE.Mesh(new THREE.BoxGeometry(r, r, r))) as any; + helper.material.color.setHex(0x101010); + helper.material.blending = THREE.AdditiveBlending; + helper.material.transparent = true; + group.add(helper); - positions = new Float32Array( segments * 3 ); - colors = new Float32Array( segments * 3 ); + const segments = maxParticleCount * maxParticleCount; - const pMaterial = new THREE.PointsMaterial( { - color: 0xFFFFFF, - size: 3, - blending: THREE.AdditiveBlending, - transparent: true, - sizeAttenuation: false - } ); + positions = new Float32Array(segments * 3); + colors = new Float32Array(segments * 3); - particles = new THREE.BufferGeometry(); - particlePositions = new Float32Array( maxParticleCount * 3 ); + const pMaterial = new THREE.PointsMaterial({ + color: 0xFFFFFF, + size: 3, + blending: THREE.AdditiveBlending, + transparent: true, + sizeAttenuation: false + }); - for ( let i = 0; i < maxParticleCount; i ++ ) { + particles = new THREE.BufferGeometry(); + particlePositions = new Float32Array(maxParticleCount * 3); - const x = Math.random() * r - r / 2; - const y = Math.random() * r - r / 2; - const z = Math.random() * r - r / 2; + for (let i = 0; i < maxParticleCount; i++) { - particlePositions[ i * 3 ] = x; - particlePositions[ i * 3 + 1 ] = y; - particlePositions[ i * 3 + 2 ] = z; + const x = Math.random() * r - r / 2; + const y = Math.random() * r - r / 2; + const z = Math.random() * r - r / 2; - // add it to the geometry - particlesData.push( { - velocity: new THREE.Vector3( - 1 + Math.random() * 2, - 1 + Math.random() * 2, - 1 + Math.random() * 2 ), - numConnections: 0 - } ); + particlePositions[i * 3] = x; + particlePositions[i * 3 + 1] = y; + particlePositions[i * 3 + 2] = z; - } + // add it to the geometry + particlesData.push({ + velocity: new THREE.Vector3(- 1 + Math.random() * 2, - 1 + Math.random() * 2, - 1 + Math.random() * 2), + numConnections: 0 + }); - particles.setDrawRange( 0, particleCount ); - particles.setAttribute( 'position', new THREE.BufferAttribute( particlePositions, 3 ).setUsage( THREE.DynamicDrawUsage ) ); + } - // create the particle system - pointCloud = new THREE.Points( particles, pMaterial ); - group.add( pointCloud ); + particles.setDrawRange(0, particleCount); + particles.setAttribute('position', new THREE.BufferAttribute(particlePositions, 3).setUsage(THREE.DynamicDrawUsage)); - const geometry = new THREE.BufferGeometry(); + // create the particle system + pointCloud = new THREE.Points(particles, pMaterial); + group.add(pointCloud); - geometry.setAttribute( 'position', new THREE.BufferAttribute( positions, 3 ).setUsage( THREE.DynamicDrawUsage ) ); - geometry.setAttribute( 'color', new THREE.BufferAttribute( colors, 3 ).setUsage( THREE.DynamicDrawUsage ) ); + const geometry = new THREE.BufferGeometry(); - geometry.computeBoundingSphere(); + geometry.setAttribute('position', new THREE.BufferAttribute(positions, 3).setUsage(THREE.DynamicDrawUsage)); + geometry.setAttribute('color', new THREE.BufferAttribute(colors, 3).setUsage(THREE.DynamicDrawUsage)); - geometry.setDrawRange( 0, 0 ); + geometry.computeBoundingSphere(); - const material = new THREE.LineBasicMaterial( { - vertexColors: true, - blending: THREE.AdditiveBlending, - transparent: true - } ); + geometry.setDrawRange(0, 0); - linesMesh = new THREE.LineSegments( geometry, material ); - group.add( linesMesh ); + const material = new THREE.LineBasicMaterial({ + vertexColors: true, + blending: THREE.AdditiveBlending, + transparent: true + }); - // + linesMesh = new THREE.LineSegments(geometry, material); + group.add(linesMesh); - const ctx = canvas.getContext('webgl2'); - renderer = new THREE.WebGLRenderer( {context: ctx, antialias: true } ); - renderer.setPixelRatio( window.devicePixelRatio ); - renderer.setSize( window.innerWidth, window.innerHeight ); - renderer.outputEncoding = THREE.sRGBEncoding; + // - // + const ctx = canvas.getContext('webgl2'); + renderer = new THREE.WebGLRenderer({ context: ctx, antialias: true }); + renderer.setPixelRatio(window.devicePixelRatio); + renderer.setSize(window.innerWidth, window.innerHeight); + renderer.outputEncoding = THREE.sRGBEncoding; - //stats = new Stats(); - //container.appendChild( stats.dom ); + // - window.addEventListener( 'resize', onWindowResize ); + //stats = new Stats(); + //container.appendChild( stats.dom ); - } + window.addEventListener('resize', onWindowResize); - function onWindowResize() { + } - camera.aspect = window.innerWidth / window.innerHeight; - camera.updateProjectionMatrix(); + function onWindowResize() { - renderer.setSize( window.innerWidth, window.innerHeight ); + camera.aspect = window.innerWidth / window.innerHeight; + camera.updateProjectionMatrix(); - } + renderer.setSize(window.innerWidth, window.innerHeight); - function animate() { + } - let vertexpos = 0; - let colorpos = 0; - let numConnected = 0; + function animate() { - for ( let i = 0; i < particleCount; i ++ ) - particlesData[ i ].numConnections = 0; + let vertexpos = 0; + let colorpos = 0; + let numConnected = 0; - for ( let i = 0; i < particleCount; i ++ ) { + for (let i = 0; i < particleCount; i++) + particlesData[i].numConnections = 0; - // get the particle - const particleData = particlesData[ i ]; + for (let i = 0; i < particleCount; i++) { - particlePositions[ i * 3 ] += particleData.velocity.x; - particlePositions[ i * 3 + 1 ] += particleData.velocity.y; - particlePositions[ i * 3 + 2 ] += particleData.velocity.z; + // get the particle + const particleData = particlesData[i]; - if ( particlePositions[ i * 3 + 1 ] < - rHalf || particlePositions[ i * 3 + 1 ] > rHalf ) - particleData.velocity.y = - particleData.velocity.y; + particlePositions[i * 3] += particleData.velocity.x; + particlePositions[i * 3 + 1] += particleData.velocity.y; + particlePositions[i * 3 + 2] += particleData.velocity.z; - if ( particlePositions[ i * 3 ] < - rHalf || particlePositions[ i * 3 ] > rHalf ) - particleData.velocity.x = - particleData.velocity.x; + if (particlePositions[i * 3 + 1] < - rHalf || particlePositions[i * 3 + 1] > rHalf) + particleData.velocity.y = - particleData.velocity.y; - if ( particlePositions[ i * 3 + 2 ] < - rHalf || particlePositions[ i * 3 + 2 ] > rHalf ) - particleData.velocity.z = - particleData.velocity.z; + if (particlePositions[i * 3] < - rHalf || particlePositions[i * 3] > rHalf) + particleData.velocity.x = - particleData.velocity.x; - if ( effectController.limitConnections && particleData.numConnections >= effectController.maxConnections ) - continue; + if (particlePositions[i * 3 + 2] < - rHalf || particlePositions[i * 3 + 2] > rHalf) + particleData.velocity.z = - particleData.velocity.z; - // Check collision - for ( let j = i + 1; j < particleCount; j ++ ) { + if (effectController.limitConnections && particleData.numConnections >= effectController.maxConnections) + continue; - const particleDataB = particlesData[ j ]; - if ( effectController.limitConnections && particleDataB.numConnections >= effectController.maxConnections ) - continue; + // Check collision + for (let j = i + 1; j < particleCount; j++) { - const dx = particlePositions[ i * 3 ] - particlePositions[ j * 3 ]; - const dy = particlePositions[ i * 3 + 1 ] - particlePositions[ j * 3 + 1 ]; - const dz = particlePositions[ i * 3 + 2 ] - particlePositions[ j * 3 + 2 ]; - const dist = Math.sqrt( dx * dx + dy * dy + dz * dz ); + const particleDataB = particlesData[j]; + if (effectController.limitConnections && particleDataB.numConnections >= effectController.maxConnections) + continue; - if ( dist < effectController.minDistance ) { + const dx = particlePositions[i * 3] - particlePositions[j * 3]; + const dy = particlePositions[i * 3 + 1] - particlePositions[j * 3 + 1]; + const dz = particlePositions[i * 3 + 2] - particlePositions[j * 3 + 2]; + const dist = Math.sqrt(dx * dx + dy * dy + dz * dz); - particleData.numConnections ++; - particleDataB.numConnections ++; + if (dist < effectController.minDistance) { - const alpha = 1.0 - dist / effectController.minDistance; + particleData.numConnections++; + particleDataB.numConnections++; - positions[ vertexpos ++ ] = particlePositions[ i * 3 ]; - positions[ vertexpos ++ ] = particlePositions[ i * 3 + 1 ]; - positions[ vertexpos ++ ] = particlePositions[ i * 3 + 2 ]; + const alpha = 1.0 - dist / effectController.minDistance; - positions[ vertexpos ++ ] = particlePositions[ j * 3 ]; - positions[ vertexpos ++ ] = particlePositions[ j * 3 + 1 ]; - positions[ vertexpos ++ ] = particlePositions[ j * 3 + 2 ]; + positions[vertexpos++] = particlePositions[i * 3]; + positions[vertexpos++] = particlePositions[i * 3 + 1]; + positions[vertexpos++] = particlePositions[i * 3 + 2]; - colors[ colorpos ++ ] = alpha; - colors[ colorpos ++ ] = alpha; - colors[ colorpos ++ ] = alpha; + positions[vertexpos++] = particlePositions[j * 3]; + positions[vertexpos++] = particlePositions[j * 3 + 1]; + positions[vertexpos++] = particlePositions[j * 3 + 2]; - colors[ colorpos ++ ] = alpha; - colors[ colorpos ++ ] = alpha; - colors[ colorpos ++ ] = alpha; + colors[colorpos++] = alpha; + colors[colorpos++] = alpha; + colors[colorpos++] = alpha; - numConnected ++; + colors[colorpos++] = alpha; + colors[colorpos++] = alpha; + colors[colorpos++] = alpha; - } + numConnected++; } } + } - linesMesh.geometry.setDrawRange( 0, numConnected * 2 ); - linesMesh.geometry.attributes.position.needsUpdate = true; - linesMesh.geometry.attributes.color.needsUpdate = true; - pointCloud.geometry.attributes.position.needsUpdate = true; + linesMesh.geometry.setDrawRange(0, numConnected * 2); + linesMesh.geometry.attributes.position.needsUpdate = true; + linesMesh.geometry.attributes.color.needsUpdate = true; - requestAnimationFrame( animate ); + pointCloud.geometry.attributes.position.needsUpdate = true; - //stats.update(); - render(); + requestAnimationFrame(animate); - } + //stats.update(); + render(); + + } - function render() { + function render() { - const time = Date.now() * 0.001; + const time = Date.now() * 0.001; - group.rotation.y = time * 0.1; - renderer.render( scene, camera ); + group.rotation.y = time * 0.1; + renderer.render(scene, camera); - } + } } } diff --git a/tools/demo/canvas/index.ts b/tools/demo/canvas/index.ts index b684b2b5..abd9b335 100644 --- a/tools/demo/canvas/index.ts +++ b/tools/demo/canvas/index.ts @@ -213,15 +213,15 @@ export class DemoSharedCanvas extends DemoSharedBase { + transform="translate(50)" /> + transform="translate(0 50)" /> + transform="translate(50,50)" /> `) */ @@ -315,8 +315,117 @@ export class DemoSharedCanvas extends DemoSharedBase { */ } + urlTests() { + this.urlConstructor(); + this.urlHash(); + this.urlHost(); + this.urlHostname(); + this.urlHref(); + this.urlOrigin(); + this.urlPassword(); + this.urlPathname(); + this.urlProtocol(); + this.urlSearch(); + + this.urlUsername(); + } + + + + urlConstructor() { + let m = 'https://developer.mozilla.org'; + let a = new URL("/", m); // => 'https://developer.mozilla.org/' + let b = new URL(m); // => 'https://developer.mozilla.org/' + + new URL('en-US/docs', b); // => 'https://developer.mozilla.org/en-US/docs' + let d = new URL('/en-US/docs', b); // => 'https://developer.mozilla.org/en-US/docs' + new URL('/en-US/docs', d); // => 'https://developer.mozilla.org/en-US/docs' + new URL('/en-US/docs', a); // => 'https://developer.mozilla.org/en-US/docs' + + new URL('/en-US/docs', "https://developer.mozilla.org/fr-FR/toto"); + // => 'https://developer.mozilla.org/en-US/docs' + + try { + new URL('/en-US/docs', ''); // Raises a TypeError exception as '' is not a valid URL + } catch (e) { + console.log(e); + } + + try { + new URL('/en-US/docs'); // Raises a TypeError exception as '/en-US/docs' is not a valid URL + } catch (e) { + console.log(e); + } + new URL('http://www.example.com',); // => 'http://www.example.com/' + new URL('http://www.example.com', b); // => 'http://www.example.com/' + + new URL("//foo.com", "https://example.com") // => 'https://foo.com' (see relative URLs) + } + urlHash() { + const url = new URL('https://developer.mozilla.org/en-US/docs/Web/API/URL/href#Examples'); + console.log(url.hash); // Logs: '#Examples' + } + + urlHost() { + let url = new URL('https://developer.mozilla.org/en-US/docs/Web/API/URL/host'); + console.log(url.host); // "developer.mozilla.org" + + url = new URL('https://developer.mozilla.org:443/en-US/docs/Web/API/URL/host'); + console.log(url.host); // "developer.mozilla.org" + // The port number is not included because 443 is the scheme's default port + + url = new URL('https://developer.mozilla.org:4097/en-US/docs/Web/API/URL/host'); + console.log(url.host); // "developer.mozilla.org:4097" + } + + urlHostname() { + const url = new URL('https://developer.mozilla.org/en-US/docs/Web/API/URL/hostname'); + console.log(url.hostname); // Logs: 'developer.mozilla.org' + } + + urlHref() { + const url = new URL('https://developer.mozilla.org/en-US/docs/Web/API/URL/href'); + console.log(url.href); // Logs: 'https://developer.mozilla.org/en-US/docs/Web/API/URL/href' + } + + urlOrigin() { + const url = new URL("blob:https://mozilla.org:443/") + console.log(url.origin); // Logs 'https://mozilla.org' + } + + urlPassword() { + const url = new URL('https://anonymous:flabada@developer.mozilla.org/en-US/docs/Web/API/URL/password'); + console.log(url.password) // Logs "flabada" + } + + urlPathname() { + const url = new URL('https://developer.mozilla.org/en-US/docs/Web/API/URL/pathname?q=value'); + console.log(url.pathname); // Logs "/en-US/docs/Web/API/URL/pathname" + } + + urlPort() { + const url = new URL('https://mydomain.com:80/svn/Repos/'); + console.log(url.port); // Logs '80' + } + + urlProtocol() { + const url = new URL('https://developer.mozilla.org/en-US/docs/Web/API/URL/protocol'); + console.log(url.protocol); // Logs "https:" + } + + urlSearch() { + const url = new URL('https://developer.mozilla.org/en-US/docs/Web/API/URL/search?q=123'); + console.log(url.search); // Logs "?q=123" + } + + urlUsername() { + const url = new URL('https://anonymous:flabada@developer.mozilla.org/en-US/docs/Web/API/URL/username'); + console.log(url.username) // Logs "anonymous" + } + draw() { -//const str = new java.lang.String() + this.urlTests(); + //const str = new java.lang.String() // const ctx = this.canvas.getContext('2d'); @@ -324,19 +433,19 @@ export class DemoSharedCanvas extends DemoSharedBase { // ctx.fillText('Hello world', 50, 90); - /* const ctx = this.canvas.getContext('2d'); - -// Moved square -ctx.translate(110, 30); -ctx.fillStyle = 'red'; -ctx.fillRect(0, 0, 80, 80); - -// Reset current transformation matrix to the identity matrix -ctx.setTransform(1, 0, 0, 1, 0, 0); - -// Unmoved square -ctx.fillStyle = 'gray'; -ctx.fillRect(0, 0, 80, 80); */ + /* const ctx = this.canvas.getContext('2d'); + + // Moved square + ctx.translate(110, 30); + ctx.fillStyle = 'red'; + ctx.fillRect(0, 0, 80, 80); + + // Reset current transformation matrix to the identity matrix + ctx.setTransform(1, 0, 0, 1, 0, 0); + + // Unmoved square + ctx.fillStyle = 'gray'; + ctx.fillRect(0, 0, 80, 80); */ //filterBlur(this.canvas); @@ -469,10 +578,10 @@ ctx.fillRect(0, 0, 80, 80); */ //this.multiCanvas(this.canvas); // triangle(this.canvas); //this.zen3dCube(this.canvas); - //this.zen3dGeometryLoaderGltf(this.canvas); + this.zen3dGeometryLoaderGltf(this.canvas); //this.playCanvas(this.canvas); //this.drawRandomFullscreenImage(this.canvas); - issue54(this.canvas); + //issue54(this.canvas); } drawRandomFullscreenImage(canvas) { diff --git a/tools/demo/canvas/webgl/cube-example.ts b/tools/demo/canvas/webgl/cube-example.ts index f8cc7f98..b1d7b21d 100644 --- a/tools/demo/canvas/webgl/cube-example.ts +++ b/tools/demo/canvas/webgl/cube-example.ts @@ -1,4 +1,4 @@ -import {ImageAsset} from '@nativescript/canvas'; +import {ImageAsset, ImageBitmap} from '@nativescript/canvas'; import * as glMatrix from './gl-matrix'; import {ImageSource} from "@nativescript/core"; @@ -9,7 +9,7 @@ var asset; var cubeRotation = 0; export function main(canvas, nativeCanvas?) { - const gl = canvas.getContext ? canvas.getContext('webgl') : canvas; + const gl = canvas.getContext ? canvas.getContext('webgl2') : canvas; if (!nativeCanvas) { canvas.off('loaded'); @@ -335,16 +335,17 @@ function loadTexture(gl) { width, height, border, srcFormat, srcType, pixel); - asset = new ImageAsset(); - asset.loadFileAsync('~/assets/file-assets/webgl/svh.jpeg') - .then(src => { + fetch('~/assets/file-assets/webgl/svh.jpeg') + .then(data => data.blob()) + .then(blob => createImageBitmap(blob, {})) + .then(bm => { gl.bindTexture(gl.TEXTURE_2D, texture); gl.texImage2D(gl.TEXTURE_2D, level, internalFormat, - srcFormat, srcType, asset); + srcFormat, srcType, bm); // WebGL1 has different requirements for power of 2 images // vs non power of 2 images so check if the image is a // power of 2 in both dimensions. - if (isPowerOf2(asset.width) && isPowerOf2(asset.height)) { + if (isPowerOf2(bm.width) && isPowerOf2(bm.height)) { // Yes, it's a power of 2. Generate mips. gl.generateMipmap(gl.TEXTURE_2D); } else { @@ -359,6 +360,32 @@ function loadTexture(gl) { console.log('e', e); }) + // asset = new ImageAsset(); + // asset.loadFileAsync('~/assets/file-assets/webgl/svh.jpeg') + // .then(src => createImageBitmap(asset, {})) + // .then(bm => { + // gl.bindTexture(gl.TEXTURE_2D, texture); + // gl.texImage2D(gl.TEXTURE_2D, level, internalFormat, + // srcFormat, srcType, bm); + // console.log(bm.native, bm.width, bm.height); + // // WebGL1 has different requirements for power of 2 images + // // vs non power of 2 images so check if the image is a + // // power of 2 in both dimensions. + // if (isPowerOf2(bm.width) && isPowerOf2(bm.height)) { + // // Yes, it's a power of 2. Generate mips. + // gl.generateMipmap(gl.TEXTURE_2D); + // } else { + + // // No, it's not a power of 2. Turn of mips and set + // // wrapping to clamp to edge + // gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE); + // gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE); + // gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.LINEAR); + // } + // }).catch(e => { + // console.log('e', e); + // }) + /* ImageSource.fromFile('~/assets/file-assets/webgl/svh.jpeg') .then((src) => { diff --git a/tools/scripts/android-build.sh b/tools/scripts/android-build.sh index 3fe1eac7..3a32fcb4 100644 --- a/tools/scripts/android-build.sh +++ b/tools/scripts/android-build.sh @@ -21,7 +21,8 @@ ANDROID_AARCH_64_OUTPUT="$ANDROID_AARCH_64_OUTPUT_DIR/debug/$OUTPUT_LIB_NAME" ANDROID_x86_64_OUTPUT="$ANDROID_x86_64_OUTPUT_DIR/debug/$OUTPUT_LIB_NAME" ANDROID_NDK_SYSROOT_LIB="$ANDROID_NDK/sysroot/usr/lib" LIBCPLUSPLUS_NAME="libc++_shared.so" -CARGO_FLAGS="-C target-cpu=native" +#CARGO_FLAGS="-C target-cpu=native" +CARGO_FLAGS="" for arg in "$@" do if [[ "$arg" == "--help" ]] || [[ "$arg" == "-h" ]] diff --git a/tools/scripts/canvas-build.sh b/tools/scripts/canvas-build.sh index a2eb15e9..e2d9a9c7 100644 --- a/tools/scripts/canvas-build.sh +++ b/tools/scripts/canvas-build.sh @@ -3,56 +3,106 @@ cd ../../packages/canvas/src-native/canvas-ios set -e DEV_TEAM=${DEVELOPMENT_TEAM:-} -DIST="CanvasNative/Dist" +DIST=$(PWD)/dist mkdir -p $DIST +mkdir -p $DIST/intermediates + echo "Cleanup" xcodebuild -project CanvasNative.xcodeproj -target "CanvasNative" -configuration Release clean -echo "Building for iphone simulator" +# echo "Building for Mac Catalyst" +# xcodebuild archive -project CanvasNative.xcodeproj \ +# -scheme "CanvasNative" \ +# -configuration Release \ +# -destination "platform=macOS,variant=Mac Catalyst" \ +# -quiet \ +# SKIP_INSTALL=NO \ +# -archivePath $DIST/intermediates/CanvasNative.maccatalyst.xcarchive + + + +# echo "Building for iphone simulator" +# xcodebuild archive -project CanvasNative.xcodeproj \ +# -scheme "CanvasNative" \ +# -configuration Release \ +# -sdk iphonesimulator IPHONEOS_DEPLOYMENT_TARGET=11.0 \ +# -quiet \ +# -arch x86_64 \ +# DEVELOPMENT_TEAM=$DEV_TEAM \ +# SKIP_INSTALL=NO \ +# BUILD_LIBRARY_FOR_DISTRIBUTION=YES \ +# ONLY_ACTIVE_ARCH=NO \ +# -archivePath $DIST/intermediates/CanvasNative.iphonesimulator.xcarchive + + + +# echo "Building for iphone simulator m1" xcodebuild archive -project CanvasNative.xcodeproj \ -scheme "CanvasNative" \ -configuration Release \ - -arch x86_64 \ - -sdk iphonesimulator \ + -sdk iphonesimulator IPHONEOS_DEPLOYMENT_TARGET=11.0 \ -quiet \ + -arch x86_64 \ DEVELOPMENT_TEAM=$DEV_TEAM \ SKIP_INSTALL=NO \ BUILD_LIBRARY_FOR_DISTRIBUTION=YES \ - -archivePath $DIST/CanvasNative.iphonesimulator.xcarchive + ONLY_ACTIVE_ARCH=NO \ + -archivePath $DIST/intermediates/CanvasNative.iphonesimulator.xcarchive + + + echo "Building for ARM64 device" xcodebuild archive -project CanvasNative.xcodeproj \ -scheme "CanvasNative" \ -configuration Release \ -arch arm64 \ - -sdk iphoneos \ + -sdk iphoneos IPHONEOS_DEPLOYMENT_TARGET=11.0 \ -quiet \ DEVELOPMENT_TEAM=$DEV_TEAM \ SKIP_INSTALL=NO \ BUILD_LIBRARY_FOR_DISTRIBUTION=YES \ - -archivePath $DIST/CanvasNative.iphoneos.xcarchive + ONLY_ACTIVE_ARCH=NO \ + -archivePath $DIST/intermediates/CanvasNative.iphoneos.xcarchive + echo "Creating CanvasNative.xcframework" OUTPUT_DIR="$DIST/CanvasNative.xcframework" rm -rf $OUTPUT_DIR + +# -framework "$DIST/intermediates/CanvasNative.maccatalyst.xcarchive/Products/Library/Frameworks/CanvasNative.framework" \ +# -debug-symbols "$DIST/intermediates/CanvasNative.maccatalyst.xcarchive/dSYMs/CanvasNative.framework.dSYM" \ + xcodebuild -create-xcframework \ - -framework "$DIST/CanvasNative.iphonesimulator.xcarchive/Products/Library/Frameworks/CanvasNative.framework" \ - -framework "$DIST/CanvasNative.iphoneos.xcarchive/Products/Library/Frameworks/CanvasNative.framework" \ + -framework "$DIST/intermediates/CanvasNative.iphonesimulator.xcarchive/Products/Library/Frameworks/CanvasNative.framework" \ + -debug-symbols "$DIST/intermediates/CanvasNative.iphonesimulator.xcarchive/dSYMs/CanvasNative.framework.dSYM" \ + -framework "$DIST/intermediates/CanvasNative.iphoneos.xcarchive/Products/Library/Frameworks/CanvasNative.framework" \ + -debug-symbols "$DIST/intermediates/CanvasNative.iphoneos.xcarchive/dSYMs/CanvasNative.framework.dSYM" \ -output "$OUTPUT_DIR" -DSYM_OUTPUT_DIR="$DIST/CanvasNative.framework.dSYM" -cp -r "$DIST/CanvasNative.iphoneos.xcarchive/dSYMs/CanvasNative.framework.dSYM/" $DSYM_OUTPUT_DIR -lipo -create \ - "$DIST/CanvasNative.iphonesimulator.xcarchive/dSYMs/CanvasNative.framework.dSYM/Contents/Resources/DWARF/CanvasNative" \ - "$DIST/CanvasNative.iphoneos.xcarchive/dSYMs/CanvasNative.framework.dSYM/Contents/Resources/DWARF/CanvasNative" \ - -output "$DSYM_OUTPUT_DIR/Contents/Resources/DWARF/CanvasNative" +rm -rf "$DIST/intermediates" + +# echo "Creating CanvasNative.xcframework" +# OUTPUT_DIR="$DIST/CanvasNative.xcframework" +# rm -rf $OUTPUT_DIR +# xcodebuild -create-xcframework \ +# -framework "$DIST/CanvasNative.iphonesimulator.xcarchive/Products/Library/Frameworks/CanvasNative.framework" \ +# -framework "$DIST/CanvasNative.iphoneos.xcarchive/Products/Library/Frameworks/CanvasNative.framework" \ +# -output "$OUTPUT_DIR" + +# DSYM_OUTPUT_DIR="$DIST/CanvasNative.framework.dSYM" +# cp -r "$DIST/CanvasNative.iphoneos.xcarchive/dSYMs/CanvasNative.framework.dSYM/" $DSYM_OUTPUT_DIR +# lipo -create \ +# "$DIST/CanvasNative.iphonesimulator.xcarchive/dSYMs/CanvasNative.framework.dSYM/Contents/Resources/DWARF/CanvasNative" \ +# "$DIST/CanvasNative.iphoneos.xcarchive/dSYMs/CanvasNative.framework.dSYM/Contents/Resources/DWARF/CanvasNative" \ +# -output "$DSYM_OUTPUT_DIR/Contents/Resources/DWARF/CanvasNative" -pushd $DIST -zip -qr "CanvasNative.framework.dSYM.zip" "CanvasNative.framework.dSYM" -rm -rf "CanvasNative.framework.dSYM" -popd +# pushd $DIST +# zip -qr "CanvasNative.framework.dSYM.zip" "CanvasNative.framework.dSYM" +# rm -rf "CanvasNative.framework.dSYM" +# popd -rm -rf "$DIST/CanvasNative.iphonesimulator.xcarchive" -rm -rf "$DIST/CanvasNative.iphoneos.xcarchive" +# rm -rf "$DIST/CanvasNative.iphonesimulator.xcarchive" +# rm -rf "$DIST/CanvasNative.iphoneos.xcarchive" diff --git a/tools/scripts/ios-build.sh b/tools/scripts/ios-build.sh index ac2d994a..a8ea874e 100755 --- a/tools/scripts/ios-build.sh +++ b/tools/scripts/ios-build.sh @@ -6,6 +6,7 @@ IOS_SRC_DIR="$CWD/canvas-ios" IOS_LIB_DIR="$IOS_SRC_DIR/CanvasNative" IOS_LIB_INCLUDE="$IOS_LIB_DIR/include" IOS_LIB_LIBS="$IOS_LIB_DIR/libs" +IOS_LIB_SIM="$IOS_LIB_LIBS/iphonesimulator" IOS_LIB_X86_64_SIM="$IOS_LIB_LIBS/x86_64-iphonesimulator" IOS_LIB_ARM_64_SIM="$IOS_LIB_LIBS/arm64-iphonesimulator" IOS_LIB_ARM_64_PHONE="$IOS_LIB_LIBS/arm64-iphoneos" @@ -15,7 +16,7 @@ BUILD_FLAG="" BITCODE_ENABLED=false FEATURE_FLAGS="" ##CARGO_FLAGS="-C link-arg=-s -Z embed-bitcode features=itarget target-cpu=native" -CARGO_FLAGS="-C target-cpu=native" +CARGO_FLAGS="" ##CARGO_FLAGS="" IOS_X86_64_SIM_OUTPUT_DEBUG_DIR="$NATIVE_SRC/target/x86_64-apple-ios/debug/$OUTPUT_LIB_NAME" IOS_X86_64_SIM_OUTPUT_RELEASE_DIR="$NATIVE_SRC/target/x86_64-apple-ios/release/$OUTPUT_LIB_NAME" @@ -23,8 +24,8 @@ IOS_X86_64_SIM_OUTPUT_RELEASE_DIR="$NATIVE_SRC/target/x86_64-apple-ios/release/$ IOS_ARM_64_PHONE_OUTPUT_DEBUG_DIR="$NATIVE_SRC/target/aarch64-apple-ios/debug/$OUTPUT_LIB_NAME" IOS_ARM_64_PHONE_OUTPUT_RELEASE_DIR="$NATIVE_SRC/target/aarch64-apple-ios/release/$OUTPUT_LIB_NAME" -IOS_ARM_64_SIM_OUTPUT_DEBUG_DIR="$NATIVE_SRC/target/aarch64-apple-darwin/debug/$OUTPUT_LIB_NAME" -IOS_ARM_64_SIM_OUTPUT_RELEASE_DIR="$NATIVE_SRC/target/aarch64-apple-darwin/release/$OUTPUT_LIB_NAME" +IOS_ARM_64_SIM_OUTPUT_DEBUG_DIR="$NATIVE_SRC/target/aarch64-apple-ios-sim/debug/$OUTPUT_LIB_NAME" +IOS_ARM_64_SIM_OUTPUT_RELEASE_DIR="$NATIVE_SRC/target/aarch64-apple-ios-sim/release/$OUTPUT_LIB_NAME" if ! cargo --version >/dev/null 2>&1; then @@ -59,7 +60,23 @@ if [[ -f "$IOS_LIB_INCLUDE/canvas_native.h" ]]; then fi # TODO fix header generation .... ignore android -cbindgen "$CWD/canvas-native/canvas-core/src/lib.rs" -l c >"$IOS_LIB_INCLUDE/canvas_native.h" +cbindgen --config "$CWD/canvas-native/canvas-core/cbindgen.toml" "$CWD/canvas-native/canvas-core/src/lib.rs" -l c >"$IOS_LIB_INCLUDE/canvas_native.h" + + +if [[ -f "$IOS_LIB_ARM_64_PHONE/$OUTPUT_LIB_NAME" ]]; then + rm "$IOS_LIB_ARM_64_PHONE/$OUTPUT_LIB_NAME" +fi + +if [[ $IS_RELEASE == true ]]; then + cd "$NATIVE_SRC" + RUST_BACKTRACE=1 cargo build --target aarch64-apple-ios $BUILD_FLAG $FEATURE_FLAGS + cp "$IOS_ARM_64_PHONE_OUTPUT_RELEASE_DIR" "$IOS_LIB_ARM_64_PHONE/$OUTPUT_LIB_NAME" +else + cd "$NATIVE_SRC" + RUST_BACKTRACE=1 cargo build --target aarch64-apple-ios $FEATURE_FLAGS + cp "$IOS_ARM_64_PHONE_OUTPUT_DEBUG_DIR" "$IOS_LIB_ARM_64_PHONE/$OUTPUT_LIB_NAME" +fi + if [[ -f "$IOS_LIB_X86_64_SIM/$OUTPUT_LIB_NAME" ]]; then @@ -69,39 +86,51 @@ fi if [[ $IS_RELEASE == true ]]; then cd "$NATIVE_SRC" RUST_BACKTRACE=1 cargo build --target x86_64-apple-ios $BUILD_FLAG $FEATURE_FLAGS - cp "$IOS_X86_64_SIM_OUTPUT_RELEASE_DIR" "$IOS_LIB_X86_64_SIM/$OUTPUT_LIB_NAME" + cp "$IOS_X86_64_SIM_OUTPUT_RELEASE_DIR" "$IOS_LIB_X86_64_SIM/$OUTPUT_LIB_NAME" else cd "$NATIVE_SRC" RUST_BACKTRACE=1 cargo build --target x86_64-apple-ios $FEATURE_FLAGS - cp "$IOS_X86_64_SIM_OUTPUT_DEBUG_DIR" "$IOS_LIB_X86_64_SIM/$OUTPUT_LIB_NAME" + cp "$IOS_X86_64_SIM_OUTPUT_DEBUG_DIR" "$IOS_LIB_X86_64_SIM/$OUTPUT_LIB_NAME" fi -if [[ -f "$IOS_LIB_ARM_64_PHONE/$OUTPUT_LIB_NAME" ]]; then - rm "$IOS_LIB_ARM_64_PHONE/$OUTPUT_LIB_NAME" +if [[ -f "$IOS_LIB_ARM_64_SIM/$OUTPUT_LIB_NAME" ]]; then + rm "$IOS_LIB_ARM_64_SIM/$OUTPUT_LIB_NAME" fi if [[ $IS_RELEASE == true ]]; then cd "$NATIVE_SRC" - RUST_BACKTRACE=1 cargo build --target aarch64-apple-ios $BUILD_FLAG $FEATURE_FLAGS - cp "$IOS_ARM_64_PHONE_OUTPUT_RELEASE_DIR" "$IOS_LIB_ARM_64_PHONE/$OUTPUT_LIB_NAME" + RUST_BACKTRACE=1 cargo build --target aarch64-apple-ios-sim $BUILD_FLAG $FEATURE_FLAGS + cp "$IOS_ARM_64_SIM_OUTPUT_RELEASE_DIR" "$IOS_LIB_ARM_64_SIM/$OUTPUT_LIB_NAME" else cd "$NATIVE_SRC" - RUST_BACKTRACE=1 cargo build --target aarch64-apple-ios $FEATURE_FLAGS - cp "$IOS_ARM_64_PHONE_OUTPUT_DEBUG_DIR" "$IOS_LIB_ARM_64_PHONE/$OUTPUT_LIB_NAME" + RUST_BACKTRACE=1 cargo build --target aarch64-apple-ios-sim $FEATURE_FLAGS + cp "$IOS_ARM_64_SIM_OUTPUT_DEBUG_DIR" "$IOS_LIB_ARM_64_SIM/$OUTPUT_LIB_NAME" fi -# if [[ -f "$IOS_LIB_ARM_64_SIM/$OUTPUT_LIB_NAME" ]]; then -# rm "$IOS_LIB_ARM_64_SIM/$OUTPUT_LIB_NAME" + +# if [[ -f "$IOS_LIB_SIM/$OUTPUT_LIB_NAME" ]]; then +# rm "$IOS_LIB_SIM/$OUTPUT_LIB_NAME" # fi + # if [[ $IS_RELEASE == true ]]; then # cd "$NATIVE_SRC" -# RUST_BACKTRACE=1 cargo build --target aarch64-apple-darwin $BUILD_FLAG $FEATURE_FLAGS -# cp "$IOS_ARM_64_SIM_OUTPUT_RELEASE_DIR" "$IOS_LIB_ARM_64_SIM/$OUTPUT_LIB_NAME" + +# lipo -create \ +# "$IOS_X86_64_SIM_OUTPUT_RELEASE_DIR" \ +# "$IOS_ARM_64_SIM_OUTPUT_RELEASE_DIR" \ +# -output "$IOS_LIB_SIM/$OUTPUT_LIB_NAME" # else # cd "$NATIVE_SRC" -# RUST_BACKTRACE=1 cargo build --target aarch64-apple-darwin $FEATURE_FLAGS -# cp "$IOS_ARM_64_SIM_OUTPUT_DEBUG_DIR" "$IOS_LIB_ARM_64_SIM/$OUTPUT_LIB_NAME" +# lipo -create \ +# "$IOS_X86_64_SIM_OUTPUT_DEBUG_DIR" \ +# "$IOS_ARM_64_SIM_OUTPUT_DEBUG_DIR" \ +# -output "$IOS_LIB_SIM/$OUTPUT_LIB_NAME" # fi + + + + +