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

Commit 2632b5d0 authored by Chet Haase's avatar Chet Haase
Browse files

Reduce amount of invalidation when old-style animations are running

Previously, old animations (view.animation.*) would cause invalidations on
both the area of the child view and then the entire parent area. There's no
reason for the second invalidation; only the child area need be redrawn.

Issue #10229470 Old animation code in View.draw() may be invalidating too much

Change-Id: I4d0d16321e20b2f34dc579eacf5d3841aed33d6d
parent 4bcc8ee6
Loading
Loading
Loading
Loading
+0 −4
Original line number Original line Diff line number Diff line
@@ -14013,10 +14013,6 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
        }
        }
        if (more && hardwareAccelerated) {
        if (more && hardwareAccelerated) {
            // invalidation is the trigger to recreate display lists, so if we're using
            // display lists to render, force an invalidate to allow the animation to
            // continue drawing another frame
            parent.invalidate(true);
            if (a.hasAlpha() && (mPrivateFlags & PFLAG_ALPHA_SET) == PFLAG_ALPHA_SET) {
            if (a.hasAlpha() && (mPrivateFlags & PFLAG_ALPHA_SET) == PFLAG_ALPHA_SET) {
                // alpha animations should cause the child to recreate its display list
                // alpha animations should cause the child to recreate its display list
                invalidate(true);
                invalidate(true);