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

Commit e6a026bd authored by Jorim Jaggi's avatar Jorim Jaggi
Browse files

Move nulling of nextFrameCallback

If draw() invokes postDraw that sets the next callback, the
callback will never be invoked.

Test: Long-swipe-up from navigation bar
Change-Id: If2e4dfff8a845b73fa77426305d5ece1921857e5
Fixes: 109701914
parent a76360dd
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -3305,8 +3305,11 @@ public final class ViewRootImpl implements ViewParent,
                }

                useAsyncReport = true;
                mAttachInfo.mThreadedRenderer.draw(mView, mAttachInfo, this, mNextRtFrameCallback);

                // draw(...) might invoke post-draw, which might register the next callback already.
                final FrameDrawingCallback callback = mNextRtFrameCallback;
                mNextRtFrameCallback = null;
                mAttachInfo.mThreadedRenderer.draw(mView, mAttachInfo, this, callback);
            } else {
                // If we get here with a disabled & requested hardware renderer, something went
                // wrong (an invalidate posted right before we destroyed the hardware surface