diff options
author | Ruben Brunk <rubenbrunk@google.com> | 2013-07-15 18:32:50 -0700 |
---|---|---|
committer | Ruben Brunk <rubenbrunk@google.com> | 2013-07-17 14:13:05 -0700 |
commit | 76a8b489a62ed82919c8b6339123488c09fc0168 (patch) | |
tree | d0e4ecc28c34047f55530077f0693b0cb188da87 /src/com/android/gallery3d/filtershow/pipeline | |
parent | 3f0034140c165b86fbaf5c0369f39431548308e9 (diff) | |
download | android_packages_apps_Gallery2-76a8b489a62ed82919c8b6339123488c09fc0168.tar.gz android_packages_apps_Gallery2-76a8b489a62ed82919c8b6339123488c09fc0168.tar.bz2 android_packages_apps_Gallery2-76a8b489a62ed82919c8b6339123488c09fc0168.zip |
Refactoring GeometryMetadata.
Bug: 9170644
- First part of multi-step refactor, splits
GeometryMetadata functionality into 4
FilterRepresentation subclasses as requested.
Change-Id: I212193db8c154f64c550adb9735c0502bcaa7468
Diffstat (limited to 'src/com/android/gallery3d/filtershow/pipeline')
-rw-r--r-- | src/com/android/gallery3d/filtershow/pipeline/ImagePreset.java | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/com/android/gallery3d/filtershow/pipeline/ImagePreset.java b/src/com/android/gallery3d/filtershow/pipeline/ImagePreset.java index cc4938c60..26dce370e 100644 --- a/src/com/android/gallery3d/filtershow/pipeline/ImagePreset.java +++ b/src/com/android/gallery3d/filtershow/pipeline/ImagePreset.java @@ -26,9 +26,13 @@ import android.util.Log; import com.android.gallery3d.R; import com.android.gallery3d.filtershow.cache.ImageLoader; import com.android.gallery3d.filtershow.filters.BaseFiltersManager; +import com.android.gallery3d.filtershow.filters.FilterCropRepresentation; import com.android.gallery3d.filtershow.filters.FilterFxRepresentation; import com.android.gallery3d.filtershow.filters.FilterImageBorderRepresentation; +import com.android.gallery3d.filtershow.filters.FilterMirrorRepresentation; import com.android.gallery3d.filtershow.filters.FilterRepresentation; +import com.android.gallery3d.filtershow.filters.FilterRotateRepresentation; +import com.android.gallery3d.filtershow.filters.FilterStraightenRepresentation; import com.android.gallery3d.filtershow.filters.FiltersManager; import com.android.gallery3d.filtershow.filters.ImageFilter; import com.android.gallery3d.filtershow.imageshow.GeometryMetadata; @@ -659,8 +663,17 @@ public class ImagePreset { } FilterRepresentation creatFilterFromName(String name) { + // TODO: move these to FiltersManager pattern. if (GeometryMetadata.SERIALIZATION_NAME.equalsIgnoreCase(name)) { return new GeometryMetadata(); + } else if (FilterRotateRepresentation.SERIALIZATION_NAME.equals(name)) { + return new FilterRotateRepresentation(); + } else if (FilterMirrorRepresentation.SERIALIZATION_NAME.equals(name)) { + return new FilterMirrorRepresentation(); + } else if (FilterStraightenRepresentation.SERIALIZATION_NAME.equals(name)) { + return new FilterStraightenRepresentation(); + } else if (FilterCropRepresentation.SERIALIZATION_NAME.equals(name)) { + return new FilterCropRepresentation(); } FiltersManager filtersManager = FiltersManager.getManager(); return filtersManager.createFilterFromName(name); |