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" |
11 #include "cc/layer.h" | 11 #include "cc/layer.h" |
12 #include "cc/layer_tree_host.h" | 12 #include "cc/layer_tree_host.h" |
13 #include "cc/switches.h" | 13 #include "cc/switches.h" |
14 #include "cc/thread.h" | 14 #include "cc/thread.h" |
| 15 #include "cc/util.h" |
15 #include "third_party/WebKit/Source/Platform/chromium/public/WebGraphicsContext3
D.h" | 16 #include "third_party/WebKit/Source/Platform/chromium/public/WebGraphicsContext3
D.h" |
16 #include "third_party/WebKit/Source/Platform/chromium/public/WebInputHandler.h" | 17 #include "third_party/WebKit/Source/Platform/chromium/public/WebInputHandler.h" |
17 #include "third_party/WebKit/Source/Platform/chromium/public/WebLayer.h" | 18 #include "third_party/WebKit/Source/Platform/chromium/public/WebLayer.h" |
18 #include "third_party/WebKit/Source/Platform/chromium/public/WebLayerTreeViewCli
ent.h" | 19 #include "third_party/WebKit/Source/Platform/chromium/public/WebLayerTreeViewCli
ent.h" |
19 #include "third_party/WebKit/Source/Platform/chromium/public/WebLayerTreeView.h" | 20 #include "third_party/WebKit/Source/Platform/chromium/public/WebLayerTreeView.h" |
20 #include "third_party/WebKit/Source/Platform/chromium/public/WebRenderingStats.h
" | 21 #include "third_party/WebKit/Source/Platform/chromium/public/WebRenderingStats.h
" |
21 #include "third_party/WebKit/Source/Platform/chromium/public/WebSize.h" | 22 #include "third_party/WebKit/Source/Platform/chromium/public/WebSize.h" |
22 #include "web_layer_impl.h" | 23 #include "web_layer_impl.h" |
23 #include "web_to_ccinput_handler_adapter.h" | 24 #include "web_to_ccinput_handler_adapter.h" |
24 #include "webkit/compositor_bindings/web_rendering_stats_impl.h" | 25 #include "webkit/compositor_bindings/web_rendering_stats_impl.h" |
(...skipping 20 matching lines...) Expand all Loading... |
45 settings.rightAlignedSchedulingEnabled = CommandLine::ForCurrentProcess()->H
asSwitch(cc::switches::kEnableRightAlignedScheduling); | 46 settings.rightAlignedSchedulingEnabled = CommandLine::ForCurrentProcess()->H
asSwitch(cc::switches::kEnableRightAlignedScheduling); |
46 settings.acceleratedAnimationEnabled = webSettings.acceleratedAnimationEnabl
ed; | 47 settings.acceleratedAnimationEnabled = webSettings.acceleratedAnimationEnabl
ed; |
47 settings.pageScalePinchZoomEnabled = webSettings.pageScalePinchZoomEnabled; | 48 settings.pageScalePinchZoomEnabled = webSettings.pageScalePinchZoomEnabled; |
48 settings.refreshRate = webSettings.refreshRate; | 49 settings.refreshRate = webSettings.refreshRate; |
49 settings.defaultTileSize = webSettings.defaultTileSize; | 50 settings.defaultTileSize = webSettings.defaultTileSize; |
50 settings.maxUntiledLayerSize = webSettings.maxUntiledLayerSize; | 51 settings.maxUntiledLayerSize = webSettings.maxUntiledLayerSize; |
51 settings.initialDebugState.showFPSCounter = webSettings.showFPSCounter; | 52 settings.initialDebugState.showFPSCounter = webSettings.showFPSCounter; |
52 settings.initialDebugState.showPaintRects = webSettings.showPaintRects; | 53 settings.initialDebugState.showPaintRects = webSettings.showPaintRects; |
53 settings.initialDebugState.showPlatformLayerTree = webSettings.showPlatformL
ayerTree; | 54 settings.initialDebugState.showPlatformLayerTree = webSettings.showPlatformL
ayerTree; |
54 settings.initialDebugState.showDebugBorders = webSettings.showDebugBorders; | 55 settings.initialDebugState.showDebugBorders = webSettings.showDebugBorders; |
55 settings.implSidePainting = CommandLine::ForCurrentProcess()->HasSwitch(cc::
switches::kEnableImplSidePainting); | 56 settings.implSidePainting = cc::IsImplSidePaintingEnabled(CommandLine::ForCu
rrentProcess()); |
56 settings.recordRenderingStats = webSettings.recordRenderingStats; | 57 settings.recordRenderingStats = webSettings.recordRenderingStats; |
57 settings.useCheapnessEstimator = CommandLine::ForCurrentProcess()->HasSwitch
(switches::kUseCheapnessEstimator); | 58 settings.useCheapnessEstimator = CommandLine::ForCurrentProcess()->HasSwitch
(switches::kUseCheapnessEstimator); |
58 | 59 |
59 settings.calculateTopControlsPosition = CommandLine::ForCurrentProcess()->Ha
sSwitch(switches::kEnableTopControlsPositionCalculation); | 60 settings.calculateTopControlsPosition = CommandLine::ForCurrentProcess()->Ha
sSwitch(switches::kEnableTopControlsPositionCalculation); |
60 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kTopControlsHeight
)) { | 61 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kTopControlsHeight
)) { |
61 std::string controls_height_str = | 62 std::string controls_height_str = |
62 CommandLine::ForCurrentProcess()->GetSwitchValueASCII(switches::kTop
ControlsHeight); | 63 CommandLine::ForCurrentProcess()->GetSwitchValueASCII(switches::kTop
ControlsHeight); |
63 double controls_height; | 64 double controls_height; |
64 if (base::StringToDouble(controls_height_str, &controls_height) && contr
ols_height > 0) | 65 if (base::StringToDouble(controls_height_str, &controls_height) && contr
ols_height > 0) |
65 settings.topControlsHeight = controls_height; | 66 settings.topControlsHeight = controls_height; |
(...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
306 { | 307 { |
307 m_client->didCompleteSwapBuffers(); | 308 m_client->didCompleteSwapBuffers(); |
308 } | 309 } |
309 | 310 |
310 void WebLayerTreeViewImpl::scheduleComposite() | 311 void WebLayerTreeViewImpl::scheduleComposite() |
311 { | 312 { |
312 m_client->scheduleComposite(); | 313 m_client->scheduleComposite(); |
313 } | 314 } |
314 | 315 |
315 } // namespace WebKit | 316 } // namespace WebKit |
OLD | NEW |