History log of /frameworks/native/services/surfaceflinger/VSyncModulator.h
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
9053521815dc4cbe3d2ab21096e05d33386dd5da 23-May-2018 Jorim Jaggi <jjaggi@google.com> Keep early vsync-offsets for at least two frames after transaction

Imagine the following sequence, in which vsync-sf is usually 4ms
behind vsync-app.
- Vsync-app fires. The app sends a transaction with early wakeup.
- Vsync-sf fires immediately after early wakeup is received,
before the regular 4ms delay.
- Vsync-sf resets itself to vsync-app+4ms as the transaction was
handled.
- Repeat 1, but now the app was a bit delayed and sends the early
wakeup late, such that the time used to do GL comp isn't enough to
avoid jank.

To fix this, we apply a low pass filter for transaction-caused
early wake and keep it early for at least 2 frames.

Test: Open/close apps, inspect systraces and verify wake-up times
Bug: 78611607
Change-Id: I74b0d88a4d95ca5b6d24950e14e3d6a9379f2714
/frameworks/native/services/surfaceflinger/VSyncModulator.h
f15c3be1e8eab73da2dd3b2a7e6215302dae4314 12-Apr-2018 Jorim Jaggi <jjaggi@google.com> Fix transaction phase offsets

There are cases where we have multiple source of transactions
in one frame. In these cases, if a NORMAL gets submitted after an
EARLY, it will override the early one which will cause to use
the wrong phase offset for this frame.

In some cases an EARLY was then still scheduled before the frame
happened, so any kind of phase offset was observeable, which
looked like drifting.

Fix this by making sure an EARLY frame stays an EARLY frame.

Test: Open app. Ensure by looking really closely that vsync-sf is
happening at the supposed offset.
Bug: 75985430

Change-Id: I5dbf097d314767493b0f06b9eb6dd7c6b2f93919
/frameworks/native/services/surfaceflinger/VSyncModulator.h
2713c30843816d3511b39b85a2c268a2b7682047 29-Mar-2018 Dan Stoza <stoza@google.com> Early wake-up for transitions (1/2)

On some devices it's very likely that we fall into GL comp during
app transitions. However, SF offsets are chosen in a way such that
the time to finish a frame is just too tight to be completely jank
free when hitting GL composition in SurfaceFlinger. Thus, we
introduce the concept of a separate early offset, and wakeup
SurfaceFlinger at that time if we think that hitting GL comp is
likely, or we already hit GL comp in the last frame.

Test: Open app, check vsync offsets in systrace
Test: Open many dialogs/apps to fall into GPU comp.
Bug: 75985430
Change-Id: Ie17e30c4575359fa11bb8912f68dcafe3e569ddb
Merged-In: Ie17e30c4575359fa11bb8912f68dcafe3e569ddb
/frameworks/native/services/surfaceflinger/VSyncModulator.h