Title: [102387] trunk/Source/WebKit/chromium
- Revision
- 102387
- Author
- [email protected]
- Date
- 2011-12-08 15:00:56 -0800 (Thu, 08 Dec 2011)
Log Message
[chromium] Set opaque() for VideoLayerChromium
https://bugs.webkit.org/show_bug.cgi?id=73858
Patch by Dana Jansens <[email protected]> on 2011-12-08
Reviewed by James Robinson.
* src/WebMediaPlayerClientImpl.cpp:
(WebKit::isVideoFrameFormatOpaque):
(WebKit::WebMediaPlayerClientImpl::getCurrentFrame):
Modified Paths
Diff
Modified: trunk/Source/WebKit/chromium/ChangeLog (102386 => 102387)
--- trunk/Source/WebKit/chromium/ChangeLog 2011-12-08 22:38:12 UTC (rev 102386)
+++ trunk/Source/WebKit/chromium/ChangeLog 2011-12-08 23:00:56 UTC (rev 102387)
@@ -1,3 +1,14 @@
+2011-12-08 Dana Jansens <[email protected]>
+
+ [chromium] Set opaque() for VideoLayerChromium
+ https://bugs.webkit.org/show_bug.cgi?id=73858
+
+ Reviewed by James Robinson.
+
+ * src/WebMediaPlayerClientImpl.cpp:
+ (WebKit::isVideoFrameFormatOpaque):
+ (WebKit::WebMediaPlayerClientImpl::getCurrentFrame):
+
2011-12-08 Elliot Poger <[email protected]>
Chromium DEPS roll 112974 -> 113603
Modified: trunk/Source/WebKit/chromium/src/WebMediaPlayerClientImpl.cpp (102386 => 102387)
--- trunk/Source/WebKit/chromium/src/WebMediaPlayerClientImpl.cpp 2011-12-08 22:38:12 UTC (rev 102386)
+++ trunk/Source/WebKit/chromium/src/WebMediaPlayerClientImpl.cpp 2011-12-08 23:00:56 UTC (rev 102387)
@@ -62,6 +62,29 @@
return adoptPtr(webFrame->client()->createMediaPlayer(webFrame, client));
}
+static bool isVideoFrameFormatOpaque(WebVideoFrame::Format format)
+{
+ switch (format) {
+ case WebVideoFrame::FormatInvalid:
+ case WebVideoFrame::FormatEmpty:
+ case WebVideoFrame::FormatRGBA:
+ case WebVideoFrame::FormatNativeTexture:
+ return false;
+ case WebVideoFrame::FormatRGB555:
+ case WebVideoFrame::FormatRGB565:
+ case WebVideoFrame::FormatRGB24:
+ case WebVideoFrame::FormatRGB32:
+ case WebVideoFrame::FormatYV12:
+ case WebVideoFrame::FormatYV16:
+ case WebVideoFrame::FormatNV12:
+ case WebVideoFrame::FormatASCII:
+ case WebVideoFrame::FormatI420:
+ return true;
+ }
+ ASSERT_NOT_REACHED();
+ return false;
+}
+
bool WebMediaPlayerClientImpl::m_isEnabled = false;
bool WebMediaPlayerClientImpl::isEnabled()
@@ -577,6 +600,8 @@
WebVideoFrame* webkitVideoFrame = m_webMediaPlayer->getCurrentFrame();
if (webkitVideoFrame)
m_currentVideoFrame = adoptPtr(new VideoFrameChromiumImpl(webkitVideoFrame));
+ if (m_videoLayer)
+ m_videoLayer->setOpaque(webkitVideoFrame && isVideoFrameFormatOpaque(webkitVideoFrame->format()));
}
return m_currentVideoFrame.get();
}
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes