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

Unified Diff: content/browser/android/child_process_launcher_android.cc

Issue 177953004: Enable SurfaceTexture based zero-copy texture uploading on Android platform Base URL: http://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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
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);
}

Powered by Google App Engine
This is Rietveld 408576698