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

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

Issue 1998723002: Move code in ui/gl/* from gfx:: to gl:: (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 7 months 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
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef GPU_IPC_CLIENT_ANDROID_IN_PROCESS_SURFACE_TEXTURE_MANAGER_H_ 5 #ifndef GPU_IPC_CLIENT_ANDROID_IN_PROCESS_SURFACE_TEXTURE_MANAGER_H_
6 #define GPU_IPC_CLIENT_ANDROID_IN_PROCESS_SURFACE_TEXTURE_MANAGER_H_ 6 #define GPU_IPC_CLIENT_ANDROID_IN_PROCESS_SURFACE_TEXTURE_MANAGER_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "base/containers/scoped_ptr_hash_map.h" 10 #include "base/containers/scoped_ptr_hash_map.h"
11 #include "base/macros.h" 11 #include "base/macros.h"
12 #include "base/memory/singleton.h" 12 #include "base/memory/singleton.h"
13 #include "base/synchronization/lock.h" 13 #include "base/synchronization/lock.h"
14 #include "gpu/gpu_export.h" 14 #include "gpu/gpu_export.h"
15 #include "gpu/ipc/common/android/surface_texture_manager.h" 15 #include "gpu/ipc/common/android/surface_texture_manager.h"
16 #include "ui/gl/android/scoped_java_surface.h" 16 #include "ui/gl/android/scoped_java_surface.h"
17 17
18 namespace gpu { 18 namespace gpu {
19 19
20 class GPU_EXPORT InProcessSurfaceTextureManager : public SurfaceTextureManager { 20 class GPU_EXPORT InProcessSurfaceTextureManager : public SurfaceTextureManager {
21 public: 21 public:
22 static GPU_EXPORT InProcessSurfaceTextureManager* GetInstance(); 22 static GPU_EXPORT InProcessSurfaceTextureManager* GetInstance();
23 23
24 // Overridden from SurfaceTextureManager: 24 // Overridden from SurfaceTextureManager:
25 void RegisterSurfaceTexture(int surface_texture_id, 25 void RegisterSurfaceTexture(int surface_texture_id,
26 int client_id, 26 int client_id,
27 gfx::SurfaceTexture* surface_texture) override; 27 gl::SurfaceTexture* surface_texture) override;
28 void UnregisterSurfaceTexture(int surface_texture_id, int client_id) override; 28 void UnregisterSurfaceTexture(int surface_texture_id, int client_id) override;
29 gfx::AcceleratedWidget AcquireNativeWidgetForSurfaceTexture( 29 gfx::AcceleratedWidget AcquireNativeWidgetForSurfaceTexture(
30 int surface_texture_id) override; 30 int surface_texture_id) override;
31 31
32 private: 32 private:
33 friend struct base::DefaultSingletonTraits<InProcessSurfaceTextureManager>; 33 friend struct base::DefaultSingletonTraits<InProcessSurfaceTextureManager>;
34 34
35 InProcessSurfaceTextureManager(); 35 InProcessSurfaceTextureManager();
36 ~InProcessSurfaceTextureManager() override; 36 ~InProcessSurfaceTextureManager() override;
37 37
38 using SurfaceTextureMap = 38 using SurfaceTextureMap =
39 base::ScopedPtrHashMap<int, std::unique_ptr<gfx::ScopedJavaSurface>>; 39 base::ScopedPtrHashMap<int, std::unique_ptr<gl::ScopedJavaSurface>>;
40 SurfaceTextureMap surface_textures_; 40 SurfaceTextureMap surface_textures_;
41 base::Lock lock_; 41 base::Lock lock_;
42 42
43 DISALLOW_COPY_AND_ASSIGN(InProcessSurfaceTextureManager); 43 DISALLOW_COPY_AND_ASSIGN(InProcessSurfaceTextureManager);
44 }; 44 };
45 45
46 } // namespace gpu 46 } // namespace gpu
47 47
48 #endif // GPU_IPC_CLIENT_ANDROID_IN_PROCESS_SURFACE_TEXTURE_MANAGER_H_ 48 #endif // GPU_IPC_CLIENT_ANDROID_IN_PROCESS_SURFACE_TEXTURE_MANAGER_H_
OLDNEW
« no previous file with comments | « gpu/gles2_conform_support/egl/thread_state.cc ('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