diff options
author | nicolasroard <nicolasroard@google.com> | 2013-02-26 04:50:31 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2013-02-26 04:50:32 +0000 |
commit | fb68b59d4a6677c9d41b621133c93551d6a93d49 (patch) | |
tree | bec2bd299f12645e2862d7b7587461a5c42c74a5 /src/com/android/gallery3d/filtershow/cache | |
parent | b47db2e6d04a8bb2aa8f62f6149526593d0def52 (diff) | |
parent | 5a8f86ddfe3030af349bce1c4a3b48835f0156e1 (diff) | |
download | android_packages_apps_Snap-fb68b59d4a6677c9d41b621133c93551d6a93d49.tar.gz android_packages_apps_Snap-fb68b59d4a6677c9d41b621133c93551d6a93d49.tar.bz2 android_packages_apps_Snap-fb68b59d4a6677c9d41b621133c93551d6a93d49.zip |
Merge "Fix crash on applying borders" into gb-ub-photos-bryce
Diffstat (limited to 'src/com/android/gallery3d/filtershow/cache')
-rw-r--r-- | src/com/android/gallery3d/filtershow/cache/FilteringPipeline.java | 3 | ||||
-rw-r--r-- | src/com/android/gallery3d/filtershow/cache/ImageLoader.java | 5 |
2 files changed, 5 insertions, 3 deletions
diff --git a/src/com/android/gallery3d/filtershow/cache/FilteringPipeline.java b/src/com/android/gallery3d/filtershow/cache/FilteringPipeline.java index ec08e488e..9c6415bc9 100644 --- a/src/com/android/gallery3d/filtershow/cache/FilteringPipeline.java +++ b/src/com/android/gallery3d/filtershow/cache/FilteringPipeline.java @@ -249,7 +249,8 @@ public class FilteringPipeline implements Handler.Callback { setPresetParameters(preset); if (request.getType() == RenderingRequest.PARTIAL_RENDERING) { - bitmap = MasterImage.getImage().getImageLoader().getScaleOneImageForPreset(null, preset, request.getBounds(), request.getDestination(), false); + bitmap = MasterImage.getImage().getImageLoader().getScaleOneImageForPreset(null, preset, + request.getBounds(), request.getDestination(), false); if (bitmap == null) { return; } diff --git a/src/com/android/gallery3d/filtershow/cache/ImageLoader.java b/src/com/android/gallery3d/filtershow/cache/ImageLoader.java index b502a2ffe..b5ed9eee0 100644 --- a/src/com/android/gallery3d/filtershow/cache/ImageLoader.java +++ b/src/com/android/gallery3d/filtershow/cache/ImageLoader.java @@ -315,6 +315,7 @@ public class ImageLoader { // decode with inSampleSize BitmapFactory.Options o2 = new BitmapFactory.Options(); o2.inSampleSize = scale; + o2.inMutable = true; Utils.closeSilently(is); is = mContext.getContentResolver().openInputStream(uri); @@ -376,9 +377,9 @@ public class ImageLoader { mLoadingLock.lock(); Bitmap bmp = mZoomCache.getImage(imagePreset, bounds); if (force || bmp == null) { - BitmapFactory.Options options = null; + BitmapFactory.Options options = new BitmapFactory.Options(); + options.inMutable = true; if (destination != null) { - options = new BitmapFactory.Options(); if (bounds.width() > destination.width()) { int sampleSize = 1; int w = bounds.width(); |