| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 CompositorMutation_h | 5 #ifndef CompositorMutation_h |
| 6 #define CompositorMutation_h | 6 #define CompositorMutation_h |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 #include "platform/graphics/CompositorMutableProperties.h" | 9 #include "platform/graphics/CompositorMutableProperties.h" |
| 10 #include "platform/wtf/HashMap.h" | 10 #include "platform/wtf/HashMap.h" |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 } | 42 } |
| 43 bool IsTransformMutated() const { | 43 bool IsTransformMutated() const { |
| 44 return mutated_flags_ & CompositorMutableProperty::kTransform; | 44 return mutated_flags_ & CompositorMutableProperty::kTransform; |
| 45 } | 45 } |
| 46 | 46 |
| 47 float Opacity() const { return opacity_; } | 47 float Opacity() const { return opacity_; } |
| 48 float ScrollLeft() const { return scroll_left_; } | 48 float ScrollLeft() const { return scroll_left_; } |
| 49 float ScrollTop() const { return scroll_top_; } | 49 float ScrollTop() const { return scroll_top_; } |
| 50 SkMatrix44 Transform() const { return transform_; } | 50 SkMatrix44 Transform() const { return transform_; } |
| 51 | 51 |
| 52 uint32_t mutatedProperties() const { return mutated_flags_; } |
| 53 |
| 52 private: | 54 private: |
| 53 uint32_t mutated_flags_ = 0; | 55 uint32_t mutated_flags_ = 0; |
| 54 float opacity_ = 0; | 56 float opacity_ = 0; |
| 55 float scroll_left_ = 0; | 57 float scroll_left_ = 0; |
| 56 float scroll_top_ = 0; | 58 float scroll_top_ = 0; |
| 57 SkMatrix44 transform_; | 59 SkMatrix44 transform_; |
| 58 }; | 60 }; |
| 59 | 61 |
| 60 struct CompositorMutations { | 62 struct CompositorMutations { |
| 61 HashMap<uint64_t, std::unique_ptr<CompositorMutation>> map; | 63 HashMap<uint64_t, std::unique_ptr<CompositorMutation>> map; |
| 62 }; | 64 }; |
| 63 | 65 |
| 64 } // namespace blink | 66 } // namespace blink |
| 65 | 67 |
| 66 #endif // CompositorMutation_h | 68 #endif // CompositorMutation_h |
| OLD | NEW |