summaryrefslogtreecommitdiffstats
path: root/core/java/android/widget
diff options
context:
space:
mode:
authorRaph Levien <raph@google.com>2013-09-27 13:36:24 -0700
committerRaph Levien <raph@google.com>2013-09-27 13:36:24 -0700
commite048f84a762d5f85829ceb2b45de52b73727de74 (patch)
tree1291c5944428ba117b4e881b1b03f7db991df957 /core/java/android/widget
parent015bcd4dd43b850ef209c64dae9c08ccaef9ea80 (diff)
downloadframeworks_base-e048f84a762d5f85829ceb2b45de52b73727de74.zip
frameworks_base-e048f84a762d5f85829ceb2b45de52b73727de74.tar.gz
frameworks_base-e048f84a762d5f85829ceb2b45de52b73727de74.tar.bz2
Fix for jank when fast-scrolling DeskClock's world cities list in RTL
This is a fix for bug 10863979. The onPreDraw() method in TextView was canceling the draw every time a the horizontal scroll changed. These dropped frames were visible as jank. The fix is to never cancel the draw. It seems likely that the previous rationale for canceling draw is no longer valid, due to other fixes, because the scroll state will have been fully updated. Change-Id: I8c2da5450723f993055a49b1cb57320c08f2a11e
Diffstat (limited to 'core/java/android/widget')
-rw-r--r--core/java/android/widget/TextView.java8
1 files changed, 3 insertions, 5 deletions
diff --git a/core/java/android/widget/TextView.java b/core/java/android/widget/TextView.java
index 97cb815..61e071b 100644
--- a/core/java/android/widget/TextView.java
+++ b/core/java/android/widget/TextView.java
@@ -4679,8 +4679,6 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
assumeLayout();
}
- boolean changed = false;
-
if (mMovement != null) {
/* This code also provides auto-scrolling when a cursor is moved using a
* CursorController (insertion point or selection limits).
@@ -4703,10 +4701,10 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
}
if (curs >= 0) {
- changed = bringPointIntoView(curs);
+ bringPointIntoView(curs);
}
} else {
- changed = bringTextIntoView();
+ bringTextIntoView();
}
// This has to be checked here since:
@@ -4727,7 +4725,7 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
getViewTreeObserver().removeOnPreDrawListener(this);
mPreDrawRegistered = false;
- return !changed;
+ return true;
}
@Override