| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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_ANIMATION_LAYER_TREE_MUTATION_H_ | 5 #ifndef CC_ANIMATION_LAYER_TREE_MUTATION_H_ |
| 6 #define CC_ANIMATION_LAYER_TREE_MUTATION_H_ | 6 #define CC_ANIMATION_LAYER_TREE_MUTATION_H_ |
| 7 | 7 |
| 8 #include "base/containers/hash_tables.h" | 8 #include <unordered_map> |
| 9 |
| 9 #include "cc/animation/mutable_properties.h" | 10 #include "cc/animation/mutable_properties.h" |
| 10 #include "third_party/skia/include/utils/SkMatrix44.h" | 11 #include "third_party/skia/include/utils/SkMatrix44.h" |
| 11 | 12 |
| 12 namespace cc { | 13 namespace cc { |
| 13 | 14 |
| 14 class LayerTreeMutation { | 15 class LayerTreeMutation { |
| 15 public: | 16 public: |
| 16 void SetOpacity(float opacity) { | 17 void SetOpacity(float opacity) { |
| 17 mutated_flags_ |= kMutablePropertyOpacity; | 18 mutated_flags_ |= kMutablePropertyOpacity; |
| 18 opacity_ = opacity; | 19 opacity_ = opacity; |
| (...skipping 30 matching lines...) Expand all Loading... |
| 49 SkMatrix44 transform() const { return transform_; } | 50 SkMatrix44 transform() const { return transform_; } |
| 50 | 51 |
| 51 private: | 52 private: |
| 52 uint32_t mutated_flags_ = 0; | 53 uint32_t mutated_flags_ = 0; |
| 53 float opacity_ = 0; | 54 float opacity_ = 0; |
| 54 float scroll_left_ = 0; | 55 float scroll_left_ = 0; |
| 55 float scroll_top_ = 0; | 56 float scroll_top_ = 0; |
| 56 SkMatrix44 transform_; | 57 SkMatrix44 transform_; |
| 57 }; | 58 }; |
| 58 | 59 |
| 59 typedef base::hash_map<uint64_t, LayerTreeMutation> LayerTreeMutationMap; | 60 typedef std::unordered_map<uint64_t, LayerTreeMutation> LayerTreeMutationMap; |
| 60 | 61 |
| 61 } // namespace cc | 62 } // namespace cc |
| 62 | 63 |
| 63 #endif // CC_ANIMATION_LAYER_TREE_MUTATION_H_ | 64 #endif // CC_ANIMATION_LAYER_TREE_MUTATION_H_ |
| OLD | NEW |