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

Commit 8cc1f691 authored by John Reck's avatar John Reck
Browse files

More targetted drawFinished fix

Prior to fe5dfcac the frameCompleteCallback
was posted to the native Looper, which is
effectively a postAtFrontOfQueue. Since it
was switched to the Java-side looper, do
an explicit postAtFrontOfQueue

Fixes: 124801988
Test: speculative
Change-Id: I287c9f3917983503402dcfe3ee7d494eefae8d1f
parent ab5938c3
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -3406,7 +3406,7 @@ public final class ViewRootImpl implements ViewParent,
                usingAsyncReport = true;
                final Handler handler = mAttachInfo.mHandler;
                mAttachInfo.mThreadedRenderer.setFrameCompleteCallback((long frameNr) ->
                        handler.post(() -> {
                        handler.postAtFrontOfQueue(() -> {
                            // TODO: Use the frame number
                            pendingDrawFinished();
                            if (commitCallbacks != null) {
@@ -3418,7 +3418,7 @@ public final class ViewRootImpl implements ViewParent,
            } else if (commitCallbacks != null && commitCallbacks.size() > 0) {
                final Handler handler = mAttachInfo.mHandler;
                mAttachInfo.mThreadedRenderer.setFrameCompleteCallback((long frameNr) ->
                        handler.post(() -> {
                        handler.postAtFrontOfQueue(() -> {
                            for (int i = 0; i < commitCallbacks.size(); i++) {
                                commitCallbacks.get(i).run();
                            }