| 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 691 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 702 { | 702 { |
| 703 return m_proxy->hasImplThread(); | 703 return m_proxy->hasImplThread(); |
| 704 } | 704 } |
| 705 | 705 |
| 706 void LayerTreeHostImpl::ScheduleManageTiles() | 706 void LayerTreeHostImpl::ScheduleManageTiles() |
| 707 { | 707 { |
| 708 if (m_client) | 708 if (m_client) |
| 709 m_client->setNeedsManageTilesOnImplThread(); | 709 m_client->setNeedsManageTilesOnImplThread(); |
| 710 } | 710 } |
| 711 | 711 |
| 712 void LayerTreeHostImpl::ScheduleCheckForCompletedRasterTasks() |
| 713 { |
| 714 if (m_client) |
| 715 m_client->setNeedsCheckForCompletedRasterTasksOnImplThread(); |
| 716 } |
| 717 |
| 712 void LayerTreeHostImpl::DidUploadVisibleHighResolutionTile() | 718 void LayerTreeHostImpl::DidUploadVisibleHighResolutionTile() |
| 713 { | 719 { |
| 714 if (m_client) | 720 if (m_client) |
| 715 m_client->didUploadVisibleHighResolutionTileOnImplThread(); | 721 m_client->didUploadVisibleHighResolutionTileOnImplThread(); |
| 716 } | 722 } |
| 717 | 723 |
| 718 bool LayerTreeHostImpl::shouldClearRootRenderPass() const | 724 bool LayerTreeHostImpl::shouldClearRootRenderPass() const |
| 719 { | 725 { |
| 720 return m_settings.shouldClearRootRenderPass; | 726 return m_settings.shouldClearRootRenderPass; |
| 721 } | 727 } |
| (...skipping 966 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1688 m_currentFrameTime = base::TimeTicks(); | 1694 m_currentFrameTime = base::TimeTicks(); |
| 1689 } | 1695 } |
| 1690 | 1696 |
| 1691 base::TimeTicks LayerTreeHostImpl::currentFrameTime() | 1697 base::TimeTicks LayerTreeHostImpl::currentFrameTime() |
| 1692 { | 1698 { |
| 1693 if (m_currentFrameTime.is_null()) | 1699 if (m_currentFrameTime.is_null()) |
| 1694 m_currentFrameTime = base::TimeTicks::Now(); | 1700 m_currentFrameTime = base::TimeTicks::Now(); |
| 1695 return m_currentFrameTime; | 1701 return m_currentFrameTime; |
| 1696 } | 1702 } |
| 1697 | 1703 |
| 1704 void LayerTreeHostImpl::checkForCompletedRasterTasks() |
| 1705 { |
| 1706 if (!m_tileManager) |
| 1707 return; |
| 1708 |
| 1709 m_tileManager->CheckForCompletedRasterTasks(); |
| 1710 } |
| 1711 |
| 1698 // static | 1712 // static |
| 1699 LayerImpl* LayerTreeHostImpl::getNonCompositedContentLayerRecursive(LayerImpl* l
ayer) | 1713 LayerImpl* LayerTreeHostImpl::getNonCompositedContentLayerRecursive(LayerImpl* l
ayer) |
| 1700 { | 1714 { |
| 1701 if (!layer) | 1715 if (!layer) |
| 1702 return NULL; | 1716 return NULL; |
| 1703 | 1717 |
| 1704 if (layer->drawsContent()) | 1718 if (layer->drawsContent()) |
| 1705 return layer; | 1719 return layer; |
| 1706 | 1720 |
| 1707 for (LayerImpl::LayerList::const_iterator it = layer->children().begin(); | 1721 for (LayerImpl::LayerList::const_iterator it = layer->children().begin(); |
| (...skipping 20 matching lines...) Expand all Loading... |
| 1728 if (m_tileManager) | 1742 if (m_tileManager) |
| 1729 m_tileManager->SetRecordRenderingStats(m_debugState.recordRenderingStats
()); | 1743 m_tileManager->SetRecordRenderingStats(m_debugState.recordRenderingStats
()); |
| 1730 } | 1744 } |
| 1731 | 1745 |
| 1732 void LayerTreeHostImpl::savePaintTime(const base::TimeDelta& totalPaintTime) | 1746 void LayerTreeHostImpl::savePaintTime(const base::TimeDelta& totalPaintTime) |
| 1733 { | 1747 { |
| 1734 m_paintTimeCounter->SavePaintTime(totalPaintTime); | 1748 m_paintTimeCounter->SavePaintTime(totalPaintTime); |
| 1735 } | 1749 } |
| 1736 | 1750 |
| 1737 } // namespace cc | 1751 } // namespace cc |
| OLD | NEW |