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_CLIENT_COMMAND_BUFFER_PROXY_IMPL_H_ | 5 #ifndef GPU_IPC_CLIENT_COMMAND_BUFFER_PROXY_IMPL_H_ |
6 #define GPU_IPC_CLIENT_COMMAND_BUFFER_PROXY_IMPL_H_ | 6 #define GPU_IPC_CLIENT_COMMAND_BUFFER_PROXY_IMPL_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 #include <stdint.h> | 9 #include <stdint.h> |
10 | 10 |
11 #include <map> | 11 #include <map> |
12 #include <memory> | 12 #include <memory> |
13 #include <queue> | 13 #include <queue> |
14 #include <string> | 14 #include <string> |
15 | 15 |
16 #include "base/callback.h" | 16 #include "base/callback.h" |
17 #include "base/compiler_specific.h" | 17 #include "base/compiler_specific.h" |
18 #include "base/containers/hash_tables.h" | 18 #include "base/containers/hash_tables.h" |
19 #include "base/macros.h" | 19 #include "base/macros.h" |
20 #include "base/memory/ref_counted.h" | 20 #include "base/memory/ref_counted.h" |
21 #include "base/memory/weak_ptr.h" | 21 #include "base/memory/weak_ptr.h" |
22 #include "base/observer_list.h" | 22 #include "base/observer_list.h" |
23 #include "base/single_thread_task_runner.h" | 23 #include "base/single_thread_task_runner.h" |
24 #include "base/threading/thread_checker.h" | 24 #include "base/threading/thread_checker.h" |
25 #include "gpu/command_buffer/client/gpu_control.h" | 25 #include "gpu/command_buffer/client/gpu_control.h" |
26 #include "gpu/command_buffer/common/command_buffer.h" | 26 #include "gpu/command_buffer/common/command_buffer.h" |
27 #include "gpu/command_buffer/common/command_buffer_id.h" | 27 #include "gpu/command_buffer/common/command_buffer_id.h" |
28 #include "gpu/command_buffer/common/command_buffer_shared.h" | 28 #include "gpu/command_buffer/common/command_buffer_shared.h" |
29 #include "gpu/command_buffer/common/gpu_memory_allocation.h" | 29 #include "gpu/command_buffer/common/gpu_memory_allocation.h" |
| 30 #include "gpu/command_buffer/common/scheduling_priority.h" |
30 #include "gpu/gpu_export.h" | 31 #include "gpu/gpu_export.h" |
31 #include "gpu/ipc/common/gpu_stream_constants.h" | |
32 #include "gpu/ipc/common/surface_handle.h" | 32 #include "gpu/ipc/common/surface_handle.h" |
33 #include "ipc/ipc_listener.h" | 33 #include "ipc/ipc_listener.h" |
34 #include "ui/gfx/swap_result.h" | 34 #include "ui/gfx/swap_result.h" |
35 #include "ui/gl/gpu_preference.h" | 35 #include "ui/gl/gpu_preference.h" |
36 #include "ui/latency/latency_info.h" | 36 #include "ui/latency/latency_info.h" |
37 | 37 |
38 struct GPUCommandBufferConsoleMessage; | 38 struct GPUCommandBufferConsoleMessage; |
39 struct GPUCreateCommandBufferConfig; | 39 struct GPUCreateCommandBufferConfig; |
40 struct GpuCommandBufferMsg_SwapBuffersCompleted_Params; | 40 struct GpuCommandBufferMsg_SwapBuffersCompleted_Params; |
41 class GURL; | 41 class GURL; |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
76 | 76 |
77 typedef base::Callback<void(const std::string& msg, int id)> | 77 typedef base::Callback<void(const std::string& msg, int id)> |
78 GpuConsoleMessageCallback; | 78 GpuConsoleMessageCallback; |
79 | 79 |
80 // Create and connect to a command buffer in the GPU process. | 80 // Create and connect to a command buffer in the GPU process. |
81 static std::unique_ptr<CommandBufferProxyImpl> Create( | 81 static std::unique_ptr<CommandBufferProxyImpl> Create( |
82 scoped_refptr<GpuChannelHost> host, | 82 scoped_refptr<GpuChannelHost> host, |
83 gpu::SurfaceHandle surface_handle, | 83 gpu::SurfaceHandle surface_handle, |
84 CommandBufferProxyImpl* share_group, | 84 CommandBufferProxyImpl* share_group, |
85 int32_t stream_id, | 85 int32_t stream_id, |
86 gpu::GpuStreamPriority stream_priority, | 86 gpu::SchedulingPriority stream_priority, |
87 const gpu::gles2::ContextCreationAttribHelper& attribs, | 87 const gpu::gles2::ContextCreationAttribHelper& attribs, |
88 const GURL& active_url, | 88 const GURL& active_url, |
89 scoped_refptr<base::SingleThreadTaskRunner> task_runner); | 89 scoped_refptr<base::SingleThreadTaskRunner> task_runner); |
90 ~CommandBufferProxyImpl() override; | 90 ~CommandBufferProxyImpl() override; |
91 | 91 |
92 // IPC::Listener implementation: | 92 // IPC::Listener implementation: |
93 bool OnMessageReceived(const IPC::Message& message) override; | 93 bool OnMessageReceived(const IPC::Message& message) override; |
94 void OnChannelError() override; | 94 void OnChannelError() override; |
95 | 95 |
96 // CommandBuffer implementation: | 96 // CommandBuffer implementation: |
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
295 | 295 |
296 base::WeakPtr<CommandBufferProxyImpl> weak_this_; | 296 base::WeakPtr<CommandBufferProxyImpl> weak_this_; |
297 scoped_refptr<base::SequencedTaskRunner> callback_thread_; | 297 scoped_refptr<base::SequencedTaskRunner> callback_thread_; |
298 | 298 |
299 DISALLOW_COPY_AND_ASSIGN(CommandBufferProxyImpl); | 299 DISALLOW_COPY_AND_ASSIGN(CommandBufferProxyImpl); |
300 }; | 300 }; |
301 | 301 |
302 } // namespace gpu | 302 } // namespace gpu |
303 | 303 |
304 #endif // GPU_IPC_CLIENT_COMMAND_BUFFER_PROXY_IMPL_H_ | 304 #endif // GPU_IPC_CLIENT_COMMAND_BUFFER_PROXY_IMPL_H_ |
OLD | NEW |