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

Unified Diff: cc/trees/mutator_host_client.h

Issue 1921583003: CC Animation: Let MutatorHostClient deals with elements instead of layers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@elementid
Patch Set: Rename methods in ElementAnimations Created 4 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/trees/layer_tree_impl.cc ('k') | ui/compositor/layer_animator.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/mutator_host_client.h
diff --git a/cc/trees/mutator_host_client.h b/cc/trees/mutator_host_client.h
index 48097dced37d2d906e58cda31ae25d060b6523ff..1e1ec5e15012bfc2df7d01aa14770c3ea25a870c 100644
--- a/cc/trees/mutator_host_client.h
+++ b/cc/trees/mutator_host_client.h
@@ -13,39 +13,41 @@ class ScrollOffset;
namespace cc {
class FilterOperations;
-class Layer;
using ElementId = int;
-enum class LayerTreeType { ACTIVE, PENDING };
+enum class ElementListType { ACTIVE, PENDING };
class MutatorHostClient {
public:
- virtual bool IsLayerInTree(int layer_id, LayerTreeType tree_type) const = 0;
+ virtual bool IsElementInList(ElementId element_id,
+ ElementListType list_type) const = 0;
+
virtual void SetMutatorsNeedCommit() = 0;
virtual void SetMutatorsNeedRebuildPropertyTrees() = 0;
- virtual void SetLayerFilterMutated(int layer_id,
- LayerTreeType tree_type,
- const FilterOperations& filters) = 0;
- virtual void SetLayerOpacityMutated(int layer_id,
- LayerTreeType tree_type,
- float opacity) = 0;
- virtual void SetLayerTransformMutated(int layer_id,
- LayerTreeType tree_type,
- const gfx::Transform& transform) = 0;
- virtual void SetLayerScrollOffsetMutated(
- int layer_id,
- LayerTreeType tree_type,
+ virtual void SetElementFilterMutated(ElementId element_id,
+ ElementListType list_type,
+ const FilterOperations& filters) = 0;
+ virtual void SetElementOpacityMutated(ElementId element_id,
+ ElementListType list_type,
+ float opacity) = 0;
+ virtual void SetElementTransformMutated(ElementId element_id,
+ ElementListType list_type,
+ const gfx::Transform& transform) = 0;
+ virtual void SetElementScrollOffsetMutated(
+ ElementId element_id,
+ ElementListType list_type,
const gfx::ScrollOffset& scroll_offset) = 0;
- virtual void LayerTransformIsPotentiallyAnimatingChanged(
- int layer_id,
- LayerTreeType tree_type,
+ virtual void ElementTransformIsPotentiallyAnimatingChanged(
+ ElementId element_id,
+ ElementListType list_type,
bool is_animating) = 0;
virtual void ScrollOffsetAnimationFinished() = 0;
- virtual gfx::ScrollOffset GetScrollOffsetForAnimation(int layer_id) const = 0;
+ virtual gfx::ScrollOffset GetScrollOffsetForAnimation(
+ ElementId element_id) const = 0;
};
} // namespace cc
« no previous file with comments | « cc/trees/layer_tree_impl.cc ('k') | ui/compositor/layer_animator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698