diff options
author | Christian Wichner <cwichner@google.com> | 2013-05-24 16:09:07 +0200 |
---|---|---|
committer | Christian Wichner <cwichner@google.com> | 2013-05-24 16:09:07 +0200 |
commit | f22d8c2e1f011a31e56db45cab07c98a2a03ad9a (patch) | |
tree | 8ddcb7a3ee95e9e8d80799a97152e7513e3488d7 /src/com/android/gallery3d/filtershow/filters | |
parent | 4f675e3c7509efea7e0d140bda1631042a21f8ca (diff) | |
download | android_packages_apps_Snap-f22d8c2e1f011a31e56db45cab07c98a2a03ad9a.tar.gz android_packages_apps_Snap-f22d8c2e1f011a31e56db45cab07c98a2a03ad9a.tar.bz2 android_packages_apps_Snap-f22d8c2e1f011a31e56db45cab07c98a2a03ad9a.zip |
functionality added to transport filter parameter values to following filters. e.g. FixedFrames use the style from Retrolux or Film to tinting the frame.
Change-Id: I87f2497bdaccf8de5d153cbebf9641b979ea15a3
Diffstat (limited to 'src/com/android/gallery3d/filtershow/filters')
-rw-r--r-- | src/com/android/gallery3d/filtershow/filters/ImageFilter.java | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/com/android/gallery3d/filtershow/filters/ImageFilter.java b/src/com/android/gallery3d/filtershow/filters/ImageFilter.java index b80fc7f15..6481e108e 100644 --- a/src/com/android/gallery3d/filtershow/filters/ImageFilter.java +++ b/src/com/android/gallery3d/filtershow/filters/ImageFilter.java @@ -69,10 +69,12 @@ public abstract class ImageFilter implements Cloneable { public boolean supportsAllocationInput() { return false; } public void apply(Allocation in, Allocation out) { + setGeneralParameters(); } public Bitmap apply(Bitmap bitmap, float scaleFactor, int quality) { // do nothing here, subclasses will implement filtering here + setGeneralParameters(); return bitmap; } @@ -102,4 +104,11 @@ public abstract class ImageFilter implements Cloneable { public FilterEnvironment getEnvironment() { return mEnvironment; } + + public void setGeneralParameters() { + // should implement in subclass which like to transport + // some information to other filters. (like the style setting from RetroLux + // and Film to FixedFrame) + mEnvironment.clearGeneralParameters(); + } } |