8package org.skia.jetski;
12import androidx.annotation.RequiresApi;
15 private long mNativeInstance;
23 this(CreateBitmapInstance(
bitmap));
26 @RequiresApi(
Build.VERSION_CODES.N)
49 return new Canvas(
this, nGetNativeCanvas(mNativeInstance));
58 return new Image(nMakeImageSnapshot(mNativeInstance));
68 nFlushAndSubmit(mNativeInstance);
72 return nGetWidth(mNativeInstance);
76 return nGetHeight(mNativeInstance);
83 nRelease(mNativeInstance);
93 private Surface(
long native_instance) {
94 mNativeInstance = native_instance;
97 private static long CreateBitmapInstance(Bitmap
bitmap) {
99 throw new IllegalStateException(
"Immutable bitmap passed to Surface constructor");
101 return nCreateBitmap(
bitmap);
104 private static native
long nCreateBitmap(Bitmap
bitmap);
105 private static native
long nCreateThreadedSurface(
android.view.Surface
surface);
106 private static native
long nCreateVKSurface(
android.view.Surface
surface);
107 private static native
long nCreateGLSurface(
android.view.Surface
surface);
109 private static native
void nRelease(
long nativeInstance);
110 private static native
long nGetNativeCanvas(
long nativeInstance);
111 private static native
void nFlushAndSubmit(
long nativeInstance);
112 private static native
int nGetWidth(
long nativeInstance);
113 private static native
int nGetHeight(
long nativeInstance);
114 private static native
long nMakeImageSnapshot(
long nativeInstance);
static Surface CreateGL(android.view.Surface surface)
static Surface createThreadedSurface(android.view.Surface surface)
static Surface CreateVulkan(android.view.Surface surface)
Image makeImageSnapshot()
def Build(configs, env, options)