summaryrefslogtreecommitdiffstats
path: root/src/com/android/gallery3d/filtershow/imageshow/ImageShow.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/com/android/gallery3d/filtershow/imageshow/ImageShow.java')
-rw-r--r--src/com/android/gallery3d/filtershow/imageshow/ImageShow.java23
1 files changed, 14 insertions, 9 deletions
diff --git a/src/com/android/gallery3d/filtershow/imageshow/ImageShow.java b/src/com/android/gallery3d/filtershow/imageshow/ImageShow.java
index 5fd971ac4..7089e6036 100644
--- a/src/com/android/gallery3d/filtershow/imageshow/ImageShow.java
+++ b/src/com/android/gallery3d/filtershow/imageshow/ImageShow.java
@@ -366,8 +366,21 @@ public class ImageShow extends View implements OnGestureListener,
m.mapRect(d);
d.roundOut(mImageBounds);
- if (master.onGoingNewLookAnimation()) {
+ boolean showAnimatedImage = master.onGoingNewLookAnimation();
+ if (!showAnimatedImage && mDidStartAnimation) {
+ // animation ended, but do we have the correct image to show?
+ if (master.getPreset().equals(master.getCurrentPreset())) {
+ // we do, let's stop showing the animated image
+ mDidStartAnimation = false;
+ MasterImage.getImage().resetAnimBitmap();
+ } else {
+ showAnimatedImage = true;
+ }
+ } else if (showAnimatedImage) {
mDidStartAnimation = true;
+ }
+
+ if (showAnimatedImage) {
canvas.save();
// Animation uses the image before the change
@@ -472,14 +485,6 @@ public class ImageShow extends View implements OnGestureListener,
canvas.drawBitmap(image, m, mPaint);
}
- if (!master.onGoingNewLookAnimation()
- && mDidStartAnimation
- && !master.getPreviousPreset().equals(master.getCurrentPreset())) {
- mDidStartAnimation = false;
- MasterImage.getImage().resetAnimBitmap();
- invalidate();
- }
-
canvas.restore();
}