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 "platform/graphics/CompositorMutableProperties.h" | 8 #include "platform/graphics/CompositorMutableProperties.h" |
| 9 #include "public/platform/WebCompositorMutations.h" |
9 #include "third_party/skia/include/utils/SkMatrix44.h" | 10 #include "third_party/skia/include/utils/SkMatrix44.h" |
10 #include "wtf/HashMap.h" | 11 #include "wtf/HashMap.h" |
11 | 12 |
12 namespace blink { | 13 namespace blink { |
13 | 14 |
14 class CompositorMutation { | 15 class CompositorMutation { |
15 public: | 16 public: |
16 void setOpacity(float opacity) | 17 void setOpacity(float opacity) |
17 { | 18 { |
18 m_mutatedFlags |= CompositorMutableProperty::kOpacity; | 19 m_mutatedFlags |= CompositorMutableProperty::kOpacity; |
(...skipping 26 matching lines...) Expand all Loading... |
45 SkMatrix44 transform() const { return m_transform; } | 46 SkMatrix44 transform() const { return m_transform; } |
46 | 47 |
47 private: | 48 private: |
48 uint32_t m_mutatedFlags = 0; | 49 uint32_t m_mutatedFlags = 0; |
49 float m_opacity = 0; | 50 float m_opacity = 0; |
50 float m_scrollLeft = 0; | 51 float m_scrollLeft = 0; |
51 float m_scrollTop = 0; | 52 float m_scrollTop = 0; |
52 SkMatrix44 m_transform; | 53 SkMatrix44 m_transform; |
53 }; | 54 }; |
54 | 55 |
55 struct CompositorMutations { | 56 struct CompositorMutations : public WebCompositorMutations { |
| 57 ~CompositorMutations() override { } |
56 HashMap<uint64_t, OwnPtr<CompositorMutation>> map; | 58 HashMap<uint64_t, OwnPtr<CompositorMutation>> map; |
57 }; | 59 }; |
58 | 60 |
59 } // namespace blink | 61 } // namespace blink |
60 | 62 |
61 #endif // CompositorMutation_h | 63 #endif // CompositorMutation_h |
OLD | NEW |