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
Loading
Please register or sign in to comment