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

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

Issue 11275106: Make fullscreen Flash use the discrete GPU (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 1 month 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 515 matching lines...) Expand 10 before | Expand all | Expand 10 after
526 void RenderWidgetFullscreenPepper::CreateContext() { 526 void RenderWidgetFullscreenPepper::CreateContext() {
527 DCHECK(!context_); 527 DCHECK(!context_);
528 CommandLine* command_line = CommandLine::ForCurrentProcess(); 528 CommandLine* command_line = CommandLine::ForCurrentProcess();
529 if (command_line->HasSwitch(switches::kDisableFlashFullscreen3d)) 529 if (command_line->HasSwitch(switches::kDisableFlashFullscreen3d))
530 return; 530 return;
531 WebKit::WebGraphicsContext3D::Attributes attributes; 531 WebKit::WebGraphicsContext3D::Attributes attributes;
532 attributes.depth = false; 532 attributes.depth = false;
533 attributes.stencil = false; 533 attributes.stencil = false;
534 attributes.antialias = false; 534 attributes.antialias = false;
535 attributes.shareResources = false; 535 attributes.shareResources = false;
536 attributes.preferDiscreteGPU = true;
536 context_ = WebGraphicsContext3DCommandBufferImpl::CreateViewContext( 537 context_ = WebGraphicsContext3DCommandBufferImpl::CreateViewContext(
537 RenderThreadImpl::current(), 538 RenderThreadImpl::current(),
538 surface_id(), 539 surface_id(),
539 NULL, 540 NULL,
540 attributes, 541 attributes,
541 true /* bind generates resources */, 542 true /* bind generates resources */,
542 active_url_, 543 active_url_,
543 CAUSE_FOR_GPU_LAUNCH_RENDERWIDGETFULLSCREENPEPPER_CREATECONTEXT); 544 CAUSE_FOR_GPU_LAUNCH_RENDERWIDGETFULLSCREENPEPPER_CREATECONTEXT);
544 if (!context_) 545 if (!context_)
545 return; 546 return;
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
673 RenderWidgetFullscreenPepper::GetParentContextForPlatformContext3D() { 674 RenderWidgetFullscreenPepper::GetParentContextForPlatformContext3D() {
674 if (!context_) { 675 if (!context_) {
675 CreateContext(); 676 CreateContext();
676 } 677 }
677 if (!context_) 678 if (!context_)
678 return NULL; 679 return NULL;
679 return context_; 680 return context_;
680 } 681 }
681 682
682 } // namespace content 683 } // 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