OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 CONTENT_COMMON_GPU_GPU_CHANNEL_MANAGER_H_ | 5 #ifndef CONTENT_COMMON_GPU_GPU_CHANNEL_MANAGER_H_ |
6 #define CONTENT_COMMON_GPU_GPU_CHANNEL_MANAGER_H_ | 6 #define CONTENT_COMMON_GPU_GPU_CHANNEL_MANAGER_H_ |
7 | 7 |
8 #include <deque> | 8 #include <deque> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
91 gpu::gles2::ProgramCache* program_cache(); | 91 gpu::gles2::ProgramCache* program_cache(); |
92 | 92 |
93 GpuMemoryManager* gpu_memory_manager() { return &gpu_memory_manager_; } | 93 GpuMemoryManager* gpu_memory_manager() { return &gpu_memory_manager_; } |
94 | 94 |
95 GpuChannel* LookupChannel(int32 client_id); | 95 GpuChannel* LookupChannel(int32 client_id); |
96 | 96 |
97 SyncPointManager* sync_point_manager() { return sync_point_manager_; } | 97 SyncPointManager* sync_point_manager() { return sync_point_manager_; } |
98 | 98 |
99 gfx::GLSurface* GetDefaultOffscreenSurface(); | 99 gfx::GLSurface* GetDefaultOffscreenSurface(); |
100 | 100 |
| 101 bool MakeCurrent(gfx::GLSurface* surface); |
| 102 |
101 private: | 103 private: |
102 struct ImageOperation { | 104 struct ImageOperation { |
103 ImageOperation(int32 sync_point, base::Closure callback); | 105 ImageOperation(int32 sync_point, base::Closure callback); |
104 ~ImageOperation(); | 106 ~ImageOperation(); |
105 | 107 |
106 int32 sync_point; | 108 int32 sync_point; |
107 base::Closure callback; | 109 base::Closure callback; |
108 }; | 110 }; |
109 typedef base::hash_map<int, scoped_refptr<GpuChannel> > GpuChannelMap; | 111 typedef base::hash_map<int, scoped_refptr<GpuChannel> > GpuChannelMap; |
110 typedef std::deque<ImageOperation*> ImageOperationQueue; | 112 typedef std::deque<ImageOperation*> ImageOperationQueue; |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
147 scoped_ptr<gpu::gles2::ProgramCache> program_cache_; | 149 scoped_ptr<gpu::gles2::ProgramCache> program_cache_; |
148 scoped_refptr<gfx::GLSurface> default_offscreen_surface_; | 150 scoped_refptr<gfx::GLSurface> default_offscreen_surface_; |
149 ImageOperationQueue image_operations_; | 151 ImageOperationQueue image_operations_; |
150 | 152 |
151 DISALLOW_COPY_AND_ASSIGN(GpuChannelManager); | 153 DISALLOW_COPY_AND_ASSIGN(GpuChannelManager); |
152 }; | 154 }; |
153 | 155 |
154 } // namespace content | 156 } // namespace content |
155 | 157 |
156 #endif // CONTENT_COMMON_GPU_GPU_CHANNEL_MANAGER_H_ | 158 #endif // CONTENT_COMMON_GPU_GPU_CHANNEL_MANAGER_H_ |
OLD | NEW |