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

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: Update API name. 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
« no previous file with comments | « Source/platform/graphics/BitmapImage.h ('k') | Source/platform/graphics/Image.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/graphics/BitmapImage.cpp
diff --git a/Source/platform/graphics/BitmapImage.cpp b/Source/platform/graphics/BitmapImage.cpp
index a937da22617ae000cc3bec3b2157c5e1582a433e..8ffafb8cb36399ff81cda5afcf3153a0b66f22b8 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 deltaTimeInSeconds)
+{
+ if (m_desiredFrameStartTime)
+ m_desiredFrameStartTime -= deltaTimeInSeconds;
+ else
+ m_desiredFrameStartTime = monotonicallyIncreasingTime() - deltaTimeInSeconds;
+}
+
void BitmapImage::advanceAnimation(Timer<BitmapImage>*)
{
internalAdvanceAnimation(false);
« no previous file with comments | « Source/platform/graphics/BitmapImage.h ('k') | Source/platform/graphics/Image.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698