diff options
| author | Miao Wang <miaowang@google.com> | 2015-07-29 12:56:27 -0700 |
|---|---|---|
| committer | Miao Wang <miaowang@google.com> | 2015-07-29 14:58:39 -0700 |
| commit | 1bfb4e42a0dd97a78cd13d35f0c2b7add600357c (patch) | |
| tree | c4c1453427ff0718321b7e171cf22307e4be523f /src | |
| parent | d9662ac615b0d5ac1edcbaab6ddd202edc743195 (diff) | |
| download | android_packages_apps_Gallery2-1bfb4e42a0dd97a78cd13d35f0c2b7add600357c.tar.gz android_packages_apps_Gallery2-1bfb4e42a0dd97a78cd13d35f0c2b7add600357c.tar.bz2 android_packages_apps_Gallery2-1bfb4e42a0dd97a78cd13d35f0c2b7add600357c.zip | |
Create RenderScript ScriptC without resourceID.
- Fix build
- Enable Gallery2 to able to build for 64bit.
Bug: 22693954
Bug: 15275515
Change-Id: I394e6e2d98052d8c3c4c011f9807308b9ca9ab86
Diffstat (limited to 'src')
5 files changed, 5 insertions, 6 deletions
diff --git a/src/com/android/gallery3d/filtershow/filters/ImageFilterChanSat.java b/src/com/android/gallery3d/filtershow/filters/ImageFilterChanSat.java index 1ea8edfb8..5d3856ebc 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 cbdfaa623..0a615afd4 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 9a494d823..e94e2a63a 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 418afc40f..bfec89f6b 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 49ac5959c..e0b4cf687 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 |
