| 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 GPU_IPC_SERVICE_GPU_CHANNEL_MANAGER_H_ | 5 #ifndef GPU_IPC_SERVICE_GPU_CHANNEL_MANAGER_H_ |
| 6 #define GPU_IPC_SERVICE_GPU_CHANNEL_MANAGER_H_ | 6 #define GPU_IPC_SERVICE_GPU_CHANNEL_MANAGER_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <deque> | 10 #include <deque> |
| (...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 126 uint32_t GetProcessedOrderNum() const; | 126 uint32_t GetProcessedOrderNum() const; |
| 127 | 127 |
| 128 #if defined(OS_ANDROID) | 128 #if defined(OS_ANDROID) |
| 129 void DidAccessGpu(); | 129 void DidAccessGpu(); |
| 130 #endif | 130 #endif |
| 131 | 131 |
| 132 bool is_exiting_for_lost_context() { | 132 bool is_exiting_for_lost_context() { |
| 133 return exiting_for_lost_context_; | 133 return exiting_for_lost_context_; |
| 134 } | 134 } |
| 135 | 135 |
| 136 gles2::MailboxManager* mailbox_manager() const { |
| 137 return mailbox_manager_.get(); |
| 138 } |
| 139 |
| 140 gl::GLShareGroup* share_group() const { return share_group_.get(); } |
| 141 |
| 136 protected: | 142 protected: |
| 137 virtual std::unique_ptr<GpuChannel> CreateGpuChannel( | 143 virtual std::unique_ptr<GpuChannel> CreateGpuChannel( |
| 138 int client_id, | 144 int client_id, |
| 139 uint64_t client_tracing_id, | 145 uint64_t client_tracing_id, |
| 140 bool preempts, | 146 bool preempts, |
| 141 bool allow_view_command_buffers, | 147 bool allow_view_command_buffers, |
| 142 bool allow_real_time_streams); | 148 bool allow_real_time_streams); |
| 143 | 149 |
| 144 SyncPointManager* sync_point_manager() const { | 150 SyncPointManager* sync_point_manager() const { |
| 145 return sync_point_manager_; | 151 return sync_point_manager_; |
| 146 } | 152 } |
| 147 | 153 |
| 148 gl::GLShareGroup* share_group() const { return share_group_.get(); } | 154 PreemptionFlag* preemption_flag() const { return preemption_flag_.get(); } |
| 149 gles2::MailboxManager* mailbox_manager() const { | |
| 150 return mailbox_manager_.get(); | |
| 151 } | |
| 152 PreemptionFlag* preemption_flag() const { | |
| 153 return preemption_flag_.get(); | |
| 154 } | |
| 155 | 155 |
| 156 scoped_refptr<base::SingleThreadTaskRunner> task_runner_; | 156 scoped_refptr<base::SingleThreadTaskRunner> task_runner_; |
| 157 scoped_refptr<base::SingleThreadTaskRunner> io_task_runner_; | 157 scoped_refptr<base::SingleThreadTaskRunner> io_task_runner_; |
| 158 | 158 |
| 159 // These objects manage channels to individual renderer processes there is | 159 // These objects manage channels to individual renderer processes there is |
| 160 // one channel for each renderer process that has connected to this GPU | 160 // one channel for each renderer process that has connected to this GPU |
| 161 // process. | 161 // process. |
| 162 base::ScopedPtrHashMap<int32_t, std::unique_ptr<GpuChannel>> gpu_channels_; | 162 base::ScopedPtrHashMap<int32_t, std::unique_ptr<GpuChannel>> gpu_channels_; |
| 163 | 163 |
| 164 private: | 164 private: |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 206 // that any WeakPtrs to Controller are invalidated before its members | 206 // that any WeakPtrs to Controller are invalidated before its members |
| 207 // variable's destructors are executed, rendering them invalid. | 207 // variable's destructors are executed, rendering them invalid. |
| 208 base::WeakPtrFactory<GpuChannelManager> weak_factory_; | 208 base::WeakPtrFactory<GpuChannelManager> weak_factory_; |
| 209 | 209 |
| 210 DISALLOW_COPY_AND_ASSIGN(GpuChannelManager); | 210 DISALLOW_COPY_AND_ASSIGN(GpuChannelManager); |
| 211 }; | 211 }; |
| 212 | 212 |
| 213 } // namespace gpu | 213 } // namespace gpu |
| 214 | 214 |
| 215 #endif // GPU_IPC_SERVICE_GPU_CHANNEL_MANAGER_H_ | 215 #endif // GPU_IPC_SERVICE_GPU_CHANNEL_MANAGER_H_ |
| OLD | NEW |