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

Side by Side Diff: cc/trees/layer_tree_host_impl.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 unified diff | Download patch
« no previous file with comments | « cc/trees/layer_tree_host_common_unittest.cc ('k') | cc/trees/layer_tree_host_impl.cc » ('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 2011 The Chromium Authors. All rights reserved. 1 // Copyright 2011 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_LAYER_TREE_HOST_IMPL_H_ 5 #ifndef CC_TREES_LAYER_TREE_HOST_IMPL_H_
6 #define CC_TREES_LAYER_TREE_HOST_IMPL_H_ 6 #define CC_TREES_LAYER_TREE_HOST_IMPL_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include <memory> 10 #include <memory>
(...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after
250 LayerTreeImpl* tree, 250 LayerTreeImpl* tree,
251 const gfx::Transform& transform); 251 const gfx::Transform& transform);
252 void SetTreeLayerScrollOffsetMutated(int layer_id, 252 void SetTreeLayerScrollOffsetMutated(int layer_id,
253 LayerTreeImpl* tree, 253 LayerTreeImpl* tree,
254 const gfx::ScrollOffset& scroll_offset); 254 const gfx::ScrollOffset& scroll_offset);
255 void TreeLayerTransformIsPotentiallyAnimatingChanged(int layer_id, 255 void TreeLayerTransformIsPotentiallyAnimatingChanged(int layer_id,
256 LayerTreeImpl* tree, 256 LayerTreeImpl* tree,
257 bool is_animating); 257 bool is_animating);
258 bool AnimationsPreserveAxisAlignment(const LayerImpl* layer) const; 258 bool AnimationsPreserveAxisAlignment(const LayerImpl* layer) const;
259 259
260 // LayerTreeMutatorsClient implementation. 260 // MutatorHostClient implementation.
261 bool IsLayerInTree(int layer_id, LayerTreeType tree_type) const override; 261 bool IsElementInList(ElementId element_id,
262 ElementListType list_type) const override;
262 void SetMutatorsNeedCommit() override; 263 void SetMutatorsNeedCommit() override;
263 void SetMutatorsNeedRebuildPropertyTrees() override; 264 void SetMutatorsNeedRebuildPropertyTrees() override;
264 void SetLayerFilterMutated(int layer_id, 265 void SetElementFilterMutated(ElementId element_id,
265 LayerTreeType tree_type, 266 ElementListType list_type,
266 const FilterOperations& filters) override; 267 const FilterOperations& filters) override;
267 void SetLayerOpacityMutated(int layer_id, 268 void SetElementOpacityMutated(ElementId element_id,
268 LayerTreeType tree_type, 269 ElementListType list_type,
269 float opacity) override; 270 float opacity) override;
270 void SetLayerTransformMutated(int layer_id, 271 void SetElementTransformMutated(ElementId element_id,
271 LayerTreeType tree_type, 272 ElementListType list_type,
272 const gfx::Transform& transform) override; 273 const gfx::Transform& transform) override;
273 void SetLayerScrollOffsetMutated( 274 void SetElementScrollOffsetMutated(
274 int layer_id, 275 ElementId element_id,
275 LayerTreeType tree_type, 276 ElementListType list_type,
276 const gfx::ScrollOffset& scroll_offset) override; 277 const gfx::ScrollOffset& scroll_offset) override;
277 void LayerTransformIsPotentiallyAnimatingChanged(int layer_id, 278 void ElementTransformIsPotentiallyAnimatingChanged(
278 LayerTreeType tree_type, 279 ElementId element_id,
279 bool is_animating) override; 280 ElementListType list_type,
281 bool is_animating) override;
280 void ScrollOffsetAnimationFinished() override; 282 void ScrollOffsetAnimationFinished() override;
281 gfx::ScrollOffset GetScrollOffsetForAnimation(int layer_id) const override; 283 gfx::ScrollOffset GetScrollOffsetForAnimation(
284 ElementId element_id) const override;
282 285
283 virtual bool PrepareTiles(); 286 virtual bool PrepareTiles();
284 287
285 // Returns DRAW_SUCCESS unless problems occured preparing the frame, and we 288 // Returns DRAW_SUCCESS unless problems occured preparing the frame, and we
286 // should try to avoid displaying the frame. If PrepareToDraw is called, 289 // should try to avoid displaying the frame. If PrepareToDraw is called,
287 // DidDrawAllLayers must also be called, regardless of whether DrawLayers is 290 // DidDrawAllLayers must also be called, regardless of whether DrawLayers is
288 // called between the two. 291 // called between the two.
289 virtual DrawResult PrepareToDraw(FrameData* frame); 292 virtual DrawResult PrepareToDraw(FrameData* frame);
290 virtual void DrawLayers(FrameData* frame); 293 virtual void DrawLayers(FrameData* frame);
291 // Must be called if and only if PrepareToDraw was called. 294 // Must be called if and only if PrepareToDraw was called.
(...skipping 547 matching lines...) Expand 10 before | Expand all | Expand 10 after
839 std::unique_ptr<Viewport> viewport_; 842 std::unique_ptr<Viewport> viewport_;
840 843
841 LayerTreeMutator* mutator_; 844 LayerTreeMutator* mutator_;
842 845
843 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl); 846 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl);
844 }; 847 };
845 848
846 } // namespace cc 849 } // namespace cc
847 850
848 #endif // CC_TREES_LAYER_TREE_HOST_IMPL_H_ 851 #endif // CC_TREES_LAYER_TREE_HOST_IMPL_H_
OLDNEW
« no previous file with comments | « cc/trees/layer_tree_host_common_unittest.cc ('k') | cc/trees/layer_tree_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698