| 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_LAYERS_LAYER_H_ | 5 #ifndef CC_LAYERS_LAYER_H_ |
| 6 #define CC_LAYERS_LAYER_H_ | 6 #define CC_LAYERS_LAYER_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 #include <stdint.h> | 9 #include <stdint.h> |
| 10 | 10 |
| (...skipping 373 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 384 // called only on layers that have changed properties. The properties | 384 // called only on layers that have changed properties. The properties |
| 385 // themselves are pushed to proto::LayerProperties. | 385 // themselves are pushed to proto::LayerProperties. |
| 386 void ToLayerPropertiesProto(proto::LayerUpdate* layer_update); | 386 void ToLayerPropertiesProto(proto::LayerUpdate* layer_update); |
| 387 | 387 |
| 388 // Read all property values from the given LayerProperties object and update | 388 // Read all property values from the given LayerProperties object and update |
| 389 // the current layer. The values for |needs_push_properties_| and | 389 // the current layer. The values for |needs_push_properties_| and |
| 390 // |num_dependents_need_push_properties_| are always updated, but the rest | 390 // |num_dependents_need_push_properties_| are always updated, but the rest |
| 391 // of |proto| is only read if |needs_push_properties_| is set. | 391 // of |proto| is only read if |needs_push_properties_| is set. |
| 392 void FromLayerPropertiesProto(const proto::LayerProperties& proto); | 392 void FromLayerPropertiesProto(const proto::LayerProperties& proto); |
| 393 | 393 |
| 394 // TODO(xingliu): Layer will hold LayerTree instead of LayerTreeHost. | |
| 395 // http://crbug.com/628683 | |
| 396 LayerTreeHost* layer_tree_host() { return layer_tree_host_; } | 394 LayerTreeHost* layer_tree_host() { return layer_tree_host_; } |
| 397 const LayerTreeHost* layer_tree_host() const { return layer_tree_host_; } | 395 const LayerTreeHost* layer_tree_host() const { return layer_tree_host_; } |
| 398 LayerTree* GetLayerTree() const; | 396 LayerTree* GetLayerTree() const; |
| 399 | 397 |
| 400 virtual ScrollbarLayerInterface* ToScrollbarLayer(); | 398 virtual ScrollbarLayerInterface* ToScrollbarLayer(); |
| 401 | 399 |
| 402 virtual sk_sp<SkPicture> GetPicture() const; | 400 virtual sk_sp<SkPicture> GetPicture() const; |
| 403 | 401 |
| 404 // Constructs a LayerImpl of the correct runtime type for this Layer type. | 402 // Constructs a LayerImpl of the correct runtime type for this Layer type. |
| 405 virtual std::unique_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl); | 403 virtual std::unique_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl); |
| (...skipping 324 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 730 // These all act like draw properties, so don't need push properties. | 728 // These all act like draw properties, so don't need push properties. |
| 731 gfx::Rect visible_layer_rect_; | 729 gfx::Rect visible_layer_rect_; |
| 732 size_t num_unclipped_descendants_; | 730 size_t num_unclipped_descendants_; |
| 733 | 731 |
| 734 DISALLOW_COPY_AND_ASSIGN(Layer); | 732 DISALLOW_COPY_AND_ASSIGN(Layer); |
| 735 }; | 733 }; |
| 736 | 734 |
| 737 } // namespace cc | 735 } // namespace cc |
| 738 | 736 |
| 739 #endif // CC_LAYERS_LAYER_H_ | 737 #endif // CC_LAYERS_LAYER_H_ |
| OLD | NEW |