summaryrefslogtreecommitdiffstats
path: root/src/com/android/gallery3d/glrenderer
diff options
context:
space:
mode:
Diffstat (limited to 'src/com/android/gallery3d/glrenderer')
-rw-r--r--src/com/android/gallery3d/glrenderer/NinePatchTexture.java2
-rw-r--r--src/com/android/gallery3d/glrenderer/ResourceTexture.java13
2 files changed, 3 insertions, 12 deletions
diff --git a/src/com/android/gallery3d/glrenderer/NinePatchTexture.java b/src/com/android/gallery3d/glrenderer/NinePatchTexture.java
index 2353f8b9b..d0ddc46c3 100644
--- a/src/com/android/gallery3d/glrenderer/NinePatchTexture.java
+++ b/src/com/android/gallery3d/glrenderer/NinePatchTexture.java
@@ -50,7 +50,7 @@ public class NinePatchTexture extends ResourceTexture {
BitmapFactory.Options options = new BitmapFactory.Options();
options.inPreferredConfig = Bitmap.Config.ARGB_8888;
Bitmap bitmap = BitmapFactory.decodeResource(
- mContext.getResources(), mResId, options, false);
+ mContext.getResources(), mResId, options);
mBitmap = bitmap;
setSize(bitmap.getWidth(), bitmap.getHeight());
byte[] chunkData = bitmap.getNinePatchChunk();
diff --git a/src/com/android/gallery3d/glrenderer/ResourceTexture.java b/src/com/android/gallery3d/glrenderer/ResourceTexture.java
index d60a16c5a..eb8e8a517 100644
--- a/src/com/android/gallery3d/glrenderer/ResourceTexture.java
+++ b/src/com/android/gallery3d/glrenderer/ResourceTexture.java
@@ -19,7 +19,6 @@ package com.android.gallery3d.glrenderer;
import android.content.Context;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
-import android.util.Log;
import junit.framework.Assert;
@@ -27,7 +26,6 @@ import junit.framework.Assert;
// By default ResourceTexture is not opaque.
public class ResourceTexture extends UploadedTexture {
- private static final String TAG = "ResourceTexture";
protected final Context mContext;
protected final int mResId;
@@ -42,15 +40,8 @@ public class ResourceTexture extends UploadedTexture {
protected Bitmap onGetBitmap() {
BitmapFactory.Options options = new BitmapFactory.Options();
options.inPreferredConfig = Bitmap.Config.ARGB_8888;
- Bitmap bitmap = null;
- try {
- bitmap = BitmapFactory.decodeResource(mContext.getResources(), mResId, options, false);
- } catch (OutOfMemoryError ex) {
- Log.e(TAG, "BitmapFactory decode resource out of memory");
- ex.printStackTrace();
- return null;
- }
- return bitmap;
+ return BitmapFactory.decodeResource(
+ mContext.getResources(), mResId, options);
}
@Override