summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authornicolasroard <nicolasroard@google.com>2013-03-30 12:08:58 -0700
committernicolasroard <nicolasroard@google.com>2013-03-30 12:08:58 -0700
commitd4545febbff39febd1058e1aa60e0c8b7659204f (patch)
tree72a38f6fa3335e3671a7e6a8ac7ddd70f498738f /src
parentd94a961e445adbf2ebd6af702209020475c6cab3 (diff)
downloadandroid_packages_apps_Snap-d4545febbff39febd1058e1aa60e0c8b7659204f.tar.gz
android_packages_apps_Snap-d4545febbff39febd1058e1aa60e0c8b7659204f.tar.bz2
android_packages_apps_Snap-d4545febbff39febd1058e1aa60e0c8b7659204f.zip
Fixes some state synchronization issues
Change-Id: Iea0f2b8d9c885795bddfb0d3001c8a351caed63c
Diffstat (limited to 'src')
-rw-r--r--src/com/android/gallery3d/filtershow/cache/FilteringPipeline.java9
-rw-r--r--src/com/android/gallery3d/filtershow/filters/FilterRepresentation.java3
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 + ">");
}