diff options
Diffstat (limited to 'src/com/android/gallery3d/ui/AlbumSetSlotRenderer.java')
-rw-r--r-- | src/com/android/gallery3d/ui/AlbumSetSlotRenderer.java | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/src/com/android/gallery3d/ui/AlbumSetSlotRenderer.java b/src/com/android/gallery3d/ui/AlbumSetSlotRenderer.java index 233a8003d..70d7c273a 100644 --- a/src/com/android/gallery3d/ui/AlbumSetSlotRenderer.java +++ b/src/com/android/gallery3d/ui/AlbumSetSlotRenderer.java @@ -106,13 +106,20 @@ public class AlbumSetSlotRenderer extends AbstractSlotRenderer { } } - private static Texture checkTexture(Texture texture) { + private static Texture checkLabelTexture(Texture texture) { return ((texture instanceof UploadedTexture) && ((UploadedTexture) texture).isUploading()) ? null : texture; } + private static Texture checkContentTexture(Texture texture) { + return ((texture instanceof TiledTexture) + && !((TiledTexture) texture).isReady()) + ? null + : texture; + } + @Override public int renderSlot(GLCanvas canvas, int index, int pass, int width, int height) { AlbumSetEntry entry = mDataWindow.get(index); @@ -155,7 +162,7 @@ public class AlbumSetSlotRenderer extends AbstractSlotRenderer { GLCanvas canvas, AlbumSetEntry entry, int width, int height) { int renderRequestFlags = 0; - Texture content = checkTexture(entry.content); + Texture content = checkContentTexture(entry.content); if (content == null) { content = mWaitLoadingTexture; entry.isWaitLoadingDisplayed = true; @@ -175,7 +182,7 @@ public class AlbumSetSlotRenderer extends AbstractSlotRenderer { protected int renderLabel( GLCanvas canvas, AlbumSetEntry entry, int width, int height) { - Texture content = checkTexture(entry.labelTexture); + Texture content = checkLabelTexture(entry.labelTexture); if (content == null) { content = mWaitLoadingTexture; } |