| 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 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 86 gpu::gles2::ProgramCache* program_cache(); | 86 gpu::gles2::ProgramCache* program_cache(); |
| 87 | 87 |
| 88 GpuMemoryManager* gpu_memory_manager() { return &gpu_memory_manager_; } | 88 GpuMemoryManager* gpu_memory_manager() { return &gpu_memory_manager_; } |
| 89 | 89 |
| 90 GpuChannel* LookupChannel(int32 client_id); | 90 GpuChannel* LookupChannel(int32 client_id); |
| 91 | 91 |
| 92 SyncPointManager* sync_point_manager() { return sync_point_manager_; } | 92 SyncPointManager* sync_point_manager() { return sync_point_manager_; } |
| 93 | 93 |
| 94 gfx::GLSurface* GetDefaultOffscreenSurface(); | 94 gfx::GLSurface* GetDefaultOffscreenSurface(); |
| 95 | 95 |
| 96 bool MakeCurrent(gfx::GLSurface* surface); |
| 97 |
| 96 private: | 98 private: |
| 97 struct ImageOperation { | 99 struct ImageOperation { |
| 98 ImageOperation(int32 sync_point, base::Closure callback); | 100 ImageOperation(int32 sync_point, base::Closure callback); |
| 99 ~ImageOperation(); | 101 ~ImageOperation(); |
| 100 | 102 |
| 101 int32 sync_point; | 103 int32 sync_point; |
| 102 base::Closure callback; | 104 base::Closure callback; |
| 103 }; | 105 }; |
| 104 typedef base::hash_map<int, scoped_refptr<GpuChannel> > GpuChannelMap; | 106 typedef base::hash_map<int, scoped_refptr<GpuChannel> > GpuChannelMap; |
| 105 typedef std::deque<ImageOperation*> ImageOperationQueue; | 107 typedef std::deque<ImageOperation*> ImageOperationQueue; |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 142 scoped_ptr<gpu::gles2::ProgramCache> program_cache_; | 144 scoped_ptr<gpu::gles2::ProgramCache> program_cache_; |
| 143 scoped_refptr<gfx::GLSurface> default_offscreen_surface_; | 145 scoped_refptr<gfx::GLSurface> default_offscreen_surface_; |
| 144 ImageOperationQueue image_operations_; | 146 ImageOperationQueue image_operations_; |
| 145 | 147 |
| 146 DISALLOW_COPY_AND_ASSIGN(GpuChannelManager); | 148 DISALLOW_COPY_AND_ASSIGN(GpuChannelManager); |
| 147 }; | 149 }; |
| 148 | 150 |
| 149 } // namespace content | 151 } // namespace content |
| 150 | 152 |
| 151 #endif // CONTENT_COMMON_GPU_GPU_CHANNEL_MANAGER_H_ | 153 #endif // CONTENT_COMMON_GPU_GPU_CHANNEL_MANAGER_H_ |
| OLD | NEW |