Merge "Revert "Avoid drawable invalidation during draw()"" into mnc-dr1.5-dev am: 624d43b66f am: 0cd5e9f475
am: 105108209f
* commit '105108209fc35b5029e5a728c09f6eaf91b8a940':
Revert "Avoid drawable invalidation during draw()"
This commit is contained in:
@@ -3593,9 +3593,6 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
|
||||
|
||||
private int[] mDrawableState = null;
|
||||
|
||||
/** Whether draw() is currently being called. */
|
||||
private boolean mInDraw = false;
|
||||
|
||||
ViewOutlineProvider mOutlineProvider = ViewOutlineProvider.BACKGROUND;
|
||||
|
||||
/**
|
||||
@@ -16474,8 +16471,6 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
|
||||
*/
|
||||
@CallSuper
|
||||
public void draw(Canvas canvas) {
|
||||
mInDraw = true;
|
||||
|
||||
final int privateFlags = mPrivateFlags;
|
||||
final boolean dirtyOpaque = (privateFlags & PFLAG_DIRTY_MASK) == PFLAG_DIRTY_OPAQUE &&
|
||||
(mAttachInfo == null || !mAttachInfo.mIgnoreDirtyState);
|
||||
@@ -16520,7 +16515,6 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
|
||||
onDrawForeground(canvas);
|
||||
|
||||
// we're done...
|
||||
mInDraw = false;
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -16668,8 +16662,6 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
|
||||
|
||||
// Step 6, draw decorations (foreground, scrollbars)
|
||||
onDrawForeground(canvas);
|
||||
|
||||
mInDraw = false;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -17114,8 +17106,7 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
|
||||
*/
|
||||
@Override
|
||||
public void invalidateDrawable(@NonNull Drawable drawable) {
|
||||
// Don't invalidate if a drawable changes during drawing.
|
||||
if (verifyDrawable(drawable) && !mInDraw) {
|
||||
if (verifyDrawable(drawable)) {
|
||||
final Rect dirty = drawable.getDirtyBounds();
|
||||
final int scrollX = mScrollX;
|
||||
final int scrollY = mScrollY;
|
||||
|
||||
Reference in New Issue
Block a user