OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef CompositorMutableState_h |
| 6 #define CompositorMutableState_h |
| 7 |
| 8 #include "platform/PlatformExport.h" |
| 9 |
| 10 #include <cstdint> |
| 11 |
| 12 class SkMatrix44; |
| 13 |
| 14 namespace cc { |
| 15 class LayerImpl; |
| 16 } // namespace cc |
| 17 |
| 18 namespace blink { |
| 19 |
| 20 class CompositorMutation; |
| 21 |
| 22 // This class wraps the compositor-owned, mutable state for a single element. |
| 23 class PLATFORM_EXPORT CompositorMutableState { |
| 24 public: |
| 25 CompositorMutableState(CompositorMutation*, cc::LayerImpl* main, cc::LayerIm
pl* scroll); |
| 26 ~CompositorMutableState(); |
| 27 |
| 28 double opacity() const; |
| 29 void setOpacity(double); |
| 30 |
| 31 const SkMatrix44& transform() const; |
| 32 void setTransform(const SkMatrix44&); |
| 33 |
| 34 double scrollLeft() const; |
| 35 void setScrollLeft(double); |
| 36 |
| 37 double scrollTop() const; |
| 38 void setScrollTop(double); |
| 39 |
| 40 private: |
| 41 CompositorMutation* m_mutation; |
| 42 cc::LayerImpl* m_mainLayer; |
| 43 cc::LayerImpl* m_scrollLayer; |
| 44 }; |
| 45 |
| 46 } // namespace blink |
| 47 |
| 48 #endif // CompositorMutableState_h |
OLD | NEW |