| 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_CLIENT_COMMAND_BUFFER_PROXY_IMPL_H_ | 5 #ifndef CONTENT_COMMON_GPU_CLIENT_COMMAND_BUFFER_PROXY_IMPL_H_ |
| 6 #define CONTENT_COMMON_GPU_CLIENT_COMMAND_BUFFER_PROXY_IMPL_H_ | 6 #define CONTENT_COMMON_GPU_CLIENT_COMMAND_BUFFER_PROXY_IMPL_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <queue> | 9 #include <queue> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 82 | 82 |
| 83 // IPC::Listener implementation: | 83 // IPC::Listener implementation: |
| 84 bool OnMessageReceived(const IPC::Message& message) override; | 84 bool OnMessageReceived(const IPC::Message& message) override; |
| 85 void OnChannelError() override; | 85 void OnChannelError() override; |
| 86 | 86 |
| 87 // CommandBuffer implementation: | 87 // CommandBuffer implementation: |
| 88 bool Initialize() override; | 88 bool Initialize() override; |
| 89 State GetLastState() override; | 89 State GetLastState() override; |
| 90 int32 GetLastToken() override; | 90 int32 GetLastToken() override; |
| 91 void Flush(int32 put_offset) override; | 91 void Flush(int32 put_offset) override; |
| 92 void OrderingBarrier(int32 put_offset) override; |
| 92 void WaitForTokenInRange(int32 start, int32 end) override; | 93 void WaitForTokenInRange(int32 start, int32 end) override; |
| 93 void WaitForGetOffsetInRange(int32 start, int32 end) override; | 94 void WaitForGetOffsetInRange(int32 start, int32 end) override; |
| 94 void SetGetBuffer(int32 shm_id) override; | 95 void SetGetBuffer(int32 shm_id) override; |
| 95 scoped_refptr<gpu::Buffer> CreateTransferBuffer(size_t size, | 96 scoped_refptr<gpu::Buffer> CreateTransferBuffer(size_t size, |
| 96 int32* id) override; | 97 int32* id) override; |
| 97 void DestroyTransferBuffer(int32 id) override; | 98 void DestroyTransferBuffer(int32 id) override; |
| 98 | 99 |
| 99 // gpu::GpuControl implementation: | 100 // gpu::GpuControl implementation: |
| 100 gpu::Capabilities GetCapabilities() override; | 101 gpu::Capabilities GetCapabilities() override; |
| 101 int32 CreateImage(ClientBuffer buffer, | 102 int32 CreateImage(ClientBuffer buffer, |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 183 | 184 |
| 184 // The shared memory area used to update state. | 185 // The shared memory area used to update state. |
| 185 scoped_ptr<base::SharedMemory> shared_state_shm_; | 186 scoped_ptr<base::SharedMemory> shared_state_shm_; |
| 186 | 187 |
| 187 // |*this| is owned by |*channel_| and so is always outlived by it, so using a | 188 // |*this| is owned by |*channel_| and so is always outlived by it, so using a |
| 188 // raw pointer is ok. | 189 // raw pointer is ok. |
| 189 GpuChannelHost* channel_; | 190 GpuChannelHost* channel_; |
| 190 int route_id_; | 191 int route_id_; |
| 191 unsigned int flush_count_; | 192 unsigned int flush_count_; |
| 192 int32 last_put_offset_; | 193 int32 last_put_offset_; |
| 194 int32 last_barrier_put_offset_; |
| 193 | 195 |
| 194 base::Closure channel_error_callback_; | 196 base::Closure channel_error_callback_; |
| 195 | 197 |
| 196 MemoryAllocationChangedCallback memory_allocation_changed_callback_; | 198 MemoryAllocationChangedCallback memory_allocation_changed_callback_; |
| 197 | 199 |
| 198 GpuConsoleMessageCallback console_message_callback_; | 200 GpuConsoleMessageCallback console_message_callback_; |
| 199 | 201 |
| 200 // Tasks to be invoked in SignalSyncPoint responses. | 202 // Tasks to be invoked in SignalSyncPoint responses. |
| 201 uint32 next_signal_id_; | 203 uint32 next_signal_id_; |
| 202 SignalTaskMap signal_tasks_; | 204 SignalTaskMap signal_tasks_; |
| 203 | 205 |
| 204 // Local cache of id to gpu memory buffer mapping. | 206 // Local cache of id to gpu memory buffer mapping. |
| 205 GpuMemoryBufferMap gpu_memory_buffers_; | 207 GpuMemoryBufferMap gpu_memory_buffers_; |
| 206 | 208 |
| 207 gpu::Capabilities capabilities_; | 209 gpu::Capabilities capabilities_; |
| 208 | 210 |
| 209 std::vector<ui::LatencyInfo> latency_info_; | 211 std::vector<ui::LatencyInfo> latency_info_; |
| 210 | 212 |
| 211 SwapBuffersCompletionCallback swap_buffers_completion_callback_; | 213 SwapBuffersCompletionCallback swap_buffers_completion_callback_; |
| 212 | 214 |
| 213 DISALLOW_COPY_AND_ASSIGN(CommandBufferProxyImpl); | 215 DISALLOW_COPY_AND_ASSIGN(CommandBufferProxyImpl); |
| 214 }; | 216 }; |
| 215 | 217 |
| 216 } // namespace content | 218 } // namespace content |
| 217 | 219 |
| 218 #endif // CONTENT_COMMON_GPU_CLIENT_COMMAND_BUFFER_PROXY_IMPL_H_ | 220 #endif // CONTENT_COMMON_GPU_CLIENT_COMMAND_BUFFER_PROXY_IMPL_H_ |
| OLD | NEW |