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

Side by Side Diff: cc/tree_synchronizer.cc

Issue 11316297: Only do full tree sync if tree is actually changed, otherwise just push properties (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: extra newline Created 8 years 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/scrollbar_layer.cc ('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/tree_synchronizer.h" 5 #include "cc/tree_synchronizer.h"
6 6
7 #include "base/debug/trace_event.h"
7 #include "cc/layer.h" 8 #include "cc/layer.h"
8 #include "cc/layer_impl.h" 9 #include "cc/layer_impl.h"
9 #include "cc/scrollbar_animation_controller.h" 10 #include "cc/scrollbar_animation_controller.h"
10 #include "cc/scrollbar_layer.h" 11 #include "cc/scrollbar_layer.h"
11 #include "cc/scrollbar_layer_impl.h" 12 #include "cc/scrollbar_layer_impl.h"
12 13
13 namespace cc { 14 namespace cc {
14 15
15 scoped_ptr<LayerImpl> TreeSynchronizer::synchronizeTrees(Layer* layerRoot, scope d_ptr<LayerImpl> oldLayerImplRoot, LayerTreeHostImpl* hostImpl) 16 scoped_ptr<LayerImpl> TreeSynchronizer::synchronizeTrees(Layer* layerRoot, scope d_ptr<LayerImpl> oldLayerImplRoot, LayerTreeHostImpl* hostImpl)
16 { 17 {
18 TRACE_EVENT0("cc", "TreeSynchronizer::synchronizeTrees");
17 ScopedPtrLayerImplMap oldLayers; 19 ScopedPtrLayerImplMap oldLayers;
18 RawPtrLayerImplMap newLayers; 20 RawPtrLayerImplMap newLayers;
19 21
20 collectExistingLayerImplRecursive(oldLayers, oldLayerImplRoot.Pass()); 22 collectExistingLayerImplRecursive(oldLayers, oldLayerImplRoot.Pass());
21 23
22 scoped_ptr<LayerImpl> newTree = synchronizeTreeRecursive(newLayers, oldLayer s, layerRoot, hostImpl); 24 scoped_ptr<LayerImpl> newTree = synchronizeTreeRecursive(newLayers, oldLayer s, layerRoot, hostImpl);
23 25
24 updateScrollbarLayerPointersRecursive(newLayers, layerRoot); 26 updateScrollbarLayerPointersRecursive(newLayers, layerRoot);
25 27
26 return newTree.Pass(); 28 return newTree.Pass();
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 DCHECK(scrollbarLayerImpl); 103 DCHECK(scrollbarLayerImpl);
102 DCHECK(scrollLayerImpl); 104 DCHECK(scrollLayerImpl);
103 105
104 if (scrollbarLayerImpl->orientation() == WebKit::WebScrollbar::Horizontal) 106 if (scrollbarLayerImpl->orientation() == WebKit::WebScrollbar::Horizontal)
105 scrollLayerImpl->setHorizontalScrollbarLayer(scrollbarLayerImpl); 107 scrollLayerImpl->setHorizontalScrollbarLayer(scrollbarLayerImpl);
106 else 108 else
107 scrollLayerImpl->setVerticalScrollbarLayer(scrollbarLayerImpl); 109 scrollLayerImpl->setVerticalScrollbarLayer(scrollbarLayerImpl);
108 } 110 }
109 111
110 } // namespace cc 112 } // namespace cc
OLDNEW
« cc/layer_tree_host.cc ('K') | « cc/scrollbar_layer.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698