diff options
author | nicolasroard <nicolasroard@google.com> | 2013-03-30 12:08:58 -0700 |
---|---|---|
committer | nicolasroard <nicolasroard@google.com> | 2013-03-30 12:08:58 -0700 |
commit | 1ad3cd574da4e998e55e4ff4861ff19e2ea982bd (patch) | |
tree | 18222ead99dc63987c1e0a8a322010f3078bafc4 /src/com/android/gallery3d | |
parent | ad42027590c52fcc522c06d311f28742e0441ec0 (diff) | |
download | android_packages_apps_Gallery2-1ad3cd574da4e998e55e4ff4861ff19e2ea982bd.tar.gz android_packages_apps_Gallery2-1ad3cd574da4e998e55e4ff4861ff19e2ea982bd.tar.bz2 android_packages_apps_Gallery2-1ad3cd574da4e998e55e4ff4861ff19e2ea982bd.zip |
Fixes some state synchronization issues
Change-Id: Iea0f2b8d9c885795bddfb0d3001c8a351caed63c
Diffstat (limited to 'src/com/android/gallery3d')
-rw-r--r-- | src/com/android/gallery3d/filtershow/cache/FilteringPipeline.java | 9 | ||||
-rw-r--r-- | src/com/android/gallery3d/filtershow/filters/FilterRepresentation.java | 3 |
2 files changed, 5 insertions, 7 deletions
diff --git a/src/com/android/gallery3d/filtershow/cache/FilteringPipeline.java b/src/com/android/gallery3d/filtershow/cache/FilteringPipeline.java index ce66b5bce..a8c8d7b47 100644 --- a/src/com/android/gallery3d/filtershow/cache/FilteringPipeline.java +++ b/src/com/android/gallery3d/filtershow/cache/FilteringPipeline.java @@ -105,12 +105,6 @@ public class FilteringPipeline implements Handler.Callback { case COMPUTE_RENDERING_REQUEST: case COMPUTE_PARTIAL_RENDERING_REQUEST: case COMPUTE_HIGHRES_RENDERING_REQUEST: { - if (msg.what == COMPUTE_PARTIAL_RENDERING_REQUEST - || msg.what == COMPUTE_HIGHRES_RENDERING_REQUEST) { - if (mProcessingHandler.hasMessages(msg.what)) { - return false; - } - } if (DEBUG) { Log.v(LOGTAG, "Compute Request: " + getType(msg.what)); @@ -168,6 +162,9 @@ public class FilteringPipeline implements Handler.Callback { msg.obj = request; if (type == COMPUTE_PARTIAL_RENDERING_REQUEST || type == COMPUTE_HIGHRES_RENDERING_REQUEST) { + if (mProcessingHandler.hasMessages(msg.what)) { + mProcessingHandler.removeMessages(msg.what); + } mProcessingHandler.sendMessageDelayed(msg, HIRES_DELAY); } else { mProcessingHandler.sendMessage(msg); diff --git a/src/com/android/gallery3d/filtershow/filters/FilterRepresentation.java b/src/com/android/gallery3d/filtershow/filters/FilterRepresentation.java index b92460d99..7e0e25d61 100644 --- a/src/com/android/gallery3d/filtershow/filters/FilterRepresentation.java +++ b/src/com/android/gallery3d/filtershow/filters/FilterRepresentation.java @@ -63,7 +63,8 @@ public class FilterRepresentation implements Cloneable { representation.setShowEditingControls(showEditingControls()); representation.setShowParameterValue(showParameterValue()); representation.setShowUtilityPanel(showUtilityPanel()); - representation.mTempRepresentation = null; + representation.mTempRepresentation = + mTempRepresentation != null ? mTempRepresentation.clone() : null; if (DEBUG) { Log.v(LOGTAG, "cloning from <" + this + "> to <" + representation + ">"); } |