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

Unified Diff: Source/core/svg/SVGDocumentExtensions.cpp

Issue 190963003: Drive SVG Animations via requestAnimationFrame (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 9 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/svg/SVGDocumentExtensions.h ('k') | Source/core/svg/animation/SMILTimeContainer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/svg/SVGDocumentExtensions.cpp
diff --git a/Source/core/svg/SVGDocumentExtensions.cpp b/Source/core/svg/SVGDocumentExtensions.cpp
index c4a5a8f1444ffda93223737b3be9319549e14a60..8d0acd17d9bd4e1dcec635a333c2cb3b424e9468 100644
--- a/Source/core/svg/SVGDocumentExtensions.cpp
+++ b/Source/core/svg/SVGDocumentExtensions.cpp
@@ -83,6 +83,22 @@ RenderSVGResourceContainer* SVGDocumentExtensions::resourceById(const AtomicStri
return m_resources.get(id);
}
+void SVGDocumentExtensions::serviceOnAnimationFrame(Document& document, double monotonicAnimationStartTime)
+{
+ if (!document.svgExtensions())
+ return;
+ document.accessSVGExtensions().serviceAnimations(monotonicAnimationStartTime);
+}
+
+void SVGDocumentExtensions::serviceAnimations(double monotonicAnimationStartTime)
+{
+ Vector<RefPtr<SVGSVGElement> > timeContainers;
+ timeContainers.appendRange(m_timeContainers.begin(), m_timeContainers.end());
+ Vector<RefPtr<SVGSVGElement> >::iterator end = timeContainers.end();
+ for (Vector<RefPtr<SVGSVGElement> >::iterator itr = timeContainers.begin(); itr != end; ++itr)
+ (*itr)->timeContainer()->serviceAnimations(monotonicAnimationStartTime);
+}
+
void SVGDocumentExtensions::startAnimations()
{
// FIXME: Eventually every "Time Container" will need a way to latch on to some global timer
« no previous file with comments | « Source/core/svg/SVGDocumentExtensions.h ('k') | Source/core/svg/animation/SMILTimeContainer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698