Index: content/browser/android/child_process_launcher_android.cc |
diff --git a/content/browser/android/child_process_launcher_android.cc b/content/browser/android/child_process_launcher_android.cc |
index cf915e4a42a837de1f7a824c63964e205cbbbe4f..d1b16dd843ba4b3187ebc631c84b123c99083a48 100644 |
--- a/content/browser/android/child_process_launcher_android.cc |
+++ b/content/browser/android/child_process_launcher_android.cc |
@@ -159,6 +159,20 @@ jobject GetViewSurface(JNIEnv* env, jclass clazz, jint surface_id) { |
return CompositorImpl::GetSurface(surface_id); |
} |
+void SetupSurfaceTextureToRenderer( |
+ base::ProcessHandle process, |
+ void* gpu_memory_buffer, |
+ scoped_refptr<gfx::SurfaceTexture> surface_texture) { |
+ JNIEnv* env = AttachCurrentThread(); |
+ DCHECK(env); |
+ gfx::ScopedJavaSurface surface(surface_texture.get()); |
Hongbo Min
2014/03/18 06:10:03
Is it safe that the Surface is released after exi
|
+ Java_ChildProcessLauncher_setupSurfaceTextureToRenderer( |
+ env, |
+ static_cast<jint>(process), |
+ reinterpret_cast<intptr_t>(gpu_memory_buffer), |
+ surface.j_surface().obj()); |
+} |
+ |
jboolean IsSingleProcess(JNIEnv* env, jclass clazz) { |
return CommandLine::ForCurrentProcess()->HasSwitch(switches::kSingleProcess); |
} |