Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(703)

Side by Side Diff: content/renderer/render_widget_fullscreen_pepper.cc

Issue 13116025: Revert 165513 "Make fullscreen Flash use the discrete GPU" (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1410/src/
Patch Set: Created 7 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698