| OLD | NEW |
| 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 "config.h" | |
| 6 | |
| 7 #include "cc/layer.h" | 5 #include "cc/layer.h" |
| 8 | 6 |
| 9 #include "cc/active_animation.h" | 7 #include "cc/active_animation.h" |
| 10 #include "cc/animation_events.h" | 8 #include "cc/animation_events.h" |
| 11 #include "cc/layer_animation_controller.h" | 9 #include "cc/layer_animation_controller.h" |
| 12 #include "cc/layer_impl.h" | 10 #include "cc/layer_impl.h" |
| 13 #include "cc/layer_tree_host.h" | 11 #include "cc/layer_tree_host.h" |
| 14 #include "cc/settings.h" | 12 #include "cc/settings.h" |
| 15 #include "third_party/skia/include/core/SkImageFilter.h" | 13 #include "third_party/skia/include/core/SkImageFilter.h" |
| 16 #include "ui/gfx/rect_conversions.h" | 14 #include "ui/gfx/rect_conversions.h" |
| (...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 180 | 178 |
| 181 child->setParent(0); | 179 child->setParent(0); |
| 182 m_children.erase(iter); | 180 m_children.erase(iter); |
| 183 setNeedsCommit(); | 181 setNeedsCommit(); |
| 184 return; | 182 return; |
| 185 } | 183 } |
| 186 } | 184 } |
| 187 | 185 |
| 188 void Layer::replaceChild(Layer* reference, scoped_refptr<Layer> newLayer) | 186 void Layer::replaceChild(Layer* reference, scoped_refptr<Layer> newLayer) |
| 189 { | 187 { |
| 190 ASSERT_ARG(reference, reference); | 188 DCHECK(reference); |
| 191 ASSERT_ARG(reference, reference->parent() == this); | 189 DCHECK_EQ(reference->parent(), this); |
| 192 | 190 |
| 193 if (reference == newLayer) | 191 if (reference == newLayer) |
| 194 return; | 192 return; |
| 195 | 193 |
| 196 int referenceIndex = indexOfChild(reference); | 194 int referenceIndex = indexOfChild(reference); |
| 197 if (referenceIndex == -1) { | 195 if (referenceIndex == -1) { |
| 198 NOTREACHED(); | 196 NOTREACHED(); |
| 199 return; | 197 return; |
| 200 } | 198 } |
| 201 | 199 |
| (...skipping 649 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 851 { | 849 { |
| 852 return 0; | 850 return 0; |
| 853 } | 851 } |
| 854 | 852 |
| 855 void sortLayers(std::vector<scoped_refptr<Layer> >::iterator, std::vector<scoped
_refptr<Layer> >::iterator, void*) | 853 void sortLayers(std::vector<scoped_refptr<Layer> >::iterator, std::vector<scoped
_refptr<Layer> >::iterator, void*) |
| 856 { | 854 { |
| 857 // Currently we don't use z-order to decide what to paint, so there's no nee
d to actually sort Layers. | 855 // Currently we don't use z-order to decide what to paint, so there's no nee
d to actually sort Layers. |
| 858 } | 856 } |
| 859 | 857 |
| 860 } // namespace cc | 858 } // namespace cc |
| OLD | NEW |