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

Skip to content
Commit adf5024a authored by Siarhei Vishniakou's avatar Siarhei Vishniakou
Browse files

Send metrics notification just before frame advances

Currently, it is possible to notify frame metrics observers that
registered to receive present time about the same frame twice.

This is wasteful, but also requires the metrics listener to guard
against duplicates. See https://b.corp.google.com/issues/169866723#comment23

To avoid this issue, only notify about metrics with present time just
before the frame is advanced to the next position. This ensures that we
are always notifying about the last frame that's about to go away.

Bug: 169866723
Test: added a crash to LatencyTracker for the case where we are notified
about non-existent record. The record disappears once it's complete. So
the first call was completing the record, and the second call was
causing a crash. Now, the crash is gone with this patch.

Change-Id: Ia247b4a0010b8ecb016ac66e44e211ec4f40bf8f
parent 603b4c4a
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment