aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/android/SkAnimatedImage.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/android/SkAnimatedImage.h')
-rw-r--r--include/android/SkAnimatedImage.h16
1 files changed, 15 insertions, 1 deletions
diff --git a/include/android/SkAnimatedImage.h b/include/android/SkAnimatedImage.h
index 51f0e5b84b..983a57bd5c 100644
--- a/include/android/SkAnimatedImage.h
+++ b/include/android/SkAnimatedImage.h
@@ -107,7 +107,20 @@ private:
int fIndex;
SkCodecAnimation::DisposalMethod fDisposalMethod;
+ // init() may have to create a new SkPixelRef, if the
+ // current one is already in use by another owner (e.g.
+ // an SkPicture). This determines whether to copy the
+ // existing one to the new one.
+ enum class OnInit {
+ // Restore the image from the old SkPixelRef to the
+ // new one.
+ kRestoreIfNecessary,
+ // No need to restore.
+ kNoRestore,
+ };
+
Frame();
+ bool init(const SkImageInfo& info, OnInit);
bool copyTo(Frame*) const;
};
@@ -122,7 +135,8 @@ private:
bool fFinished;
int fCurrentFrameDuration;
- Frame fActiveFrame;
+ Frame fDisplayFrame;
+ Frame fDecodingFrame;
Frame fRestoreFrame;
int fRepetitionCount;
int fRepetitionsCompleted;