diff options
author | kayiz <kaiyiz@codeaurora.org> | 2013-12-06 11:06:52 +0800 |
---|---|---|
committer | Steve Kondik <shade@chemlab.org> | 2013-12-10 03:49:22 -0800 |
commit | f1adfc490e9f58d653359b941cdbb5b9dad554b0 (patch) | |
tree | 74ee3a22739ecb38f22ac247b8610d5d1406fcd3 | |
parent | 0b9e20a63f96830080897fef45de3e424e70c2af (diff) | |
download | android_packages_apps_Gallery2-f1adfc490e9f58d653359b941cdbb5b9dad554b0.tar.gz android_packages_apps_Gallery2-f1adfc490e9f58d653359b941cdbb5b9dad554b0.tar.bz2 android_packages_apps_Gallery2-f1adfc490e9f58d653359b941cdbb5b9dad554b0.zip |
Gallery2: fix screen flashing after rotating pictures
After rotating a picture, it needs to redraw the bitmap,
but the bitmap can not be available immediately, and it will
draw a rectange of placeholder color (gray) first, then it
redraw the bitmap, this make it seems like the screen flashing.
We draw the placeholder color only if the texture is null.
CRs-Fixed: 570056
Change-Id: I28bc65ba674906f39eae3d872988fe96511a3ecb
-rw-r--r-- | src/com/android/gallery3d/ui/TiledScreenNail.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/com/android/gallery3d/ui/TiledScreenNail.java b/src/com/android/gallery3d/ui/TiledScreenNail.java index 860e230bb..0ade9389c 100644 --- a/src/com/android/gallery3d/ui/TiledScreenNail.java +++ b/src/com/android/gallery3d/ui/TiledScreenNail.java @@ -153,7 +153,7 @@ public class TiledScreenNail implements ScreenNail { @Override public void draw(GLCanvas canvas, int x, int y, int width, int height) { - if (mTexture == null || !mTexture.isReady()) { + if (mTexture == null) { if (mAnimationStartTime == ANIMATION_NOT_NEEDED) { mAnimationStartTime = ANIMATION_NEEDED; } @@ -177,7 +177,7 @@ public class TiledScreenNail implements ScreenNail { @Override public void draw(GLCanvas canvas, RectF source, RectF dest) { - if (mTexture == null || !mTexture.isReady()) { + if (mTexture == null) { canvas.fillRect(dest.left, dest.top, dest.width(), dest.height(), mPlaceholderColor); return; |