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

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

Issue 18370002: cc: Made use color estimator a const instead of a flag. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix cc_perftests compile error Created 7 years, 5 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
« no previous file with comments | « content/browser/renderer_host/render_process_host_impl.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 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 if (cmd->HasSwitch(switches::kMaxUntiledLayerHeight)) { 132 if (cmd->HasSwitch(switches::kMaxUntiledLayerHeight)) {
133 GetSwitchValueAsInt(*cmd, switches::kMaxUntiledLayerHeight, 1, 133 GetSwitchValueAsInt(*cmd, switches::kMaxUntiledLayerHeight, 1,
134 std::numeric_limits<int>::max(), 134 std::numeric_limits<int>::max(),
135 &max_untiled_layer_height); 135 &max_untiled_layer_height);
136 } 136 }
137 137
138 settings.max_untiled_layer_size = gfx::Size(max_untiled_layer_width, 138 settings.max_untiled_layer_size = gfx::Size(max_untiled_layer_width,
139 max_untiled_layer_height); 139 max_untiled_layer_height);
140 140
141 settings.impl_side_painting = cc::switches::IsImplSidePaintingEnabled(); 141 settings.impl_side_painting = cc::switches::IsImplSidePaintingEnabled();
142 settings.use_color_estimator =
143 !cmd->HasSwitch(cc::switches::kDisableColorEstimator);
144 142
145 settings.calculate_top_controls_position = 143 settings.calculate_top_controls_position =
146 cmd->HasSwitch(cc::switches::kEnableTopControlsPositionCalculation); 144 cmd->HasSwitch(cc::switches::kEnableTopControlsPositionCalculation);
147 if (cmd->HasSwitch(cc::switches::kTopControlsHeight)) { 145 if (cmd->HasSwitch(cc::switches::kTopControlsHeight)) {
148 std::string controls_height_str = 146 std::string controls_height_str =
149 cmd->GetSwitchValueASCII(cc::switches::kTopControlsHeight); 147 cmd->GetSwitchValueASCII(cc::switches::kTopControlsHeight);
150 double controls_height; 148 double controls_height;
151 if (base::StringToDouble(controls_height_str, &controls_height) && 149 if (base::StringToDouble(controls_height_str, &controls_height) &&
152 controls_height > 0) 150 controls_height > 0)
153 settings.top_controls_height = controls_height; 151 settings.top_controls_height = controls_height;
(...skipping 405 matching lines...) Expand 10 before | Expand all | Expand 10 after
559 return RenderThreadImpl::current()->OffscreenContextProviderForMainThread(); 557 return RenderThreadImpl::current()->OffscreenContextProviderForMainThread();
560 } 558 }
561 559
562 scoped_refptr<cc::ContextProvider> 560 scoped_refptr<cc::ContextProvider>
563 RenderWidgetCompositor::OffscreenContextProviderForCompositorThread() { 561 RenderWidgetCompositor::OffscreenContextProviderForCompositorThread() {
564 return RenderThreadImpl::current()-> 562 return RenderThreadImpl::current()->
565 OffscreenContextProviderForCompositorThread(); 563 OffscreenContextProviderForCompositorThread();
566 } 564 }
567 565
568 } // namespace content 566 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/renderer_host/render_process_host_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698