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

Unified Diff: gpu/ipc/client/android/in_process_surface_texture_manager.cc

Issue 2525483005: Remove SurfaceTextureManager (Closed)
Patch Set: Fix link error Created 4 years 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 | « gpu/ipc/client/android/in_process_surface_texture_manager.h ('k') | gpu/ipc/common/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
deleted file mode 100644
index 84fc5eee88dee7f57309050847c89f57dfd7bfe8..0000000000000000000000000000000000000000
--- a/gpu/ipc/client/android/in_process_surface_texture_manager.cc
+++ /dev/null
@@ -1,60 +0,0 @@
-// Copyright 2015 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "gpu/ipc/client/android/in_process_surface_texture_manager.h"
-
-#include <android/native_window.h>
-#include <android/native_window_jni.h>
-
-#include "base/android/jni_android.h"
-#include "base/containers/scoped_ptr_hash_map.h"
-#include "base/logging.h"
-#include "base/memory/ptr_util.h"
-
-namespace gpu {
-
-// static
-InProcessSurfaceTextureManager* InProcessSurfaceTextureManager::GetInstance() {
- return base::Singleton<
- InProcessSurfaceTextureManager,
- base::LeakySingletonTraits<InProcessSurfaceTextureManager>>::get();
-}
-
-void InProcessSurfaceTextureManager::RegisterSurfaceTexture(
- int surface_texture_id,
- int client_id,
- gl::SurfaceTexture* surface_texture) {
- base::AutoLock lock(lock_);
-
- DCHECK(surface_textures_.find(surface_texture_id) == surface_textures_.end());
- surface_textures_.add(
- surface_texture_id,
- base::MakeUnique<gl::ScopedJavaSurface>(surface_texture));
-}
-
-void InProcessSurfaceTextureManager::UnregisterSurfaceTexture(
- int surface_texture_id,
- int client_id) {
- base::AutoLock lock(lock_);
-
- DCHECK(surface_textures_.find(surface_texture_id) != surface_textures_.end());
- surface_textures_.erase(surface_texture_id);
-}
-
-gfx::AcceleratedWidget
-InProcessSurfaceTextureManager::AcquireNativeWidgetForSurfaceTexture(
- int surface_texture_id) {
- base::AutoLock lock(lock_);
-
- DCHECK(surface_textures_.find(surface_texture_id) != surface_textures_.end());
- JNIEnv* env = base::android::AttachCurrentThread();
- return ANativeWindow_fromSurface(
- env, surface_textures_.get(surface_texture_id)->j_surface().obj());
-}
-
-InProcessSurfaceTextureManager::InProcessSurfaceTextureManager() {}
-
-InProcessSurfaceTextureManager::~InProcessSurfaceTextureManager() {}
-
-} // namespace gpu
« no previous file with comments | « gpu/ipc/client/android/in_process_surface_texture_manager.h ('k') | gpu/ipc/common/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698