Chromium Code Reviews| 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 #ifndef CC_LAYER_H_ | 5 #ifndef CC_LAYER_H_ |
| 6 #define CC_LAYER_H_ | 6 #define CC_LAYER_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 47 | 47 |
| 48 // Base class for composited layers. Special layer types are derived from | 48 // Base class for composited layers. Special layer types are derived from |
| 49 // this class. | 49 // this class. |
| 50 class CC_EXPORT Layer : public base::RefCounted<Layer>, | 50 class CC_EXPORT Layer : public base::RefCounted<Layer>, |
| 51 public LayerAnimationValueObserver { | 51 public LayerAnimationValueObserver { |
| 52 public: | 52 public: |
| 53 typedef std::vector<scoped_refptr<Layer> > LayerList; | 53 typedef std::vector<scoped_refptr<Layer> > LayerList; |
| 54 | 54 |
| 55 static scoped_refptr<Layer> create(); | 55 static scoped_refptr<Layer> create(); |
| 56 | 56 |
| 57 static const int s_invalidLayerId; | |
|
enne (OOO)
2013/03/11 21:08:24
Can you make this an enum to not require storage f
wjmaclean
2013/03/12 16:13:07
Yes, good idea!
| |
| 57 int id() const; | 58 int id() const; |
| 58 | 59 |
| 59 Layer* rootLayer(); | 60 Layer* rootLayer(); |
| 60 Layer* parent() { return m_parent; } | 61 Layer* parent() { return m_parent; } |
| 61 const Layer* parent() const { return m_parent; } | 62 const Layer* parent() const { return m_parent; } |
| 62 void addChild(scoped_refptr<Layer>); | 63 void addChild(scoped_refptr<Layer>); |
| 63 void insertChild(scoped_refptr<Layer>, size_t index); | 64 void insertChild(scoped_refptr<Layer>, size_t index); |
| 64 void replaceChild(Layer* reference, scoped_refptr<Layer> newLayer); | 65 void replaceChild(Layer* reference, scoped_refptr<Layer> newLayer); |
| 65 void removeFromParent(); | 66 void removeFromParent(); |
| 66 void removeAllChildren(); | 67 void removeAllChildren(); |
| (...skipping 337 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 404 WebKit::WebLayerScrollClient* m_layerScrollClient; | 405 WebKit::WebLayerScrollClient* m_layerScrollClient; |
| 405 | 406 |
| 406 DrawProperties<Layer, RenderSurface> m_drawProperties; | 407 DrawProperties<Layer, RenderSurface> m_drawProperties; |
| 407 }; | 408 }; |
| 408 | 409 |
| 409 void sortLayers(std::vector<scoped_refptr<Layer> >::iterator, std::vector<scoped _refptr<Layer> >::iterator, void*); | 410 void sortLayers(std::vector<scoped_refptr<Layer> >::iterator, std::vector<scoped _refptr<Layer> >::iterator, void*); |
| 410 | 411 |
| 411 } // namespace cc | 412 } // namespace cc |
| 412 | 413 |
| 413 #endif // CC_LAYER_H_ | 414 #endif // CC_LAYER_H_ |
| OLD | NEW |