RESOLVED FIXED 136879
Fix an issue that caused video playback to not always use high resolution streams
https://bugs.webkit.org/show_bug.cgi?id=136879
Summary Fix an issue that caused video playback to not always use high resolution str...
Simon Fraser (smfr)
Reported 2014-09-16 19:10:13 PDT
Fix an issue that caused video playback to not always use high resolution streams
Attachments
Patch (20.02 KB, patch)
2014-09-16 20:20 PDT, Simon Fraser (smfr)
no flags
Patch (13.61 KB, patch)
2014-09-17 11:55 PDT, Simon Fraser (smfr)
eric.carlson: review+
Simon Fraser (smfr)
Comment 1 2014-09-16 20:20:31 PDT
Jeremy Jones
Comment 2 2014-09-17 11:41:55 PDT
Comment on attachment 238235 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=238235&action=review > Source/WebCore/WebCore.exp.in:3441 > -__ZN7WebCore32WebVideoFullscreenInterfaceAVKit15setupFullscreenER7CALayerNS_7IntRectEP6UIView > +__ZN7WebCore32WebVideoFullscreenInterfaceAVKit15setupFullscreenER7CALayerNS_7IntRectEfP6UIView This can be done without changing the WebVideoFullscreenInterfaceAVKit interface. > Source/WebCore/platform/ios/WebVideoFullscreenControllerAVKit.mm:128 > - _interface->setupFullscreen(*_videoFullscreenLayer.get(), _mediaElement->clientRect(), view); > + _interface->setupFullscreen(*_videoFullscreenLayer.get(), _mediaElement->clientRect(), 1, view); Don't need this if the change is isolated to the IPC interface. > Source/WebCore/platform/ios/WebVideoFullscreenInterfaceAVKit.h:95 > - virtual void setupFullscreen(PlatformLayer&, WebCore::IntRect initialRect, UIView *); > + virtual void setupFullscreen(PlatformLayer&, WebCore::IntRect initialRect, float hostingDeviceScaleFactor, UIView *); Ditto. > Source/WebCore/platform/ios/WebVideoFullscreenInterfaceAVKit.mm:737 > -void WebVideoFullscreenInterfaceAVKit::setupFullscreen(PlatformLayer& videoLayer, WebCore::IntRect initialRect, UIView* parentView) > +void WebVideoFullscreenInterfaceAVKit::setupFullscreen(PlatformLayer& videoLayer, WebCore::IntRect initialRect, float hostingDeviceScaleFactor, UIView* parentView) Ditto. > Source/WebCore/platform/ios/WebVideoFullscreenInterfaceAVKit.mm:764 > + > + if (hostingDeviceScaleFactor != 1) { > + // Invert the scale transform added in the WebProcess to fix <rdar://problem/18316542>. > + float inverseScale = 1 / hostingDeviceScaleFactor; > + [m_videoLayer setTransform:CATransform3DMakeScale(inverseScale, inverseScale, 1)]; > + } This can be put into WebVideoFullscreenManagerProxy::setupFullscreenWithID, just before it calls setupFullsdcreen. > Source/WebKit2/UIProcess/ios/WebVideoFullscreenManagerProxy.mm:80 > - setupFullscreen(*m_layerHost.get(), initialRect, parentView); > + setupFullscreen(*m_layerHost.get(), initialRect, hostingDeviceScaleFactor, parentView); Apply the transform here on m_layerHost instead of passing it to setupFullscreen.
Simon Fraser (smfr)
Comment 3 2014-09-17 11:55:09 PDT
Simon Fraser (smfr)
Comment 4 2014-09-17 14:18:45 PDT
Note You need to log in before you can comment on or make changes to this bug.