| 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 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 171 settings.topControlsHideThreshold = hide_threshold; | 171 settings.topControlsHideThreshold = hide_threshold; |
| 172 } | 172 } |
| 173 | 173 |
| 174 settings.partialSwapEnabled = widget->AllowPartialSwap() && | 174 settings.partialSwapEnabled = widget->AllowPartialSwap() && |
| 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 #if defined(OS_CHROMEOS) |
| 182 settings.usePinchZoomScrollbars = |
| 183 !cmd->HasSwitch(cc::switches::kDisablePinchZoomScrollbars); |
| 184 #elif defined(OS_WIN) || defined(OS_LINUX) |
| 185 settings.usePinchZoomScrollbars = |
| 186 cmd->HasSwitch(cc::switches::kEnablePinchZoomScrollbars); |
| 187 #endif |
| 181 settings.initialDebugState.showFPSCounter = | 188 settings.initialDebugState.showFPSCounter = |
| 182 cmd->HasSwitch(switches::kShowFPSCounter); | 189 cmd->HasSwitch(switches::kShowFPSCounter); |
| 183 settings.initialDebugState.showPaintRects = | 190 settings.initialDebugState.showPaintRects = |
| 184 cmd->HasSwitch(switches::kShowPaintRects); | 191 cmd->HasSwitch(switches::kShowPaintRects); |
| 185 settings.initialDebugState.showDebugBorders = | 192 settings.initialDebugState.showDebugBorders = |
| 186 cmd->HasSwitch(switches::kShowCompositedLayerBorders); | 193 cmd->HasSwitch(switches::kShowCompositedLayerBorders); |
| 187 settings.initialDebugState.showPlatformLayerTree = | 194 settings.initialDebugState.showPlatformLayerTree = |
| 188 cmd->HasSwitch(switches::kShowCompositedLayerTree); | 195 cmd->HasSwitch(switches::kShowCompositedLayerTree); |
| 189 | 196 |
| 190 settings.initialDebugState.showPropertyChangedRects = | 197 settings.initialDebugState.showPropertyChangedRects = |
| (...skipping 313 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 504 return RenderThreadImpl::current()->OffscreenContextProviderForMainThread(); | 511 return RenderThreadImpl::current()->OffscreenContextProviderForMainThread(); |
| 505 } | 512 } |
| 506 | 513 |
| 507 scoped_refptr<cc::ContextProvider> | 514 scoped_refptr<cc::ContextProvider> |
| 508 RenderWidgetCompositor::OffscreenContextProviderForCompositorThread() { | 515 RenderWidgetCompositor::OffscreenContextProviderForCompositorThread() { |
| 509 return RenderThreadImpl::current()-> | 516 return RenderThreadImpl::current()-> |
| 510 OffscreenContextProviderForCompositorThread(); | 517 OffscreenContextProviderForCompositorThread(); |
| 511 } | 518 } |
| 512 | 519 |
| 513 } // namespace content | 520 } // namespace content |
| OLD | NEW |