| 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 083c3209a62c0107afde08c80aaefcb7c9e9889e..ddea64d30d002a92980eb53de15688e4cd4b0d16 100644
|
| --- a/content/app/android/child_process_service_impl.cc
|
| +++ b/content/app/android/child_process_service_impl.cc
|
| @@ -17,7 +17,6 @@
|
| #include "content/child/child_thread_impl.h"
|
| #include "content/public/common/content_descriptors.h"
|
| #include "gpu/ipc/common/android/scoped_surface_request_conduit.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"
|
| #include "ipc/ipc_descriptors.h"
|
| @@ -35,8 +34,7 @@ namespace {
|
|
|
| // TODO(sievers): Use two different implementations of this depending on if
|
| // we're in a renderer or gpu process.
|
| -class SurfaceTextureManagerImpl : public gpu::SurfaceTextureManager,
|
| - public gpu::SurfaceTexturePeer,
|
| +class SurfaceTextureManagerImpl : public gpu::SurfaceTexturePeer,
|
| public gpu::ScopedSurfaceRequestConduit,
|
| public gpu::GpuSurfaceLookup {
|
| public:
|
| @@ -55,41 +53,6 @@ class SurfaceTextureManagerImpl : public gpu::SurfaceTextureManager,
|
| gpu::ScopedSurfaceRequestConduit::SetInstance(nullptr);
|
| }
|
|
|
| - // Overridden from SurfaceTextureManager:
|
| - void RegisterSurfaceTexture(int surface_texture_id,
|
| - int client_id,
|
| - gl::SurfaceTexture* surface_texture) override {
|
| - JNIEnv* env = base::android::AttachCurrentThread();
|
| - Java_ChildProcessServiceImpl_createSurfaceTextureSurface(
|
| - env, service_impl_, surface_texture_id, client_id,
|
| - surface_texture->j_surface_texture());
|
| - }
|
| - void UnregisterSurfaceTexture(int surface_texture_id,
|
| - int client_id) override {
|
| - JNIEnv* env = base::android::AttachCurrentThread();
|
| - Java_ChildProcessServiceImpl_destroySurfaceTextureSurface(
|
| - env, service_impl_, surface_texture_id, client_id);
|
| - }
|
| - gfx::AcceleratedWidget AcquireNativeWidgetForSurfaceTexture(
|
| - int surface_texture_id) override {
|
| - JNIEnv* env = base::android::AttachCurrentThread();
|
| - gl::ScopedJavaSurface surface(
|
| - Java_ChildProcessServiceImpl_getSurfaceTextureSurface(
|
| - env, service_impl_, surface_texture_id));
|
| -
|
| - if (surface.j_surface().is_null())
|
| - return NULL;
|
| -
|
| - // Note: This ensures that any local references used by
|
| - // ANativeWindow_fromSurface are released immediately. This is needed as a
|
| - // workaround for https://code.google.com/p/android/issues/detail?id=68174
|
| - base::android::ScopedJavaLocalFrame scoped_local_reference_frame(env);
|
| - ANativeWindow* native_window =
|
| - ANativeWindow_fromSurface(env, surface.j_surface().obj());
|
| -
|
| - return native_window;
|
| - }
|
| -
|
| // Overridden from SurfaceTexturePeer:
|
| void EstablishSurfaceTexturePeer(
|
| base::ProcessHandle pid,
|
| @@ -158,8 +121,6 @@ void InternalInitChildProcessImpl(JNIEnv* env,
|
| jlong cpu_features) {
|
| // Set the CPU properties.
|
| android_setCpu(cpu_count, cpu_features);
|
| - gpu::SurfaceTextureManager::SetInstance(
|
| - new SurfaceTextureManagerImpl(service_impl));
|
|
|
| base::android::MemoryPressureListenerAndroid::RegisterSystemCallback(env);
|
| }
|
|
|