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

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

Issue 13983014: [CLOSED] Cleaning up the plethora of switches for GPU vs software vs SwiftShader. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 8 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 | « content/public/common/content_switches.cc ('k') | content/shell/shell_main_delegate.cc » ('j') | 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.h" 5 #include "content/renderer/render_widget.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/debug/trace_event.h" 9 #include "base/debug/trace_event.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 538 matching lines...) Expand 10 before | Expand all | Expand 10 after
549 GURL RenderWidget::GetURLForGraphicsContext3D() { 549 GURL RenderWidget::GetURLForGraphicsContext3D() {
550 return GURL(); 550 return GURL();
551 } 551 }
552 552
553 bool RenderWidget::ForceCompositingModeEnabled() { 553 bool RenderWidget::ForceCompositingModeEnabled() {
554 return false; 554 return false;
555 } 555 }
556 556
557 scoped_ptr<cc::OutputSurface> RenderWidget::CreateOutputSurface() { 557 scoped_ptr<cc::OutputSurface> RenderWidget::CreateOutputSurface() {
558 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); 558 const CommandLine& command_line = *CommandLine::ForCurrentProcess();
559 if (command_line.HasSwitch(switches::kEnableSoftwareCompositingGLAdapter)) { 559 if (command_line.HasSwitch(switches::kDisableGpu)) {
560 return scoped_ptr<cc::OutputSurface>( 560 return scoped_ptr<cc::OutputSurface>(
561 new CompositorOutputSurface(routing_id(), NULL, 561 new CompositorOutputSurface(routing_id(), NULL,
562 new CompositorSoftwareOutputDevice())); 562 new CompositorSoftwareOutputDevice()));
563 } 563 }
564 564
565 // Explicitly disable antialiasing for the compositor. As of the time of 565 // Explicitly disable antialiasing for the compositor. As of the time of
566 // this writing, the only platform that supported antialiasing for the 566 // this writing, the only platform that supported antialiasing for the
567 // compositor was Mac OS X, because the on-screen OpenGL context creation 567 // compositor was Mac OS X, because the on-screen OpenGL context creation
568 // code paths on Windows and Linux didn't yet have multisampling support. 568 // code paths on Windows and Linux didn't yet have multisampling support.
569 // Mac OS X essentially always behaves as though it's rendering offscreen. 569 // Mac OS X essentially always behaves as though it's rendering offscreen.
(...skipping 1745 matching lines...) Expand 10 before | Expand all | Expand 10 after
2315 2315
2316 if (!context->Initialize( 2316 if (!context->Initialize(
2317 attributes, 2317 attributes,
2318 false /* bind generates resources */, 2318 false /* bind generates resources */,
2319 CAUSE_FOR_GPU_LAUNCH_WEBGRAPHICSCONTEXT3DCOMMANDBUFFERIMPL_INITIALIZE) ) 2319 CAUSE_FOR_GPU_LAUNCH_WEBGRAPHICSCONTEXT3DCOMMANDBUFFERIMPL_INITIALIZE) )
2320 return NULL; 2320 return NULL;
2321 return context.release(); 2321 return context.release();
2322 } 2322 }
2323 2323
2324 } // namespace content 2324 } // namespace content
OLDNEW
« no previous file with comments | « content/public/common/content_switches.cc ('k') | content/shell/shell_main_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698