| 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/render_widget_fullscreen_pepper.h" | 5 #include "content/renderer/render_widget_fullscreen_pepper.h" |
| 6 | 6 |
| 7 #include <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 545 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 556 void RenderWidgetFullscreenPepper::CreateContext() { | 556 void RenderWidgetFullscreenPepper::CreateContext() { |
| 557 DCHECK(!context_); | 557 DCHECK(!context_); |
| 558 CommandLine* command_line = CommandLine::ForCurrentProcess(); | 558 CommandLine* command_line = CommandLine::ForCurrentProcess(); |
| 559 if (command_line->HasSwitch(switches::kDisableFlashFullscreen3d)) | 559 if (command_line->HasSwitch(switches::kDisableFlashFullscreen3d)) |
| 560 return; | 560 return; |
| 561 WebKit::WebGraphicsContext3D::Attributes attributes; | 561 WebKit::WebGraphicsContext3D::Attributes attributes; |
| 562 attributes.depth = false; | 562 attributes.depth = false; |
| 563 attributes.stencil = false; | 563 attributes.stencil = false; |
| 564 attributes.antialias = false; | 564 attributes.antialias = false; |
| 565 attributes.shareResources = false; | 565 attributes.shareResources = false; |
| 566 attributes.preferDiscreteGPU = true; | |
| 567 context_ = WebGraphicsContext3DCommandBufferImpl::CreateViewContext( | 566 context_ = WebGraphicsContext3DCommandBufferImpl::CreateViewContext( |
| 568 RenderThreadImpl::current(), | 567 RenderThreadImpl::current(), |
| 569 surface_id(), | 568 surface_id(), |
| 570 NULL, | 569 NULL, |
| 571 attributes, | 570 attributes, |
| 572 true /* bind generates resources */, | 571 true /* bind generates resources */, |
| 573 active_url_, | 572 active_url_, |
| 574 CAUSE_FOR_GPU_LAUNCH_RENDERWIDGETFULLSCREENPEPPER_CREATECONTEXT); | 573 CAUSE_FOR_GPU_LAUNCH_RENDERWIDGETFULLSCREENPEPPER_CREATECONTEXT); |
| 575 if (!context_) | 574 if (!context_) |
| 576 return; | 575 return; |
| (...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 705 RenderWidgetFullscreenPepper::GetParentContextForPlatformContext3D() { | 704 RenderWidgetFullscreenPepper::GetParentContextForPlatformContext3D() { |
| 706 if (!context_) { | 705 if (!context_) { |
| 707 CreateContext(); | 706 CreateContext(); |
| 708 } | 707 } |
| 709 if (!context_) | 708 if (!context_) |
| 710 return NULL; | 709 return NULL; |
| 711 return context_; | 710 return context_; |
| 712 } | 711 } |
| 713 | 712 |
| 714 } // namespace content | 713 } // namespace content |
| OLD | NEW |