OSDN Git Service

SF: use first sample timestamp as reference.
authorHaixia Shi <hshi@google.com>
Wed, 28 Oct 2015 20:22:22 +0000 (13:22 -0700)
committerHaixia Shi <hshi@google.com>
Fri, 30 Oct 2015 20:16:09 +0000 (13:16 -0700)
commit664339a8e8d3f2d5acd5728dae666cc9a14e08f3
tree90488915028bc55af24c4a83b454bc64cec9f17d
parent3b0d488e87bf602998749e27ad5b555122895a90
SF: use first sample timestamp as reference.

Do not use the absolute 64-bit nsecs_t timestamp directly in phase
and error calculations. Compared to the estimated vsync period, the
timestamp tend to many orders of magnitudes larger, and consequently
the integer modulo operation used to calculate phase and error can
be very sensitive to tiny fluctuation in vsync period.

Bug: 25113115
Test: set kTraceDetailedInfo=true; see Phase and Error are stable in systrace

Change-Id: I687703eec31b1072c606898c0424a96c0a8ca033
services/surfaceflinger/DispSync.cpp
services/surfaceflinger/DispSync.h