Reset isFirstFrameRendered on init of SurfaceViewRenderer

If a SurfaceViewRenderer is reinitialized, the onFirstFrameRendered
callback is not fired.

Ensure that we reset the flag when the SurfaceViewRenderer is
initialized.

BUG=webrtc:7985

Review-Url: https://codereview.webrtc.org/2981793002
Cr-Commit-Position: refs/heads/master@{#19016}
This commit is contained in:
tserng
2017-07-14 02:35:53 -07:00
committed by Commit Bot
parent c8f9230667
commit ff7acb19a1
2 changed files with 2 additions and 0 deletions

View File

@ -10,6 +10,7 @@ Anil Kumar <an1kumar@gmail.com>
Ben Strong <bstrong@gmail.com>
Bob Withers <bwit@pobox.com>
Bridger Maxwell <bridgeyman@gmail.com>
Chris Tserng <tserng@amazon.com>
Christophe Dumez <ch.dumez@samsung.com>
Cody Barnes <conceptgenesis@gmail.com>
Colin Plumb

View File

@ -92,6 +92,7 @@ public class SurfaceViewRenderer
ThreadUtils.checkIsOnMainThread();
this.rendererEvents = rendererEvents;
synchronized (layoutLock) {
isFirstFrameRendered = false;
rotatedFrameWidth = 0;
rotatedFrameHeight = 0;
frameRotation = 0;