This source file includes following definitions.
- JNINamespace
- onFrameAvailable
- finalize
- nativeFrameAvailable
- nativeDestroy
package org.chromium.ui.gl;
import android.graphics.SurfaceTexture;
import org.chromium.base.JNINamespace;
@JNINamespace("gfx")
class SurfaceTextureListener implements SurfaceTexture.OnFrameAvailableListener {
private final long mNativeSurfaceTextureListener;
SurfaceTextureListener(long nativeSurfaceTextureListener) {
assert nativeSurfaceTextureListener != 0;
mNativeSurfaceTextureListener = nativeSurfaceTextureListener;
}
@Override
public void onFrameAvailable(SurfaceTexture surfaceTexture) {
nativeFrameAvailable(mNativeSurfaceTextureListener);
}
@Override
protected void finalize() throws Throwable {
try {
nativeDestroy(mNativeSurfaceTextureListener);
} finally {
super.finalize();
}
}
private native void nativeFrameAvailable(long nativeSurfaceTextureListener);
private native void nativeDestroy(long nativeSurfaceTextureListener);
}