OLD | NEW |
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 | 8 |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
124 } | 124 } |
125 | 125 |
126 settings.maxUntiledLayerSize = gfx::Size(max_untiled_layer_width, | 126 settings.maxUntiledLayerSize = gfx::Size(max_untiled_layer_width, |
127 max_untiled_layer_height); | 127 max_untiled_layer_height); |
128 | 128 |
129 settings.rightAlignedSchedulingEnabled = | 129 settings.rightAlignedSchedulingEnabled = |
130 cmd->HasSwitch(cc::switches::kEnableRightAlignedScheduling); | 130 cmd->HasSwitch(cc::switches::kEnableRightAlignedScheduling); |
131 settings.implSidePainting = cc::switches::IsImplSidePaintingEnabled(); | 131 settings.implSidePainting = cc::switches::IsImplSidePaintingEnabled(); |
132 settings.useCheapnessEstimator = | 132 settings.useCheapnessEstimator = |
133 cmd->HasSwitch(cc::switches::kUseCheapnessEstimator); | 133 cmd->HasSwitch(cc::switches::kUseCheapnessEstimator); |
| 134 settings.useColorEstimator = |
| 135 cmd->HasSwitch(cc::switches::kUseColorEstimator); |
| 136 settings.predictionBenchmarking = |
| 137 cmd->HasSwitch(cc::switches::kEnablePredictionBenchmarking); |
134 | 138 |
135 settings.calculateTopControlsPosition = | 139 settings.calculateTopControlsPosition = |
136 cmd->HasSwitch(cc::switches::kEnableTopControlsPositionCalculation); | 140 cmd->HasSwitch(cc::switches::kEnableTopControlsPositionCalculation); |
137 if (cmd->HasSwitch(cc::switches::kTopControlsHeight)) { | 141 if (cmd->HasSwitch(cc::switches::kTopControlsHeight)) { |
138 std::string controls_height_str = | 142 std::string controls_height_str = |
139 cmd->GetSwitchValueASCII(cc::switches::kTopControlsHeight); | 143 cmd->GetSwitchValueASCII(cc::switches::kTopControlsHeight); |
140 double controls_height; | 144 double controls_height; |
141 if (base::StringToDouble(controls_height_str, &controls_height) && | 145 if (base::StringToDouble(controls_height_str, &controls_height) && |
142 controls_height > 0) | 146 controls_height > 0) |
143 settings.topControlsHeight = controls_height; | 147 settings.topControlsHeight = controls_height; |
(...skipping 415 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
559 | 563 |
560 scoped_refptr<cc::ContextProvider> | 564 scoped_refptr<cc::ContextProvider> |
561 RenderWidgetCompositor::OffscreenContextProviderForCompositorThread() { | 565 RenderWidgetCompositor::OffscreenContextProviderForCompositorThread() { |
562 if (!contexts_compositor_thread_ || | 566 if (!contexts_compositor_thread_ || |
563 contexts_compositor_thread_->DestroyedOnMainThread()) | 567 contexts_compositor_thread_->DestroyedOnMainThread()) |
564 contexts_compositor_thread_ = new CompositorThreadContextProvider; | 568 contexts_compositor_thread_ = new CompositorThreadContextProvider; |
565 return contexts_compositor_thread_; | 569 return contexts_compositor_thread_; |
566 } | 570 } |
567 | 571 |
568 } // namespace content | 572 } // namespace content |
OLD | NEW |