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

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

Issue 195583003: Add initial GpuMemoryBufferSurfaceTexture implementation. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 9 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/browser/android/child_process_launcher_android.h ('k') | content/browser/child_process_launcher.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..ca99a784286ae9fd784d28d8c7c33c2db4ae8766 100644
--- a/content/browser/android/child_process_launcher_android.cc
+++ b/content/browser/android/child_process_launcher_android.cc
@@ -81,6 +81,7 @@ static void OnChildProcessStarted(JNIEnv*,
void StartChildProcess(
const CommandLine::StringVector& argv,
+ int child_process_id,
const std::vector<content::FileDescriptorInfo>& files_to_register,
const StartChildProcessCallback& callback) {
JNIEnv* env = AttachCurrentThread();
@@ -119,6 +120,7 @@ void StartChildProcess(
Java_ChildProcessLauncher_start(env,
base::android::GetApplicationContext(),
j_argv.obj(),
+ child_process_id,
j_file_ids.obj(),
j_file_fds.obj(),
j_file_auto_close.obj(),
@@ -156,7 +158,19 @@ jobject GetViewSurface(JNIEnv* env, jclass clazz, jint surface_id) {
// handled on a binder thread. Handling this on the UI thread will lead
// to deadlocks.
DCHECK(!BrowserThread::CurrentlyOn(BrowserThread::UI));
- return CompositorImpl::GetSurface(surface_id);
+ return CompositorImpl::GetSurface(surface_id).Release();
+}
+
+jobject GetSurfaceTextureSurface(JNIEnv* env,
+ jclass clazz,
+ jint surface_texture_id,
+ jint child_process_id) {
+ // This is a synchronous call from a renderer process and is expected to be
+ // handled on a binder thread. Handling this on the UI thread will lead
+ // to deadlocks.
+ DCHECK(!BrowserThread::CurrentlyOn(BrowserThread::UI));
+ return CompositorImpl::GetSurfaceTextureSurface(surface_texture_id,
+ child_process_id).Release();
}
jboolean IsSingleProcess(JNIEnv* env, jclass clazz) {
« no previous file with comments | « content/browser/android/child_process_launcher_android.h ('k') | content/browser/child_process_launcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698