I'm trying to get a better understanding of how my application is interacting with the Android's buffering system. Specifically, I want to optimize when my frames are being added to SurfaceFlinger's BufferQueue, in relation to the Vsync signal.
I understand that BufferQueue information is included inside SurfaceViews when using them:
Binder_1-276 ( 171) [001] ...1 34110.301903: tracing_mark_write: C|171|SurfaceView|1
surfaceflinger-171 ( 171) [001] ...1 34110.314233: tracing_mark_write: C|171|SurfaceView|0
What about if I'm using a TextureView? There is no SurfaceView counter in these cases. Is there any other indicator of buffer state when not using a SurfaceView? Do the application counters also denote BufferQueue state?
Binder_2-279 ( 171) [000] ...1 34169.029234: tracing_mark_write: C|171|com.android.grafika/com.android.grafika.PlayMovieActivity|1
The following line in both BufferQueueProducer.cpp and BufferQueueConsumer.cpp seem to suggest this, but I could use a vote of confidence if at all possible:
ATRACE_INT(mCore->mConsumerName.string(), mCore->mQueue.size());