DescriptionFix leaked external surface when several EME videos coexist
Background: In the code we see that BrowserMediaPlayerManager can only hold
one ExternalVideoSurfaceContainer and a ExternalVideoSurfaceContainer can
only hold one SurfaceView.
Problem: When ExternalVideoSurfaceContainer starts holding a new surface,
createSurfaceView() will change mSurfaceView to the new SurfaceView. It
does not release the old SurfaceView before it looses its reference to it.
Leaving a SurfaceView behind could cause Z-fights with other SurfaceViews,
such as fullscreen video playback.
Solution: By deallocating player A's SurfaceView when player B requests one
we ensure that no SurfaceView is leaked. To ensure deallocation we always
call setActiveContainer(this) before createSurfaceView().
BUG=431318
TEST=Flip between two EME videos, see crbug.com/431318 for detailed info.
Committed: https://crrev.com/50f8b8e49b1aac03afe9ae00747812cdd0a118b0
Cr-Commit-Position: refs/heads/master@{#304191}
Patch Set 1 #
Total comments: 3
Patch Set 2 : Added fix to Chromecast #Patch Set 3 : Added AUTHORS #
Messages
Total messages: 28 (9 generated)
|