summaryrefslogtreecommitdiffstats
path: root/src/com/android/gallery3d/glrenderer/ResourceTexture.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/com/android/gallery3d/glrenderer/ResourceTexture.java')
-rw-r--r--src/com/android/gallery3d/glrenderer/ResourceTexture.java13
1 files changed, 2 insertions, 11 deletions
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