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

Side by Side Diff: content/renderer/gpu/render_widget_compositor.cc

Issue 16069004: cc: Remove legacy accelerated painting path (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix unused variable warning Created 7 years, 6 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') | 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) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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/gpu/render_widget_compositor.h" 5 #include "content/renderer/gpu/render_widget_compositor.h"
6 6
7 #include <limits> 7 #include <limits>
8 #include <string> 8 #include <string>
9 9
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 new RenderWidgetCompositor(widget)); 85 new RenderWidgetCompositor(widget));
86 86
87 CommandLine* cmd = CommandLine::ForCurrentProcess(); 87 CommandLine* cmd = CommandLine::ForCurrentProcess();
88 88
89 cc::LayerTreeSettings settings; 89 cc::LayerTreeSettings settings;
90 90
91 // For web contents, layer transforms should scale up the contents of layers 91 // For web contents, layer transforms should scale up the contents of layers
92 // to keep content always crisp when possible. 92 // to keep content always crisp when possible.
93 settings.layer_transforms_should_scale_layer_contents = true; 93 settings.layer_transforms_should_scale_layer_contents = true;
94 94
95 settings.accelerate_painting =
96 cmd->HasSwitch(switches::kEnableAcceleratedPainting);
97 settings.throttle_frame_production = 95 settings.throttle_frame_production =
98 !cmd->HasSwitch(switches::kDisableGpuVsync); 96 !cmd->HasSwitch(switches::kDisableGpuVsync);
99 settings.render_parent_drives_begin_frame_ = 97 settings.render_parent_drives_begin_frame_ =
100 cmd->HasSwitch(switches::kEnableVsyncNotification); 98 cmd->HasSwitch(switches::kEnableVsyncNotification);
101 settings.using_synchronous_renderer_compositor = 99 settings.using_synchronous_renderer_compositor =
102 widget->UsingSynchronousRendererCompositor(); 100 widget->UsingSynchronousRendererCompositor();
103 settings.per_tile_painting_enabled = 101 settings.per_tile_painting_enabled =
104 cmd->HasSwitch(cc::switches::kEnablePerTilePainting); 102 cmd->HasSwitch(cc::switches::kEnablePerTilePainting);
105 settings.accelerated_animation_enabled = 103 settings.accelerated_animation_enabled =
106 !cmd->HasSwitch(cc::switches::kDisableThreadedAnimation); 104 !cmd->HasSwitch(cc::switches::kDisableThreadedAnimation);
(...skipping 466 matching lines...) Expand 10 before | Expand all | Expand 10 after
573 return RenderThreadImpl::current()->OffscreenContextProviderForMainThread(); 571 return RenderThreadImpl::current()->OffscreenContextProviderForMainThread();
574 } 572 }
575 573
576 scoped_refptr<cc::ContextProvider> 574 scoped_refptr<cc::ContextProvider>
577 RenderWidgetCompositor::OffscreenContextProviderForCompositorThread() { 575 RenderWidgetCompositor::OffscreenContextProviderForCompositorThread() {
578 return RenderThreadImpl::current()-> 576 return RenderThreadImpl::current()->
579 OffscreenContextProviderForCompositorThread(); 577 OffscreenContextProviderForCompositorThread();
580 } 578 }
581 579
582 } // namespace content 580 } // namespace content
OLDNEW
« no previous file with comments | « content/public/common/content_switches.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698