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

Unified Diff: Source/core/animation/AnimationPlayer.h

Issue 881183003: Animation: Cancel same-property animations on compositor (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Add manual test. Improve code a bit. Created 5 years, 11 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 | « Source/core/animation/AnimationEffect.h ('k') | Source/core/animation/AnimationPlayer.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/animation/AnimationPlayer.h
diff --git a/Source/core/animation/AnimationPlayer.h b/Source/core/animation/AnimationPlayer.h
index aa27c81ee81272afefce2f4e96d983650e4ccec0..983cb06a8f78cb2249f0707fc30d78365d0fa5cc 100644
--- a/Source/core/animation/AnimationPlayer.h
+++ b/Source/core/animation/AnimationPlayer.h
@@ -33,6 +33,7 @@
#include "bindings/core/v8/ScriptPromise.h"
#include "bindings/core/v8/ScriptPromiseProperty.h"
+#include "core/CSSPropertyNames.h"
#include "core/animation/AnimationNode.h"
#include "core/dom/ActiveDOMObject.h"
#include "core/dom/DOMException.h"
@@ -43,6 +44,7 @@
namespace blink {
class AnimationTimeline;
+class Element;
class ExceptionState;
class AnimationPlayer final
@@ -140,11 +142,13 @@ public:
bool canStartAnimationOnCompositor();
bool maybeStartAnimationOnCompositor();
void cancelAnimationOnCompositor();
+ void cancelIncompatibleAnimationsOnCompositor();
bool hasActiveAnimationsOnCompositor();
void setCompositorPending(bool sourceChanged = false);
void notifyCompositorStartTime(double timelineTime);
void notifyStartTime(double timelineTime);
+ bool affects(const Element&, CSSPropertyID) const;
void preCommit(int compositorGroup, bool startOnCompositor);
void postCommit(double timelineTime);
@@ -152,7 +156,7 @@ public:
unsigned sequenceNumber() const { return m_sequenceNumber; }
int compositorGroup() const { return m_compositorGroup; }
- static bool hasLowerPriority(AnimationPlayer* player1, AnimationPlayer* player2)
+ static bool hasLowerPriority(const AnimationPlayer* player1, const AnimationPlayer* player2)
{
return player1->sequenceNumber() < player2->sequenceNumber();
}
« no previous file with comments | « Source/core/animation/AnimationEffect.h ('k') | Source/core/animation/AnimationPlayer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698