Bug 133706 - Improve enter and exit fullscreen transition by using two step transition.
Summary: Improve enter and exit fullscreen transition by using two step transition.
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit2 (show other bugs)
Version: 528+ (Nightly build)
Hardware: iPhone / iPad Unspecified
: P2 Normal
Assignee: Jeremy Jones
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-06-10 16:33 PDT by Jeremy Jones
Modified: 2014-06-23 10:05 PDT (History)
7 users (show)

See Also:


Attachments
Patch (24.17 KB, patch)
2014-06-10 17:06 PDT, Jeremy Jones
no flags Details | Formatted Diff | Diff
Patch (24.26 KB, patch)
2014-06-12 12:08 PDT, Jeremy Jones
simon.fraser: review+
Details | Formatted Diff | Diff
Patch for landing (24.47 KB, patch)
2014-06-16 16:55 PDT, Jeremy Jones
commit-queue: commit-queue-
Details | Formatted Diff | Diff
Patch for landing. (24.47 KB, patch)
2014-06-17 15:53 PDT, Jeremy Jones
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jeremy Jones 2014-06-10 16:33:04 PDT
Improve enter and exit fullscreen transition by using two step transition.
Comment 1 Jeremy Jones 2014-06-10 16:33:47 PDT
radar://16878025
Comment 2 Jeremy Jones 2014-06-10 17:06:57 PDT
Created attachment 232830 [details]
Patch
Comment 3 Eric Carlson 2014-06-12 06:26:21 PDT
Comment on attachment 232830 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=232830&action=review

> Source/WebCore/platform/ios/WebVideoFullscreenInterfaceAVKit.mm:742
> +    __block RefPtr<WebVideoFullscreenInterfaceAVKit> protect2(this);

Nit: You don't need the "2" on the variable name now that isn't in setExternalPlayback.

> Source/WebKit2/WebProcess/ios/WebVideoFullscreenManager.mm:195
> +    
> +    dispatch_async(dispatch_get_main_queue(), ^{

No need to protect "this"?
Comment 4 Jeremy Jones 2014-06-12 12:06:49 PDT
(In reply to comment #3)
> (From update of attachment 232830 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=232830&action=review
> 
> > Source/WebCore/platform/ios/WebVideoFullscreenInterfaceAVKit.mm:742
> > +    __block RefPtr<WebVideoFullscreenInterfaceAVKit> protect2(this);
> 
> Nit: You don't need the "2" on the variable name now that isn't in setExternalPlayback.

Removed the 2.

> 
> > Source/WebKit2/WebProcess/ios/WebVideoFullscreenManager.mm:195
> > +    
> > +    dispatch_async(dispatch_get_main_queue(), ^{
> 
> No need to protect "this"?

Added a protect.
Comment 5 Jeremy Jones 2014-06-12 12:08:36 PDT
Created attachment 232971 [details]
Patch
Comment 6 Simon Fraser (smfr) 2014-06-13 15:40:06 PDT
Comment on attachment 232971 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=232971&action=review

> Source/WebCore/platform/ios/WebVideoFullscreenControllerAVKit.mm:156
> +        _model->setVideoFullscreenLayer(nullptr);

nil if that's a CALayer*

> Source/WebCore/platform/ios/WebVideoFullscreenInterfaceAVKit.mm:792
> +        [m_window setHidden:YES];
> +        [m_window setRootViewController:nil];
> +        [m_playerViewController setDelegate:nil];
> +        [m_playerViewController setPlayerController:nil];
> +        m_playerViewController = nil;
> +        m_viewController = nil;
> +        m_window = nil;
> +        [m_videoLayer removeFromSuperlayer];
> +        m_videoLayer = nil;
> +        [m_videoLayerContainer removeFromSuperlayer];
> +        [m_videoLayerContainer setPlayerViewController:nil];
> +        m_videoLayerContainer = nil;

So much stuff.

> Source/WebKit2/UIProcess/ios/WebVideoFullscreenManagerProxy.messages.in:33
> +    SetupFullscreenWithID(uint32_t videoLayerID, WebCore::IntRect initialRect)

Is this a GraphicsLayer::PlatformLayerID? If so, it needs to be 64-bit.

> Source/WebKit2/UIProcess/ios/WebVideoFullscreenManagerProxy.mm:121
> +    

Blank line.
Comment 7 Jeremy Jones 2014-06-16 16:53:03 PDT
(In reply to comment #6)
> (From update of attachment 232971 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=232971&action=review
> 
> > Source/WebCore/platform/ios/WebVideoFullscreenControllerAVKit.mm:156
> > +        _model->setVideoFullscreenLayer(nullptr);
> 
> nil if that's a CALayer*

It is a PlatformLayer, which I guess is close enough in an Obj-c file. Change.

> 
> > Source/WebCore/platform/ios/WebVideoFullscreenInterfaceAVKit.mm:792
> > +        [m_window setHidden:YES];
> > +        [m_window setRootViewController:nil];
> > +        [m_playerViewController setDelegate:nil];
> > +        [m_playerViewController setPlayerController:nil];
> > +        m_playerViewController = nil;
> > +        m_viewController = nil;
> > +        m_window = nil;
> > +        [m_videoLayer removeFromSuperlayer];
> > +        m_videoLayer = nil;
> > +        [m_videoLayerContainer removeFromSuperlayer];
> > +        [m_videoLayerContainer setPlayerViewController:nil];
> > +        m_videoLayerContainer = nil;
> 
> So much stuff.

Sigh. Maybe a session object that cleans up all this implicitly in its destructor.

https://bugs.webkit.org/show_bug.cgi?id=133960

> 
> > Source/WebKit2/UIProcess/ios/WebVideoFullscreenManagerProxy.messages.in:33
> > +    SetupFullscreenWithID(uint32_t videoLayerID, WebCore::IntRect initialRect)
> 
> Is this a GraphicsLayer::PlatformLayerID? If so, it needs to be 64-bit.

It is one of these:
uint32_t LayerHostingContext::contextID()
so it stays 32-bit.

> 
> > Source/WebKit2/UIProcess/ios/WebVideoFullscreenManagerProxy.mm:121
> > +    
> 
> Blank line.

Deleted.
Comment 8 Jeremy Jones 2014-06-16 16:55:14 PDT
Created attachment 233203 [details]
Patch for landing
Comment 9 WebKit Commit Bot 2014-06-17 15:27:28 PDT
Comment on attachment 233203 [details]
Patch for landing

Rejecting attachment 233203 [details] from commit-queue.

Failed to run "['/Volumes/Data/EWS/WebKit/Tools/Scripts/webkit-patch', '--status-host=webkit-queues.appspot.com', '--bot-id=webkit-cq-02', 'validate-changelog', '--check-oops', '--non-interactive', 233203, '--port=mac']" exit_code: 1 cwd: /Volumes/Data/EWS/WebKit

ChangeLog entry in Source/WebCore/ChangeLog contains OOPS!.

Full output: http://webkit-queues.appspot.com/results/5873666126512128
Comment 10 Jeremy Jones 2014-06-17 15:53:51 PDT
Created attachment 233263 [details]
Patch for landing.
Comment 11 WebKit Commit Bot 2014-06-17 16:33:44 PDT
Comment on attachment 233263 [details]
Patch for landing.

Clearing flags on attachment: 233263

Committed r170083: <http://trac.webkit.org/changeset/170083>