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

Side by Side Diff: cc/layer.cc

Issue 11882037: Activate LayerImpl tree with sync+push instead of pointer swap (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 11 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
« no previous file with comments | « cc/layer.h ('k') | cc/layer_impl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2010 The Chromium Authors. All rights reserved. 1 // Copyright 2010 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.h" 5 #include "cc/layer.h"
6 6
7 #include "cc/animation.h" 7 #include "cc/animation.h"
8 #include "cc/animation_events.h" 8 #include "cc/animation_events.h"
9 #include "cc/layer_animation_controller.h" 9 #include "cc/layer_animation_controller.h"
10 #include "cc/layer_impl.h" 10 #include "cc/layer_impl.h"
(...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after
277 { 277 {
278 if (children == m_children) 278 if (children == m_children)
279 return; 279 return;
280 280
281 removeAllChildren(); 281 removeAllChildren();
282 size_t listSize = children.size(); 282 size_t listSize = children.size();
283 for (size_t i = 0; i < listSize; i++) 283 for (size_t i = 0; i < listSize; i++)
284 addChild(children[i]); 284 addChild(children[i]);
285 } 285 }
286 286
287 Layer* Layer::childAt(size_t index)
288 {
289 DCHECK_LT(index, m_children.size());
290 return m_children[index].get();
291 }
292
287 void Layer::setAnchorPoint(const gfx::PointF& anchorPoint) 293 void Layer::setAnchorPoint(const gfx::PointF& anchorPoint)
288 { 294 {
289 if (m_anchorPoint == anchorPoint) 295 if (m_anchorPoint == anchorPoint)
290 return; 296 return;
291 m_anchorPoint = anchorPoint; 297 m_anchorPoint = anchorPoint;
292 setNeedsCommit(); 298 setNeedsCommit();
293 } 299 }
294 300
295 void Layer::setAnchorPointZ(float anchorPointZ) 301 void Layer::setAnchorPointZ(float anchorPointZ)
296 { 302 {
(...skipping 569 matching lines...) Expand 10 before | Expand all | Expand 10 after
866 { 872 {
867 return 0; 873 return 0;
868 } 874 }
869 875
870 void sortLayers(std::vector<scoped_refptr<Layer> >::iterator, std::vector<scoped _refptr<Layer> >::iterator, void*) 876 void sortLayers(std::vector<scoped_refptr<Layer> >::iterator, std::vector<scoped _refptr<Layer> >::iterator, void*)
871 { 877 {
872 // Currently we don't use z-order to decide what to paint, so there's no nee d to actually sort Layers. 878 // Currently we don't use z-order to decide what to paint, so there's no nee d to actually sort Layers.
873 } 879 }
874 880
875 } // namespace cc 881 } // namespace cc
OLDNEW
« no previous file with comments | « cc/layer.h ('k') | cc/layer_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698