diff options
author | John Hoford <hoford@google.com> | 2013-01-14 14:48:39 -0800 |
---|---|---|
committer | John Hoford <hoford@google.com> | 2013-01-15 14:54:05 -0800 |
commit | 63a7dac01d394523799939596b960cb03321798d (patch) | |
tree | 7d320449489083a45f513935a35b8fe2102eda9f /src/com/android/gallery3d/filtershow/filters/ImageFilterRS.java | |
parent | a4eee4927777ebeb81641ad9b95719578cb5df1d (diff) | |
download | android_packages_apps_Gallery2-63a7dac01d394523799939596b960cb03321798d.tar.gz android_packages_apps_Gallery2-63a7dac01d394523799939596b960cb03321798d.tar.bz2 android_packages_apps_Gallery2-63a7dac01d394523799939596b960cb03321798d.zip |
refactoring imageshow
Change-Id: I6d0872250b31a427ea6a3e46bd1c9ca5f3ba92ee
Diffstat (limited to 'src/com/android/gallery3d/filtershow/filters/ImageFilterRS.java')
-rw-r--r-- | src/com/android/gallery3d/filtershow/filters/ImageFilterRS.java | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/com/android/gallery3d/filtershow/filters/ImageFilterRS.java b/src/com/android/gallery3d/filtershow/filters/ImageFilterRS.java index cb2bae722..6f7c36e28 100644 --- a/src/com/android/gallery3d/filtershow/filters/ImageFilterRS.java +++ b/src/com/android/gallery3d/filtershow/filters/ImageFilterRS.java @@ -31,6 +31,12 @@ public class ImageFilterRS extends ImageFilter { private static android.content.res.Resources mResources = null; public void prepare(Bitmap bitmap) { + if (mInPixelsAllocation != null) { + mInPixelsAllocation.destroy(); + } + if (mOutPixelsAllocation != null) { + mOutPixelsAllocation.destroy(); + } mInPixelsAllocation = Allocation.createFromBitmap(mRS, bitmap, Allocation.MipmapControl.MIPMAP_NONE, Allocation.USAGE_SCRIPT); |