summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornicolasroard <nicolasroard@google.com>2013-07-01 16:58:51 -0700
committernicolasroard <nicolasroard@google.com>2013-07-01 17:45:59 -0700
commitdeaef0458003c802b57dab5ebce36c38083c6708 (patch)
tree02db8fe7ced7c380f4411004466f3b7929d1bb88
parent59552e6424a93bf8ba55fa770b7d7a230ea10db9 (diff)
downloadandroid_packages_apps_Snap-deaef0458003c802b57dab5ebce36c38083c6708.tar.gz
android_packages_apps_Snap-deaef0458003c802b57dab5ebce36c38083c6708.tar.bz2
android_packages_apps_Snap-deaef0458003c802b57dab5ebce36c38083c6708.zip
Pipeline refactoring
Add SharedBuffer and Buffer class Change-Id: I823a9520541e3be5321a3deb5e58a358588b6cf3
-rw-r--r--src/com/android/gallery3d/filtershow/presets/FilterEnvironment.java7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/com/android/gallery3d/filtershow/presets/FilterEnvironment.java b/src/com/android/gallery3d/filtershow/presets/FilterEnvironment.java
index 8d59c9f54..6a130a3e3 100644
--- a/src/com/android/gallery3d/filtershow/presets/FilterEnvironment.java
+++ b/src/com/android/gallery3d/filtershow/presets/FilterEnvironment.java
@@ -22,6 +22,7 @@ import android.support.v8.renderscript.Allocation;
import com.android.gallery3d.filtershow.filters.FilterRepresentation;
import com.android.gallery3d.filtershow.filters.FiltersManagerInterface;
import com.android.gallery3d.filtershow.filters.ImageFilter;
+import com.android.gallery3d.filtershow.pipeline.Buffer;
import java.lang.ref.WeakReference;
import java.util.HashMap;
@@ -53,7 +54,11 @@ public class FilterEnvironment {
private HashMap<Integer, Integer>
generalParameters = new HashMap<Integer, Integer>();
- public void cache(Bitmap bitmap) {
+ public void cache(Buffer buffer) {
+ if (buffer == null) {
+ return;
+ }
+ Bitmap bitmap = buffer.getBitmap();
if (bitmap == null) {
return;
}