summaryrefslogtreecommitdiffstats
path: root/core/java/android/view/ViewRootImpl.java
diff options
context:
space:
mode:
authorChet Haase <chet@google.com>2012-07-03 14:17:57 -0700
committerChet Haase <chet@google.com>2012-07-09 08:34:01 -0700
commit05e91ed5a7ea17f021e1811166942a7d758e1cce (patch)
tree1b174c98df99f7785c063edbd93478d92c148281 /core/java/android/view/ViewRootImpl.java
parent9dc2cc53ac332d73376f64cc8e7c713762d74bdd (diff)
downloadframeworks_base-05e91ed5a7ea17f021e1811166942a7d758e1cce.zip
frameworks_base-05e91ed5a7ea17f021e1811166942a7d758e1cce.tar.gz
frameworks_base-05e91ed5a7ea17f021e1811166942a7d758e1cce.tar.bz2
Force invalidates on non-visible views to traverse the hierarchy
An optimization prunes invalidates on views which are not inside their parent's bounds. This works in most cases, but it is possible to run a situation where a view has been invalidated (and is thus waiting to be redrawn), but the pruning logic ensures that that draw call will not happen. Further, when/if the view comes into the bounds of its parent again, it may still not be redrawn, because now future invalidates on the view are noop'd because it is already in an invalidated state (and thus will not propagate invalidates up the hierarchy). The fix is to remove the optitmization. This will cause some overhead sending the invalidation request up to the view root, but this overhead is minimal (and only extra for cases of out-of-bounds views), and the more expensive part of rendering these views will still not be done since the view root will avoid re-drawing the hierarchy when the dirty rectangle is empty. Issue #6773607 Layered views animating from offscreen sometimes remain invisible Change-Id: Ia2c1a2b9d3e7f267253cb325ccceff1e7fdbe8bd
Diffstat (limited to 'core/java/android/view/ViewRootImpl.java')
-rw-r--r--core/java/android/view/ViewRootImpl.java2
1 files changed, 2 insertions, 0 deletions
diff --git a/core/java/android/view/ViewRootImpl.java b/core/java/android/view/ViewRootImpl.java
index e03c7d3..9798877 100644
--- a/core/java/android/view/ViewRootImpl.java
+++ b/core/java/android/view/ViewRootImpl.java
@@ -868,6 +868,8 @@ public final class ViewRootImpl implements ViewParent,
if (dirty == null) {
invalidate();
return null;
+ } else if (dirty.isEmpty()) {
+ return null;
}
if (mCurScrollY != 0 || mTranslator != null) {