Improve fullscreen video rotation animation.
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 18 Sep 2014 23:40:46 +0000 (23:40 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 18 Sep 2014 23:40:46 +0000 (23:40 +0000)
commit539a219d2044b3f41d6205093efc7c9852b1abae
tree5c5a1ce2ce75444445c69471cf7fb1634c6bf69c
parentbca4887a1c94b91718222a28f17617a6ac8533a0
Improve fullscreen video rotation animation.
https://bugs.webkit.org/show_bug.cgi?id=136870

Patch by Jeremy Jones <jeremyj@apple.com> on 2014-09-18
Reviewed by Simon Fraser.

Source/WebCore:

Instead of setting the frame on the video layer, set position and bounds separately. This allows the position to be synchronized with the rest of the animation.
When using a fencePort to synchronize animations, if the fence times out, pivoting around the center provides a better fallback.

* platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
(-[WebAVVideoLayer setVideoSublayer:]): added
(-[WebAVVideoLayer videoSublayer]): added
(-[WebAVVideoLayer setBounds:]):  set position and bounds insted of frame.
(WebVideoFullscreenInterfaceAVKit::setupFullscreen): use setVideoSublayer
* platform/ios/WebVideoFullscreenModelVideoElement.mm:
(WebVideoFullscreenModelVideoElement::setVideoFullscreenLayer): set bounds and anchorPoint instead of frame
(WebVideoFullscreenModelVideoElement::setVideoLayerFrame): set bounds instead of frame.

Source/WebKit2:

Remove WKCAContext from LayerHostingContext and use a fencePort to synchronize animation between processes.

* Platform/mac/LayerHostingContext.h: add setFencePort. Remove WKCAContext.
* Platform/mac/LayerHostingContext.mm:
(WebKit::LayerHostingContext::createForPort): Remove WKCAContext.
(WebKit::LayerHostingContext::createForExternalHostingProcess): ditto
(WebKit::LayerHostingContext::setRootLayer): ditto
(WebKit::LayerHostingContext::rootLayer): ditto
(WebKit::LayerHostingContext::contextID): ditto
(WebKit::LayerHostingContext::invalidate): ditto
(WebKit::LayerHostingContext::setColorSpace): ditto
(WebKit::LayerHostingContext::colorSpace): ditto
(WebKit::LayerHostingContext::setFencePort): added
* UIProcess/ios/WebVideoFullscreenManagerProxy.mm:
(WebKit::WebVideoFullscreenManagerProxy::setVideoLayerFrame):
* WebProcess/ios/WebVideoFullscreenManager.h:
* WebProcess/ios/WebVideoFullscreenManager.messages.in: add fence port parameter
* WebProcess/ios/WebVideoFullscreenManager.mm: ditto
(WebKit::WebVideoFullscreenManager::didSetupFullscreen): ditto
(WebKit::WebVideoFullscreenManager::setVideoLayerFrameFenced): ditto

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@173741 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/platform/ios/WebVideoFullscreenInterfaceAVKit.mm
Source/WebCore/platform/ios/WebVideoFullscreenModelVideoElement.mm
Source/WebKit2/ChangeLog
Source/WebKit2/Platform/mac/LayerHostingContext.h
Source/WebKit2/Platform/mac/LayerHostingContext.mm
Source/WebKit2/UIProcess/ios/WebVideoFullscreenManagerProxy.mm
Source/WebKit2/WebProcess/ios/WebVideoFullscreenManager.h
Source/WebKit2/WebProcess/ios/WebVideoFullscreenManager.messages.in
Source/WebKit2/WebProcess/ios/WebVideoFullscreenManager.mm