diff options
author | nicolasroard <nicolasroard@google.com> | 2012-10-23 12:18:54 -0700 |
---|---|---|
committer | nicolasroard <nicolasroard@google.com> | 2012-10-23 12:18:54 -0700 |
commit | a7291ecf1ac70a4b687ca1429ff7231f83cc5577 (patch) | |
tree | 32927343f86a48717d9c97ba36f45cc470fa6feb /src | |
parent | 8d18082a0938aaa64ac9d98993d1092cb5846c05 (diff) | |
download | android_packages_apps_Snap-a7291ecf1ac70a4b687ca1429ff7231f83cc5577.tar.gz android_packages_apps_Snap-a7291ecf1ac70a4b687ca1429ff7231f83cc5577.tar.bz2 android_packages_apps_Snap-a7291ecf1ac70a4b687ca1429ff7231f83cc5577.zip |
Fix flickering in geometry panel
bug:7344214
Change-Id: I34c980061c2d51e7b97ec95fc77e3331cffdf8d5
Diffstat (limited to 'src')
-rw-r--r-- | src/com/android/gallery3d/filtershow/presets/ImagePreset.java | 22 |
1 files changed, 17 insertions, 5 deletions
diff --git a/src/com/android/gallery3d/filtershow/presets/ImagePreset.java b/src/com/android/gallery3d/filtershow/presets/ImagePreset.java index 69875d9c6..87e1934fd 100644 --- a/src/com/android/gallery3d/filtershow/presets/ImagePreset.java +++ b/src/com/android/gallery3d/filtershow/presets/ImagePreset.java @@ -169,7 +169,11 @@ public class ImagePreset { return false; } - if (!mGeoData.equals(preset.mGeoData)) { + if (mDoApplyGeometry != preset.mDoApplyGeometry) { + return false; + } + + if (mDoApplyGeometry && !mGeoData.equals(preset.mGeoData)) { return false; } @@ -181,13 +185,21 @@ public class ImagePreset { return false; } - for (int i = 0; i < preset.mFilters.size(); i++) { - ImageFilter a = preset.mFilters.elementAt(i); - ImageFilter b = mFilters.elementAt(i); - if (!a.same(b)) { + if (mDoApplyFilters != preset.mDoApplyFilters) { + if (mFilters.size() > 0 || preset.mFilters.size() > 0) { return false; } } + + if (mDoApplyFilters && preset.mDoApplyFilters) { + for (int i = 0; i < preset.mFilters.size(); i++) { + ImageFilter a = preset.mFilters.elementAt(i); + ImageFilter b = mFilters.elementAt(i); + if (!a.same(b)) { + return false; + } + } + } return true; } |