summaryrefslogtreecommitdiff
path: root/libs/hwui/FrameMetricsObserver.h
AgeCommit message (Collapse)Author
2025-02-18Pass metrics buffer as std::array Siarhei Vishniakou
Before this change, metrics were passed around as a raw array, without clear guidance of how big the array was or how to use it. The callers had to look into the implementation to understand that to use this array, "FrameInfo.h" needed to be included, and that the array size and indices were there. With the current refactor, it will become slightly easier to use these metrics. Bug: 376713684 Change-Id: Iecc04a0a215a7913ca8f49e4611fb104e1cacb8e Test: compile only Flag: EXEMPT refactor
2021-09-10Make sure fields are initialized before access Greg Kaiser
We initialize mSurfaceControlId and mAttachedFrameNumber in the constructor to assure they'll always give consistent values when read. Test: TreeHugger Bug: 195699687 Change-Id: I471b402e4654a0c02082109d8828ad6b59085f13
2021-09-07Make frame number type consistent Pablo Gamito
The frame numbers are ultimately stored as uint64_t so to avoid any implementation dependent casting we make sure all direct and indirect references to this value are stored as uint64_t Test: N/A Change-Id: I080c94b1007f2e884cf0fa3583bf51badc913a05
2021-08-31Stop reporting frame stats from frames completed before observer was attached Pablo Gamito
Test: Run app from bug report Fixes: 195699687 Change-Id: If80825dfb41467917b7b9b1e8c9ead1a0dcbffae
2021-03-05Pass actual present time to ViewRootImpl Siarhei Vishniakou
To measure end-to-end touch latency, we need to report the actual present time to ViewRootImpl. ViewRootImpl, in turn, will report this information to InputDispatcher. Finally, InputDispatcher will combine all known information for a specific input event, and will report this data to westworld. In another patch, we will add a new call, 'reportLatencyInfo', to InputPublisher. This call will allow the app to send this latency data to InputDispatcher. Bug: 169866723 Test: printed the input event present times inside ViewRootImpl Change-Id: Ibd3a2cfeb1a340eb15cd2165071df1f8589634af
2019-02-12Merge "Mark FrameMetricsObserver::notify() as pure virtual" am: 0b3cef8697 ↵ Pirama Arumuga Nainar
am: fec4795045 am: dbeb139e26 Change-Id: I4194a12a2f7b3fadc5e442590946d1de2dd63f17
2019-02-07Mark FrameMetricsObserver::notify() as pure virtual Pirama Arumuga Nainar
Bug: http://b/116873221 If not, Clang assumes that the TU which defines this function will contain the vtable for the class as well. Since there's no out-of-line definition of this funciton, no TU ends up with the vtable. This causes a problem with coverage builds, which are built with -O0, where calls don't get inlined, thereby requiring a definition of the vtable. For non -O0 builds, the vtable is not required since the virtual calls get inlined/optimized-out. Test: Build with and without -O0. Change-Id: I60a5cefcd1c327f1e00785fedbb2163c682b33d1
2018-12-03Remove ; from closing namespaces in libs/hwui Chris Blume
When closing a namespace a } is sufficient. It doesn't need to be }; like closing a class or enum. Within frameworks/base/libs/hwui there is a mix between } and }; when closing a namespace. There are even mixes between a .h and the corresponding .cpp files. In a separate CL I was asked to not close with };. That was a good comment. I adopted the style from nearby code. This CL cleans up the nearby code. Test: I made sure the code still built as expected. Change-Id: Ieb314a4f48d6e33752463f3be4361fdc9be97482
2017-11-03Format the world (or just HWUI) John Reck
Test: No code changes, just ran through clang-format Change-Id: Id23aa4ec7eebc0446fe3a30260f33e7fd455bb8c
2016-02-17allow for slow FrameMetricsListeners Andres Morales
A slow listener could cause a race in the NotifyHandler where the single reference to the buffer to send would get updated when it shouldn't have been. Switch to a queue of available buffers to prevent this race. Also, stop setting and clearing the observer reference and instead incStrong/decStrong to mark temporary strong ownership without colliding with other owners in flight. Bug: 27097094 Change-Id: Iee647bfae8b80019b6d8290179eed3973230901f
2016-02-09updates to FrameStatsObserver API Andres Morales
- Rename to FrameMetrics to avoid collision with existing android.view.FrameStats class - Make FrameMetricsObserver implementation detail, exposing FrameMetricsListener interface as public API and wrapping in FrameStatsObserver to maintain state - Remove dropped frame count call, in favor of passing as parameter to callback method. - Move away from raw timestamp access in favor of Metric IDs which represent higher-level, more stable stages in a frame lifecycle and match the categories exposed in the onscreen bars. - Support many-to-many Window<->FrameMetricsListener relationship Change-Id: I00e741d664d4c868b1b6d0131a23f8316bd8c5c2