summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornebkat <nebkat@teamhacksung.org>2012-01-24 18:22:13 +0000
committernebkat <nebkat@teamhacksung.org>2012-01-24 18:22:13 +0000
commit089c749c2fbae611d19000317979197e26ff9f19 (patch)
treefe0e3f981bf00b20ac8862c5791fae4e913f3cb4
parent535b875b47380ed50a8d3f7f060aeb7ae7784b4b (diff)
downloadandroid_packages_apps_Trebuchet-089c749c2fbae611d19000317979197e26ff9f19.tar.gz
android_packages_apps_Trebuchet-089c749c2fbae611d19000317979197e26ff9f19.tar.bz2
android_packages_apps_Trebuchet-089c749c2fbae611d19000317979197e26ff9f19.zip
Workspace: Avoid extra invalidate
Change-Id: Icd1b1906ba1a82e45dc90c24b728d8cbd16a2444
-rw-r--r--src/com/cyanogenmod/trebuchet/Workspace.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/com/cyanogenmod/trebuchet/Workspace.java b/src/com/cyanogenmod/trebuchet/Workspace.java
index ea4b055d1..300ac36f7 100644
--- a/src/com/cyanogenmod/trebuchet/Workspace.java
+++ b/src/com/cyanogenmod/trebuchet/Workspace.java
@@ -2050,7 +2050,9 @@ public class Workspace extends PagedView
}
for (int i = 0; i < getChildCount(); i++) {
final CellLayout cl = (CellLayout) getPageAt(i);
- cl.setRotation(a * mOldRotations[i] + b * mNewRotations[i]);
+ if (mOldRotations[i] != mNewRotations[i]) {
+ cl.setRotation(a * mOldRotations[i] + b * mNewRotations[i]);
+ }
cl.setFastRotationY(a * mOldRotationYs[i] + b * mNewRotationYs[i]);
}
}