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
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
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
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
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
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
- 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