Merge "Merge "Using inline definition of FrameDrawingCallback instead of lambda as it fails on some devices" into rvc-dev am: a38a553c16 am: b5e88fa694" into rvc-d1-dev-plus-aosp
This commit is contained in:
committed by
Android (Google) Code Review
commit
4cee33549d
@@ -15,6 +15,7 @@
|
|||||||
*/
|
*/
|
||||||
package com.android.systemui.shared.system;
|
package com.android.systemui.shared.system;
|
||||||
|
|
||||||
|
import android.graphics.HardwareRenderer;
|
||||||
import android.view.SurfaceControl;
|
import android.view.SurfaceControl;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.ViewRootImpl;
|
import android.view.ViewRootImpl;
|
||||||
@@ -50,7 +51,13 @@ public class ViewRootImplCompat {
|
|||||||
|
|
||||||
public void registerRtFrameCallback(LongConsumer callback) {
|
public void registerRtFrameCallback(LongConsumer callback) {
|
||||||
if (mViewRoot != null) {
|
if (mViewRoot != null) {
|
||||||
mViewRoot.registerRtFrameCallback(callback::accept);
|
mViewRoot.registerRtFrameCallback(
|
||||||
|
new HardwareRenderer.FrameDrawingCallback() {
|
||||||
|
@Override
|
||||||
|
public void onFrameDraw(long l) {
|
||||||
|
callback.accept(l);
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user