Changeset 254490 in webkit


Ignore:
Timestamp:
Jan 13, 2020 9:09:19 PM (4 years ago)
Author:
jer.noble@apple.com
Message:

[WK1][iOS] VideoFullscreenControllerContext uses UIKit on the WebThread
https://bugs.webkit.org/show_bug.cgi?id=206203
<rdar://problem/48742782>

Reviewed by Simon Fraser.

  • platform/ios/WebVideoFullscreenControllerAVKit.mm:

(VideoFullscreenControllerContext::setVideoLayerFrame):

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r254484 r254490  
     12020-01-13  Jer Noble  <jer.noble@apple.com>
     2
     3        [WK1][iOS] VideoFullscreenControllerContext uses UIKit on the WebThread
     4        https://bugs.webkit.org/show_bug.cgi?id=206203
     5        <rdar://problem/48742782>
     6
     7        Reviewed by Simon Fraser.
     8
     9        * platform/ios/WebVideoFullscreenControllerAVKit.mm:
     10        (VideoFullscreenControllerContext::setVideoLayerFrame):
     11
    1122020-01-13  Zalan Bujtas  <zalan@apple.com>
    213
  • trunk/Source/WebCore/platform/ios/WebVideoFullscreenControllerAVKit.mm

    r254241 r254490  
    590590    [videoFullscreenLayer setSublayerTransform:[videoFullscreenLayer transform]];
    591591
    592     dispatch_async(dispatch_get_main_queue(), [protectedThis = makeRefPtr(this), this, frame, videoFullscreenLayer = WTFMove(videoFullscreenLayer)] () mutable {
    593         WebThreadRun([protectedThis = WTFMove(protectedThis), this, frame, videoFullscreenLayer = WTFMove(videoFullscreenLayer)] {
    594             [CATransaction begin];
    595             [CATransaction setDisableActions:YES];
    596             [CATransaction setAnimationDuration:0];
    597            
    598             [videoFullscreenLayer setSublayerTransform:CATransform3DIdentity];
    599            
    600             if (m_fullscreenModel)
    601                 m_fullscreenModel->setVideoLayerFrame(frame);
    602             [CATransaction commit];
    603         });
     592    dispatchAsyncOnMainThreadWithWebThreadLockIfNeeded([protectedThis = makeRefPtr(this), this, frame, videoFullscreenLayer = WTFMove(videoFullscreenLayer)] {
     593        [CATransaction begin];
     594        [CATransaction setDisableActions:YES];
     595        [CATransaction setAnimationDuration:0];
     596
     597        [videoFullscreenLayer setSublayerTransform:CATransform3DIdentity];
     598
     599        if (m_fullscreenModel)
     600            m_fullscreenModel->setVideoLayerFrame(frame);
     601        [CATransaction commit];
    604602    });
    605603}
Note: See TracChangeset for help on using the changeset viewer.