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/feature_list.h" | 9 #include "base/feature_list.h" |
10 #include "base/location.h" | 10 #include "base/location.h" |
(...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
242 | 242 |
243 scoped_refptr<gpu::GpuChannelHost> channel = | 243 scoped_refptr<gpu::GpuChannelHost> channel = |
244 render_thread->EstablishGpuChannelSync(); | 244 render_thread->EstablishGpuChannelSync(); |
245 if (!channel) | 245 if (!channel) |
246 return false; | 246 return false; |
247 | 247 |
248 has_alpha_ = requested_attribs.alpha_size > 0; | 248 has_alpha_ = requested_attribs.alpha_size > 0; |
249 | 249 |
250 gpu::gles2::ContextCreationAttribHelper attrib_helper = requested_attribs; | 250 gpu::gles2::ContextCreationAttribHelper attrib_helper = requested_attribs; |
251 attrib_helper.should_use_native_gmb_for_backbuffer = use_image_chromium_; | 251 attrib_helper.should_use_native_gmb_for_backbuffer = use_image_chromium_; |
| 252 attrib_helper.context_type = gpu::gles2::CONTEXT_TYPE_OPENGLES2; |
252 | 253 |
253 gpu::CommandBufferProxyImpl* share_buffer = NULL; | 254 gpu::CommandBufferProxyImpl* share_buffer = NULL; |
254 if (share_context) { | 255 if (share_context) { |
255 PPB_Graphics3D_Impl* share_graphics = | 256 PPB_Graphics3D_Impl* share_graphics = |
256 static_cast<PPB_Graphics3D_Impl*>(share_context); | 257 static_cast<PPB_Graphics3D_Impl*>(share_context); |
257 share_buffer = share_graphics->GetCommandBufferProxy(); | 258 share_buffer = share_graphics->GetCommandBufferProxy(); |
258 } | 259 } |
259 | 260 |
260 command_buffer_ = gpu::CommandBufferProxyImpl::Create( | 261 command_buffer_ = gpu::CommandBufferProxyImpl::Create( |
261 std::move(channel), gpu::kNullSurfaceHandle, share_buffer, | 262 std::move(channel), gpu::kNullSurfaceHandle, share_buffer, |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
354 if (!mailboxes_to_reuse_.empty()) { | 355 if (!mailboxes_to_reuse_.empty()) { |
355 gpu::Mailbox mailbox = mailboxes_to_reuse_.back(); | 356 gpu::Mailbox mailbox = mailboxes_to_reuse_.back(); |
356 mailboxes_to_reuse_.pop_back(); | 357 mailboxes_to_reuse_.pop_back(); |
357 return mailbox; | 358 return mailbox; |
358 } | 359 } |
359 | 360 |
360 return gpu::Mailbox::Generate(); | 361 return gpu::Mailbox::Generate(); |
361 } | 362 } |
362 | 363 |
363 } // namespace content | 364 } // namespace content |
OLD | NEW |