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 |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
78 virtual ~DeletionObserver() {} | 78 virtual ~DeletionObserver() {} |
79 }; | 79 }; |
80 | 80 |
81 typedef base::Callback<void(const std::string& msg, int id)> | 81 typedef base::Callback<void(const std::string& msg, int id)> |
82 GpuConsoleMessageCallback; | 82 GpuConsoleMessageCallback; |
83 | 83 |
84 // Create and connect to a command buffer in the GPU process. | 84 // Create and connect to a command buffer in the GPU process. |
85 static std::unique_ptr<CommandBufferProxyImpl> Create( | 85 static std::unique_ptr<CommandBufferProxyImpl> Create( |
86 scoped_refptr<GpuChannelHost> host, | 86 scoped_refptr<GpuChannelHost> host, |
87 gpu::SurfaceHandle surface_handle, | 87 gpu::SurfaceHandle surface_handle, |
| 88 const gfx::Size& size, |
88 CommandBufferProxyImpl* share_group, | 89 CommandBufferProxyImpl* share_group, |
89 int32_t stream_id, | 90 int32_t stream_id, |
90 gpu::GpuStreamPriority stream_priority, | 91 gpu::GpuStreamPriority stream_priority, |
91 const gpu::gles2::ContextCreationAttribHelper& attribs, | 92 const gpu::gles2::ContextCreationAttribHelper& attribs, |
92 const GURL& active_url, | 93 const GURL& active_url, |
| 94 gl::GpuPreference gpu_preference, |
93 scoped_refptr<base::SingleThreadTaskRunner> task_runner); | 95 scoped_refptr<base::SingleThreadTaskRunner> task_runner); |
94 ~CommandBufferProxyImpl() override; | 96 ~CommandBufferProxyImpl() override; |
95 | 97 |
96 // IPC::Listener implementation: | 98 // IPC::Listener implementation: |
97 bool OnMessageReceived(const IPC::Message& message) override; | 99 bool OnMessageReceived(const IPC::Message& message) override; |
98 void OnChannelError() override; | 100 void OnChannelError() override; |
99 | 101 |
100 // CommandBuffer implementation: | 102 // CommandBuffer implementation: |
101 State GetLastState() override; | 103 State GetLastState() override; |
102 int32_t GetLastToken() override; | 104 int32_t GetLastToken() override; |
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
310 | 312 |
311 base::WeakPtr<CommandBufferProxyImpl> weak_this_; | 313 base::WeakPtr<CommandBufferProxyImpl> weak_this_; |
312 scoped_refptr<base::SequencedTaskRunner> callback_thread_; | 314 scoped_refptr<base::SequencedTaskRunner> callback_thread_; |
313 | 315 |
314 DISALLOW_COPY_AND_ASSIGN(CommandBufferProxyImpl); | 316 DISALLOW_COPY_AND_ASSIGN(CommandBufferProxyImpl); |
315 }; | 317 }; |
316 | 318 |
317 } // namespace gpu | 319 } // namespace gpu |
318 | 320 |
319 #endif // GPU_IPC_CLIENT_COMMAND_BUFFER_PROXY_IMPL_H_ | 321 #endif // GPU_IPC_CLIENT_COMMAND_BUFFER_PROXY_IMPL_H_ |
OLD | NEW |