Don't clear self.videoFrame when setting up OpenGL in the EAGL video view.

It makes sense to clean up self.videoFrame in -teardownGL, but if
we happen to have a frame available in -setupGL then it's OK to
keep using that frame. Clearing the frame here frequently causes
the screen view to go black for a moment when the app returns from
the background.

Bug: webrtc:10059
Change-Id: Ic62f872a0a582c807cee1e30ea9bb32f31ada341
Reviewed-on: https://webrtc-review.googlesource.com/c/112213
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Commit-Queue: Kári Helgason <kthelgason@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25816}
This commit is contained in:
Aaron Golden 2018-11-27 11:58:47 -08:00 committed by Commit Bot
parent 2ba65c3a71
commit 154a262b61

View file

@ -251,7 +251,6 @@
}
- (void)setupGL {
self.videoFrame = nil;
[self ensureGLContext];
glDisable(GL_DITHER);
_timer.isPaused = NO;