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

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

Issue 634643002: content: Out-of-process GPU service support for SurfaceTexture backed GpuMemoryBuffers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: one last build fix Created 6 years, 2 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 b6e755e513506a9b01c87cce81c4490649818461..c937fce174af6216b61d62481f590035f9966e60 100644
--- a/content/browser/android/child_process_launcher_android.cc
+++ b/content/browser/android/child_process_launcher_android.cc
@@ -18,7 +18,7 @@
#include "content/public/common/content_switches.h"
#include "jni/ChildProcessLauncher_jni.h"
#include "media/base/android/media_player_android.h"
-#include "ui/gl/android/scoped_java_surface.h"
+#include "ui/gl/android/surface_texture.h"
using base::android::AttachCurrentThread;
using base::android::ToJavaArrayOfStrings;
@@ -197,21 +197,32 @@ void UnregisterViewSurface(int surface_id) {
Java_ChildProcessLauncher_unregisterViewSurface(env, surface_id);
}
-void RegisterChildProcessSurfaceTexture(int surface_texture_id,
- int child_process_id,
- jobject j_surface_texture) {
+void CreateSurfaceTextureSurface(int surface_texture_id,
+ int client_id,
+ gfx::SurfaceTexture* surface_texture) {
JNIEnv* env = AttachCurrentThread();
DCHECK(env);
- Java_ChildProcessLauncher_registerSurfaceTexture(
- env, surface_texture_id, child_process_id, j_surface_texture);
+ Java_ChildProcessLauncher_createSurfaceTextureSurface(
+ env,
+ surface_texture_id,
+ client_id,
+ surface_texture->j_surface_texture().obj());
}
-void UnregisterChildProcessSurfaceTexture(int surface_texture_id,
- int child_process_id) {
+void DestroySurfaceTextureSurface(int surface_texture_id, int client_id) {
JNIEnv* env = AttachCurrentThread();
DCHECK(env);
- Java_ChildProcessLauncher_unregisterSurfaceTexture(
- env, surface_texture_id, child_process_id);
+ Java_ChildProcessLauncher_destroySurfaceTextureSurface(
+ env, surface_texture_id, client_id);
+}
+
+gfx::ScopedJavaSurface GetSurfaceTextureSurface(int surface_texture_id,
+ int client_id) {
+ JNIEnv* env = AttachCurrentThread();
+ DCHECK(env);
+ return gfx::ScopedJavaSurface::AcquireExternalSurface(
+ Java_ChildProcessLauncher_getSurfaceTextureSurface(
+ env, surface_texture_id, client_id).obj());
}
jboolean IsSingleProcess(JNIEnv* env, jclass clazz) {
« no previous file with comments | « content/browser/android/child_process_launcher_android.h ('k') | content/browser/android/surface_texture_peer_browser_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698