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 #include "platform/graphics/CompositorMutableState.h" | 5 #include "platform/graphics/CompositorMutableState.h" |
6 | 6 |
7 #include "cc/layers/layer_impl.h" | 7 #include "cc/layers/layer_impl.h" |
8 #include "cc/trees/layer_tree_impl.h" | 8 #include "cc/trees/layer_tree_impl.h" |
9 #include "platform/graphics/CompositorMutation.h" | 9 #include "platform/graphics/CompositorMutation.h" |
10 | 10 |
(...skipping 15 matching lines...) Expand all Loading... |
26 void CompositorMutableState::setOpacity(double opacity) | 26 void CompositorMutableState::setOpacity(double opacity) |
27 { | 27 { |
28 if (!m_mainLayer) | 28 if (!m_mainLayer) |
29 return; | 29 return; |
30 m_mainLayer->OnOpacityAnimated(opacity); | 30 m_mainLayer->OnOpacityAnimated(opacity); |
31 m_mutation->setOpacity(opacity); | 31 m_mutation->setOpacity(opacity); |
32 } | 32 } |
33 | 33 |
34 const SkMatrix44& CompositorMutableState::transform() const | 34 const SkMatrix44& CompositorMutableState::transform() const |
35 { | 35 { |
36 return m_mainLayer ? m_mainLayer->transform().matrix() : SkMatrix44::I(); | 36 return m_mainLayer ? m_mainLayer->Transform().matrix() : SkMatrix44::I(); |
37 } | 37 } |
38 | 38 |
39 void CompositorMutableState::setTransform(const SkMatrix44& matrix) | 39 void CompositorMutableState::setTransform(const SkMatrix44& matrix) |
40 { | 40 { |
41 if (!m_mainLayer) | 41 if (!m_mainLayer) |
42 return; | 42 return; |
43 m_mainLayer->OnTransformAnimated(gfx::Transform(matrix)); | 43 m_mainLayer->OnTransformAnimated(gfx::Transform(matrix)); |
44 m_mutation->setTransform(matrix); | 44 m_mutation->setTransform(matrix); |
45 } | 45 } |
46 | 46 |
(...skipping 22 matching lines...) Expand all Loading... |
69 { | 69 { |
70 if (!m_scrollLayer) | 70 if (!m_scrollLayer) |
71 return; | 71 return; |
72 gfx::ScrollOffset offset = m_scrollLayer->CurrentScrollOffset(); | 72 gfx::ScrollOffset offset = m_scrollLayer->CurrentScrollOffset(); |
73 offset.set_y(scrollTop); | 73 offset.set_y(scrollTop); |
74 m_scrollLayer->OnScrollOffsetAnimated(offset); | 74 m_scrollLayer->OnScrollOffsetAnimated(offset); |
75 m_mutation->setScrollTop(scrollTop); | 75 m_mutation->setScrollTop(scrollTop); |
76 } | 76 } |
77 | 77 |
78 } // namespace blink | 78 } // namespace blink |
OLD | NEW |