summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMiao Wang <miaowang@google.com>2015-07-29 22:24:21 (GMT)
committerAndroid Git Automerger <android-git-automerger@android.com>2015-07-29 22:24:21 (GMT)
commite71248e4da5f3109e3296574981460ab04cd8339 (patch)
tree0a481ee8e38f977cd9c8bbde4f3a7a1c6d7fe5df
parenta2aab1aa459c2f16016e0bc2bd4e93aee2d39c27 (diff)
parent1bfb4e42a0dd97a78cd13d35f0c2b7add600357c (diff)
downloadandroid_packages_apps_Gallery2-e71248e4da5f3109e3296574981460ab04cd8339.zip
android_packages_apps_Gallery2-e71248e4da5f3109e3296574981460ab04cd8339.tar.gz
android_packages_apps_Gallery2-e71248e4da5f3109e3296574981460ab04cd8339.tar.bz2
am 1bfb4e42: Create RenderScript ScriptC without resourceID.
* commit '1bfb4e42a0dd97a78cd13d35f0c2b7add600357c': Create RenderScript ScriptC without resourceID.
-rw-r--r--Android.mk2
-rw-r--r--src/com/android/gallery3d/filtershow/filters/ImageFilterChanSat.java2
-rw-r--r--src/com/android/gallery3d/filtershow/filters/ImageFilterGrad.java2
-rw-r--r--src/com/android/gallery3d/filtershow/filters/ImageFilterRS.java3
-rw-r--r--src/com/android/gallery3d/filtershow/filters/ImageFilterSharpen.java2
-rw-r--r--src/com/android/gallery3d/filtershow/filters/ImageFilterVignette.java2
6 files changed, 5 insertions, 8 deletions
diff --git a/Android.mk b/Android.mk
index d3f4110..3088512 100644
--- a/Android.mk
+++ b/Android.mk
@@ -37,8 +37,6 @@ LOCAL_JNI_SHARED_LIBRARIES := libjni_eglfence libjni_filtershow_filters librsjni
LOCAL_PROGUARD_FLAG_FILES := proguard.flags
-LOCAL_MULTILIB := 32
-
LOCAL_JAVA_LIBRARIES += org.apache.http.legacy
include $(BUILD_PACKAGE)
diff --git a/src/com/android/gallery3d/filtershow/filters/ImageFilterChanSat.java b/src/com/android/gallery3d/filtershow/filters/ImageFilterChanSat.java
index 1ea8edf..5d3856e 100644
--- a/src/com/android/gallery3d/filtershow/filters/ImageFilterChanSat.java
+++ b/src/com/android/gallery3d/filtershow/filters/ImageFilterChanSat.java
@@ -77,7 +77,7 @@ public class ImageFilterChanSat extends ImageFilterRS {
Type.Builder tb_float = new Type.Builder(rsCtx, Element.F32_4(rsCtx));
tb_float.setX(in.getType().getX());
tb_float.setY(in.getType().getY());
- mScript = new ScriptC_saturation(rsCtx, res, R.raw.saturation);
+ mScript = new ScriptC_saturation(rsCtx);
}
diff --git a/src/com/android/gallery3d/filtershow/filters/ImageFilterGrad.java b/src/com/android/gallery3d/filtershow/filters/ImageFilterGrad.java
index cbdfaa6..0a615af 100644
--- a/src/com/android/gallery3d/filtershow/filters/ImageFilterGrad.java
+++ b/src/com/android/gallery3d/filtershow/filters/ImageFilterGrad.java
@@ -87,7 +87,7 @@ public class ImageFilterGrad extends ImageFilterRS {
Type.Builder tb_float = new Type.Builder(rsCtx, Element.F32_4(rsCtx));
tb_float.setX(in.getType().getX());
tb_float.setY(in.getType().getY());
- mScript = new ScriptC_grad(rsCtx, res, R.raw.grad);
+ mScript = new ScriptC_grad(rsCtx);
}
diff --git a/src/com/android/gallery3d/filtershow/filters/ImageFilterRS.java b/src/com/android/gallery3d/filtershow/filters/ImageFilterRS.java
index 9a494d8..e94e2a6 100644
--- a/src/com/android/gallery3d/filtershow/filters/ImageFilterRS.java
+++ b/src/com/android/gallery3d/filtershow/filters/ImageFilterRS.java
@@ -159,8 +159,7 @@ public abstract class ImageFilterRS extends ImageFilter {
private static Allocation convertRGBAtoA(RenderScript RS, Bitmap bitmap) {
if (RS != mRScache || mGreyConvert == null) {
- mGreyConvert = new ScriptC_grey(RS, RS.getApplicationContext().getResources(),
- R.raw.grey);
+ mGreyConvert = new ScriptC_grey(RS);
mRScache = RS;
}
diff --git a/src/com/android/gallery3d/filtershow/filters/ImageFilterSharpen.java b/src/com/android/gallery3d/filtershow/filters/ImageFilterSharpen.java
index 418afc4..bfec89f 100644
--- a/src/com/android/gallery3d/filtershow/filters/ImageFilterSharpen.java
+++ b/src/com/android/gallery3d/filtershow/filters/ImageFilterSharpen.java
@@ -64,7 +64,7 @@ public class ImageFilterSharpen extends ImageFilterRS {
protected void createFilter(android.content.res.Resources res, float scaleFactor,
int quality) {
if (mScript == null) {
- mScript = new ScriptC_convolve3x3(getRenderScriptContext(), res, R.raw.convolve3x3);
+ mScript = new ScriptC_convolve3x3(getRenderScriptContext());
}
}
diff --git a/src/com/android/gallery3d/filtershow/filters/ImageFilterVignette.java b/src/com/android/gallery3d/filtershow/filters/ImageFilterVignette.java
index 49ac595..e0b4cf6 100644
--- a/src/com/android/gallery3d/filtershow/filters/ImageFilterVignette.java
+++ b/src/com/android/gallery3d/filtershow/filters/ImageFilterVignette.java
@@ -79,7 +79,7 @@ public class ImageFilterVignette extends ImageFilterRS {
protected void createFilter(Resources res, float scaleFactor, int quality) {
RenderScript rsCtx = getRenderScriptContext();
- mScript = new ScriptC_vignette(rsCtx, res, R.raw.vignette);
+ mScript = new ScriptC_vignette(rsCtx);
}
@Override