| 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 |
| 11 #include <set> | 11 #include <set> |
| 12 #include <string> | 12 #include <string> |
| 13 #include <unordered_map> |
| 13 #include <vector> | 14 #include <vector> |
| 14 | 15 |
| 15 #include "base/callback.h" | 16 #include "base/callback.h" |
| 16 #include "base/macros.h" | 17 #include "base/macros.h" |
| 17 #include "base/memory/ref_counted.h" | 18 #include "base/memory/ref_counted.h" |
| 18 #include "base/observer_list.h" | 19 #include "base/observer_list.h" |
| 19 #include "cc/animation/layer_animation_controller.h" | 20 #include "cc/animation/layer_animation_controller.h" |
| 20 #include "cc/animation/layer_animation_value_observer.h" | 21 #include "cc/animation/layer_animation_value_observer.h" |
| 21 #include "cc/animation/layer_animation_value_provider.h" | 22 #include "cc/animation/layer_animation_value_provider.h" |
| 22 #include "cc/base/cc_export.h" | 23 #include "cc/base/cc_export.h" |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 76 class LayerProperties; | 77 class LayerProperties; |
| 77 class LayerUpdate; | 78 class LayerUpdate; |
| 78 } // namespace proto | 79 } // namespace proto |
| 79 | 80 |
| 80 // Base class for composited layers. Special layer types are derived from | 81 // Base class for composited layers. Special layer types are derived from |
| 81 // this class. | 82 // this class. |
| 82 class CC_EXPORT Layer : public base::RefCounted<Layer>, | 83 class CC_EXPORT Layer : public base::RefCounted<Layer>, |
| 83 public LayerAnimationValueObserver, | 84 public LayerAnimationValueObserver, |
| 84 public LayerAnimationValueProvider { | 85 public LayerAnimationValueProvider { |
| 85 public: | 86 public: |
| 86 typedef LayerList LayerListType; | 87 using LayerListType = LayerList; |
| 87 typedef base::hash_map<int, scoped_refptr<Layer>> LayerIdMap; | 88 using LayerIdMap = std::unordered_map<int, scoped_refptr<Layer>>; |
| 88 | 89 |
| 89 enum LayerIdLabels { | 90 enum LayerIdLabels { |
| 90 INVALID_ID = -1, | 91 INVALID_ID = -1, |
| 91 }; | 92 }; |
| 92 | 93 |
| 93 static scoped_refptr<Layer> Create(const LayerSettings& settings); | 94 static scoped_refptr<Layer> Create(const LayerSettings& settings); |
| 94 | 95 |
| 95 int id() const { return layer_id_; } | 96 int id() const { return layer_id_; } |
| 96 | 97 |
| 97 Layer* RootLayer(); | 98 Layer* RootLayer(); |
| (...skipping 689 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 787 | 788 |
| 788 std::vector<FrameTimingRequest> frame_timing_requests_; | 789 std::vector<FrameTimingRequest> frame_timing_requests_; |
| 789 bool frame_timing_requests_dirty_; | 790 bool frame_timing_requests_dirty_; |
| 790 | 791 |
| 791 DISALLOW_COPY_AND_ASSIGN(Layer); | 792 DISALLOW_COPY_AND_ASSIGN(Layer); |
| 792 }; | 793 }; |
| 793 | 794 |
| 794 } // namespace cc | 795 } // namespace cc |
| 795 | 796 |
| 796 #endif // CC_LAYERS_LAYER_H_ | 797 #endif // CC_LAYERS_LAYER_H_ |
| OLD | NEW |