OSDN Git Service

Refactor to remove obsolete design and improve code consistency.
authorYuli Huang <yuli@google.com>
Mon, 28 Nov 2011 12:05:27 +0000 (20:05 +0800)
committerYuli Huang <yuli@google.com>
Thu, 1 Dec 2011 16:57:02 +0000 (00:57 +0800)
commit04085c3b17e4b6da6fb951e2cdbd35dfa153bb87
treefbea219d9e64977adf73fca3b9faa20c92839512
parente4fe38b74589dbce167cd88d14b249f645a57b73
Refactor to remove obsolete design and improve code consistency.

1. Remove isValid()/validate() in Filter; EffectAction would push
filters into the stack when being notified by notifyChanged().
2. Make RedEyeAction consistent with DoodleAction by ignoring
out-of-bounds operations.
3. Improve consistency by encapsulate effect-tool creation/removal in
one class (EffectToolFactory).
4. Minimize variable visibility in EffectAction subclasses.
5. Fix unfinished doodle lost when exiting Doodle effect by multi-touch.

Change-Id: I8d3b127c5fe8777eb45b7c5ae680f6a30a99635a
56 files changed:
res/layout/photoeditor_crop_view.xml
res/layout/photoeditor_doodle_view.xml
res/layout/photoeditor_effect_tool_fullscreen.xml [new file with mode: 0644]
res/layout/photoeditor_flip_view.xml
res/layout/photoeditor_rotate_view.xml
res/layout/photoeditor_touch_view.xml
src/com/android/gallery3d/photoeditor/EffectsBar.java
src/com/android/gallery3d/photoeditor/actions/AutoFixAction.java
src/com/android/gallery3d/photoeditor/actions/ColorTemperatureAction.java
src/com/android/gallery3d/photoeditor/actions/CropAction.java
src/com/android/gallery3d/photoeditor/actions/CrossProcessAction.java
src/com/android/gallery3d/photoeditor/actions/DocumentaryAction.java
src/com/android/gallery3d/photoeditor/actions/Doodle.java
src/com/android/gallery3d/photoeditor/actions/DoodleAction.java
src/com/android/gallery3d/photoeditor/actions/DoodleView.java
src/com/android/gallery3d/photoeditor/actions/DuotoneAction.java
src/com/android/gallery3d/photoeditor/actions/EffectAction.java
src/com/android/gallery3d/photoeditor/actions/EffectToolFactory.java
src/com/android/gallery3d/photoeditor/actions/FaceTanAction.java
src/com/android/gallery3d/photoeditor/actions/FaceliftAction.java
src/com/android/gallery3d/photoeditor/actions/FillLightAction.java
src/com/android/gallery3d/photoeditor/actions/FisheyeAction.java
src/com/android/gallery3d/photoeditor/actions/FlipAction.java
src/com/android/gallery3d/photoeditor/actions/GrainAction.java
src/com/android/gallery3d/photoeditor/actions/GrayscaleAction.java
src/com/android/gallery3d/photoeditor/actions/HighlightAction.java
src/com/android/gallery3d/photoeditor/actions/LomoishAction.java
src/com/android/gallery3d/photoeditor/actions/NegativeAction.java
src/com/android/gallery3d/photoeditor/actions/PosterizeAction.java
src/com/android/gallery3d/photoeditor/actions/RedEyeAction.java
src/com/android/gallery3d/photoeditor/actions/RotateAction.java
src/com/android/gallery3d/photoeditor/actions/SaturationAction.java
src/com/android/gallery3d/photoeditor/actions/SepiaAction.java
src/com/android/gallery3d/photoeditor/actions/ShadowAction.java
src/com/android/gallery3d/photoeditor/actions/SharpenAction.java
src/com/android/gallery3d/photoeditor/actions/StraightenAction.java
src/com/android/gallery3d/photoeditor/actions/TintAction.java
src/com/android/gallery3d/photoeditor/actions/TouchView.java
src/com/android/gallery3d/photoeditor/actions/VignetteAction.java
src/com/android/gallery3d/photoeditor/filters/AbstractScaleFilter.java
src/com/android/gallery3d/photoeditor/filters/CropFilter.java
src/com/android/gallery3d/photoeditor/filters/CrossProcessFilter.java
src/com/android/gallery3d/photoeditor/filters/DocumentaryFilter.java
src/com/android/gallery3d/photoeditor/filters/DoodleFilter.java
src/com/android/gallery3d/photoeditor/filters/DuotoneFilter.java
src/com/android/gallery3d/photoeditor/filters/Filter.java
src/com/android/gallery3d/photoeditor/filters/FlipFilter.java
src/com/android/gallery3d/photoeditor/filters/GrayscaleFilter.java
src/com/android/gallery3d/photoeditor/filters/LomoishFilter.java
src/com/android/gallery3d/photoeditor/filters/NegativeFilter.java
src/com/android/gallery3d/photoeditor/filters/PosterizeFilter.java
src/com/android/gallery3d/photoeditor/filters/RedEyeFilter.java
src/com/android/gallery3d/photoeditor/filters/RotateFilter.java
src/com/android/gallery3d/photoeditor/filters/SepiaFilter.java
src/com/android/gallery3d/photoeditor/filters/StraightenFilter.java
src/com/android/gallery3d/photoeditor/filters/TintFilter.java