diff options
author | Ruben Brunk <rubenbrunk@google.com> | 2013-07-18 16:37:30 -0700 |
---|---|---|
committer | Ruben Brunk <rubenbrunk@google.com> | 2013-08-01 09:46:44 -0700 |
commit | 203eb404a7cd6a80397535e63d22b3772939f03d (patch) | |
tree | c6cc970ad5bf9fc710cb3a8a2a667729b2439623 /src/com/android/gallery3d/filtershow/pipeline/CacheProcessing.java | |
parent | 3a5bc6b23096365e1a814f8999937028bc12b401 (diff) | |
download | android_packages_apps_Snap-203eb404a7cd6a80397535e63d22b3772939f03d.tar.gz android_packages_apps_Snap-203eb404a7cd6a80397535e63d22b3772939f03d.tar.bz2 android_packages_apps_Snap-203eb404a7cd6a80397535e63d22b3772939f03d.zip |
Refactoring Geometry handling.
Bug: 9170644
Bug: 9366654
Bug: 9366263
- Consolidates all the geometry transforms in GeometryMathUtils and
significantly reduces complexity.
- Removes GeometryMetadata object and dependent code.
- Removes ImageGeometry and geometry update callbacks.
Change-Id: I59add51907459593244c9ebaadef585efc7486d5
Diffstat (limited to 'src/com/android/gallery3d/filtershow/pipeline/CacheProcessing.java')
-rw-r--r-- | src/com/android/gallery3d/filtershow/pipeline/CacheProcessing.java | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/com/android/gallery3d/filtershow/pipeline/CacheProcessing.java b/src/com/android/gallery3d/filtershow/pipeline/CacheProcessing.java index 10b6c4923..e0269e9bb 100644 --- a/src/com/android/gallery3d/filtershow/pipeline/CacheProcessing.java +++ b/src/com/android/gallery3d/filtershow/pipeline/CacheProcessing.java @@ -90,7 +90,9 @@ public class CacheProcessing { cacheBitmap = originalBitmap.copy(Bitmap.Config.ARGB_8888, true); if (findBaseImageIndex > -1) { FilterRepresentation representation = filters.elementAt(findBaseImageIndex); - cacheBitmap = environment.applyRepresentation(representation, cacheBitmap); + if (representation.getFilterType() != FilterRepresentation.TYPE_GEOMETRY) { + cacheBitmap = environment.applyRepresentation(representation, cacheBitmap); + } mSteps.elementAt(findBaseImageIndex).representation = representation.copy(); mSteps.elementAt(findBaseImageIndex).cache = cacheBitmap; } @@ -115,7 +117,9 @@ public class CacheProcessing { } for (int i = findBaseImageIndex; i <= similarUpToIndex; i++) { FilterRepresentation representation = filters.elementAt(i); - cacheBitmap = environment.applyRepresentation(representation, cacheBitmap); + if (representation.getFilterType() != FilterRepresentation.TYPE_GEOMETRY) { + cacheBitmap = environment.applyRepresentation(representation, cacheBitmap); + } if (DEBUG) { Log.v(LOGTAG, " - " + i + " => apply " + representation.getName()); } @@ -134,7 +138,9 @@ public class CacheProcessing { FilterRepresentation representation = filters.elementAt(i); CacheStep currentStep = mSteps.elementAt(i); cacheBitmap = cacheBitmap.copy(Bitmap.Config.ARGB_8888, true); - cacheBitmap = environment.applyRepresentation(representation, cacheBitmap); + if (representation.getFilterType() != FilterRepresentation.TYPE_GEOMETRY) { + cacheBitmap = environment.applyRepresentation(representation, cacheBitmap); + } currentStep.representation = representation.copy(); currentStep.cache = cacheBitmap; if (DEBUG) { |