Merge "Fix double-tap behaviour" into gb-ub-photos-bryce
diff --git a/src/com/android/gallery3d/filtershow/cache/FilteringPipeline.java b/src/com/android/gallery3d/filtershow/cache/FilteringPipeline.java
index ce66b5b..a8c8d7b 100644
--- a/src/com/android/gallery3d/filtershow/cache/FilteringPipeline.java
+++ b/src/com/android/gallery3d/filtershow/cache/FilteringPipeline.java
@@ -105,12 +105,6 @@
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 @@
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 b92460d..7e0e25d 100644
--- a/src/com/android/gallery3d/filtershow/filters/FilterRepresentation.java
+++ b/src/com/android/gallery3d/filtershow/filters/FilterRepresentation.java
@@ -63,7 +63,8 @@
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 + ">");
}