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

Unified Diff: Source/platform/graphics/BitmapImage.cpp

Issue 1120963003: Implements getImageAnimationPolicy() at ImageLoader. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Adds Internals::advanceTimeWithImage Created 5 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: Source/platform/graphics/BitmapImage.cpp
diff --git a/Source/platform/graphics/BitmapImage.cpp b/Source/platform/graphics/BitmapImage.cpp
index a937da22617ae000cc3bec3b2157c5e1582a433e..5ad6479e4ac3b9e6725b6cc2f8225b8c84c7d198 100644
--- a/Source/platform/graphics/BitmapImage.cpp
+++ b/Source/platform/graphics/BitmapImage.cpp
@@ -599,6 +599,14 @@ bool BitmapImage::maybeAnimated()
return m_source.repetitionCount() != cAnimationNone;
}
+void BitmapImage::advanceTime(double time)
+{
+ if (m_desiredFrameStartTime)
+ m_desiredFrameStartTime -= time;
+ else
+ m_desiredFrameStartTime = monotonicallyIncreasingTime() - time;
+}
+
void BitmapImage::advanceAnimation(Timer<BitmapImage>*)
{
internalAdvanceAnimation(false);

Powered by Google App Engine
This is Rietveld 408576698