Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(130)

Unified Diff: content/common/android/surface_texture_bridge.cc

Issue 12388038: Android: Remove Surface cruft (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/common/android/surface_callback.cc ('k') | content/common/android/surface_texture_peer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/android/surface_texture_bridge.cc
diff --git a/content/common/android/surface_texture_bridge.cc b/content/common/android/surface_texture_bridge.cc
index 7026919569384441cb17fc20fe3e6cfebb6d2c8e..7f9d710c3baf48428471b9f69d631d32c7767374 100644
--- a/content/common/android/surface_texture_bridge.cc
+++ b/content/common/android/surface_texture_bridge.cc
@@ -10,9 +10,9 @@
#include "base/android/build_info.h"
#include "base/android/jni_android.h"
#include "base/logging.h"
+#include "content/common/android/scoped_java_surface.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;
@@ -25,7 +25,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;
}
}
@@ -139,12 +138,9 @@ void SurfaceTextureBridge::DetachFromGLContext() {
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());
- JNI_Surface::Java_Surface_release(env, jsurface.obj());
+ ScopedJavaSurface surface(this);
+ ANativeWindow* native_window =
+ ANativeWindow_fromSurface(env, surface.j_surface().obj());
return native_window;
}
« no previous file with comments | « content/common/android/surface_callback.cc ('k') | content/common/android/surface_texture_peer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698