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

Commit a38a553c authored by Sunny Goyal's avatar Sunny Goyal Committed by Android (Google) Code Review
Browse files

Merge "Using inline definition of FrameDrawingCallback instead of lambda as it...

Merge "Using inline definition of FrameDrawingCallback instead of lambda as it fails on some devices" into rvc-dev
parents b1d2c794 d0642f70
Loading
Loading
Loading
Loading
+8 −1
Original line number Diff line number Diff line
@@ -15,6 +15,7 @@
 */
package com.android.systemui.shared.system;

import android.graphics.HardwareRenderer;
import android.view.SurfaceControl;
import android.view.View;
import android.view.ViewRootImpl;
@@ -50,7 +51,13 @@ public class ViewRootImplCompat {

    public void registerRtFrameCallback(LongConsumer callback) {
        if (mViewRoot != null) {
            mViewRoot.registerRtFrameCallback(callback::accept);
            mViewRoot.registerRtFrameCallback(
                    new HardwareRenderer.FrameDrawingCallback() {
                        @Override
                        public void onFrameDraw(long l) {
                            callback.accept(l);
                        }
                    });
        }
    }
}