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
commit83eeb942e8eda7da94303eb1c105164c253cdbba (patch)
tree1a1cd17a81b26e4a19a4ab92b051b10ea8c1aefe
parentda1c8d757aad7f7f0077ff99283b3db98e2ea395 (diff)
parent3adce2f354258282f9c0e19667786ea79481feeb (diff)
downloadandroid_packages_apps_Snap-83eeb942e8eda7da94303eb1c105164c253cdbba.tar.gz
android_packages_apps_Snap-83eeb942e8eda7da94303eb1c105164c253cdbba.tar.bz2
android_packages_apps_Snap-83eeb942e8eda7da94303eb1c105164c253cdbba.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();