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

Side by Side Diff: cc/trees/layer_tree_host.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, 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/test/animation_timelines_test_common.cc ('k') | cc/trees/layer_tree_host.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_H_ 5 #ifndef CC_TREES_LAYER_TREE_HOST_H_
6 #define CC_TREES_LAYER_TREE_HOST_H_ 6 #define CC_TREES_LAYER_TREE_HOST_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 345 matching lines...) Expand 10 before | Expand all | Expand 10 after
356 356
357 Layer* LayerById(int id) const; 357 Layer* LayerById(int id) const;
358 358
359 void AddLayerShouldPushProperties(Layer* layer); 359 void AddLayerShouldPushProperties(Layer* layer);
360 void RemoveLayerShouldPushProperties(Layer* layer); 360 void RemoveLayerShouldPushProperties(Layer* layer);
361 std::unordered_set<Layer*>& LayersThatShouldPushProperties(); 361 std::unordered_set<Layer*>& LayersThatShouldPushProperties();
362 bool LayerNeedsPushPropertiesForTesting(Layer* layer); 362 bool LayerNeedsPushPropertiesForTesting(Layer* layer);
363 363
364 void RegisterLayer(Layer* layer); 364 void RegisterLayer(Layer* layer);
365 void UnregisterLayer(Layer* layer); 365 void UnregisterLayer(Layer* layer);
366 // LayerTreeMutatorsClient implementation. 366 // MutatorHostClient implementation.
367 bool IsLayerInTree(int layer_id, LayerTreeType tree_type) const override; 367 bool IsElementInList(ElementId element_id,
368 ElementListType list_type) const override;
368 void SetMutatorsNeedCommit() override; 369 void SetMutatorsNeedCommit() override;
369 void SetMutatorsNeedRebuildPropertyTrees() override; 370 void SetMutatorsNeedRebuildPropertyTrees() override;
370 void SetLayerFilterMutated(int layer_id, 371 void SetElementFilterMutated(ElementId element_id,
371 LayerTreeType tree_type, 372 ElementListType list_type,
372 const FilterOperations& filters) override; 373 const FilterOperations& filters) override;
373 void SetLayerOpacityMutated(int layer_id, 374 void SetElementOpacityMutated(ElementId element_id,
374 LayerTreeType tree_type, 375 ElementListType list_type,
375 float opacity) override; 376 float opacity) override;
376 void SetLayerTransformMutated(int layer_id, 377 void SetElementTransformMutated(ElementId element_id,
377 LayerTreeType tree_type, 378 ElementListType list_type,
378 const gfx::Transform& transform) override; 379 const gfx::Transform& transform) override;
379 void SetLayerScrollOffsetMutated( 380 void SetElementScrollOffsetMutated(
380 int layer_id, 381 ElementId element_id,
381 LayerTreeType tree_type, 382 ElementListType list_type,
382 const gfx::ScrollOffset& scroll_offset) override; 383 const gfx::ScrollOffset& scroll_offset) override;
383 void LayerTransformIsPotentiallyAnimatingChanged(int layer_id, 384 void ElementTransformIsPotentiallyAnimatingChanged(
384 LayerTreeType tree_type, 385 ElementId element_id,
385 bool is_animating) override; 386 ElementListType list_type,
387 bool is_animating) override;
386 void ScrollOffsetAnimationFinished() override {} 388 void ScrollOffsetAnimationFinished() override {}
387 gfx::ScrollOffset GetScrollOffsetForAnimation(int layer_id) const override; 389 gfx::ScrollOffset GetScrollOffsetForAnimation(
390 ElementId element_id) const override;
388 391
389 bool ScrollOffsetAnimationWasInterrupted(const Layer* layer) const; 392 bool ScrollOffsetAnimationWasInterrupted(const Layer* layer) const;
390 bool IsAnimatingFilterProperty(const Layer* layer) const; 393 bool IsAnimatingFilterProperty(const Layer* layer) const;
391 bool IsAnimatingOpacityProperty(const Layer* layer) const; 394 bool IsAnimatingOpacityProperty(const Layer* layer) const;
392 bool IsAnimatingTransformProperty(const Layer* layer) const; 395 bool IsAnimatingTransformProperty(const Layer* layer) const;
393 bool HasPotentiallyRunningFilterAnimation(const Layer* layer) const; 396 bool HasPotentiallyRunningFilterAnimation(const Layer* layer) const;
394 bool HasPotentiallyRunningOpacityAnimation(const Layer* layer) const; 397 bool HasPotentiallyRunningOpacityAnimation(const Layer* layer) const;
395 bool HasPotentiallyRunningTransformAnimation(const Layer* layer) const; 398 bool HasPotentiallyRunningTransformAnimation(const Layer* layer) const;
396 bool HasOnlyTranslationTransforms(const Layer* layer) const; 399 bool HasOnlyTranslationTransforms(const Layer* layer) const;
397 bool MaximumTargetScale(const Layer* layer, float* max_scale) const; 400 bool MaximumTargetScale(const Layer* layer, float* max_scale) const;
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after
590 593
591 uint32_t surface_id_namespace_; 594 uint32_t surface_id_namespace_;
592 uint32_t next_surface_sequence_; 595 uint32_t next_surface_sequence_;
593 596
594 DISALLOW_COPY_AND_ASSIGN(LayerTreeHost); 597 DISALLOW_COPY_AND_ASSIGN(LayerTreeHost);
595 }; 598 };
596 599
597 } // namespace cc 600 } // namespace cc
598 601
599 #endif // CC_TREES_LAYER_TREE_HOST_H_ 602 #endif // CC_TREES_LAYER_TREE_HOST_H_
OLDNEW
« no previous file with comments | « cc/test/animation_timelines_test_common.cc ('k') | cc/trees/layer_tree_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698