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, | |
89 CommandBufferProxyImpl* share_group, | 88 CommandBufferProxyImpl* share_group, |
90 int32_t stream_id, | 89 int32_t stream_id, |
91 gpu::GpuStreamPriority stream_priority, | 90 gpu::GpuStreamPriority stream_priority, |
92 const gpu::gles2::ContextCreationAttribHelper& attribs, | 91 const gpu::gles2::ContextCreationAttribHelper& attribs, |
93 const GURL& active_url, | 92 const GURL& active_url, |
94 gl::GpuPreference gpu_preference, | |
95 scoped_refptr<base::SingleThreadTaskRunner> task_runner); | 93 scoped_refptr<base::SingleThreadTaskRunner> task_runner); |
96 ~CommandBufferProxyImpl() override; | 94 ~CommandBufferProxyImpl() override; |
97 | 95 |
98 // IPC::Listener implementation: | 96 // IPC::Listener implementation: |
99 bool OnMessageReceived(const IPC::Message& message) override; | 97 bool OnMessageReceived(const IPC::Message& message) override; |
100 void OnChannelError() override; | 98 void OnChannelError() override; |
101 | 99 |
102 // CommandBuffer implementation: | 100 // CommandBuffer implementation: |
103 State GetLastState() override; | 101 State GetLastState() override; |
104 int32_t GetLastToken() override; | 102 int32_t GetLastToken() override; |
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
312 | 310 |
313 base::WeakPtr<CommandBufferProxyImpl> weak_this_; | 311 base::WeakPtr<CommandBufferProxyImpl> weak_this_; |
314 scoped_refptr<base::SequencedTaskRunner> callback_thread_; | 312 scoped_refptr<base::SequencedTaskRunner> callback_thread_; |
315 | 313 |
316 DISALLOW_COPY_AND_ASSIGN(CommandBufferProxyImpl); | 314 DISALLOW_COPY_AND_ASSIGN(CommandBufferProxyImpl); |
317 }; | 315 }; |
318 | 316 |
319 } // namespace gpu | 317 } // namespace gpu |
320 | 318 |
321 #endif // GPU_IPC_CLIENT_COMMAND_BUFFER_PROXY_IMPL_H_ | 319 #endif // GPU_IPC_CLIENT_COMMAND_BUFFER_PROXY_IMPL_H_ |
OLD | NEW |