diff options
Diffstat (limited to 'content/common/android/surface_texture_bridge.cc')
-rw-r--r-- | content/common/android/surface_texture_bridge.cc | 28 |
1 files changed, 0 insertions, 28 deletions
diff --git a/content/common/android/surface_texture_bridge.cc b/content/common/android/surface_texture_bridge.cc index bdf54ee..8f640f8 100644 --- a/content/common/android/surface_texture_bridge.cc +++ b/content/common/android/surface_texture_bridge.cc @@ -4,13 +4,10 @@ #include "content/common/android/surface_texture_bridge.h" -#include <android/native_window_jni.h> - #include "base/android/jni_android.h" #include "base/logging.h" #include "content/common/android/surface_texture_listener.h" #include "jni/SurfaceTexture_jni.h" -#include "jni/Surface_jni.h" using base::android::AttachCurrentThread; using base::android::CheckException; @@ -23,7 +20,6 @@ bool g_jni_initialized = false; void RegisterNativesIfNeeded(JNIEnv* env) { if (!g_jni_initialized) { JNI_SurfaceTexture::RegisterNativesImpl(env); - JNI_Surface::RegisterNativesImpl(env); g_jni_initialized = true; } } @@ -107,28 +103,4 @@ void SurfaceTextureBridge::SetDefaultBufferSize(int width, int height) { static_cast<jint>(height)); } -void SurfaceTextureBridge::AttachToGLContext(int texture_id) { - JNIEnv* env = AttachCurrentThread(); - // Note: This method is only available on JB and greater. - JNI_SurfaceTexture::Java_SurfaceTexture_attachToGLContext( - env, j_surface_texture_.obj(), texture_id); -} - -void SurfaceTextureBridge::DetachFromGLContext() { - JNIEnv* env = AttachCurrentThread(); - // Note: This method is only available on JB and greater. - JNI_SurfaceTexture::Java_SurfaceTexture_detachFromGLContext( - env, j_surface_texture_.obj()); -} - -ANativeWindow* SurfaceTextureBridge::CreateSurface() { - JNIEnv* env = AttachCurrentThread(); - ScopedJavaLocalRef<jobject> jsurface( - JNI_Surface::Java_Surface_Constructor( - env, j_surface_texture_.obj())); - DCHECK(!jsurface.is_null()); - ANativeWindow* native_window = ANativeWindow_fromSurface(env, jsurface.obj()); - return native_window; -} - } // namespace content |