| 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 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 121 } | 121 } |
| 122 | 122 |
| 123 settings.maxUntiledLayerSize = gfx::Size(max_untiled_layer_width, | 123 settings.maxUntiledLayerSize = gfx::Size(max_untiled_layer_width, |
| 124 max_untiled_layer_height); | 124 max_untiled_layer_height); |
| 125 | 125 |
| 126 settings.rightAlignedSchedulingEnabled = | 126 settings.rightAlignedSchedulingEnabled = |
| 127 cmd->HasSwitch(cc::switches::kEnableRightAlignedScheduling); | 127 cmd->HasSwitch(cc::switches::kEnableRightAlignedScheduling); |
| 128 settings.implSidePainting = cc::switches::IsImplSidePaintingEnabled(); | 128 settings.implSidePainting = cc::switches::IsImplSidePaintingEnabled(); |
| 129 settings.useCheapnessEstimator = | 129 settings.useCheapnessEstimator = |
| 130 cmd->HasSwitch(cc::switches::kUseCheapnessEstimator); | 130 cmd->HasSwitch(cc::switches::kUseCheapnessEstimator); |
| 131 settings.useColorEstimator = |
| 132 cmd->HasSwitch(cc::switches::kUseColorEstimator); |
| 133 settings.predictionBenchmarking = |
| 134 cmd->HasSwitch(cc::switches::kEnablePredictionBenchmarking); |
| 131 | 135 |
| 132 settings.calculateTopControlsPosition = | 136 settings.calculateTopControlsPosition = |
| 133 cmd->HasSwitch(cc::switches::kEnableTopControlsPositionCalculation); | 137 cmd->HasSwitch(cc::switches::kEnableTopControlsPositionCalculation); |
| 134 if (cmd->HasSwitch(cc::switches::kTopControlsHeight)) { | 138 if (cmd->HasSwitch(cc::switches::kTopControlsHeight)) { |
| 135 std::string controls_height_str = | 139 std::string controls_height_str = |
| 136 cmd->GetSwitchValueASCII(cc::switches::kTopControlsHeight); | 140 cmd->GetSwitchValueASCII(cc::switches::kTopControlsHeight); |
| 137 double controls_height; | 141 double controls_height; |
| 138 if (base::StringToDouble(controls_height_str, &controls_height) && | 142 if (base::StringToDouble(controls_height_str, &controls_height) && |
| 139 controls_height > 0) | 143 controls_height > 0) |
| 140 settings.topControlsHeight = controls_height; | 144 settings.topControlsHeight = controls_height; |
| (...skipping 353 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 494 return RenderThreadImpl::current()->OffscreenContextProviderForMainThread(); | 498 return RenderThreadImpl::current()->OffscreenContextProviderForMainThread(); |
| 495 } | 499 } |
| 496 | 500 |
| 497 scoped_refptr<cc::ContextProvider> | 501 scoped_refptr<cc::ContextProvider> |
| 498 RenderWidgetCompositor::OffscreenContextProviderForCompositorThread() { | 502 RenderWidgetCompositor::OffscreenContextProviderForCompositorThread() { |
| 499 return RenderThreadImpl::current()-> | 503 return RenderThreadImpl::current()-> |
| 500 OffscreenContextProviderForCompositorThread(); | 504 OffscreenContextProviderForCompositorThread(); |
| 501 } | 505 } |
| 502 | 506 |
| 503 } // namespace content | 507 } // namespace content |
| OLD | NEW |