Use System.nanoTime(), avoid desyncing frame times

The rendering pipeline expects frame vsync times as
System.nanoTime(). When the frame vsync time is behind
the most recent frame, the render request is dropped [*].

This reverts the value back to System.nanoTime() which
was accidentally changed in ag/15819081.

* frameworks/base/libs/hwui/renderthread/TimeLord.cpp:46

Bug: 217046739
Test: ???
Change-Id: I21d8737e7acb5ac13bfbcf150006415431d874aa
This commit is contained in:
Mark Renouf
2022-05-11 15:27:30 -04:00
parent 1c0a4f1cee
commit 7ab7a81845

View File

@@ -395,7 +395,7 @@ public class ScrollCaptureViewSupport<V extends View> implements ScrollCaptureCa
@SyncAndDrawResult
public int renderView(View view, Rect sourceRect) {
HardwareRenderer.FrameRenderRequest request = mRenderer.createRenderRequest();
request.setVsyncTime(SystemClock.elapsedRealtimeNanos());
request.setVsyncTime(System.nanoTime());
if (updateForView(view)) {
setupLighting(view);
}