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_impl.h" | 5 #include "cc/layer_tree_host_impl.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
10 #include "base/debug/trace_event.h" | 10 #include "base/debug/trace_event.h" |
(...skipping 1674 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1685 void LayerTreeHostImpl::renderingStats(RenderingStats* stats) const | 1685 void LayerTreeHostImpl::renderingStats(RenderingStats* stats) const |
1686 { | 1686 { |
1687 stats->numFramesSentToScreen = fpsCounter()->currentFrameNumber(); | 1687 stats->numFramesSentToScreen = fpsCounter()->currentFrameNumber(); |
1688 stats->droppedFrameCount = fpsCounter()->droppedFrameCount(); | 1688 stats->droppedFrameCount = fpsCounter()->droppedFrameCount(); |
1689 stats->numImplThreadScrolls = m_numImplThreadScrolls; | 1689 stats->numImplThreadScrolls = m_numImplThreadScrolls; |
1690 stats->numMainThreadScrolls = m_numMainThreadScrolls; | 1690 stats->numMainThreadScrolls = m_numMainThreadScrolls; |
1691 stats->numLayersDrawn = m_cumulativeNumLayersDrawn; | 1691 stats->numLayersDrawn = m_cumulativeNumLayersDrawn; |
1692 stats->numMissingTiles = m_cumulativeNumMissingTiles; | 1692 stats->numMissingTiles = m_cumulativeNumMissingTiles; |
1693 | 1693 |
1694 if (m_tileManager) | 1694 if (m_tileManager) |
1695 m_tileManager->renderingStats(stats); | 1695 m_tileManager->GetRenderingStats(stats); |
1696 } | 1696 } |
1697 | 1697 |
1698 void LayerTreeHostImpl::sendManagedMemoryStats( | 1698 void LayerTreeHostImpl::sendManagedMemoryStats( |
1699 size_t memoryVisibleBytes, | 1699 size_t memoryVisibleBytes, |
1700 size_t memoryVisibleAndNearbyBytes, | 1700 size_t memoryVisibleAndNearbyBytes, |
1701 size_t memoryUseBytes) | 1701 size_t memoryUseBytes) |
1702 { | 1702 { |
1703 if (!renderer()) | 1703 if (!renderer()) |
1704 return; | 1704 return; |
1705 | 1705 |
(...skipping 30 matching lines...) Expand all Loading... |
1736 ScrollbarAnimationController* scrollbarController = layer->scrollbarAnimatio
nController(); | 1736 ScrollbarAnimationController* scrollbarController = layer->scrollbarAnimatio
nController(); |
1737 double monotonicTime = (time - base::TimeTicks()).InSecondsF(); | 1737 double monotonicTime = (time - base::TimeTicks()).InSecondsF(); |
1738 if (scrollbarController && scrollbarController->animate(monotonicTime)) | 1738 if (scrollbarController && scrollbarController->animate(monotonicTime)) |
1739 m_client->setNeedsRedrawOnImplThread(); | 1739 m_client->setNeedsRedrawOnImplThread(); |
1740 | 1740 |
1741 for (size_t i = 0; i < layer->children().size(); ++i) | 1741 for (size_t i = 0; i < layer->children().size(); ++i) |
1742 animateScrollbarsRecursive(layer->children()[i], time); | 1742 animateScrollbarsRecursive(layer->children()[i], time); |
1743 } | 1743 } |
1744 | 1744 |
1745 } // namespace cc | 1745 } // namespace cc |
OLD | NEW |