summaryrefslogtreecommitdiffstats
path: root/src/com/android/gallery3d/ui
diff options
context:
space:
mode:
authorhuiyan <huiyan@codeaurora.org>2016-02-03 16:09:04 +0800
committerGerrit - the friendly Code Review server <code-review@localhost>2016-02-22 00:25:48 -0800
commit5a3b44382d3dcd218d247f7526858f1f4466bb5f (patch)
tree9262fcbdef85eddfe03de9e29debc4311d65d810 /src/com/android/gallery3d/ui
parentf114d9bba2a8bead30dcf4c82ca64b2e44136ba7 (diff)
downloadandroid_packages_apps_Gallery2-5a3b44382d3dcd218d247f7526858f1f4466bb5f.tar.gz
android_packages_apps_Gallery2-5a3b44382d3dcd218d247f7526858f1f4466bb5f.tar.bz2
android_packages_apps_Gallery2-5a3b44382d3dcd218d247f7526858f1f4466bb5f.zip
Gallery2: Fix display abnormal after reload data in TimelinePage.
After reload data, the canvas only save and don't restore, so the coordinate of canvas is wrong and display abnormal. The canvas must restore after save operation. Change-Id: I2d27ace93917d3023ae622782e57f93d38541cbe CRs-Fixed: 962568 CRs-Fixed: 970007
Diffstat (limited to 'src/com/android/gallery3d/ui')
-rw-r--r--src/com/android/gallery3d/ui/TimeLineSlotView.java3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/com/android/gallery3d/ui/TimeLineSlotView.java b/src/com/android/gallery3d/ui/TimeLineSlotView.java
index 108cb3486..dadd5ff25 100644
--- a/src/com/android/gallery3d/ui/TimeLineSlotView.java
+++ b/src/com/android/gallery3d/ui/TimeLineSlotView.java
@@ -297,10 +297,9 @@ public class TimeLineSlotView extends GLView {
private int renderItem(
GLCanvas canvas, int index, int pass, boolean paperActive) {
-
- canvas.save(GLCanvas.SAVE_FLAG_ALPHA | GLCanvas.SAVE_FLAG_MATRIX);
Rect rect = mLayout.getSlotRect(index, mTempRect);
if (rect == null) return 0;
+ canvas.save(GLCanvas.SAVE_FLAG_ALPHA | GLCanvas.SAVE_FLAG_MATRIX);
canvas.translate(rect.left, rect.top, 0);
if (mAnimation != null && mAnimation.isActive()) {
mAnimation.apply(canvas, index, rect);