Send onFrameRendered differently depending on whether the surface is a
display

When rendering on the display, only send onFrameRendered when the video
frame is actually rendered on the display. Otherwise, send it when it is
queued to the surface.

Bug: 234833109
Bug: 274472195
Test: atest DecoderRenderTest
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:e4f38afb622bb9620d7f3345383daeb8a860f55d)
Merged-In: I35f1e8a844d9a96b04d8c6b2c00881e7ec09f98d
Change-Id: I35f1e8a844d9a96b04d8c6b2c00881e7ec09f98d
2 files changed