| 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_host.h" | 5 #include "cc/layer_tree_host.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/debug/trace_event.h" | 8 #include "base/debug/trace_event.h" |
| 9 #include "base/message_loop.h" | 9 #include "base/message_loop.h" |
| 10 #include "cc/font_atlas.h" | 10 #include "cc/font_atlas.h" |
| (...skipping 27 matching lines...) Expand all Loading... |
| 38 | 38 |
| 39 LayerTreeSettings::LayerTreeSettings() | 39 LayerTreeSettings::LayerTreeSettings() |
| 40 : acceleratePainting(false) | 40 : acceleratePainting(false) |
| 41 , showPlatformLayerTree(false) | 41 , showPlatformLayerTree(false) |
| 42 , showPaintRects(false) | 42 , showPaintRects(false) |
| 43 , showPropertyChangedRects(false) | 43 , showPropertyChangedRects(false) |
| 44 , showSurfaceDamageRects(false) | 44 , showSurfaceDamageRects(false) |
| 45 , showScreenSpaceRects(false) | 45 , showScreenSpaceRects(false) |
| 46 , showReplicaScreenSpaceRects(false) | 46 , showReplicaScreenSpaceRects(false) |
| 47 , showOccludingRects(false) | 47 , showOccludingRects(false) |
| 48 , showNonOccludingRects(false) |
| 48 , renderVSyncEnabled(true) | 49 , renderVSyncEnabled(true) |
| 49 , perTilePaintingEnabled(false) | 50 , perTilePaintingEnabled(false) |
| 50 , partialSwapEnabled(false) | 51 , partialSwapEnabled(false) |
| 51 , acceleratedAnimationEnabled(true) | 52 , acceleratedAnimationEnabled(true) |
| 52 , pageScalePinchZoomEnabled(false) | 53 , pageScalePinchZoomEnabled(false) |
| 53 , backgroundColorInsteadOfCheckerboard(false) | 54 , backgroundColorInsteadOfCheckerboard(false) |
| 54 , showOverdrawInTracing(false) | 55 , showOverdrawInTracing(false) |
| 55 , refreshRate(0) | 56 , refreshRate(0) |
| 56 , maxPartialTextureUpdates(std::numeric_limits<size_t>::max()) | 57 , maxPartialTextureUpdates(std::numeric_limits<size_t>::max()) |
| 57 , defaultTileSize(gfx::Size(256, 256)) | 58 , defaultTileSize(gfx::Size(256, 256)) |
| 58 , maxUntiledLayerSize(gfx::Size(512, 512)) | 59 , maxUntiledLayerSize(gfx::Size(512, 512)) |
| 59 , minimumOcclusionTrackingSize(gfx::Size(160, 160)) | 60 , minimumOcclusionTrackingSize(gfx::Size(160, 160)) |
| 60 { | 61 { |
| 61 // TODO(danakj): Move this to chromium when we don't go through the WebKit A
PI anymore. | 62 // TODO(danakj): Move this to chromium when we don't go through the WebKit A
PI anymore. |
| 62 showPropertyChangedRects = CommandLine::ForCurrentProcess()->HasSwitch(cc::s
witches::kShowPropertyChangedRects); | 63 showPropertyChangedRects = CommandLine::ForCurrentProcess()->HasSwitch(cc::s
witches::kShowPropertyChangedRects); |
| 63 showSurfaceDamageRects = CommandLine::ForCurrentProcess()->HasSwitch(cc::swi
tches::kShowSurfaceDamageRects); | 64 showSurfaceDamageRects = CommandLine::ForCurrentProcess()->HasSwitch(cc::swi
tches::kShowSurfaceDamageRects); |
| 64 showScreenSpaceRects = CommandLine::ForCurrentProcess()->HasSwitch(cc::switc
hes::kShowScreenSpaceRects); | 65 showScreenSpaceRects = CommandLine::ForCurrentProcess()->HasSwitch(cc::switc
hes::kShowScreenSpaceRects); |
| 65 showReplicaScreenSpaceRects = CommandLine::ForCurrentProcess()->HasSwitch(cc
::switches::kShowReplicaScreenSpaceRects); | 66 showReplicaScreenSpaceRects = CommandLine::ForCurrentProcess()->HasSwitch(cc
::switches::kShowReplicaScreenSpaceRects); |
| 66 showOccludingRects = CommandLine::ForCurrentProcess()->HasSwitch(cc::switche
s::kShowOccludingRects); | 67 showOccludingRects = CommandLine::ForCurrentProcess()->HasSwitch(cc::switche
s::kShowOccludingRects); |
| 68 showNonOccludingRects = CommandLine::ForCurrentProcess()->HasSwitch(cc::swit
ches::kShowNonOccludingRects); |
| 67 partialSwapEnabled = CommandLine::ForCurrentProcess()->HasSwitch(switches::k
EnablePartialSwap); | 69 partialSwapEnabled = CommandLine::ForCurrentProcess()->HasSwitch(switches::k
EnablePartialSwap); |
| 68 backgroundColorInsteadOfCheckerboard = CommandLine::ForCurrentProcess()->Has
Switch(switches::kBackgroundColorInsteadOfCheckerboard); | 70 backgroundColorInsteadOfCheckerboard = CommandLine::ForCurrentProcess()->Has
Switch(switches::kBackgroundColorInsteadOfCheckerboard); |
| 69 showOverdrawInTracing = CommandLine::ForCurrentProcess()->HasSwitch(switches
::kTraceOverdraw); | 71 showOverdrawInTracing = CommandLine::ForCurrentProcess()->HasSwitch(switches
::kTraceOverdraw); |
| 70 } | 72 } |
| 71 | 73 |
| 72 LayerTreeSettings::~LayerTreeSettings() | 74 LayerTreeSettings::~LayerTreeSettings() |
| 73 { | 75 { |
| 74 } | 76 } |
| 75 | 77 |
| 76 RendererCapabilities::RendererCapabilities() | 78 RendererCapabilities::RendererCapabilities() |
| (...skipping 775 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 852 else | 854 else |
| 853 layer->notifyAnimationFinished(wallClockTime.ToDoubleT()); | 855 layer->notifyAnimationFinished(wallClockTime.ToDoubleT()); |
| 854 } | 856 } |
| 855 } | 857 } |
| 856 | 858 |
| 857 for (size_t childIndex = 0; childIndex < layer->children().size(); ++childIn
dex) | 859 for (size_t childIndex = 0; childIndex < layer->children().size(); ++childIn
dex) |
| 858 setAnimationEventsRecursive(events, layer->children()[childIndex].get(),
wallClockTime); | 860 setAnimationEventsRecursive(events, layer->children()[childIndex].get(),
wallClockTime); |
| 859 } | 861 } |
| 860 | 862 |
| 861 } // namespace cc | 863 } // namespace cc |
| OLD | NEW |