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

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

Issue 135693003: Defer starting of animations until after compositing update (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Advance animation clock after minimum delay. Created 6 years, 10 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: Source/core/animation/DocumentAnimations.h
diff --git a/Source/core/animation/DocumentAnimations.h b/Source/core/animation/DocumentAnimations.h
index b952c532ec16b927ce4eb7b7a61a17b57eb18134..9772eef3c1a4edbef8061b2a0d7188bf5cd40404 100644
--- a/Source/core/animation/DocumentAnimations.h
+++ b/Source/core/animation/DocumentAnimations.h
@@ -41,12 +41,28 @@ class Node;
class DocumentAnimations {
public:
- static void serviceOnAnimationFrame(Document&, double monotonicAnimationStartTime);
+ static void serviceOnFrameStart(Document&, double monotonicAnimationStartTime);
abarth-chromium 2014/02/20 17:52:00 Can we rename this function to indicate what it do
dstockwell 2014/02/24 06:03:25 Done. I split and renamed the functions of Documen
static void serviceBeforeGetComputedStyle(Node&, CSSPropertyID);
- static void serviceAfterStyleRecalc(Document&);
+
+ class ServiceOnFrameEndScope {
abarth-chromium 2014/02/20 17:52:00 This is a wacky pattern for calling a function. W
dstockwell 2014/02/20 18:22:01 Isn't this the same pattern as DocumentLifecycle::
+ WTF_MAKE_NONCOPYABLE(ServiceOnFrameEndScope);
+ public:
+ ServiceOnFrameEndScope(Document& document)
+ : m_document(document)
+ {
+ }
+ ~ServiceOnFrameEndScope()
+ {
+ DocumentAnimations::serviceOnFrameEnd(m_document);
+ }
+
+ private:
+ Document& m_document;
+ };
private:
DocumentAnimations() { }
+ static void serviceOnFrameEnd(Document&);
};
} // namespace

Powered by Google App Engine
This is Rietveld 408576698