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_TREES_MUTATOR_HOST_CLIENT_H_ | 5 #ifndef CC_TREES_MUTATOR_HOST_CLIENT_H_ |
6 #define CC_TREES_MUTATOR_HOST_CLIENT_H_ | 6 #define CC_TREES_MUTATOR_HOST_CLIENT_H_ |
7 | 7 |
8 #include "cc/base/cc_export.h" | |
9 | |
8 namespace gfx { | 10 namespace gfx { |
9 class Transform; | 11 class Transform; |
10 class ScrollOffset; | 12 class ScrollOffset; |
11 } | 13 } |
12 | 14 |
13 namespace cc { | 15 namespace cc { |
14 | 16 |
15 class FilterOperations; | 17 class FilterOperations; |
16 class Layer; | 18 class Layer; |
17 | 19 |
18 enum class LayerTreeType { ACTIVE, PENDING }; | 20 enum class LayerTreeType { ACTIVE, PENDING }; |
19 | 21 |
20 class MutatorHostClient { | 22 class CC_EXPORT MutatorHostClient { |
21 public: | 23 public: |
22 virtual bool IsLayerInTree(int layer_id, LayerTreeType tree_type) const = 0; | 24 virtual bool IsLayerInTree(int layer_id, LayerTreeType tree_type) const = 0; |
23 virtual void SetMutatorsNeedCommit() = 0; | 25 virtual void SetMutatorsNeedCommit() = 0; |
24 | 26 |
25 virtual void SetLayerFilterMutated(int layer_id, | 27 virtual void SetLayerFilterMutated(int layer_id, |
26 LayerTreeType tree_type, | 28 LayerTreeType tree_type, |
27 const FilterOperations& filters) = 0; | 29 const FilterOperations& filters) = 0; |
28 virtual void SetLayerOpacityMutated(int layer_id, | 30 virtual void SetLayerOpacityMutated(int layer_id, |
29 LayerTreeType tree_type, | 31 LayerTreeType tree_type, |
30 float opacity) = 0; | 32 float opacity) = 0; |
31 virtual void SetLayerTransformMutated(int layer_id, | 33 virtual void SetLayerTransformMutated(int layer_id, |
32 LayerTreeType tree_type, | 34 LayerTreeType tree_type, |
33 const gfx::Transform& transform) = 0; | 35 const gfx::Transform& transform) = 0; |
34 virtual void SetLayerScrollOffsetMutated( | 36 virtual void SetLayerScrollOffsetMutated( |
35 int layer_id, | 37 int layer_id, |
36 LayerTreeType tree_type, | 38 LayerTreeType tree_type, |
37 const gfx::ScrollOffset& scroll_offset) = 0; | 39 const gfx::ScrollOffset& scroll_offset) = 0; |
40 | |
41 virtual void ScrollOffsetAnimationFinished() {} | |
ajuma
2015/07/06 17:41:00
This should be pure virtual like the other methods
loyso (OOO)
2015/07/07 04:14:38
Done.
| |
42 virtual gfx::ScrollOffset GetScrollOffsetForAnimation(int layer_id) const = 0; | |
38 }; | 43 }; |
39 | 44 |
40 } // namespace cc | 45 } // namespace cc |
41 | 46 |
42 #endif // CC_TREES_MUTATOR_HOST_CLIENT_H_ | 47 #endif // CC_TREES_MUTATOR_HOST_CLIENT_H_ |
OLD | NEW |