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

Unified Diff: content/renderer/media/android/webmediaplayer_android.cc

Issue 2084223002: Make the video layer visibility configurable in OverlayFullscreenVideo mode (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/renderer/media/android/webmediaplayer_android.h ('k') | media/blink/webmediaplayer_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/media/android/webmediaplayer_android.cc
diff --git a/content/renderer/media/android/webmediaplayer_android.cc b/content/renderer/media/android/webmediaplayer_android.cc
index 7adb15e764c5066242f2bc070c7ab1abe9077474..6a2c8bb900e6dda82ef6abe71d23df4b61e8da8d 100644
--- a/content/renderer/media/android/webmediaplayer_android.cc
+++ b/content/renderer/media/android/webmediaplayer_android.cc
@@ -1047,7 +1047,6 @@ void WebMediaPlayerAndroid::OnDidExitFullscreen() {
player_manager_->RequestExternalSurface(player_id_, last_computed_rect_);
#endif // defined(VIDEO_HOLE)
is_fullscreen_ = false;
- ReallocateVideoFrame();
client_->repaint();
}
@@ -1208,8 +1207,6 @@ void WebMediaPlayerAndroid::DrawRemotePlaybackText(
void WebMediaPlayerAndroid::ReallocateVideoFrame() {
DCHECK(main_thread_checker_.CalledOnValidThread());
-
- if (is_fullscreen_) return;
if (needs_external_surface_) {
// VideoFrame::CreateHoleFrame is only defined under VIDEO_HOLE.
#if defined(VIDEO_HOLE)
@@ -1632,8 +1629,9 @@ void WebMediaPlayerAndroid::SetCdmReadyCB(
SetCdmInternal(base::Bind(&media::IgnoreCdmAttached));
}
-bool WebMediaPlayerAndroid::supportsOverlayFullscreenVideo() {
- return true;
+WebMediaPlayer::OverlayFullscreenVideoMode
+WebMediaPlayerAndroid::getOverlayFullscreenVideoMode() {
+ return WebMediaPlayer::OverlayFullscreenVideoMode::VideoLayerInvisible;
}
void WebMediaPlayerAndroid::enteredFullscreen() {
@@ -1642,16 +1640,6 @@ void WebMediaPlayerAndroid::enteredFullscreen() {
SetNeedsEstablishPeer(false);
is_fullscreen_ = true;
suppress_deleting_texture_ = false;
-
- // Create a transparent video frame. Blink will already have made the
- // background transparent because we returned true from
- // supportsOverlayFullscreenVideo(). By making the video frame transparent,
- // as well, everything in the LayerTreeView will be transparent except for
- // media controls. The video will be on visible on the underlaid surface.
- if (!fullscreen_frame_)
- fullscreen_frame_ = VideoFrame::CreateTransparentFrame(gfx::Size(1, 1));
- SetCurrentFrameInternal(fullscreen_frame_);
- client_->repaint();
}
bool WebMediaPlayerAndroid::IsHLSStream() const {
« no previous file with comments | « content/renderer/media/android/webmediaplayer_android.h ('k') | media/blink/webmediaplayer_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698