summaryrefslogtreecommitdiffstats
path: root/src/com
diff options
context:
space:
mode:
Diffstat (limited to 'src/com')
-rw-r--r--src/com/android/gallery3d/glrenderer/BasicTexture.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/com/android/gallery3d/glrenderer/BasicTexture.java b/src/com/android/gallery3d/glrenderer/BasicTexture.java
index 82eb5a7ee..2e77b903f 100644
--- a/src/com/android/gallery3d/glrenderer/BasicTexture.java
+++ b/src/com/android/gallery3d/glrenderer/BasicTexture.java
@@ -78,8 +78,8 @@ public abstract class BasicTexture implements Texture {
public void setSize(int width, int height) {
mWidth = width;
mHeight = height;
- mTextureWidth = Utils.nextPowerOf2(width);
- mTextureHeight = Utils.nextPowerOf2(height);
+ mTextureWidth = width > 0 ? Utils.nextPowerOf2(width) : 0;
+ mTextureHeight = height > 0 ? Utils.nextPowerOf2(height) : 0;
if (mTextureWidth > MAX_TEXTURE_SIZE || mTextureHeight > MAX_TEXTURE_SIZE) {
Log.w(TAG, String.format("texture is too large: %d x %d",
mTextureWidth, mTextureHeight), new Exception());