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

Unified Diff: cc/animation/animation_host.h

Issue 1950243005: Communicate MT changes to impl-only scroll offset animations (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: review comments 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 side-by-side diff with in-line comments
Download patch
Index: cc/animation/animation_host.h
diff --git a/cc/animation/animation_host.h b/cc/animation/animation_host.h
index 5839d599753d50fd138162b541bd1618cb1b4c3a..4466cdd803a42e38eeb5316eec6550369b7fbf4f 100644
--- a/cc/animation/animation_host.h
+++ b/cc/animation/animation_host.h
@@ -13,7 +13,6 @@
#include "base/memory/ref_counted.h"
#include "base/time/time.h"
#include "cc/animation/animation.h"
-#include "cc/animation/scroll_offset_animations_impl.h"
#include "cc/base/cc_export.h"
#include "cc/trees/mutator_host_client.h"
#include "ui/gfx/geometry/box_f.h"
@@ -30,6 +29,10 @@ class AnimationPlayer;
class AnimationTimeline;
class ElementAnimations;
class LayerTreeHost;
+class ScrollOffsetAnimations;
+class ScrollOffsetAnimationsImpl;
+
+struct ScrollOffsetAnimationUpdate;
loyso (OOO) 2016/05/11 06:25:45 Is it used in this header?
ymalik 2016/05/12 22:31:25 No. Thanks!
enum class ThreadInstance { MAIN, IMPL };
@@ -75,7 +78,9 @@ class CC_EXPORT AnimationHost {
void SetNeedsCommit();
void SetNeedsRebuildPropertyTrees();
- void PushPropertiesTo(AnimationHost* host_impl);
+ void PushPropertiesTo(
+ AnimationHost* host_impl,
+ base::TimeTicks frame_monotonic_time = base::TimeTicks());
loyso (OOO) 2016/05/11 06:25:45 Can we avoid the default value and make it explici
ymalik 2016/05/12 22:31:25 No other rationale. But you're right, this should
void SetSupportsScrollAnimations(bool supports_scroll_animations);
bool SupportsScrollAnimations() const;
@@ -149,6 +154,9 @@ class CC_EXPORT AnimationHost {
void ScrollAnimationAbort(bool needs_completion);
+ // This should only be called from the main thread.
+ ScrollOffsetAnimations& scroll_offset_animations() const;
+
// Registers the given element animations as active. An active element
// animations is one that has a running animation that needs to be ticked.
void DidActivateElementAnimations(ElementAnimations* element_animations);
@@ -175,7 +183,8 @@ class CC_EXPORT AnimationHost {
void PushTimelinesToImplThread(AnimationHost* host_impl) const;
void RemoveTimelinesFromImplThread(AnimationHost* host_impl) const;
- void PushPropertiesToImplThread(AnimationHost* host_impl);
+ void PushPropertiesToImplThread(AnimationHost* host_impl,
+ base::TimeTicks frame_monotonic_time);
void EraseTimeline(scoped_refptr<AnimationTimeline> timeline);
@@ -189,6 +198,7 @@ class CC_EXPORT AnimationHost {
MutatorHostClient* mutator_host_client_;
+ std::unique_ptr<ScrollOffsetAnimations> scroll_offset_animations_;
std::unique_ptr<ScrollOffsetAnimationsImpl> scroll_offset_animations_impl_;
const ThreadInstance thread_instance_;
« no previous file with comments | « cc/BUILD.gn ('k') | cc/animation/animation_host.cc » ('j') | cc/animation/animation_host.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698