summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTim Murray <timmurray@google.com>2013-02-11 23:49:57 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2013-02-11 23:49:58 +0000
commit32ee1acbd9f9ab0db382f0947a1ca1f3dfe52059 (patch)
tree764a40397bbfe4b54f7b0e7f2f5059b8ae13ee85
parent31e52aae5eeefd8383cb238e7dd3047e883968ef (diff)
parent7921e124d57759d6f0887a42ddc360d923e60cdd (diff)
downloadandroid_packages_apps_Gallery2-32ee1acbd9f9ab0db382f0947a1ca1f3dfe52059.tar.gz
android_packages_apps_Gallery2-32ee1acbd9f9ab0db382f0947a1ca1f3dfe52059.tar.bz2
android_packages_apps_Gallery2-32ee1acbd9f9ab0db382f0947a1ca1f3dfe52059.zip
Merge "Only create one RS context." into gb-ub-photos-bryce
-rw-r--r--src/com/android/gallery3d/filtershow/filters/ImageFilterRS.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/com/android/gallery3d/filtershow/filters/ImageFilterRS.java b/src/com/android/gallery3d/filtershow/filters/ImageFilterRS.java
index 4778d3c08..79c783a94 100644
--- a/src/com/android/gallery3d/filtershow/filters/ImageFilterRS.java
+++ b/src/com/android/gallery3d/filtershow/filters/ImageFilterRS.java
@@ -92,7 +92,9 @@ public class ImageFilterRS extends ImageFilter {
}
public static void setRenderScriptContext(Activity context) {
- mRS = RenderScript.create(context);
+ if (mRS == null) {
+ mRS = RenderScript.create(context);
+ }
mResources = context.getResources();
if (mInPixelsAllocation != null) {
mInPixelsAllocation.destroy();