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_H_ | 5 #ifndef GPU_IPC_SERVICE_GPU_CHANNEL_H_ |
6 #define GPU_IPC_SERVICE_GPU_CHANNEL_H_ | 6 #define GPU_IPC_SERVICE_GPU_CHANNEL_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 #include <stdint.h> | 9 #include <stdint.h> |
10 | 10 |
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
174 #endif | 174 #endif |
175 | 175 |
176 protected: | 176 protected: |
177 // The message filter on the io thread. | 177 // The message filter on the io thread. |
178 scoped_refptr<GpuChannelMessageFilter> filter_; | 178 scoped_refptr<GpuChannelMessageFilter> filter_; |
179 | 179 |
180 // Map of routing id to command buffer stub. | 180 // Map of routing id to command buffer stub. |
181 base::ScopedPtrHashMap<int32_t, std::unique_ptr<GpuCommandBufferStub>> stubs_; | 181 base::ScopedPtrHashMap<int32_t, std::unique_ptr<GpuCommandBufferStub>> stubs_; |
182 | 182 |
183 private: | 183 private: |
| 184 friend class TestGpuChannel; |
| 185 |
184 bool OnControlMessageReceived(const IPC::Message& msg); | 186 bool OnControlMessageReceived(const IPC::Message& msg); |
185 | 187 |
186 void HandleMessage(const scoped_refptr<GpuChannelMessageQueue>& queue); | 188 void HandleMessage(const scoped_refptr<GpuChannelMessageQueue>& queue); |
187 | 189 |
188 // Some messages such as WaitForGetOffsetInRange and WaitForTokenInRange are | 190 // Some messages such as WaitForGetOffsetInRange and WaitForTokenInRange are |
189 // processed as soon as possible because the client is blocked until they | 191 // processed as soon as possible because the client is blocked until they |
190 // are completed. | 192 // are completed. |
191 void HandleOutOfOrderMessage(const IPC::Message& msg); | 193 void HandleOutOfOrderMessage(const IPC::Message& msg); |
192 | 194 |
193 void HandleMessageHelper(const IPC::Message& msg); | 195 void HandleMessageHelper(const IPC::Message& msg); |
(...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
471 scoped_refptr<PreemptionFlag> preempting_flag_; | 473 scoped_refptr<PreemptionFlag> preempting_flag_; |
472 scoped_refptr<PreemptionFlag> preempted_flag_; | 474 scoped_refptr<PreemptionFlag> preempted_flag_; |
473 SyncPointManager* const sync_point_manager_; | 475 SyncPointManager* const sync_point_manager_; |
474 | 476 |
475 DISALLOW_COPY_AND_ASSIGN(GpuChannelMessageQueue); | 477 DISALLOW_COPY_AND_ASSIGN(GpuChannelMessageQueue); |
476 }; | 478 }; |
477 | 479 |
478 } // namespace gpu | 480 } // namespace gpu |
479 | 481 |
480 #endif // GPU_IPC_SERVICE_GPU_CHANNEL_H_ | 482 #endif // GPU_IPC_SERVICE_GPU_CHANNEL_H_ |
OLD | NEW |