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

Commit edaf0794 authored by Chet Haase's avatar Chet Haase Committed by Android (Google) Code Review
Browse files

Merge "Fix ViewGroupOverlay's handling of invalidating viewgroups"

parents b32a7c7c e4a2d7c4
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -4426,8 +4426,10 @@ public abstract class ViewGroup extends View implements ViewParent, ViewManager
    /**
     * Quick invalidation method that simply transforms the dirty rect into the parent's
     * coordinate system, pruning the invalidation if the parent has already been invalidated.
     *
     * @hide
     */
    private ViewParent invalidateChildInParentFast(int left, int top, final Rect dirty) {
    protected ViewParent invalidateChildInParentFast(int left, int top, final Rect dirty) {
        if ((mPrivateFlags & PFLAG_DRAWN) == PFLAG_DRAWN ||
                (mPrivateFlags & PFLAG_DRAWING_CACHE_VALID) == PFLAG_DRAWING_CACHE_VALID) {
            dirty.offset(left - mScrollX, top - mScrollY);
+11 −0
Original line number Diff line number Diff line
@@ -300,6 +300,17 @@ public class ViewOverlay {
            }
        }

        /**
         * @hide
         */
        @Override
        protected ViewParent invalidateChildInParentFast(int left, int top, Rect dirty) {
            if (mHostView instanceof ViewGroup) {
                return ((ViewGroup) mHostView).invalidateChildInParentFast(left, top, dirty);
            }
            return null;
        }

        @Override
        public ViewParent invalidateChildInParent(int[] location, Rect dirty) {
            if (mHostView != null) {