summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTim Murray <timmurray@google.com>2013-02-11 23:49:57 (GMT)
committerAndroid (Google) Code Review <android-gerrit@google.com>2013-02-11 23:49:58 (GMT)
commit83eeb942e8eda7da94303eb1c105164c253cdbba (patch)
tree1a1cd17a81b26e4a19a4ab92b051b10ea8c1aefe
parentda1c8d757aad7f7f0077ff99283b3db98e2ea395 (diff)
parent3adce2f354258282f9c0e19667786ea79481feeb (diff)
downloadandroid_packages_apps_Snap-83eeb942e8eda7da94303eb1c105164c253cdbba.zip
android_packages_apps_Snap-83eeb942e8eda7da94303eb1c105164c253cdbba.tar.gz
android_packages_apps_Snap-83eeb942e8eda7da94303eb1c105164c253cdbba.tar.bz2
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 4778d3c..79c783a 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();