Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2011 The Chromium Authors. All rights reserved. | 1 // Copyright 2011 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 "web_layer_tree_view_impl.h" | 5 #include "web_layer_tree_view_impl.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/string_number_conversions.h" | 8 #include "base/string_number_conversions.h" |
| 9 #include "cc/font_atlas.h" | 9 #include "cc/font_atlas.h" |
| 10 #include "cc/input_handler.h" | 10 #include "cc/input_handler.h" |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 46 settings.acceleratedAnimationEnabled = webSettings.acceleratedAnimationEnabl ed; | 46 settings.acceleratedAnimationEnabled = webSettings.acceleratedAnimationEnabl ed; |
| 47 settings.pageScalePinchZoomEnabled = webSettings.pageScalePinchZoomEnabled; | 47 settings.pageScalePinchZoomEnabled = webSettings.pageScalePinchZoomEnabled; |
| 48 settings.refreshRate = webSettings.refreshRate; | 48 settings.refreshRate = webSettings.refreshRate; |
| 49 settings.defaultTileSize = webSettings.defaultTileSize; | 49 settings.defaultTileSize = webSettings.defaultTileSize; |
| 50 settings.maxUntiledLayerSize = webSettings.maxUntiledLayerSize; | 50 settings.maxUntiledLayerSize = webSettings.maxUntiledLayerSize; |
| 51 settings.initialDebugState.showFPSCounter = webSettings.showFPSCounter; | 51 settings.initialDebugState.showFPSCounter = webSettings.showFPSCounter; |
| 52 settings.initialDebugState.showPaintRects = webSettings.showPaintRects; | 52 settings.initialDebugState.showPaintRects = webSettings.showPaintRects; |
| 53 settings.initialDebugState.showPlatformLayerTree = webSettings.showPlatformL ayerTree; | 53 settings.initialDebugState.showPlatformLayerTree = webSettings.showPlatformL ayerTree; |
| 54 settings.initialDebugState.showDebugBorders = webSettings.showDebugBorders; | 54 settings.initialDebugState.showDebugBorders = webSettings.showDebugBorders; |
| 55 settings.implSidePainting = CommandLine::ForCurrentProcess()->HasSwitch(cc:: switches::kEnableImplSidePainting); | 55 settings.implSidePainting = CommandLine::ForCurrentProcess()->HasSwitch(cc:: switches::kEnableImplSidePainting); |
| 56 settings.recordRenderingStats = webSettings.recordRenderingStats; | |
|
jamesr
2013/01/30 19:13:27
this code can see command line switches - why can'
danakj
2013/01/30 19:15:09
Hm, ya I can move it from content/ to cc/. That do
| |
| 56 | 57 |
| 57 settings.calculateTopControlsPosition = CommandLine::ForCurrentProcess()->Ha sSwitch(switches::kEnableTopControlsPositionCalculation); | 58 settings.calculateTopControlsPosition = CommandLine::ForCurrentProcess()->Ha sSwitch(switches::kEnableTopControlsPositionCalculation); |
| 58 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kTopControlsHeight )) { | 59 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kTopControlsHeight )) { |
| 59 std::string controls_height_str = | 60 std::string controls_height_str = |
| 60 CommandLine::ForCurrentProcess()->GetSwitchValueASCII(switches::kTop ControlsHeight); | 61 CommandLine::ForCurrentProcess()->GetSwitchValueASCII(switches::kTop ControlsHeight); |
| 61 int controls_height; | 62 int controls_height; |
| 62 if (base::StringToInt(controls_height_str, &controls_height) && controls _height > 0) | 63 if (base::StringToInt(controls_height_str, &controls_height) && controls _height > 0) |
| 63 settings.topControlsHeightPx = controls_height; | 64 settings.topControlsHeightPx = controls_height; |
| 64 } | 65 } |
| 65 if (settings.calculateTopControlsPosition && (settings.topControlsHeightPx < = 0 || !settings.compositorFrameMessage)) { | 66 if (settings.calculateTopControlsPosition && (settings.topControlsHeightPx < = 0 || !settings.compositorFrameMessage)) { |
| (...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 304 { | 305 { |
| 305 m_client->didCompleteSwapBuffers(); | 306 m_client->didCompleteSwapBuffers(); |
| 306 } | 307 } |
| 307 | 308 |
| 308 void WebLayerTreeViewImpl::scheduleComposite() | 309 void WebLayerTreeViewImpl::scheduleComposite() |
| 309 { | 310 { |
| 310 m_client->scheduleComposite(); | 311 m_client->scheduleComposite(); |
| 311 } | 312 } |
| 312 | 313 |
| 313 } // namespace WebKit | 314 } // namespace WebKit |
| OLD | NEW |