Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7008d7b7 authored by Chet Haase's avatar Chet Haase Committed by Android Git Automerger
Browse files

am fd086b95: am 76f08218: Merge "Fix quickReject logic for transformed views" into jb-dev

* commit 'fd086b95':
  Fix quickReject logic for transformed views
parents 17981738 fd086b95
Loading
Loading
Loading
Loading
+65 −0
Original line number Diff line number Diff line
@@ -2120,6 +2120,13 @@ public class View implements Drawable.Callback, Drawable.Callback2, KeyEvent.Cal
     */
    static final int VIEW_IS_ANIMATING_TRANSFORM = 0x10000000;
    /**
     * Flag indicating whether a view failed the quickReject() check in draw(). This condition
     * is used to check whether later changes to the view's transform should invalidate the
     * view to force the quickReject test to run again.
     */
    static final int VIEW_QUICK_REJECTED = 0x20000000;
    /* End of masks for mPrivateFlags2 */
    static final int DRAG_MASK = DRAG_CAN_ACCEPT | DRAG_HOVERED;
@@ -8547,6 +8554,10 @@ public class View implements Drawable.Callback, Drawable.Callback2, KeyEvent.Cal
        if (mDisplayList != null) {
            mDisplayList.setCameraDistance(-Math.abs(distance) / dpi);
        }
        if ((mPrivateFlags2 & VIEW_QUICK_REJECTED) == VIEW_QUICK_REJECTED) {
            // View was rejected last time it was drawn by its parent; this may have changed
            invalidateParentIfNeeded();
        }
    }
    /**
@@ -8589,6 +8600,10 @@ public class View implements Drawable.Callback, Drawable.Callback2, KeyEvent.Cal
            if (mDisplayList != null) {
                mDisplayList.setRotation(rotation);
            }
            if ((mPrivateFlags2 & VIEW_QUICK_REJECTED) == VIEW_QUICK_REJECTED) {
                // View was rejected last time it was drawn by its parent; this may have changed
                invalidateParentIfNeeded();
            }
        }
    }
@@ -8636,6 +8651,10 @@ public class View implements Drawable.Callback, Drawable.Callback2, KeyEvent.Cal
            if (mDisplayList != null) {
                mDisplayList.setRotationY(rotationY);
            }
            if ((mPrivateFlags2 & VIEW_QUICK_REJECTED) == VIEW_QUICK_REJECTED) {
                // View was rejected last time it was drawn by its parent; this may have changed
                invalidateParentIfNeeded();
            }
        }
    }
@@ -8683,6 +8702,10 @@ public class View implements Drawable.Callback, Drawable.Callback2, KeyEvent.Cal
            if (mDisplayList != null) {
                mDisplayList.setRotationX(rotationX);
            }
            if ((mPrivateFlags2 & VIEW_QUICK_REJECTED) == VIEW_QUICK_REJECTED) {
                // View was rejected last time it was drawn by its parent; this may have changed
                invalidateParentIfNeeded();
            }
        }
    }
@@ -8722,6 +8745,10 @@ public class View implements Drawable.Callback, Drawable.Callback2, KeyEvent.Cal
            if (mDisplayList != null) {
                mDisplayList.setScaleX(scaleX);
            }
            if ((mPrivateFlags2 & VIEW_QUICK_REJECTED) == VIEW_QUICK_REJECTED) {
                // View was rejected last time it was drawn by its parent; this may have changed
                invalidateParentIfNeeded();
            }
        }
    }
@@ -8761,6 +8788,10 @@ public class View implements Drawable.Callback, Drawable.Callback2, KeyEvent.Cal
            if (mDisplayList != null) {
                mDisplayList.setScaleY(scaleY);
            }
            if ((mPrivateFlags2 & VIEW_QUICK_REJECTED) == VIEW_QUICK_REJECTED) {
                // View was rejected last time it was drawn by its parent; this may have changed
                invalidateParentIfNeeded();
            }
        }
    }
@@ -8808,6 +8839,10 @@ public class View implements Drawable.Callback, Drawable.Callback2, KeyEvent.Cal
            if (mDisplayList != null) {
                mDisplayList.setPivotX(pivotX);
            }
            if ((mPrivateFlags2 & VIEW_QUICK_REJECTED) == VIEW_QUICK_REJECTED) {
                // View was rejected last time it was drawn by its parent; this may have changed
                invalidateParentIfNeeded();
            }
        }
    }
@@ -8854,6 +8889,10 @@ public class View implements Drawable.Callback, Drawable.Callback2, KeyEvent.Cal
            if (mDisplayList != null) {
                mDisplayList.setPivotY(pivotY);
            }
            if ((mPrivateFlags2 & VIEW_QUICK_REJECTED) == VIEW_QUICK_REJECTED) {
                // View was rejected last time it was drawn by its parent; this may have changed
                invalidateParentIfNeeded();
            }
        }
    }
@@ -9012,6 +9051,10 @@ public class View implements Drawable.Callback, Drawable.Callback2, KeyEvent.Cal
            }
            mBackgroundSizeChanged = true;
            invalidateParentIfNeeded();
            if ((mPrivateFlags2 & VIEW_QUICK_REJECTED) == VIEW_QUICK_REJECTED) {
                // View was rejected last time it was drawn by its parent; this may have changed
                invalidateParentIfNeeded();
            }
        }
    }
@@ -9081,6 +9124,10 @@ public class View implements Drawable.Callback, Drawable.Callback2, KeyEvent.Cal
            }
            mBackgroundSizeChanged = true;
            invalidateParentIfNeeded();
            if ((mPrivateFlags2 & VIEW_QUICK_REJECTED) == VIEW_QUICK_REJECTED) {
                // View was rejected last time it was drawn by its parent; this may have changed
                invalidateParentIfNeeded();
            }
        }
    }
@@ -9144,6 +9191,10 @@ public class View implements Drawable.Callback, Drawable.Callback2, KeyEvent.Cal
            }
            mBackgroundSizeChanged = true;
            invalidateParentIfNeeded();
            if ((mPrivateFlags2 & VIEW_QUICK_REJECTED) == VIEW_QUICK_REJECTED) {
                // View was rejected last time it was drawn by its parent; this may have changed
                invalidateParentIfNeeded();
            }
        }
    }
@@ -9204,6 +9255,10 @@ public class View implements Drawable.Callback, Drawable.Callback2, KeyEvent.Cal
            }
            mBackgroundSizeChanged = true;
            invalidateParentIfNeeded();
            if ((mPrivateFlags2 & VIEW_QUICK_REJECTED) == VIEW_QUICK_REJECTED) {
                // View was rejected last time it was drawn by its parent; this may have changed
                invalidateParentIfNeeded();
            }
        }
    }
@@ -9288,6 +9343,10 @@ public class View implements Drawable.Callback, Drawable.Callback2, KeyEvent.Cal
            if (mDisplayList != null) {
                mDisplayList.setTranslationX(translationX);
            }
            if ((mPrivateFlags2 & VIEW_QUICK_REJECTED) == VIEW_QUICK_REJECTED) {
                // View was rejected last time it was drawn by its parent; this may have changed
                invalidateParentIfNeeded();
            }
        }
    }
@@ -9325,6 +9384,10 @@ public class View implements Drawable.Callback, Drawable.Callback2, KeyEvent.Cal
            if (mDisplayList != null) {
                mDisplayList.setTranslationY(translationY);
            }
            if ((mPrivateFlags2 & VIEW_QUICK_REJECTED) == VIEW_QUICK_REJECTED) {
                // View was rejected last time it was drawn by its parent; this may have changed
                invalidateParentIfNeeded();
            }
        }
    }
@@ -12788,8 +12851,10 @@ public class View implements Drawable.Callback, Drawable.Callback2, KeyEvent.Cal
        if (!concatMatrix && canvas.quickReject(mLeft, mTop, mRight, mBottom, Canvas.EdgeType.BW) &&
                (mPrivateFlags & DRAW_ANIMATION) == 0) {
            mPrivateFlags2 |= VIEW_QUICK_REJECTED;
            return more;
        }
        mPrivateFlags2 &= ~VIEW_QUICK_REJECTED;
        if (hardwareAccelerated) {
            // Clear INVALIDATED flag to allow invalidation to occur during rendering, but