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