OSDN Git Service

Make Gallery2 use platform RenderScript
authorMiao Wang <miaowang@google.com>
Fri, 6 Nov 2015 22:39:05 +0000 (14:39 -0800)
committerMiao Wang <miaowang@google.com>
Tue, 10 Nov 2015 05:35:35 +0000 (21:35 -0800)
Bug: 25226912
Change-Id: I26c3d86b4ef6c0611b97731e849eab526521e5c2

12 files changed:
Android.mk
proguard.flags
src/com/android/gallery3d/filtershow/filters/ImageFilter.java
src/com/android/gallery3d/filtershow/filters/ImageFilterChanSat.java
src/com/android/gallery3d/filtershow/filters/ImageFilterGrad.java
src/com/android/gallery3d/filtershow/filters/ImageFilterRS.java
src/com/android/gallery3d/filtershow/filters/ImageFilterVignette.java
src/com/android/gallery3d/filtershow/pipeline/Buffer.java
src/com/android/gallery3d/filtershow/pipeline/CachingPipeline.java
src/com/android/gallery3d/filtershow/pipeline/FilterEnvironment.java
src/com/android/gallery3d/filtershow/pipeline/ImagePreset.java
src/com/android/gallery3d/filtershow/pipeline/PipelineInterface.java

index 596b86e..670cc4c 100644 (file)
@@ -8,11 +8,6 @@ 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
 
 LOCAL_SRC_FILES := \
     $(call all-java-files-under, src) \
@@ -29,7 +24,7 @@ LOCAL_OVERRIDES_PACKAGES := Gallery Gallery3D GalleryNew3D
 
 LOCAL_SDK_VERSION := current
 
-LOCAL_JNI_SHARED_LIBRARIES := libjni_eglfence libjni_filtershow_filters librsjni libjni_jpegstream
+LOCAL_JNI_SHARED_LIBRARIES := libjni_eglfence libjni_filtershow_filters libjni_jpegstream
 
 LOCAL_PROGUARD_FLAG_FILES := proguard.flags
 
index 65104ec..53693c1 100644 (file)
@@ -40,8 +40,6 @@
 # Disable the warnings of using dynamic method calls in EffectsRecorder
 -dontnote com.android.camera.EffectsRecorder
 
--keep class android.support.v8.renderscript.** { *; }
-
 # Required for ActionBarSherlock
 -keep class android.support.v4.app.** { *; }
 -keep interface android.support.v4.app.** { *; }
index 4371374..1fcd300 100644 (file)
@@ -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;
index 5d3856e..8482eac 100644 (file)
@@ -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.LaunchOptions;
+import android.renderscript.Type;
 
 import com.android.gallery3d.R;
 import com.android.gallery3d.filtershow.pipeline.FilterEnvironment;
index 0a615af..4d5a79c 100644 (file)
@@ -26,11 +26,11 @@ 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.LaunchOptions;
+import android.renderscript.Type;
 import android.util.Log;
 
 import com.android.gallery3d.R;
index e94e2a6..3c54456 100644 (file)
@@ -18,7 +18,7 @@ package com.android.gallery3d.filtershow.filters;
 
 import android.graphics.Bitmap;
 import android.graphics.BitmapFactory;
-import android.support.v8.renderscript.*;
+import android.renderscript.*;
 import android.util.Log;
 import android.content.res.Resources;
 import com.android.gallery3d.R;
index e0b4cf6..0d0dd3b 100644 (file)
@@ -24,11 +24,11 @@ import android.graphics.Rect;
 import com.android.gallery3d.R;
 import com.android.gallery3d.filtershow.imageshow.MasterImage;
 import com.android.gallery3d.filtershow.pipeline.FilterEnvironment;
-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.LaunchOptions;
+import android.renderscript.Type;
 import android.util.Log;
 
 public class ImageFilterVignette extends ImageFilterRS {
index c378eb9..a487a5d 100644 (file)
@@ -18,8 +18,8 @@ package com.android.gallery3d.filtershow.pipeline;
 
 import android.graphics.Bitmap;
 import android.graphics.Canvas;
-import android.support.v8.renderscript.Allocation;
-import android.support.v8.renderscript.RenderScript;
+import android.renderscript.Allocation;
+import android.renderscript.RenderScript;
 import android.util.Log;
 import com.android.gallery3d.filtershow.cache.BitmapCache;
 import com.android.gallery3d.filtershow.imageshow.MasterImage;
index 8ae9a7c..2923e3b 100644 (file)
@@ -24,8 +24,8 @@ import android.graphics.Matrix;
 import android.graphics.Paint;
 import android.graphics.Rect;
 import android.graphics.RectF;
-import android.support.v8.renderscript.Allocation;
-import android.support.v8.renderscript.RenderScript;
+import android.renderscript.Allocation;
+import android.renderscript.RenderScript;
 import android.util.Log;
 
 import com.android.gallery3d.filtershow.cache.BitmapCache;
index ebf83b7..0b84f52 100644 (file)
@@ -18,7 +18,7 @@ package com.android.gallery3d.filtershow.pipeline;
 
 import android.graphics.Bitmap;
 import android.graphics.Canvas;
-import android.support.v8.renderscript.Allocation;
+import android.renderscript.Allocation;
 
 import com.android.gallery3d.app.Log;
 import com.android.gallery3d.filtershow.cache.BitmapCache;
index 4765a59..9166ee3 100644 (file)
@@ -18,7 +18,7 @@ package com.android.gallery3d.filtershow.pipeline;
 
 import android.graphics.Bitmap;
 import android.graphics.Rect;
-import android.support.v8.renderscript.Allocation;
+import android.renderscript.Allocation;
 import android.util.JsonReader;
 import android.util.JsonWriter;
 import android.util.Log;
index d53768c..ad59e0c 100644 (file)
@@ -18,8 +18,8 @@ package com.android.gallery3d.filtershow.pipeline;
 
 import android.content.res.Resources;
 import android.graphics.Bitmap;
-import android.support.v8.renderscript.Allocation;
-import android.support.v8.renderscript.RenderScript;
+import android.renderscript.Allocation;
+import android.renderscript.RenderScript;
 
 public interface PipelineInterface {
     public String getName();