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 964 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
975 | 975 |
976 activatePendingTree(); | 976 activatePendingTree(); |
977 } | 977 } |
978 | 978 |
979 void LayerTreeHostImpl::activatePendingTree() | 979 void LayerTreeHostImpl::activatePendingTree() |
980 { | 980 { |
981 CHECK(m_pendingTree); | 981 CHECK(m_pendingTree); |
982 TRACE_EVENT_ASYNC_END0("cc", "PendingTree", m_pendingTree.get()); | 982 TRACE_EVENT_ASYNC_END0("cc", "PendingTree", m_pendingTree.get()); |
983 | 983 |
984 m_activeTree->PushPersistedState(m_pendingTree.get()); | 984 m_activeTree->PushPersistedState(m_pendingTree.get()); |
985 m_activeTree->SetRootLayer(TreeSynchronizer::synchronizeTrees(m_pendingTree-
>RootLayer(), m_activeTree->DetachLayerTree(), m_activeTree.get())); | 985 if (m_pendingTree->needs_full_tree_sync()) |
| 986 m_activeTree->SetRootLayer(TreeSynchronizer::synchronizeTrees(m_pendingT
ree->RootLayer(), m_activeTree->DetachLayerTree(), m_activeTree.get())); |
986 TreeSynchronizer::pushProperties(m_pendingTree->RootLayer(), m_activeTree->R
ootLayer()); | 987 TreeSynchronizer::pushProperties(m_pendingTree->RootLayer(), m_activeTree->R
ootLayer()); |
987 DCHECK(!m_recycleTree); | 988 DCHECK(!m_recycleTree); |
988 | 989 |
989 m_pendingTree->pushPropertiesTo(m_activeTree.get()); | 990 m_pendingTree->pushPropertiesTo(m_activeTree.get()); |
990 | 991 |
991 // Now that we've synced everything from the pending tree to the active | 992 // Now that we've synced everything from the pending tree to the active |
992 // tree, rename the pending tree the recycle tree so we can reuse it on the | 993 // tree, rename the pending tree the recycle tree so we can reuse it on the |
993 // next sync. | 994 // next sync. |
994 m_pendingTree.swap(m_recycleTree); | 995 m_pendingTree.swap(m_recycleTree); |
995 m_recycleTree->ClearRenderSurfaces(); | 996 m_recycleTree->ClearRenderSurfaces(); |
(...skipping 698 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1694 LayerImpl* layer = getNonCompositedContentLayerRecursive(tree->RootLayer()); | 1695 LayerImpl* layer = getNonCompositedContentLayerRecursive(tree->RootLayer()); |
1695 return layer ? layer->getPicture() : skia::RefPtr<SkPicture>(); | 1696 return layer ? layer->getPicture() : skia::RefPtr<SkPicture>(); |
1696 } | 1697 } |
1697 | 1698 |
1698 void LayerTreeHostImpl::savePaintTime(const base::TimeDelta& totalPaintTime) | 1699 void LayerTreeHostImpl::savePaintTime(const base::TimeDelta& totalPaintTime) |
1699 { | 1700 { |
1700 m_paintTimeCounter->SavePaintTime(totalPaintTime); | 1701 m_paintTimeCounter->SavePaintTime(totalPaintTime); |
1701 } | 1702 } |
1702 | 1703 |
1703 } // namespace cc | 1704 } // namespace cc |
OLD | NEW |