summaryrefslogtreecommitdiffstats
path: root/src_pd
diff options
context:
space:
mode:
authornicolasroard <nicolasroard@google.com>2013-02-11 09:55:33 -0800
committernicolasroard <nicolasroard@google.com>2013-02-11 13:49:11 -0800
commit6900cad45d240c9a54b92991538b6a33652e766c (patch)
tree1eabeedd80a3fd05c4ea607377ea277c4ce249a2 /src_pd
parentcef6ad5d4a60a6e2960f7f72de624d5e60b3908a (diff)
downloadandroid_packages_apps_Gallery2-6900cad45d240c9a54b92991538b6a33652e766c.zip
android_packages_apps_Gallery2-6900cad45d240c9a54b92991538b6a33652e766c.tar.gz
android_packages_apps_Gallery2-6900cad45d240c9a54b92991538b6a33652e766c.tar.bz2
Cleaning filters
Change-Id: I413b935f90cebdab37d3db73d7fcb0fe77a64579
Diffstat (limited to 'src_pd')
-rw-r--r--src_pd/com/android/gallery3d/filtershow/filters/FiltersManager.java27
1 files changed, 27 insertions, 0 deletions
diff --git a/src_pd/com/android/gallery3d/filtershow/filters/FiltersManager.java b/src_pd/com/android/gallery3d/filtershow/filters/FiltersManager.java
index 3a259e9..5ddabe2 100644
--- a/src_pd/com/android/gallery3d/filtershow/filters/FiltersManager.java
+++ b/src_pd/com/android/gallery3d/filtershow/filters/FiltersManager.java
@@ -57,6 +57,33 @@ public class FiltersManager {
return gInstance;
}
+ public static FilterRepresentation getRepresentation(Class c) {
+ ImageFilter filter = mFilters.get(c);
+ if (filter != null) {
+ return filter.getDefaultRepresentation();
+ }
+ return null;
+ }
+
+ public static void addFilterRepresentations(Vector<FilterRepresentation> representations) {
+ representations.add(getRepresentation(ImageFilterTinyPlanet.class));
+ representations.add(getRepresentation(ImageFilterWBalance.class));
+ representations.add(getRepresentation(ImageFilterExposure.class));
+ representations.add(getRepresentation(ImageFilterVignette.class));
+ representations.add(getRepresentation(ImageFilterContrast.class));
+ representations.add(getRepresentation(ImageFilterShadows.class));
+ representations.add(getRepresentation(ImageFilterVibrance.class));
+ representations.add(getRepresentation(ImageFilterSharpen.class));
+ representations.add(getRepresentation(ImageFilterCurves.class));
+ representations.add(getRepresentation(ImageFilterDraw.class));
+ representations.add(getRepresentation(ImageFilterHue.class));
+ representations.add(getRepresentation(ImageFilterSaturated.class));
+ representations.add(getRepresentation(ImageFilterBwFilter.class));
+ representations.add(getRepresentation(ImageFilterNegative.class));
+ representations.add(getRepresentation(ImageFilterEdge.class));
+ representations.add(getRepresentation(ImageFilterKMeans.class));
+ }
+
public static void addFilters(Vector<ImageFilter> filters) {
filters.add(new ImageFilterTinyPlanet());
filters.add(new ImageFilterWBalance());