| Index: gpu/ipc/client/android/in_process_surface_texture_manager.cc
|
| diff --git a/gpu/ipc/client/android/in_process_surface_texture_manager.cc b/gpu/ipc/client/android/in_process_surface_texture_manager.cc
|
| index 84fc5eee88dee7f57309050847c89f57dfd7bfe8..6bf0d01cbe60aa51ad7c5e4a541f5f6898df84ac 100644
|
| --- a/gpu/ipc/client/android/in_process_surface_texture_manager.cc
|
| +++ b/gpu/ipc/client/android/in_process_surface_texture_manager.cc
|
| @@ -42,6 +42,39 @@ void InProcessSurfaceTextureManager::UnregisterSurfaceTexture(
|
| surface_textures_.erase(surface_texture_id);
|
| }
|
|
|
| +void InProcessSurfaceTextureManager::RegisterBrowserSurfaceTexture(
|
| + int surface_texture_id,
|
| + gl::SurfaceTexture* surface_texture) {
|
| + base::AutoLock lock(lock_);
|
| +
|
| + DCHECK(browser_surface_textures_.find(surface_texture_id) ==
|
| + browser_surface_textures_.end());
|
| + browser_surface_textures_.insert(std::make_pair(
|
| + surface_texture_id, gl::ScopedJavaSurface(surface_texture)));
|
| +};
|
| +
|
| +void InProcessSurfaceTextureManager::UnregisterBrowserSurfaceTexture(
|
| + int surface_texture_id) {
|
| + base::AutoLock lock(lock_);
|
| +
|
| + DCHECK(browser_surface_textures_.find(surface_texture_id) !=
|
| + browser_surface_textures_.end());
|
| + browser_surface_textures_.erase(surface_texture_id);
|
| +};
|
| +
|
| +gl::ScopedJavaSurface InProcessSurfaceTextureManager::GetBrowserSurfaceTexture(
|
| + int surface_texture_id) {
|
| + base::AutoLock lock(lock_);
|
| +
|
| + DCHECK(browser_surface_textures_.find(surface_texture_id) !=
|
| + browser_surface_textures_.end());
|
| + browser_surface_textures_.erase(surface_texture_id);
|
| + // TODO(tguilbert): multiple calls using the same |surface_texture_id| will
|
| + // probably not work.
|
| + // Fix before commiting if the general strategy in this CL is accepted.
|
| + return std::move(browser_surface_textures_.find(surface_texture_id)->second);
|
| +};
|
| +
|
| gfx::AcceleratedWidget
|
| InProcessSurfaceTextureManager::AcquireNativeWidgetForSurfaceTexture(
|
| int surface_texture_id) {
|
|
|