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_H_ | 5 #ifndef CONTENT_COMMON_GPU_GPU_CHANNEL_H_ |
6 #define CONTENT_COMMON_GPU_GPU_CHANNEL_H_ | 6 #define CONTENT_COMMON_GPU_GPU_CHANNEL_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/containers/hash_tables.h" | 10 #include "base/containers/hash_tables.h" |
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
176 // Returns the shared sync point client state. | 176 // Returns the shared sync point client state. |
177 scoped_refptr<gpu::SyncPointClientState> GetSyncPointClientState(); | 177 scoped_refptr<gpu::SyncPointClientState> GetSyncPointClientState(); |
178 | 178 |
179 void HandleMessage(); | 179 void HandleMessage(); |
180 | 180 |
181 // Some messages such as WaitForGetOffsetInRange and WaitForTokenInRange are | 181 // Some messages such as WaitForGetOffsetInRange and WaitForTokenInRange are |
182 // processed as soon as possible because the client is blocked until they | 182 // processed as soon as possible because the client is blocked until they |
183 // are completed. | 183 // are completed. |
184 void HandleOutOfOrderMessage(const IPC::Message& msg); | 184 void HandleOutOfOrderMessage(const IPC::Message& msg); |
185 | 185 |
| 186 #if defined(OS_ANDROID) |
| 187 const GpuCommandBufferStub* GetOneStub() const; |
| 188 #endif |
| 189 |
186 protected: | 190 protected: |
187 // The message filter on the io thread. | 191 // The message filter on the io thread. |
188 scoped_refptr<GpuChannelMessageFilter> filter_; | 192 scoped_refptr<GpuChannelMessageFilter> filter_; |
189 | 193 |
190 // Map of routing id to command buffer stub. | 194 // Map of routing id to command buffer stub. |
191 base::ScopedPtrHashMap<int32, scoped_ptr<GpuCommandBufferStub>> stubs_; | 195 base::ScopedPtrHashMap<int32, scoped_ptr<GpuCommandBufferStub>> stubs_; |
192 | 196 |
193 private: | 197 private: |
194 class StreamState { | 198 class StreamState { |
195 public: | 199 public: |
(...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
465 | 469 |
466 base::WeakPtr<GpuChannel> gpu_channel_; | 470 base::WeakPtr<GpuChannel> gpu_channel_; |
467 scoped_refptr<base::SingleThreadTaskRunner> task_runner_; | 471 scoped_refptr<base::SingleThreadTaskRunner> task_runner_; |
468 | 472 |
469 DISALLOW_COPY_AND_ASSIGN(GpuChannelMessageQueue); | 473 DISALLOW_COPY_AND_ASSIGN(GpuChannelMessageQueue); |
470 }; | 474 }; |
471 | 475 |
472 } // namespace content | 476 } // namespace content |
473 | 477 |
474 #endif // CONTENT_COMMON_GPU_GPU_CHANNEL_H_ | 478 #endif // CONTENT_COMMON_GPU_GPU_CHANNEL_H_ |
OLD | NEW |