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

Unified Diff: Source/core/html/HTMLVideoElement.cpp

Issue 1254613003: Let the WebMediaPlayer decide whether to use overlay video. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fixes after rebase Created 5 years, 5 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
Index: Source/core/html/HTMLVideoElement.cpp
diff --git a/Source/core/html/HTMLVideoElement.cpp b/Source/core/html/HTMLVideoElement.cpp
index 1fd3884597140f252920d6f5e0924fb1c446b25a..7d9d5aa88d6662af7533dbaf1f51e4856294ce32 100644
--- a/Source/core/html/HTMLVideoElement.cpp
+++ b/Source/core/html/HTMLVideoElement.cpp
@@ -38,6 +38,7 @@
#include "core/html/parser/HTMLParserIdioms.h"
#include "core/layout/LayoutImage.h"
#include "core/layout/LayoutVideo.h"
+#include "platform/RuntimeEnabledFeatures.h"
#include "platform/UserGestureIndicator.h"
#include "platform/graphics/GraphicsContext.h"
#include "platform/graphics/ImageBuffer.h"
@@ -244,6 +245,15 @@ bool HTMLVideoElement::webkitDisplayingFullscreen()
return isFullscreen();
}
+bool HTMLVideoElement::supportsOverlayFullscreenVideo() const
+{
+ // For WebRTC, the video frame contains all the data and no hardware surface
+ // should be used.
+ return !HTMLMediaElement::isMediaStreamURL(sourceURL().string())
+ && (RuntimeEnabledFeatures::overlayFullscreenVideoEnabled()
+ || (webMediaPlayer() && webMediaPlayer()->supportsOverlayFullscreenVideo()));
trchen 2015/07/30 21:29:21 This condition feels weird to me. I'd prefer it th
watk 2015/08/03 21:47:44 I've added forceCverlayFullscreenVideo which can b
+}
+
void HTMLVideoElement::didMoveToNewDocument(Document& oldDocument)
{
if (m_imageLoader)

Powered by Google App Engine
This is Rietveld 408576698