Chromium Code Reviews| 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 1b669437de1902946f9696913292a587e7739d8f..68fc06dc7799812827826d0b291095aa4f6540db 100644 |
| --- a/content/renderer/media/android/webmediaplayer_android.cc |
| +++ b/content/renderer/media/android/webmediaplayer_android.cc |
| @@ -1046,6 +1046,7 @@ void WebMediaPlayerAndroid::OnDidExitFullscreen() { |
| player_manager_->RequestExternalSurface(player_id_, last_computed_rect_); |
| #endif // defined(VIDEO_HOLE) |
| is_fullscreen_ = false; |
| + ReallocateVideoFrame(); |
| client_->repaint(); |
| } |
| @@ -1206,6 +1207,8 @@ 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) |
| @@ -1636,6 +1639,16 @@ 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, the whole view will be transparent and we will see through to the |
|
chrishtr
2016/05/03 16:31:04
By "whole view" you mean the LayerTreeView, right?
|
| + // underlaid fullscreen surface. |
| + if (!fullscreen_frame_) |
| + fullscreen_frame_ = VideoFrame::CreateTransparentFrame(gfx::Size(1, 1)); |
| + SetCurrentFrameInternal(fullscreen_frame_); |
| + client_->repaint(); |
| } |
| bool WebMediaPlayerAndroid::IsHLSStream() const { |