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 "cc/layer_tree_settings.h" | 5 #include "cc/layer_tree_settings.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" |
11 #include "base/string_number_conversions.h" | 11 #include "base/string_number_conversions.h" |
12 #include "cc/switches.h" | 12 #include "cc/switches.h" |
13 | 13 |
14 namespace cc { | 14 namespace cc { |
15 | 15 |
16 LayerTreeSettings::LayerTreeSettings() | 16 LayerTreeSettings::LayerTreeSettings() |
17 : acceleratePainting(false) | 17 : acceleratePainting(false) |
| 18 , compositorFrameMessage(false) |
18 , implSidePainting(false) | 19 , implSidePainting(false) |
19 , renderVSyncEnabled(true) | 20 , renderVSyncEnabled(true) |
20 , perTilePaintingEnabled(false) | 21 , perTilePaintingEnabled(false) |
21 , partialSwapEnabled(false) | 22 , partialSwapEnabled(false) |
22 , acceleratedAnimationEnabled(true) | 23 , acceleratedAnimationEnabled(true) |
23 , pageScalePinchZoomEnabled(false) | 24 , pageScalePinchZoomEnabled(false) |
24 , backgroundColorInsteadOfCheckerboard(false) | 25 , backgroundColorInsteadOfCheckerboard(false) |
25 , showOverdrawInTracing(false) | 26 , showOverdrawInTracing(false) |
26 , canUseLCDText(true) | 27 , canUseLCDText(true) |
27 , shouldClearRootRenderPass(true) | 28 , shouldClearRootRenderPass(true) |
28 , refreshRate(0) | 29 , refreshRate(0) |
29 , maxPartialTextureUpdates(std::numeric_limits<size_t>::max()) | 30 , maxPartialTextureUpdates(std::numeric_limits<size_t>::max()) |
30 , numRasterThreads(1) | 31 , numRasterThreads(1) |
31 , defaultTileSize(gfx::Size(256, 256)) | 32 , defaultTileSize(gfx::Size(256, 256)) |
32 , maxUntiledLayerSize(gfx::Size(512, 512)) | 33 , maxUntiledLayerSize(gfx::Size(512, 512)) |
33 , minimumOcclusionTrackingSize(gfx::Size(160, 160)) | 34 , minimumOcclusionTrackingSize(gfx::Size(160, 160)) |
34 { | 35 { |
35 // TODO(danakj): Move this to chromium when we don't go through the WebKit A
PI anymore. | 36 // TODO(danakj): Move this to chromium when we don't go through the WebKit A
PI anymore. |
| 37 compositorFrameMessage = CommandLine::ForCurrentProcess()->HasSwitch(cc::swi
tches::kEnableCompositorFrameMessage); |
36 implSidePainting = CommandLine::ForCurrentProcess()->HasSwitch(cc::switches:
:kEnableImplSidePainting); | 38 implSidePainting = CommandLine::ForCurrentProcess()->HasSwitch(cc::switches:
:kEnableImplSidePainting); |
37 partialSwapEnabled = CommandLine::ForCurrentProcess()->HasSwitch(switches::k
EnablePartialSwap); | 39 partialSwapEnabled = CommandLine::ForCurrentProcess()->HasSwitch(switches::k
EnablePartialSwap); |
38 backgroundColorInsteadOfCheckerboard = CommandLine::ForCurrentProcess()->Has
Switch(switches::kBackgroundColorInsteadOfCheckerboard); | 40 backgroundColorInsteadOfCheckerboard = CommandLine::ForCurrentProcess()->Has
Switch(switches::kBackgroundColorInsteadOfCheckerboard); |
39 showOverdrawInTracing = CommandLine::ForCurrentProcess()->HasSwitch(switches
::kTraceOverdraw); | 41 showOverdrawInTracing = CommandLine::ForCurrentProcess()->HasSwitch(switches
::kTraceOverdraw); |
40 | 42 |
41 // TODO(alokp): Remove this hard-coded setting. | 43 // TODO(alokp): Remove this hard-coded setting. |
42 // Platforms that need to disable LCD text must explicitly set this value. | 44 // Platforms that need to disable LCD text must explicitly set this value. |
43 #if defined(OS_ANDROID) | 45 #if defined(OS_ANDROID) |
44 canUseLCDText = false; | 46 canUseLCDText = false; |
45 #endif | 47 #endif |
(...skipping 20 matching lines...) Expand all Loading... |
66 num_raster_threads; | 68 num_raster_threads; |
67 } | 69 } |
68 } | 70 } |
69 } | 71 } |
70 | 72 |
71 LayerTreeSettings::~LayerTreeSettings() | 73 LayerTreeSettings::~LayerTreeSettings() |
72 { | 74 { |
73 } | 75 } |
74 | 76 |
75 } // namespace cc | 77 } // namespace cc |
OLD | NEW |