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

Side by Side Diff: gpu/ipc/client/android/in_process_surface_texture_manager.h

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 unified diff | Download patch
« no previous file with comments | « gpu/ipc/client/BUILD.gn ('k') | gpu/ipc/client/android/in_process_surface_texture_manager.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef GPU_IPC_CLIENT_ANDROID_IN_PROCESS_SURFACE_TEXTURE_MANAGER_H_
6 #define GPU_IPC_CLIENT_ANDROID_IN_PROCESS_SURFACE_TEXTURE_MANAGER_H_
7
8 #include <memory>
9
10 #include "base/containers/scoped_ptr_hash_map.h"
11 #include "base/macros.h"
12 #include "base/memory/singleton.h"
13 #include "base/synchronization/lock.h"
14 #include "gpu/gpu_export.h"
15 #include "gpu/ipc/common/android/surface_texture_manager.h"
16 #include "ui/gl/android/scoped_java_surface.h"
17
18 namespace gpu {
19
20 class GPU_EXPORT InProcessSurfaceTextureManager : public SurfaceTextureManager {
21 public:
22 static GPU_EXPORT InProcessSurfaceTextureManager* GetInstance();
23
24 // Overridden from SurfaceTextureManager:
25 void RegisterSurfaceTexture(int surface_texture_id,
26 int client_id,
27 gl::SurfaceTexture* surface_texture) override;
28 void UnregisterSurfaceTexture(int surface_texture_id, int client_id) override;
29 gfx::AcceleratedWidget AcquireNativeWidgetForSurfaceTexture(
30 int surface_texture_id) override;
31
32 private:
33 friend struct base::DefaultSingletonTraits<InProcessSurfaceTextureManager>;
34
35 InProcessSurfaceTextureManager();
36 ~InProcessSurfaceTextureManager() override;
37
38 using SurfaceTextureMap =
39 base::ScopedPtrHashMap<int, std::unique_ptr<gl::ScopedJavaSurface>>;
40 SurfaceTextureMap surface_textures_;
41 base::Lock lock_;
42
43 DISALLOW_COPY_AND_ASSIGN(InProcessSurfaceTextureManager);
44 };
45
46 } // namespace gpu
47
48 #endif // GPU_IPC_CLIENT_ANDROID_IN_PROCESS_SURFACE_TEXTURE_MANAGER_H_
OLDNEW
« no previous file with comments | « gpu/ipc/client/BUILD.gn ('k') | gpu/ipc/client/android/in_process_surface_texture_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698