Title: [218291] trunk/Source/WebCore
- Revision
- 218291
- Author
- [email protected]
- Date
- 2017-06-14 13:47:01 -0700 (Wed, 14 Jun 2017)
Log Message
Video flashes black when switching back to a tab https://www.apple.com/homepod/
https://bugs.webkit.org/show_bug.cgi?id=173377
Reviewed by Eric Carlson.
Previously, we had set the background color of the video layer to black in order to make the rect
occupied by the HTMLMediaElement fully opaque. This worked around a graphics corruption bug. Since
then, the code in RenderVideo::foregroundIsKnownToBeOpaqueInRect(...) has been fixed to fully account
for whether the HTMLMediaElement has a valid frame to display, making the black layer background
unnecessary.
Remove all the instances where we were setting the background color of the video layer to black.
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayerLayer):
* platform/graphics/avfoundation/objc/VideoFullscreenLayerManager.mm:
(WebCore::VideoFullscreenLayerManager::setVideoLayer):
(WebCore::VideoFullscreenLayerManager::setVideoFullscreenLayer):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (218290 => 218291)
--- trunk/Source/WebCore/ChangeLog 2017-06-14 20:15:47 UTC (rev 218290)
+++ trunk/Source/WebCore/ChangeLog 2017-06-14 20:47:01 UTC (rev 218291)
@@ -1,3 +1,24 @@
+2017-06-14 Jer Noble <[email protected]>
+
+ Video flashes black when switching back to a tab https://www.apple.com/homepod/
+ https://bugs.webkit.org/show_bug.cgi?id=173377
+
+ Reviewed by Eric Carlson.
+
+ Previously, we had set the background color of the video layer to black in order to make the rect
+ occupied by the HTMLMediaElement fully opaque. This worked around a graphics corruption bug. Since
+ then, the code in RenderVideo::foregroundIsKnownToBeOpaqueInRect(...) has been fixed to fully account
+ for whether the HTMLMediaElement has a valid frame to display, making the black layer background
+ unnecessary.
+
+ Remove all the instances where we were setting the background color of the video layer to black.
+
+ * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
+ (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayerLayer):
+ * platform/graphics/avfoundation/objc/VideoFullscreenLayerManager.mm:
+ (WebCore::VideoFullscreenLayerManager::setVideoLayer):
+ (WebCore::VideoFullscreenLayerManager::setVideoFullscreenLayer):
+
2017-06-14 Matt Lewis <[email protected]>
Unreviewed, rolling out r218161.
Modified: trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm (218290 => 218291)
--- trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm 2017-06-14 20:15:47 UTC (rev 218290)
+++ trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm 2017-06-14 20:47:01 UTC (rev 218291)
@@ -746,7 +746,6 @@
m_videoLayer = adoptNS([[AVPlayerLayer alloc] init]);
[m_videoLayer setPlayer:m_avPlayer.get()];
- [m_videoLayer setBackgroundColor:cachedCGColor(Color::black)];
#ifndef NDEBUG
[m_videoLayer setName:@"MediaPlayerPrivate AVPlayerLayer"];
Modified: trunk/Source/WebCore/platform/graphics/avfoundation/objc/VideoFullscreenLayerManager.mm (218290 => 218291)
--- trunk/Source/WebCore/platform/graphics/avfoundation/objc/VideoFullscreenLayerManager.mm 2017-06-14 20:15:47 UTC (rev 218290)
+++ trunk/Source/WebCore/platform/graphics/avfoundation/objc/VideoFullscreenLayerManager.mm 2017-06-14 20:47:01 UTC (rev 218291)
@@ -80,11 +80,9 @@
if (m_videoFullscreenLayer) {
[m_videoLayer setFrame:CGRectMake(0, 0, m_videoFullscreenFrame.width(), m_videoFullscreenFrame.height())];
[m_videoFullscreenLayer insertSublayer:m_videoLayer.get() atIndex:0];
- [m_videoLayer setBackgroundColor:cachedCGColor(Color::transparent)];
} else {
[m_videoInlineLayer insertSublayer:m_videoLayer.get() atIndex:0];
[m_videoLayer setFrame:m_videoInlineLayer.get().bounds];
- [m_videoLayer setBackgroundColor:cachedCGColor(Color::black)];
}
}
@@ -106,11 +104,9 @@
if (m_videoFullscreenLayer) {
[m_videoFullscreenLayer insertSublayer:m_videoLayer.get() atIndex:0];
[m_videoLayer setFrame:CGRectMake(0, 0, m_videoFullscreenFrame.width(), m_videoFullscreenFrame.height())];
- [m_videoLayer setBackgroundColor:cachedCGColor(Color::transparent)];
} else if (m_videoInlineLayer) {
[m_videoLayer setFrame:[m_videoInlineLayer bounds]];
[m_videoInlineLayer insertSublayer:m_videoLayer.get() atIndex:0];
- [m_videoLayer setBackgroundColor:cachedCGColor(Color::black)];
} else
[m_videoLayer removeFromSuperlayer];
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes