| 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..29a4a14a5eb28da1f9fd3414fc0f75fe8f001e36 100644
|
| --- a/content/app/android/child_process_service_impl.cc
|
| +++ b/content/app/android/child_process_service_impl.cc
|
| @@ -15,6 +15,7 @@
|
| #include "base/posix/global_descriptors.h"
|
| #include "content/child/child_thread_impl.h"
|
| #include "content/public/common/content_descriptors.h"
|
| +#include "gpu/ipc/common/android/scoped_surface_request_manager.h"
|
| #include "gpu/ipc/common/android/surface_texture_manager.h"
|
| #include "gpu/ipc/common/android/surface_texture_peer.h"
|
| #include "gpu/ipc/common/gpu_surface_lookup.h"
|
| @@ -35,6 +36,7 @@ namespace {
|
| // we're in a renderer or gpu process.
|
| class SurfaceTextureManagerImpl : public gpu::SurfaceTextureManager,
|
| public gpu::SurfaceTexturePeer,
|
| + public gpu::ScopedSurfaceRequestManager,
|
| public gpu::GpuSurfaceLookup {
|
| public:
|
| // |service impl| is the instance of
|
| @@ -44,10 +46,12 @@ class SurfaceTextureManagerImpl : public gpu::SurfaceTextureManager,
|
| : service_impl_(service_impl) {
|
| SurfaceTexturePeer::InitInstance(this);
|
| gpu::GpuSurfaceLookup::InitInstance(this);
|
| + gpu::ScopedSurfaceRequestManager::SetInstance(this);
|
| }
|
| ~SurfaceTextureManagerImpl() override {
|
| SurfaceTexturePeer::InitInstance(NULL);
|
| gpu::GpuSurfaceLookup::InitInstance(NULL);
|
| + gpu::ScopedSurfaceRequestManager::SetInstance(NULL);
|
| }
|
|
|
| // Overridden from SurfaceTextureManager:
|
| @@ -97,6 +101,27 @@ class SurfaceTextureManagerImpl : public gpu::SurfaceTextureManager,
|
| primary_id, secondary_id);
|
| }
|
|
|
| + // Overriden from ScopedSurfaceRequestManager:
|
| + void RegisterScopedSurfaceRequest(
|
| + uint64_t request_id,
|
| + ScopedSurfaceRequestCB request_cb) override {
|
| + // This method should only be called from the browser process.
|
| + NOTREACHED();
|
| + }
|
| + ScopedSurfaceRequestCB GetAndUnregisterScopedSurfaceRequest(
|
| + uint64_t request_id) override {
|
| + // This method should only be called from the browser process.
|
| + NOTREACHED();
|
| + return ScopedSurfaceRequestCB();
|
| + }
|
| + void FulfillScopedSurfaceRequest(
|
| + uint64_t request_id,
|
| + gl::SurfaceTexture* surface_texture) override {
|
| + JNIEnv* env = base::android::AttachCurrentThread();
|
| + content::Java_ChildProcessServiceImpl_fulfillScopedSurfaceRequest(
|
| + env, service_impl_, request_id, surface_texture->j_surface_texture());
|
| + }
|
| +
|
| // Overridden from GpuSurfaceLookup:
|
| gfx::AcceleratedWidget AcquireNativeWidget(int surface_id) override {
|
| JNIEnv* env = base::android::AttachCurrentThread();
|
|
|