Commit 1bfb4e42 authored by Miao Wang's avatar Miao Wang
Browse files

Create RenderScript ScriptC without resourceID.

 - Fix build
 - Enable Gallery2 to able to build for 64bit.

Bug: 22693954
Bug: 15275515
Change-Id: I394e6e2d98052d8c3c4c011f9807308b9ca9ab86
parent d9662ac6
......@@ -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)
......
......@@ -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);
}
......
......@@ -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);
}
......
......@@ -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;
}
......
......@@ -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());
}
}
......
......@@ -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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment