History log of /frameworks/native/libs/gui/FrameTimestamps.cpp
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
4e606e3901b500bdd0f3ea21b8cb63734087bf0a 16-Mar-2017 Brian Anderson <brianderson@google.com> egl: Remove retire event.

Test: adb shell /data/nativetest/libgui_test/libgui_test

Change-Id: Ibf63d22e42ae52307662107eec50f80de0e703f5
5ea5e5905170f32d5cf45ad35c552d64743892c3 02-Dec-2016 Brian Anderson <brianderson@google.com> Fix unexpected FrameEvents on BufferQueue reconnect

Helps reduce the number of ALOGE's being hit
when switching between apps.

* Notify Layer when the Producer disconnects.
* Avoid sending event deltas from a previous connection.
* Avoid releasing a frame more than once.

Test: adb shell /data/nativetest/libgui_test/libgui_test

Change-Id: I64f314be72ddb154b584d726ac382cd468e345bf
ed816e6cb4ca15181bf6120890c85290b5f7c02b 27-Oct-2016 Brian Anderson <brianderson@google.com> Add FrameEvents::isValidTimestamp

Refactor only.

Test: adb shell /data/nativetest/libgui_test/libgui_test

Change-Id: I86653ac14186ca509f58a94047f25a7b74231b30
b04c6f03a2334b03ae0105ec005aeecfa61f4a90 21-Oct-2016 Brian Anderson <brianderson@google.com> Change GL references to GPU for getFrameTimestamps.

Test: Rename only.

Change-Id: Idaf7ab38f78f58aa8387823f47dac084e21eb1f0
8cc8b10e27d515a6962ae6c66a62387ced45f5fe 21-Oct-2016 Brian Anderson <brianderson@google.com> Clean up FrameTimestamp log messages.

Test: Log message changes only. Existing tests pass.

Change-Id: I032c76393a4949b291c3a650279367caf05a775c
0a61b0c813f5991bf462e36a2314dda062727a10 07-Dec-2016 Brian Anderson <brianderson@google.com> EGL: Add eglGetCompositorTimingANDROID.

Exposes the composite deadline, composite interval, and
the composite to present latency.

A history of composite and present fences are stored.
When the present fence's timestamp becomes known,
the composite to present latency is updated with
sampling jitter removed.

The values are updated in the producer when timestamps
are enabled and on queue and dequeue.

The deadline is snapped to the next expected deadline
based on the current systemTime().

Test: adb shell /data/nativetest/libgui_test/libgui_test

Change-Id: I406814258613b984b56488236632494f2f61ff2e
f6386862dffb0fb9cb39343d959104a32e5e95b7 01-Nov-2016 Brian Anderson <brianderson@google.com> Add a DequeueReady FrameEvent

Test: adb shell /data/nativetest/libgui_test/libgui_test

Change-Id: I98ffd4123fc50b5f560e432f4078408c913c8edf
175a7206c5aea70236b916d7707ab25025eb9cd6 11-Oct-2016 Brian Anderson <brianderson@google.com> Clean up Fence a little.

Test: Cleanup patch only. Fences still work.

Change-Id: I65e5cdf5e3c067bc475c085ab6d3577d9753231c
3da8d2748580b2575e368e203ce2c7f8d34dea05 29-Jul-2016 Brian Anderson <brianderson@google.com> Surface unit tests for getFrameTimestamps.

Verifies the following:

1) The timestamps and fences aren't transferred if the
feature isn't explicitly enabled.
2) Attempts to get the timestamps will fail if not enabled.
3) Timestamps are transferred if enabled.
4) The support for Present/Retire timestamps are properly
queried from the ISurfaceComposer.
5) Timestamps correspond to the correct frame.
6) The consumer doesn't send the acquire fence back to the
producer and a sync call isn't made to try and get it
from the producer.
7) A sync call isn't made when no timestamps are requested.
8) If the consumer sent the producer fences, the consumer
can get the timestamps without a sync call.
9) If there was no GL composite performed, a sync call
isn't made to get a non-existant fence/time.
10) When asking for the retire or release time of the most
recent frame, a sync call isn't made.
11) Requests for unsupported timestamps return an error and
do not result in a sync call.

Test: Test: adb shell /data/nativetest/libgui_test/libgui_test

Change-Id: I6f728af0d4a0f431c9e47131da64584a589559e7
4565daa628d914f05dabfeca83d2e5ee07936a99 14-Dec-2016 Brian Anderson <brianderson@google.com> Suppress unnecessary "frame not found" errors.

ConsumerFrameEventHistory only stores 8 frames of history,
but video can queue more than 8 frames, which triggers
some annoying ALOGE messages that aren't really errors.

This patch makes sure to print the error only if the
producer has enabled the frame events, which only happens
with EGL where we won't see more than 3 frames queued.

Test: This only affects error reporting.

Change-Id: I184202a71f5fe29159c148957b92fb2e856bf625
3d4039d7a291cd9b6f2dd4b46fcdb576f2db3356 24-Sep-2016 Brian Anderson <brianderson@google.com> Use FenceTime to share fence times and reduce open fds.

FenceTimes are created and shared for each Fence that
FrameTimestampHistory and FrameTracker care about.

On the consumer side, the FenceTimes are also added to
shared timelines that are owned by SurfaceFlinger or
unshared timelines owned by Layer. The timelines are
checked at the end of every frame to minimize the number
of file descriptors open.

On the producer side, the FenceTimes are added to
the ConsumerFrameEventHistory instead, since the timelines
that would be tracked by SurfaceFlinger are not shared
with anyone else in the consumer's process. The timelines
are checked just after a frame is queued to minimize
the number of file descriptors open.

Test: adb shell /data/nativetest/libgui_test/libgui_test

Change-Id: Ifd4301affe1b24705b2bee7608c5a2c09dfb4041
7c3ba8aa288755fad78ddbabcee0ad5a0610ac1c 25-Jul-2016 Brian Anderson <brianderson@google.com> Update producer's cache of frame events in de/queue

* Cache is only updated during queue and dequeue if
the getFrameTimestamps is enabled.
* The consumer avoids sending a copy of the acquire
fence back to the producer since the producer
already has a copy.

Test: adb shell /data/nativetest/libgui_test/libgui_test

Change-Id: I6a8b965ae79441a40893b5df937f9ed004fe7359
3890c3995c4a52439844faeb80b5503d42b977d8 25-Jul-2016 Brian Anderson <brianderson@google.com> Cache frame event history producer-side.

* Producer maintains a recent history of frames.
* Producer only does a binder call if requested
informatiVon doesn't exist in the cache.
* Consumer sends fences to the producer, which
can be queried for timestamps without a
binder call.

Test: adb shell /data/nativetest/libgui_test/libgui_test

Change-Id: I8a64579407cc2935f5c659462cb227b07ba27e43
d6927fb1143398370c0885844bfb58923ef740b7 24-Jul-2016 Brian Anderson <brianderson@google.com> Track frame events incrementally and per layer.

* Replaces FenceTracker, which was owned by SurfaceFlinger,
with FrameEventHistory, which is owned by Layer.
* Updates FrameEventHistory as events occur.
* Changes SurfaceFlinger flag "--fences" to

Test: adb shell /data/nativetest/libgui_test/libgui_test

Change-Id: I868c2ef93964656d7e41848243433499e7f45fe7