summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlan Viverette <alanv@google.com>2014-02-20 00:47:38 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2014-02-20 00:47:40 +0000
commit498aa8bb3c51b7c5ba66cb38167263157d13bcc1 (patch)
tree2155aefe8963ca614ced8e543a62ef2aaa6b3eda
parent332886854438809e956fb232b69879e33b5dc2bb (diff)
parent81547effacfea78a3c26d34b77e1e99ffc89c89a (diff)
downloadframeworks_base-498aa8bb3c51b7c5ba66cb38167263157d13bcc1.zip
frameworks_base-498aa8bb3c51b7c5ba66cb38167263157d13bcc1.tar.gz
frameworks_base-498aa8bb3c51b7c5ba66cb38167263157d13bcc1.tar.bz2
Merge "Always redraw background display list when view is redrawn"
-rw-r--r--core/java/android/view/View.java21
1 files changed, 10 insertions, 11 deletions
diff --git a/core/java/android/view/View.java b/core/java/android/view/View.java
index 089f816..af62d9c 100644
--- a/core/java/android/view/View.java
+++ b/core/java/android/view/View.java
@@ -12755,6 +12755,10 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
if (mDisplayList != null) {
mDisplayList.clearDirty();
}
+
+ if (mBackgroundDisplayList != null) {
+ mBackgroundDisplayList.clearDirty();
+ }
}
/**
@@ -13073,13 +13077,18 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
private void cleanupDraw() {
if (mAttachInfo != null) {
+ // Ensure the display lists are reset when the view root dies.
if (mDisplayList != null) {
mDisplayList.markDirty();
mAttachInfo.mViewRootImpl.enqueueDisplayList(mDisplayList);
}
+ if (mBackgroundDisplayList != null) {
+ mBackgroundDisplayList.markDirty();
+ mAttachInfo.mViewRootImpl.enqueueDisplayList(mBackgroundDisplayList);
+ }
mAttachInfo.mViewRootImpl.cancelInvalidate(this);
} else {
- // Should never happen
+ // Should never happen.
resetDisplayList();
}
}
@@ -15216,12 +15225,6 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
}
if (mBackgroundSizeChanged) {
- // We should see the background invalidate itself, but just to be
- // careful we're going to clear the display list and force redraw.
- if (mBackgroundDisplayList != null) {
- mBackgroundDisplayList.clear();
- }
-
background.setBounds(0, 0, mRight - mLeft, mBottom - mTop);
mBackgroundSizeChanged = false;
}
@@ -15269,10 +15272,6 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
* @return A valid display list for the specified drawable
*/
private static DisplayList getDrawableDisplayList(Drawable drawable, DisplayList displayList) {
- if (displayList != null && displayList.isValid()) {
- return displayList;
- }
-
if (displayList == null) {
displayList = DisplayList.create(drawable.getClass().getName());
}