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

Commit 3127c2a4 authored by Jorim Jaggi's avatar Jorim Jaggi
Browse files

Start drawing immediately

We used to have a condition to start drawing only in the second traversal,
which added a delay of about 10-15ms. We believe that we don't need this
anymore, because we have other means of synchronizing the app transition
animation with the app drawing - we wait for all surfaces to be drawn
in window manager.

Bug: 21035872
Change-Id: I5094a1377817dc7e0a2392cc8f522e99cd7b4d6e
parent 9b0a2c92
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -2099,7 +2099,7 @@ public final class ViewRootImpl implements ViewParent,

        boolean cancelDraw = mAttachInfo.mTreeObserver.dispatchOnPreDraw() || !isViewVisible;

        if (!cancelDraw && !newSurface) {
        if (!cancelDraw) {
            if (mPendingTransitions != null && mPendingTransitions.size() > 0) {
                for (int i = 0; i < mPendingTransitions.size(); ++i) {
                    mPendingTransitions.get(i).startChangingAnimations();
@@ -2148,6 +2148,7 @@ public final class ViewRootImpl implements ViewParent,
            }
        }
    }

    private void handleOutOfResourcesException(Surface.OutOfResourcesException e) {
        Log.e(mTag, "OutOfResourcesException initializing HW surface", e);
        try {