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

Side by Side Diff: third_party/WebKit/Source/core/animation/InertEffect.h

Issue 2043273002: Defer compositor keyframe snapshots until the next style resolve (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased Created 4 years, 5 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 29 matching lines...) Expand all
40 40
41 // Lightweight subset of KeyframeEffect. 41 // Lightweight subset of KeyframeEffect.
42 // Used to transport data for deferred KeyframeEffect construction and one off I nterpolation sampling. 42 // Used to transport data for deferred KeyframeEffect construction and one off I nterpolation sampling.
43 class CORE_EXPORT InertEffect final : public AnimationEffect { 43 class CORE_EXPORT InertEffect final : public AnimationEffect {
44 public: 44 public:
45 static InertEffect* create(EffectModel*, const Timing&, bool paused, double inheritedTime); 45 static InertEffect* create(EffectModel*, const Timing&, bool paused, double inheritedTime);
46 void sample(Vector<RefPtr<Interpolation>>&) const; 46 void sample(Vector<RefPtr<Interpolation>>&) const;
47 EffectModel* model() const { return m_model.get(); } 47 EffectModel* model() const { return m_model.get(); }
48 bool paused() const { return m_paused; } 48 bool paused() const { return m_paused; }
49 49
50 bool isInertEffect() const final { return true; }
51
50 DECLARE_VIRTUAL_TRACE(); 52 DECLARE_VIRTUAL_TRACE();
51 53
52 protected: 54 protected:
53 void updateChildrenAndEffects() const override { } 55 void updateChildrenAndEffects() const override { }
54 double calculateTimeToEffectChange(bool forwards, double inheritedTime, doub le timeToNextIteration) const override; 56 double calculateTimeToEffectChange(bool forwards, double inheritedTime, doub le timeToNextIteration) const override;
55 57
56 private: 58 private:
57 InertEffect(EffectModel*, const Timing&, bool paused, double inheritedTime); 59 InertEffect(EffectModel*, const Timing&, bool paused, double inheritedTime);
58 Member<EffectModel> m_model; 60 Member<EffectModel> m_model;
59 bool m_paused; 61 bool m_paused;
60 double m_inheritedTime; 62 double m_inheritedTime;
61 }; 63 };
62 64
65 DEFINE_TYPE_CASTS(InertEffect, AnimationEffect, animationEffect, animationEffect ->isInertEffect(), animationEffect.isInertEffect());
66
63 } // namespace blink 67 } // namespace blink
64 68
65 #endif 69 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698