Index: cc/layer_tree_host.cc |
diff --git a/cc/layer_tree_host.cc b/cc/layer_tree_host.cc |
index 9194e1482797750bda1ec92c0045f3c5538373bc..fbd6e6ac14d03fae7346f95edaab1614b976cbaf 100644 |
--- a/cc/layer_tree_host.cc |
+++ b/cc/layer_tree_host.cc |
@@ -37,114 +37,6 @@ namespace cc { |
bool LayerTreeHost::s_needsFilterContext = false; |
-LayerTreeDebugState::LayerTreeDebugState() |
- : showFPSCounter(false) |
- , showPlatformLayerTree(false) |
- , showDebugBorders(false) |
- , showPaintRects(false) |
- , showPropertyChangedRects(false) |
- , showSurfaceDamageRects(false) |
- , showScreenSpaceRects(false) |
- , showReplicaScreenSpaceRects(false) |
- , showOccludingRects(false) |
- , showNonOccludingRects(false) |
-{ |
-} |
- |
-LayerTreeDebugState::~LayerTreeDebugState() |
-{ |
-} |
- |
-bool LayerTreeDebugState::showHudInfo() const |
-{ |
- return showFPSCounter || showPlatformLayerTree || showHudRects(); |
-} |
- |
-bool LayerTreeDebugState::showHudRects() const |
-{ |
- return showPaintRects || showPropertyChangedRects || showSurfaceDamageRects || showScreenSpaceRects || showReplicaScreenSpaceRects || showOccludingRects || showNonOccludingRects; |
-} |
- |
-bool LayerTreeDebugState::hudNeedsFont() const |
-{ |
- return showFPSCounter || showPlatformLayerTree; |
-} |
- |
-bool LayerTreeDebugState::equal(const LayerTreeDebugState& a, const LayerTreeDebugState& b) |
-{ |
- return memcmp(&a, &b, sizeof(LayerTreeDebugState)) == 0; |
-} |
- |
-LayerTreeDebugState LayerTreeDebugState::unite(const LayerTreeDebugState& a, const LayerTreeDebugState& b) |
-{ |
- LayerTreeDebugState r(a); |
- |
- r.showFPSCounter |= b.showFPSCounter; |
- r.showPlatformLayerTree |= b.showPlatformLayerTree; |
- r.showDebugBorders |= b.showDebugBorders; |
- |
- r.showPaintRects |= b.showPaintRects; |
- r.showPropertyChangedRects |= b.showPropertyChangedRects; |
- r.showSurfaceDamageRects |= b.showSurfaceDamageRects; |
- r.showScreenSpaceRects |= b.showScreenSpaceRects; |
- r.showReplicaScreenSpaceRects |= b.showReplicaScreenSpaceRects; |
- r.showOccludingRects |= b.showOccludingRects; |
- r.showNonOccludingRects |= b.showNonOccludingRects; |
- |
- return r; |
-} |
- |
-LayerTreeSettings::LayerTreeSettings() |
- : acceleratePainting(false) |
- , implSidePainting(false) |
- , renderVSyncEnabled(true) |
- , perTilePaintingEnabled(false) |
- , partialSwapEnabled(false) |
- , acceleratedAnimationEnabled(true) |
- , pageScalePinchZoomEnabled(false) |
- , backgroundColorInsteadOfCheckerboard(false) |
- , showOverdrawInTracing(false) |
- , refreshRate(0) |
- , maxPartialTextureUpdates(std::numeric_limits<size_t>::max()) |
- , numRasterThreads(1) |
- , defaultTileSize(gfx::Size(256, 256)) |
- , maxUntiledLayerSize(gfx::Size(512, 512)) |
- , minimumOcclusionTrackingSize(gfx::Size(160, 160)) |
-{ |
- // TODO(danakj): Move this to chromium when we don't go through the WebKit API anymore. |
- implSidePainting = CommandLine::ForCurrentProcess()->HasSwitch(cc::switches::kEnableImplSidePainting); |
- partialSwapEnabled = CommandLine::ForCurrentProcess()->HasSwitch(switches::kEnablePartialSwap); |
- backgroundColorInsteadOfCheckerboard = CommandLine::ForCurrentProcess()->HasSwitch(switches::kBackgroundColorInsteadOfCheckerboard); |
- showOverdrawInTracing = CommandLine::ForCurrentProcess()->HasSwitch(switches::kTraceOverdraw); |
- |
- initialDebugState.showPropertyChangedRects = CommandLine::ForCurrentProcess()->HasSwitch(cc::switches::kShowPropertyChangedRects); |
- initialDebugState.showSurfaceDamageRects = CommandLine::ForCurrentProcess()->HasSwitch(cc::switches::kShowSurfaceDamageRects); |
- initialDebugState.showScreenSpaceRects = CommandLine::ForCurrentProcess()->HasSwitch(cc::switches::kShowScreenSpaceRects); |
- initialDebugState.showReplicaScreenSpaceRects = CommandLine::ForCurrentProcess()->HasSwitch(cc::switches::kShowReplicaScreenSpaceRects); |
- initialDebugState.showOccludingRects = CommandLine::ForCurrentProcess()->HasSwitch(cc::switches::kShowOccludingRects); |
- initialDebugState.showNonOccludingRects = CommandLine::ForCurrentProcess()->HasSwitch(cc::switches::kShowNonOccludingRects); |
- |
- if (CommandLine::ForCurrentProcess()->HasSwitch( |
- switches::kNumRasterThreads)) { |
- const size_t kMaxRasterThreads = 64; |
- std::string num_raster_threads = |
- CommandLine::ForCurrentProcess()->GetSwitchValueASCII( |
- switches::kNumRasterThreads); |
- int num_threads; |
- if (base::StringToInt(num_raster_threads, &num_threads) && |
- num_threads > 0 && num_threads <= kMaxRasterThreads) { |
- numRasterThreads = num_threads; |
- } else { |
- LOG(WARNING) << "Bad number of raster threads: " << |
- num_raster_threads; |
- } |
- } |
-} |
- |
-LayerTreeSettings::~LayerTreeSettings() |
-{ |
-} |
- |
RendererCapabilities::RendererCapabilities() |
: bestTextureFormat(0) |
, usingPartialSwap(false) |