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

Unified Diff: content/app/android/child_process_service_impl.cc

Issue 2268173002: Add StreamTexture resgistration for the Browser (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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 | « no previous file | content/browser/android/browser_surface_texture_manager.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/app/android/child_process_service_impl.cc
diff --git a/content/app/android/child_process_service_impl.cc b/content/app/android/child_process_service_impl.cc
index 99ae3f85c76e469ed2af026ac97c22fef3bfa2ce..a57ecd902a978e63e60cc1599bafd013bd31645b 100644
--- a/content/app/android/child_process_service_impl.cc
+++ b/content/app/android/child_process_service_impl.cc
@@ -65,6 +65,26 @@ class SurfaceTextureManagerImpl : public gpu::SurfaceTextureManager,
Java_ChildProcessServiceImpl_destroySurfaceTextureSurface(
env, service_impl_, surface_texture_id, client_id);
}
+ void RegisterBrowserSurfaceTexture(
+ int surface_texture_id,
+ gl::SurfaceTexture* surface_texture) override {
+ JNIEnv* env = base::android::AttachCurrentThread();
+ Java_ChildProcessServiceImpl_createBrowserSurfaceTextureSurface(
+ env, service_impl_, surface_texture_id,
+ surface_texture->j_surface_texture());
+ }
+ void UnregisterBrowserSurfaceTexture(int surface_texture_id) override {
+ JNIEnv* env = base::android::AttachCurrentThread();
+ Java_ChildProcessServiceImpl_destroyBrowserSurfaceTextureSurface(
+ env, service_impl_, surface_texture_id);
+ }
+ gl::ScopedJavaSurface GetBrowserSurfaceTexture(
+ int surface_texture_id) override {
+ // SurfaceTexture registered via RegisterBrowserSurfaceTexture should only
+ // be accessed in the browser process.
+ NOTREACHED();
+ return gl::ScopedJavaSurface();
+ }
gfx::AcceleratedWidget AcquireNativeWidgetForSurfaceTexture(
int surface_texture_id) override {
JNIEnv* env = base::android::AttachCurrentThread();
« no previous file with comments | « no previous file | content/browser/android/browser_surface_texture_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698