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 #include "content/renderer/pepper/ppb_graphics_3d_impl.h" | 5 #include "content/renderer/pepper/ppb_graphics_3d_impl.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/location.h" | 9 #include "base/location.h" |
10 #include "base/single_thread_task_runner.h" | 10 #include "base/single_thread_task_runner.h" |
(...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
260 | 260 |
261 gpu::CommandBufferProxyImpl* share_buffer = NULL; | 261 gpu::CommandBufferProxyImpl* share_buffer = NULL; |
262 if (share_context) { | 262 if (share_context) { |
263 PPB_Graphics3D_Impl* share_graphics = | 263 PPB_Graphics3D_Impl* share_graphics = |
264 static_cast<PPB_Graphics3D_Impl*>(share_context); | 264 static_cast<PPB_Graphics3D_Impl*>(share_context); |
265 share_buffer = share_graphics->GetCommandBufferProxy(); | 265 share_buffer = share_graphics->GetCommandBufferProxy(); |
266 } | 266 } |
267 | 267 |
268 command_buffer_ = channel->CreateCommandBuffer( | 268 command_buffer_ = channel->CreateCommandBuffer( |
269 gpu::kNullSurfaceHandle, surface_size, share_buffer, | 269 gpu::kNullSurfaceHandle, surface_size, share_buffer, |
270 gpu::GpuChannelHost::kDefaultStreamId, | 270 gpu::GPU_STREAM_DEFAULT, gpu::GpuStreamPriority::NORMAL, attribs, |
271 gpu::GpuChannelHost::kDefaultStreamPriority, attribs, GURL::EmptyGURL(), | 271 GURL::EmptyGURL(), gpu_preference); |
272 gpu_preference); | |
273 if (!command_buffer_) | 272 if (!command_buffer_) |
274 return false; | 273 return false; |
275 | 274 |
276 command_buffer_->SetGpuControlClient(this); | 275 command_buffer_->SetGpuControlClient(this); |
277 | 276 |
278 if (shared_state_handle) | 277 if (shared_state_handle) |
279 *shared_state_handle = command_buffer_->GetSharedStateHandle(); | 278 *shared_state_handle = command_buffer_->GetSharedStateHandle(); |
280 if (capabilities) | 279 if (capabilities) |
281 *capabilities = command_buffer_->GetCapabilities(); | 280 *capabilities = command_buffer_->GetCapabilities(); |
282 if (command_buffer_id) | 281 if (command_buffer_id) |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
363 if (!mailboxes_to_reuse_.empty()) { | 362 if (!mailboxes_to_reuse_.empty()) { |
364 gpu::Mailbox mailbox = mailboxes_to_reuse_.back(); | 363 gpu::Mailbox mailbox = mailboxes_to_reuse_.back(); |
365 mailboxes_to_reuse_.pop_back(); | 364 mailboxes_to_reuse_.pop_back(); |
366 return mailbox; | 365 return mailbox; |
367 } | 366 } |
368 | 367 |
369 return gpu::Mailbox::Generate(); | 368 return gpu::Mailbox::Generate(); |
370 } | 369 } |
371 | 370 |
372 } // namespace content | 371 } // namespace content |
OLD | NEW |