Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(275)

Side by Side Diff: cc/layer_tree_host_impl.cc

Issue 12094094: cc: Don't do full tree sync unless needed with impl painting. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« cc/layer_tree_host.cc ('K') | « cc/layer_tree_host_impl.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 962 matching lines...) Expand 10 before | Expand all | Expand 10 after
973 973
974 activatePendingTree(); 974 activatePendingTree();
975 } 975 }
976 976
977 void LayerTreeHostImpl::activatePendingTree() 977 void LayerTreeHostImpl::activatePendingTree()
978 { 978 {
979 CHECK(m_pendingTree); 979 CHECK(m_pendingTree);
980 TRACE_EVENT_ASYNC_END0("cc", "PendingTree", m_pendingTree.get()); 980 TRACE_EVENT_ASYNC_END0("cc", "PendingTree", m_pendingTree.get());
981 981
982 m_activeTree->PushPersistedState(m_pendingTree.get()); 982 m_activeTree->PushPersistedState(m_pendingTree.get());
983 m_activeTree->SetRootLayer(TreeSynchronizer::synchronizeTrees(m_pendingTree- >RootLayer(), m_activeTree->DetachLayerTree(), m_activeTree.get())); 983 if (m_needsFullTreeSync)
984 m_activeTree->SetRootLayer(TreeSynchronizer::synchronizeTrees(m_pendingT ree->RootLayer(), m_activeTree->DetachLayerTree(), m_activeTree.get()));
984 TreeSynchronizer::pushProperties(m_pendingTree->RootLayer(), m_activeTree->R ootLayer()); 985 TreeSynchronizer::pushProperties(m_pendingTree->RootLayer(), m_activeTree->R ootLayer());
985 DCHECK(!m_recycleTree); 986 DCHECK(!m_recycleTree);
986 987
987 m_pendingTree->pushPropertiesTo(m_activeTree.get()); 988 m_pendingTree->pushPropertiesTo(m_activeTree.get());
988 989
989 // Now that we've synced everything from the pending tree to the active 990 // Now that we've synced everything from the pending tree to the active
990 // tree, rename the pending tree the recycle tree so we can reuse it on the 991 // tree, rename the pending tree the recycle tree so we can reuse it on the
991 // next sync. 992 // next sync.
992 m_pendingTree.swap(m_recycleTree); 993 m_pendingTree.swap(m_recycleTree);
993 m_recycleTree->ClearRenderSurfaces(); 994 m_recycleTree->ClearRenderSurfaces();
(...skipping 687 matching lines...) Expand 10 before | Expand all | Expand 10 after
1681 LayerImpl* layer = getNonCompositedContentLayerRecursive(tree->RootLayer()); 1682 LayerImpl* layer = getNonCompositedContentLayerRecursive(tree->RootLayer());
1682 return layer ? layer->getPicture() : skia::RefPtr<SkPicture>(); 1683 return layer ? layer->getPicture() : skia::RefPtr<SkPicture>();
1683 } 1684 }
1684 1685
1685 void LayerTreeHostImpl::savePaintTime(const base::TimeDelta& totalPaintTime) 1686 void LayerTreeHostImpl::savePaintTime(const base::TimeDelta& totalPaintTime)
1686 { 1687 {
1687 m_paintTimeCounter->SavePaintTime(totalPaintTime); 1688 m_paintTimeCounter->SavePaintTime(totalPaintTime);
1688 } 1689 }
1689 1690
1690 } // namespace cc 1691 } // namespace cc
OLDNEW
« cc/layer_tree_host.cc ('K') | « cc/layer_tree_host_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698