Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(136)

Side by Side Diff: cc/trees/mutator_host_client.h

Issue 1957533002: cc : Track opacity animation changes on effect tree (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « cc/trees/layer_tree_host_impl.cc ('k') | cc/trees/property_tree.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 namespace gfx { 8 namespace gfx {
9 class Transform; 9 class Transform;
10 class ScrollOffset; 10 class ScrollOffset;
11 } 11 }
12 12
13 namespace cc { 13 namespace cc {
14 14
15 class FilterOperations; 15 class FilterOperations;
16 16
17 using ElementId = int; 17 using ElementId = int;
18 18
19 enum class ElementListType { ACTIVE, PENDING }; 19 enum class ElementListType { ACTIVE, PENDING };
20 20
21 enum class AnimationChangeType { POTENTIAL, RUNNING, BOTH };
22
21 class MutatorHostClient { 23 class MutatorHostClient {
22 public: 24 public:
23 virtual bool IsElementInList(ElementId element_id, 25 virtual bool IsElementInList(ElementId element_id,
24 ElementListType list_type) const = 0; 26 ElementListType list_type) const = 0;
25 27
26 virtual void SetMutatorsNeedCommit() = 0; 28 virtual void SetMutatorsNeedCommit() = 0;
27 virtual void SetMutatorsNeedRebuildPropertyTrees() = 0; 29 virtual void SetMutatorsNeedRebuildPropertyTrees() = 0;
28 30
29 virtual void SetElementFilterMutated(ElementId element_id, 31 virtual void SetElementFilterMutated(ElementId element_id,
30 ElementListType list_type, 32 ElementListType list_type,
31 const FilterOperations& filters) = 0; 33 const FilterOperations& filters) = 0;
32 virtual void SetElementOpacityMutated(ElementId element_id, 34 virtual void SetElementOpacityMutated(ElementId element_id,
33 ElementListType list_type, 35 ElementListType list_type,
34 float opacity) = 0; 36 float opacity) = 0;
35 virtual void SetElementTransformMutated(ElementId element_id, 37 virtual void SetElementTransformMutated(ElementId element_id,
36 ElementListType list_type, 38 ElementListType list_type,
37 const gfx::Transform& transform) = 0; 39 const gfx::Transform& transform) = 0;
38 virtual void SetElementScrollOffsetMutated( 40 virtual void SetElementScrollOffsetMutated(
39 ElementId element_id, 41 ElementId element_id,
40 ElementListType list_type, 42 ElementListType list_type,
41 const gfx::ScrollOffset& scroll_offset) = 0; 43 const gfx::ScrollOffset& scroll_offset) = 0;
42 44
43 virtual void ElementTransformIsPotentiallyAnimatingChanged( 45 virtual void ElementTransformIsPotentiallyAnimatingChanged(
44 ElementId element_id, 46 ElementId element_id,
45 ElementListType list_type, 47 ElementListType list_type,
46 bool is_animating) = 0; 48 bool is_animating) = 0;
47 49
50 virtual void ElementOpacityIsAnimatingChanged(ElementId element_id,
51 ElementListType list_type,
52 AnimationChangeType change_type,
53 bool is_animating) = 0;
54
48 virtual void ScrollOffsetAnimationFinished() = 0; 55 virtual void ScrollOffsetAnimationFinished() = 0;
49 virtual gfx::ScrollOffset GetScrollOffsetForAnimation( 56 virtual gfx::ScrollOffset GetScrollOffsetForAnimation(
50 ElementId element_id) const = 0; 57 ElementId element_id) const = 0;
51 }; 58 };
52 59
53 } // namespace cc 60 } // namespace cc
54 61
55 #endif // CC_TREES_MUTATOR_HOST_CLIENT_H_ 62 #endif // CC_TREES_MUTATOR_HOST_CLIENT_H_
OLDNEW
« no previous file with comments | « cc/trees/layer_tree_host_impl.cc ('k') | cc/trees/property_tree.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698