Chromium Code Reviews| 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 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 164 | 164 |
| 165 if (cmd->HasSwitch(cc::switches::kTopControlsHideThreshold)) { | 165 if (cmd->HasSwitch(cc::switches::kTopControlsHideThreshold)) { |
| 166 std::string top_threshold_str = | 166 std::string top_threshold_str = |
| 167 cmd->GetSwitchValueASCII(cc::switches::kTopControlsHideThreshold); | 167 cmd->GetSwitchValueASCII(cc::switches::kTopControlsHideThreshold); |
| 168 double hide_threshold; | 168 double hide_threshold; |
| 169 if (base::StringToDouble(top_threshold_str, &hide_threshold) && | 169 if (base::StringToDouble(top_threshold_str, &hide_threshold) && |
| 170 hide_threshold >= 0.f && hide_threshold <= 1.f) | 170 hide_threshold >= 0.f && hide_threshold <= 1.f) |
| 171 settings.topControlsHideThreshold = hide_threshold; | 171 settings.topControlsHideThreshold = hide_threshold; |
| 172 } | 172 } |
| 173 | 173 |
| 174 settings.partialSwapEnabled = | 174 settings.partialSwapEnabled = web_settings.partialSwapEnabled && |
|
jamesr
2013/03/06 19:30:28
No, please don't add more dependencies on web_sett
| |
| 175 cmd->HasSwitch(cc::switches::kEnablePartialSwap); | 175 cmd->HasSwitch(cc::switches::kEnablePartialSwap); |
| 176 settings.backgroundColorInsteadOfCheckerboard = | 176 settings.backgroundColorInsteadOfCheckerboard = |
| 177 cmd->HasSwitch(cc::switches::kBackgroundColorInsteadOfCheckerboard); | 177 cmd->HasSwitch(cc::switches::kBackgroundColorInsteadOfCheckerboard); |
| 178 settings.showOverdrawInTracing = | 178 settings.showOverdrawInTracing = |
| 179 cmd->HasSwitch(cc::switches::kTraceOverdraw); | 179 cmd->HasSwitch(cc::switches::kTraceOverdraw); |
| 180 | 180 |
| 181 settings.initialDebugState.showFPSCounter = | 181 settings.initialDebugState.showFPSCounter = |
| 182 cmd->HasSwitch(switches::kShowFPSCounter); | 182 cmd->HasSwitch(switches::kShowFPSCounter); |
| 183 settings.initialDebugState.showPaintRects = | 183 settings.initialDebugState.showPaintRects = |
| 184 cmd->HasSwitch(switches::kShowPaintRects); | 184 cmd->HasSwitch(switches::kShowPaintRects); |
| (...skipping 374 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 559 | 559 |
| 560 scoped_refptr<cc::ContextProvider> | 560 scoped_refptr<cc::ContextProvider> |
| 561 RenderWidgetCompositor::OffscreenContextProviderForCompositorThread() { | 561 RenderWidgetCompositor::OffscreenContextProviderForCompositorThread() { |
| 562 if (!contexts_compositor_thread_ || | 562 if (!contexts_compositor_thread_ || |
| 563 contexts_compositor_thread_->DestroyedOnMainThread()) | 563 contexts_compositor_thread_->DestroyedOnMainThread()) |
| 564 contexts_compositor_thread_ = new CompositorThreadContextProvider; | 564 contexts_compositor_thread_ = new CompositorThreadContextProvider; |
| 565 return contexts_compositor_thread_; | 565 return contexts_compositor_thread_; |
| 566 } | 566 } |
| 567 | 567 |
| 568 } // namespace content | 568 } // namespace content |
| OLD | NEW |