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
3 // found in the LICENSE file.
5 #ifndef CC_TREES_MUTATOR_HOST_CLIENT_H_
6 #define CC_TREES_MUTATOR_HOST_CLIENT_H_
15 class FilterOperations
;
18 enum class LayerTreeType
{ ACTIVE
, PENDING
};
20 class MutatorHostClient
{
22 virtual bool IsLayerInTree(int layer_id
, LayerTreeType tree_type
) const = 0;
23 virtual void SetMutatorsNeedCommit() = 0;
25 virtual void SetLayerFilterMutated(int layer_id
,
26 LayerTreeType tree_type
,
27 const FilterOperations
& filters
) = 0;
28 virtual void SetLayerOpacityMutated(int layer_id
,
29 LayerTreeType tree_type
,
31 virtual void SetLayerTransformMutated(int layer_id
,
32 LayerTreeType tree_type
,
33 const gfx::Transform
& transform
) = 0;
34 virtual void SetLayerScrollOffsetMutated(
36 LayerTreeType tree_type
,
37 const gfx::ScrollOffset
& scroll_offset
) = 0;
39 virtual void LayerTransformIsPotentiallyAnimatingChanged(
41 LayerTreeType tree_type
,
42 bool is_animating
) = 0;
44 virtual void ScrollOffsetAnimationFinished() = 0;
45 virtual gfx::ScrollOffset
GetScrollOffsetForAnimation(int layer_id
) const = 0;
50 #endif // CC_TREES_MUTATOR_HOST_CLIENT_H_