Loading Android.mk +1 −12 Original line number Diff line number Diff line Loading @@ -10,19 +10,8 @@ LOCAL_STATIC_JAVA_LIBRARIES := android-support-v13 LOCAL_STATIC_JAVA_LIBRARIES += com.android.gallery3d.common2 LOCAL_STATIC_JAVA_LIBRARIES += xmp_toolkit LOCAL_STATIC_JAVA_LIBRARIES += mp4parser LOCAL_STATIC_JAVA_LIBRARIES += android-support-v8-renderscript LOCAL_RENDERSCRIPT_TARGET_API := 18 LOCAL_RENDERSCRIPT_COMPATIBILITY := 18 LOCAL_RENDERSCRIPT_FLAGS := -rs-package-name=android.support.v8.renderscript # Keep track of previously compiled RS files too (from bundled GalleryGoogle). prev_compiled_rs_files := $(call all-renderscript-files-under, src) # We already have these files from GalleryGoogle, so don't install them. LOCAL_RENDERSCRIPT_SKIP_INSTALL := $(prev_compiled_rs_files) LOCAL_SRC_FILES := $(call all-java-files-under, src) $(prev_compiled_rs_files) LOCAL_SRC_FILES := $(call all-java-files-under, src) $(call all-renderscript-files-under, src) LOCAL_SRC_FILES += $(call all-java-files-under, src_pd) LOCAL_RESOURCE_DIR += $(LOCAL_PATH)/res Loading src/com/android/gallery3d/filtershow/filters/ImageFilter.java +1 −1 Original line number Diff line number Diff line Loading @@ -19,7 +19,7 @@ package com.android.gallery3d.filtershow.filters; import android.app.Activity; import android.graphics.Bitmap; import android.graphics.Matrix; import android.support.v8.renderscript.Allocation; import android.renderscript.Allocation; import android.widget.Toast; import com.android.gallery3d.filtershow.imageshow.GeometryMathUtils; Loading src/com/android/gallery3d/filtershow/filters/ImageFilterChanSat.java +7 −7 Original line number Diff line number Diff line Loading @@ -18,11 +18,11 @@ package com.android.gallery3d.filtershow.filters; import android.graphics.Bitmap; import android.graphics.Matrix; import android.support.v8.renderscript.Allocation; import android.support.v8.renderscript.Element; import android.support.v8.renderscript.RenderScript; import android.support.v8.renderscript.Script.LaunchOptions; import android.support.v8.renderscript.Type; import android.renderscript.Allocation; import android.renderscript.Element; import android.renderscript.RenderScript; import android.renderscript.Script; import android.renderscript.Type; import com.android.gallery3d.R; import com.android.gallery3d.filtershow.pipeline.FilterEnvironment; Loading Loading @@ -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); } Loading Loading @@ -132,7 +132,7 @@ public class ImageFilterChanSat extends ImageFilterRS { int width = in.getType().getX(); int height = in.getType().getY(); LaunchOptions options = new LaunchOptions(); Script.LaunchOptions options = new Script.LaunchOptions(); int ty; options.setX(0, width); Loading src/com/android/gallery3d/filtershow/filters/ImageFilterGrad.java +8 −7 Original line number Diff line number Diff line Loading @@ -26,11 +26,12 @@ import com.android.gallery3d.filtershow.pipeline.FilterEnvironment; import android.graphics.Bitmap; import android.graphics.Color; import android.graphics.Matrix; import android.support.v8.renderscript.Allocation; import android.support.v8.renderscript.Element; import android.support.v8.renderscript.RenderScript; import android.support.v8.renderscript.Script.LaunchOptions; import android.support.v8.renderscript.Type; import android.renderscript.Allocation; import android.renderscript.Element; import android.renderscript.RenderScript; import android.renderscript.Script; import android.renderscript.Type; import android.util.Log; import com.android.gallery3d.R; Loading Loading @@ -87,7 +88,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); } Loading Loading @@ -161,7 +162,7 @@ public class ImageFilterGrad extends ImageFilterRS { int width = in.getType().getX(); int height = in.getType().getY(); LaunchOptions options = new LaunchOptions(); Script.LaunchOptions options = new Script.LaunchOptions(); int ty; options.setX(0, width); Loading src/com/android/gallery3d/filtershow/filters/ImageFilterRS.java +5 −3 Original line number Diff line number Diff line Loading @@ -18,7 +18,10 @@ package com.android.gallery3d.filtershow.filters; import android.graphics.Bitmap; import android.graphics.BitmapFactory; import android.support.v8.renderscript.*; import android.renderscript.Allocation; import android.renderscript.Element; import android.renderscript.RenderScript; import android.renderscript.Type; import android.util.Log; import android.content.res.Resources; import com.android.gallery3d.R; Loading Loading @@ -159,8 +162,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; } Loading Loading
Android.mk +1 −12 Original line number Diff line number Diff line Loading @@ -10,19 +10,8 @@ LOCAL_STATIC_JAVA_LIBRARIES := android-support-v13 LOCAL_STATIC_JAVA_LIBRARIES += com.android.gallery3d.common2 LOCAL_STATIC_JAVA_LIBRARIES += xmp_toolkit LOCAL_STATIC_JAVA_LIBRARIES += mp4parser LOCAL_STATIC_JAVA_LIBRARIES += android-support-v8-renderscript LOCAL_RENDERSCRIPT_TARGET_API := 18 LOCAL_RENDERSCRIPT_COMPATIBILITY := 18 LOCAL_RENDERSCRIPT_FLAGS := -rs-package-name=android.support.v8.renderscript # Keep track of previously compiled RS files too (from bundled GalleryGoogle). prev_compiled_rs_files := $(call all-renderscript-files-under, src) # We already have these files from GalleryGoogle, so don't install them. LOCAL_RENDERSCRIPT_SKIP_INSTALL := $(prev_compiled_rs_files) LOCAL_SRC_FILES := $(call all-java-files-under, src) $(prev_compiled_rs_files) LOCAL_SRC_FILES := $(call all-java-files-under, src) $(call all-renderscript-files-under, src) LOCAL_SRC_FILES += $(call all-java-files-under, src_pd) LOCAL_RESOURCE_DIR += $(LOCAL_PATH)/res Loading
src/com/android/gallery3d/filtershow/filters/ImageFilter.java +1 −1 Original line number Diff line number Diff line Loading @@ -19,7 +19,7 @@ package com.android.gallery3d.filtershow.filters; import android.app.Activity; import android.graphics.Bitmap; import android.graphics.Matrix; import android.support.v8.renderscript.Allocation; import android.renderscript.Allocation; import android.widget.Toast; import com.android.gallery3d.filtershow.imageshow.GeometryMathUtils; Loading
src/com/android/gallery3d/filtershow/filters/ImageFilterChanSat.java +7 −7 Original line number Diff line number Diff line Loading @@ -18,11 +18,11 @@ package com.android.gallery3d.filtershow.filters; import android.graphics.Bitmap; import android.graphics.Matrix; import android.support.v8.renderscript.Allocation; import android.support.v8.renderscript.Element; import android.support.v8.renderscript.RenderScript; import android.support.v8.renderscript.Script.LaunchOptions; import android.support.v8.renderscript.Type; import android.renderscript.Allocation; import android.renderscript.Element; import android.renderscript.RenderScript; import android.renderscript.Script; import android.renderscript.Type; import com.android.gallery3d.R; import com.android.gallery3d.filtershow.pipeline.FilterEnvironment; Loading Loading @@ -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); } Loading Loading @@ -132,7 +132,7 @@ public class ImageFilterChanSat extends ImageFilterRS { int width = in.getType().getX(); int height = in.getType().getY(); LaunchOptions options = new LaunchOptions(); Script.LaunchOptions options = new Script.LaunchOptions(); int ty; options.setX(0, width); Loading
src/com/android/gallery3d/filtershow/filters/ImageFilterGrad.java +8 −7 Original line number Diff line number Diff line Loading @@ -26,11 +26,12 @@ import com.android.gallery3d.filtershow.pipeline.FilterEnvironment; import android.graphics.Bitmap; import android.graphics.Color; import android.graphics.Matrix; import android.support.v8.renderscript.Allocation; import android.support.v8.renderscript.Element; import android.support.v8.renderscript.RenderScript; import android.support.v8.renderscript.Script.LaunchOptions; import android.support.v8.renderscript.Type; import android.renderscript.Allocation; import android.renderscript.Element; import android.renderscript.RenderScript; import android.renderscript.Script; import android.renderscript.Type; import android.util.Log; import com.android.gallery3d.R; Loading Loading @@ -87,7 +88,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); } Loading Loading @@ -161,7 +162,7 @@ public class ImageFilterGrad extends ImageFilterRS { int width = in.getType().getX(); int height = in.getType().getY(); LaunchOptions options = new LaunchOptions(); Script.LaunchOptions options = new Script.LaunchOptions(); int ty; options.setX(0, width); Loading
src/com/android/gallery3d/filtershow/filters/ImageFilterRS.java +5 −3 Original line number Diff line number Diff line Loading @@ -18,7 +18,10 @@ package com.android.gallery3d.filtershow.filters; import android.graphics.Bitmap; import android.graphics.BitmapFactory; import android.support.v8.renderscript.*; import android.renderscript.Allocation; import android.renderscript.Element; import android.renderscript.RenderScript; import android.renderscript.Type; import android.util.Log; import android.content.res.Resources; import com.android.gallery3d.R; Loading Loading @@ -159,8 +162,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; } Loading