Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(339)

Issue 709003004: Fix leaked external surface when several EME videos coexist (Closed)

Created:
6 years, 1 month ago by Hugo Holgersson
Modified:
6 years, 1 month ago
CC:
chromium-reviews, android-webview-reviews_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Project:
chromium
Visibility:
Public.

Description

Fix 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 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+5 lines, -6 lines) Patch
M AUTHORS View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M android_webview/java/src/org/chromium/android_webview/ExternalVideoSurfaceContainer.java View 1 2 chunks +2 lines, -3 lines 0 comments Download
M chromecast/browser/android/apk/src/org/chromium/chromecast/shell/ExternalVideoSurfaceContainer.java View 1 2 chunks +2 lines, -3 lines 0 comments Download

Messages

Total messages: 28 (9 generated)
Hugo Holgersson
I would be happy if you could have a look at my upload :)
6 years, 1 month ago (2014-11-07 16:10:25 UTC) #2
xhwang
+qinmin, who knows this code best.
6 years, 1 month ago (2014-11-10 17:03:27 UTC) #7
boliu
https://codereview.chromium.org/709003004/diff/1/android_webview/java/src/org/chromium/android_webview/ExternalVideoSurfaceContainer.java File android_webview/java/src/org/chromium/android_webview/ExternalVideoSurfaceContainer.java (right): https://codereview.chromium.org/709003004/diff/1/android_webview/java/src/org/chromium/android_webview/ExternalVideoSurfaceContainer.java#newcode170 android_webview/java/src/org/chromium/android_webview/ExternalVideoSurfaceContainer.java:170: mSurfaceView = new NoPunchingSurfaceView(mContentViewCore.getContext()); Can you also add an ...
6 years, 1 month ago (2014-11-10 18:03:39 UTC) #8
ycheo (away)
@gunsch, could you check if the change has no side-effects on ChromeCast side? https://codereview.chromium.org/709003004/diff/1/AUTHORS File ...
6 years, 1 month ago (2014-11-10 22:58:46 UTC) #10
boliu
@gunsch: Should the same change be made to //src/chromecast/browser/android/apk/src/org/chromium/chromecast/shell/ExternalVideoSurfaceContainer.java ? Can the ExternalVideoSurfaceContainer code be ...
6 years, 1 month ago (2014-11-10 23:20:16 UTC) #11
gunsch
On 2014/11/10 23:20:16, boliu wrote: > @gunsch: Should the same change be made to > ...
6 years, 1 month ago (2014-11-10 23:51:59 UTC) #12
boliu
On 2014/11/10 23:51:59, gunsch wrote: > @boliu: IIRC last time this question was asked, the ...
6 years, 1 month ago (2014-11-11 00:05:48 UTC) #13
boliu
On 2014/11/10 23:51:59, gunsch wrote: > If not, can we investigate why the > previous ...
6 years, 1 month ago (2014-11-11 00:07:19 UTC) #14
Hugo Holgersson
I assumed we should fix also for Chromecast (so files does not divert before factoring ...
6 years, 1 month ago (2014-11-11 15:35:10 UTC) #15
gunsch
@boliu: My concern is that this is just a symptom. There are other things that ...
6 years, 1 month ago (2014-11-11 16:29:52 UTC) #16
qinmin
On 2014/11/11 16:29:52, gunsch wrote: > @boliu: My concern is that this is just a ...
6 years, 1 month ago (2014-11-12 00:25:49 UTC) #17
boliu
android_webview lgtm
6 years, 1 month ago (2014-11-12 00:28:32 UTC) #18
gunsch
chromecast lgtm
6 years, 1 month ago (2014-11-12 00:29:58 UTC) #19
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/709003004/20001
6 years, 1 month ago (2014-11-12 09:30:58 UTC) #21
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on tryserver.chromium.linux (http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/23656)
6 years, 1 month ago (2014-11-12 09:34:22 UTC) #23
boliu
On 2014/11/12 09:34:22, I haz the power (commit-bot) wrote: > Try jobs failed on following ...
6 years, 1 month ago (2014-11-14 01:45:54 UTC) #24
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/709003004/40001
6 years, 1 month ago (2014-11-14 09:33:59 UTC) #26
commit-bot: I haz the power
Committed patchset #3 (id:40001)
6 years, 1 month ago (2014-11-14 10:22:18 UTC) #27
commit-bot: I haz the power
6 years, 1 month ago (2014-11-14 10:23:02 UTC) #28
Message was sent while issue was closed.
Patchset 3 (id:??) landed as
https://crrev.com/50f8b8e49b1aac03afe9ae00747812cdd0a118b0
Cr-Commit-Position: refs/heads/master@{#304191}

Powered by Google App Engine
This is Rietveld 408576698