Changeset 257127 in webkit
- Timestamp:
- Feb 20, 2020, 10:57:47 PM (5 years ago)
- Location:
- trunk/Source
- Files:
-
- 6 added
- 15 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r257126 r257127 1 2020-02-20 Peng Liu <peng.liu6@apple.com> 2 3 [Media in GPU process] Synchronize the properties of video layers in the GPU process with the hosting layer in the web process 4 https://bugs.webkit.org/show_bug.cgi?id=206132 5 6 Reviewed by Jer Noble. 7 8 Update the name (for debugging) of the CALayer created by _web_renderLayerWithContextID (The CALayer will not be only used as video layers). 9 This patch also fixes the ordering issue related to VideoLayerManagerObjC.h and VideoLayerManagerObjC.mm in the Xcode project file. 10 11 * WebCore.xcodeproj/project.pbxproj: 12 * platform/graphics/cocoa/WebCoreCALayerExtras.mm: 13 (+[CALayer _web_renderLayerWithContextID:]): 14 1 15 2020-02-20 Zalan Bujtas <zalan@apple.com> 2 16 -
trunk/Source/WebCore/PAL/ChangeLog
r257062 r257127 1 2020-02-20 Peng Liu <peng.liu6@apple.com> 2 3 [Media in GPU process] Synchronize the properties of video layers in the GPU process with the hosting layer in the web process 4 https://bugs.webkit.org/show_bug.cgi?id=206132 5 6 Reviewed by Jer Noble. 7 8 Update the CAContext interface to expose currentContext for external builds. 9 10 * pal/spi/cocoa/QuartzCoreSPI.h: 11 1 12 2020-02-20 Alexey Proskuryakov <ap@apple.com> 2 13 -
trunk/Source/WebCore/PAL/pal/spi/cocoa/QuartzCoreSPI.h
r254042 r257127 61 61 @interface CAContext () 62 62 + (NSArray *)allContexts; 63 + (CAContext *)currentContext; 63 64 + (CAContext *)localContext; 64 65 + (CAContext *)remoteContextWithOptions:(NSDictionary *)dict; -
trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj
r257125 r257127 635 635 1D2F8E052344751D00993B68 /* HTMLVideoElementPictureInPicture.h in Headers */ = {isa = PBXBuildFile; fileRef = 1DEF06CC233C3D2000EE228D /* HTMLVideoElementPictureInPicture.h */; settings = {ATTRIBUTES = (Private, ); }; }; 636 636 1D2F8E062344752300993B68 /* PictureInPictureWindow.h in Headers */ = {isa = PBXBuildFile; fileRef = 1DEF06CD233C3D2A00EE228D /* PictureInPictureWindow.h */; settings = {ATTRIBUTES = (Private, ); }; }; 637 1D392F2D23F20A7000E04B2D /* VideoLayerManagerObjC.mm in Sources */ = {isa = PBXBuildFile; fileRef = 1D392F2823F209B400E04B2D /* VideoLayerManagerObjC.mm */; };638 637 1D9F0FC12122029B005D8FD4 /* ShareData.h in Headers */ = {isa = PBXBuildFile; fileRef = 1DC55400211BA8C8004B780E /* ShareData.h */; settings = {ATTRIBUTES = (Private, ); }; }; 639 638 1DBC1B562347B3D200B901AF /* PictureInPictureObserver.h in Headers */ = {isa = PBXBuildFile; fileRef = 1DBC1B552347B3D200B901AF /* PictureInPictureObserver.h */; settings = {ATTRIBUTES = (Private, ); }; }; … … 1584 1583 52B0D4C01C57FD660077CE53 /* VideoFullscreenChangeObserver.h in Headers */ = {isa = PBXBuildFile; fileRef = 52B0D4BF1C57FD660077CE53 /* VideoFullscreenChangeObserver.h */; settings = {ATTRIBUTES = (Private, ); }; }; 1585 1584 52B0D4C21C57FF910077CE53 /* VideoFullscreenInterfaceMac.h in Headers */ = {isa = PBXBuildFile; fileRef = 52B0D4C11C57FF910077CE53 /* VideoFullscreenInterfaceMac.h */; settings = {ATTRIBUTES = (Private, ); }; }; 1585 52D5A18F1C54592300DE34A3 /* VideoLayerManagerObjC.mm in Sources */ = {isa = PBXBuildFile; fileRef = 52D5A18D1C54590300DE34A3 /* VideoLayerManagerObjC.mm */; }; 1586 1586 52D5A1A71C57489D00DE34A3 /* VideoFullscreenModel.h in Headers */ = {isa = PBXBuildFile; fileRef = 52D5A1A41C57488900DE34A3 /* VideoFullscreenModel.h */; settings = {ATTRIBUTES = (Private, ); }; }; 1587 1587 52D5A1A81C5748A300DE34A3 /* VideoFullscreenModelVideoElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 52D5A1A51C57488900DE34A3 /* VideoFullscreenModelVideoElement.h */; settings = {ATTRIBUTES = (Private, ); }; }; … … 6514 6514 1D0026A92374F9D900CA6CDF /* JSEnterPictureInPictureEvent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSEnterPictureInPictureEvent.cpp; sourceTree = "<group>"; }; 6515 6515 1D2C82B6236A3F6A0055D6C5 /* PictureInPictureSupport.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PictureInPictureSupport.h; sourceTree = "<group>"; }; 6516 1D392F2823F209B400E04B2D /* VideoLayerManagerObjC.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = VideoLayerManagerObjC.mm; sourceTree = "<group>"; };6517 1D392F2A23F209B500E04B2D /* VideoLayerManagerObjC.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = VideoLayerManagerObjC.h; sourceTree = "<group>"; };6518 6516 1DBC1B552347B3D200B901AF /* PictureInPictureObserver.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PictureInPictureObserver.h; sourceTree = "<group>"; }; 6519 6517 1DC553FD211BA12A004B780E /* NavigatorShare.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = NavigatorShare.idl; sourceTree = "<group>"; }; … … 8450 8448 52B0D4C11C57FF910077CE53 /* VideoFullscreenInterfaceMac.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = VideoFullscreenInterfaceMac.h; sourceTree = "<group>"; }; 8451 8449 52CB11DB22FDDB2E009F0A64 /* WHLSLDefaultDelete.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WHLSLDefaultDelete.h; sourceTree = "<group>"; }; 8450 52D5A18D1C54590300DE34A3 /* VideoLayerManagerObjC.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = VideoLayerManagerObjC.mm; sourceTree = "<group>"; tabWidth = 8; }; 8451 52D5A18E1C54590300DE34A3 /* VideoLayerManagerObjC.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = VideoLayerManagerObjC.h; sourceTree = "<group>"; tabWidth = 8; }; 8452 8452 52D5A1A41C57488900DE34A3 /* VideoFullscreenModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = VideoFullscreenModel.h; sourceTree = "<group>"; }; 8453 8453 52D5A1A51C57488900DE34A3 /* VideoFullscreenModelVideoElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = VideoFullscreenModelVideoElement.h; sourceTree = "<group>"; }; … … 26756 26756 CDC8B5A918047FF10016E685 /* SourceBufferPrivateAVFObjC.h */, 26757 26757 CDC8B5A818047FF10016E685 /* SourceBufferPrivateAVFObjC.mm */, 26758 1D392F2A23F209B500E04B2D/* VideoLayerManagerObjC.h */,26759 1D392F2823F209B400E04B2D/* VideoLayerManagerObjC.mm */,26758 52D5A18E1C54590300DE34A3 /* VideoLayerManagerObjC.h */, 26759 52D5A18D1C54590300DE34A3 /* VideoLayerManagerObjC.mm */, 26760 26760 CD336F6517FA0AC600DDDCD0 /* VideoTrackPrivateAVFObjC.cpp */, 26761 26761 CD336F6617FA0AC600DDDCD0 /* VideoTrackPrivateAVFObjC.h */, … … 34284 34284 7C73FB07191EF417007DE061 /* UserMessageHandlersNamespace.cpp in Sources */, 34285 34285 3FBC4AF3189881560046EE38 /* VideoFullscreenInterfaceAVKit.mm in Sources */, 34286 1D392F2D23F20A7000E04B2D/* VideoLayerManagerObjC.mm in Sources */,34286 52D5A18F1C54592300DE34A3 /* VideoLayerManagerObjC.mm in Sources */, 34287 34287 BE88E0DE1715D2A200658D98 /* VideoTrack.cpp in Sources */, 34288 34288 BE88E0E11715D2A200658D98 /* VideoTrackList.cpp in Sources */, -
trunk/Source/WebCore/platform/graphics/cocoa/WebCoreCALayerExtras.mm
r254555 r257127 83 83 CALayerHost *layerHost = [CALayerHost layer]; 84 84 #ifndef NDEBUG 85 [layerHost setName:@" WebVideoHostingLayer"];85 [layerHost setName:@"Hosting layer"]; 86 86 #endif 87 87 layerHost.contextId = contextID; -
trunk/Source/WebKit/ChangeLog
r257125 r257127 1 2020-02-20 Peng Liu <peng.liu6@apple.com> 2 3 [Media in GPU process] Synchronize the properties of video layers in the GPU process with the hosting layer in the web process 4 https://bugs.webkit.org/show_bug.cgi?id=206132 5 6 Reviewed by Jer Noble. 7 8 MediaPlayerPrivateRemote creates WKVideoLayerRemote whose sublayer is created by LayerHostingContext::createPlatformLayerForHostingContext(). 9 The WKVideoLayerRemote will be used by the renderer to manage the video element in the Web process. When its size is changed by the renderer, 10 it applies a transform without changing its actual size, and sends a message to MediaPlayerPrivateProxy in the GPU process 11 to change the size of the container layer. After that, WKVideoLayerRemote will set its size to the correct one in the Web process side. 12 We need to use a MachSendRight to synchronize the transactions in the Web process and the GPU process. 13 14 We have to use such a process to change the appearance of WKVideoLayerRemote in order to guarantee the smoothness when a user 15 change the size of a video element. 16 17 * GPUProcess/media/RemoteMediaPlayerProxy.cpp: 18 (WebKit::RemoteMediaPlayerProxy::load): 19 (WebKit::RemoteMediaPlayerProxy::prepareForPlayback): 20 (WebKit::RemoteMediaPlayerProxy::mediaPlayerFirstVideoFrameAvailable): 21 (WebKit::RemoteMediaPlayerProxy::setVideoInlineSizeFenced): 22 (WebKit::RemoteMediaPlayerProxy::mediaPlayerContentBoxRect const): Deleted. 23 * GPUProcess/media/RemoteMediaPlayerProxy.h: 24 * GPUProcess/media/RemoteMediaPlayerProxy.messages.in: 25 * SourcesCocoa.txt: 26 * UIProcess/Cocoa/VideoFullscreenManagerProxy.h: 27 * WebKit.xcodeproj/project.pbxproj: 28 * WebProcess/GPU/media/MediaPlayerPrivateRemote.cpp: 29 (WebKit::MediaPlayerPrivateRemote::prepareForPlayback): 30 (WebKit::MediaPlayerPrivateRemote::firstVideoFrameAvailable): 31 (WebKit::MediaPlayerPrivateRemote::platformLayer const): 32 (WebKit::MediaPlayerPrivateRemote::setVideoInlineSizeFenced): 33 (WebKit::MediaPlayerPrivateRemote::paint): 34 (WebKit::MediaPlayerPrivateRemote::paintCurrentFrameInContext): 35 * WebProcess/GPU/media/MediaPlayerPrivateRemote.h: 36 * WebProcess/GPU/media/VideoLayerRemote.h: Added. 37 * WebProcess/GPU/media/cocoa/VideoLayerRemoteCocoa.h: Added. 38 * WebProcess/GPU/media/cocoa/VideoLayerRemoteCocoa.mm: Added. 39 (-[WKVideoLayerRemote init]): 40 (-[WKVideoLayerRemote dealloc]): 41 (-[WKVideoLayerRemote mediaPlayerPrivateRemote]): 42 (-[WKVideoLayerRemote setMediaPlayerPrivateRemote:]): 43 (-[WKVideoLayerRemote videoSublayer]): 44 (-[WKVideoLayerRemote setVideoSublayer:]): 45 (-[WKVideoLayerRemote layoutSublayers]): 46 (-[WKVideoLayerRemote resolveBounds]): 47 (WebKit::createVideoLayerRemote): 48 * WebProcess/WebPage/ios/WebPageIOS.mm: Fixed a unified build failure. 49 1 50 2020-02-20 Eric Carlson <eric.carlson@apple.com> 2 51 -
trunk/Source/WebKit/GPUProcess/media/RemoteMediaPlayerProxy.cpp
r256353 r257127 30 30 31 31 #include "GPUConnectionToWebProcess.h" 32 #include "LayerHostingContext.h" 32 33 #include "MediaPlayerPrivateRemoteMessages.h" 33 34 #include "RemoteAudioTrackProxy.h" … … 101 102 WTFLogAlways("Unable to create sandbox extension for media url.\n"); 102 103 } 103 104 104 105 m_player->load(url, contentType, keySystem); 105 106 getConfiguration(configuration); … … 107 108 } 108 109 109 void RemoteMediaPlayerProxy::prepareForPlayback(bool privateMode, WebCore::MediaPlayerEnums::Preload preload, bool preservesPitch, bool prepareForRendering, LayoutRect layoutRect,float videoContentScale, CompletionHandler<void(Optional<LayerHostingContextID>&& contextId)>&& completionHandler)110 void RemoteMediaPlayerProxy::prepareForPlayback(bool privateMode, WebCore::MediaPlayerEnums::Preload preload, bool preservesPitch, bool prepareForRendering, float videoContentScale, CompletionHandler<void(Optional<LayerHostingContextID>&& contextId)>&& completionHandler) 110 111 { 111 112 m_player->setPrivateBrowsingMode(privateMode); … … 113 114 m_player->setPreservesPitch(preservesPitch); 114 115 m_player->prepareForRendering(); 115 m_videoContentBoxRect = layoutRect;116 116 m_videoContentScale = videoContentScale; 117 117 m_layerHostingContext = LayerHostingContext::createForExternalHostingProcess(); … … 469 469 void RemoteMediaPlayerProxy::mediaPlayerFirstVideoFrameAvailable() 470 470 { 471 // Initially the size of the platformLayer will be 0x0 because we do not provide mediaPlayerContentBoxRect() in this class. 471 472 m_layerHostingContext->setRootLayer(m_player->platformLayer()); 472 473 m_webProcessConnection->send(Messages::MediaPlayerPrivateRemote::FirstVideoFrameAvailable(), m_id); … … 545 546 notImplemented(); 546 547 return false; 547 }548 549 LayoutRect RemoteMediaPlayerProxy::mediaPlayerContentBoxRect() const550 {551 return m_videoContentBoxRect;552 548 } 553 549 -
trunk/Source/WebKit/GPUProcess/media/RemoteMediaPlayerProxy.h
r256353 r257127 47 47 #include <wtf/WeakPtr.h> 48 48 49 namespace WTF { 50 class MachSendRight; 51 } 52 49 53 namespace WebCore { 50 54 class AudioTrackPrivate; … … 77 81 void getConfiguration(RemoteMediaPlayerConfiguration&); 78 82 79 void prepareForPlayback(bool privateMode, WebCore::MediaPlayerEnums::Preload, bool preservesPitch, bool prepareForRendering, WebCore::LayoutRect,float videoContentScale, CompletionHandler<void(Optional<LayerHostingContextID>&&)>&&);83 void prepareForPlayback(bool privateMode, WebCore::MediaPlayerEnums::Preload, bool preservesPitch, bool prepareForRendering, float videoContentScale, CompletionHandler<void(Optional<LayerHostingContextID>&&)>&&); 80 84 void prepareForRendering(); 81 85 … … 109 113 void videoTrackSetSelected(TrackPrivateRemoteIdentifier, bool); 110 114 void textTrackSetMode(TrackPrivateRemoteIdentifier, WebCore::InbandTextTrackPrivate::Mode); 115 116 #if PLATFORM(COCOA) 117 void setVideoInlineSizeFenced(const WebCore::IntSize&, const WTF::MachSendRight&); 118 #endif 111 119 112 120 #if ENABLE(WIRELESS_PLAYBACK_TARGET) … … 179 187 bool mediaPlayerIsFullscreenPermitted() const final; 180 188 bool mediaPlayerIsVideo() const final; 181 WebCore::LayoutRect mediaPlayerContentBoxRect() const final;182 189 float mediaPlayerContentsScale() const final; 183 190 void mediaPlayerPause() final; -
trunk/Source/WebKit/GPUProcess/media/RemoteMediaPlayerProxy.messages.in
r256353 r257127 25 25 26 26 messages -> RemoteMediaPlayerProxy NotRefCounted { 27 PrepareForPlayback(bool privateMode, enum:uint8_t WebCore::MediaPlayerEnums::Preload preload, bool preservesPitch, bool prepareForRendering, WebCore::LayoutRect layoutRect,float videoContentScale) -> (Optional<WebKit::LayerHostingContextID> layerHostingContextId) Async27 PrepareForPlayback(bool privateMode, enum:uint8_t WebCore::MediaPlayerEnums::Preload preload, bool preservesPitch, bool prepareForRendering, float videoContentScale) -> (Optional<WebKit::LayerHostingContextID> layerHostingContextId) Async 28 28 29 29 Load(URL url, Optional<WebKit::SandboxExtension::Handle> sandboxExtension, WebCore::ContentType contentType, String keySystem) -> (struct WebKit::RemoteMediaPlayerConfiguration playerConfiguration) Async … … 58 58 TextTrackSetMode(WebKit::TrackPrivateRemoteIdentifier trackID, enum:uint8_t WebCore::InbandTextTrackPrivate::Mode mode) 59 59 60 #if PLATFORM(COCOA) 61 SetVideoInlineSizeFenced(WebCore::IntSize size, MachSendRight machSendRight) 62 #endif 63 60 64 # Paint 61 65 # PaintCurrentFrameInContext … … 82 86 ApplicationWillResignActive() 83 87 ApplicationDidBecomeActive() 84 85 88 } 86 89 -
trunk/Source/WebKit/SourcesCocoa.txt
r256820 r257127 58 58 NetworkProcess/webrtc/NetworkRTCSocket.cpp 59 59 60 GPUProcess/EntryPoint/Cocoa/XPCService/GPUServiceEntryPoint.mm 60 61 GPUProcess/ios/GPUProcessIOS.mm 61 62 GPUProcess/mac/GPUProcessMac.mm 63 GPUProcess/media/cocoa/RemoteMediaPlayerProxyCocoa.mm 62 64 GPUProcess/webrtc/LibWebRTCCodecsProxy.mm 63 GPUProcess/EntryPoint/Cocoa/XPCService/GPUServiceEntryPoint.mm64 65 65 66 Platform/cf/ModuleCF.cpp … … 555 556 WebProcess/EntryPoint/Cocoa/XPCService/WebContentServiceEntryPoint.mm 556 557 558 WebProcess/GPU/media/cocoa/VideoLayerRemoteCocoa.mm 559 557 560 WebProcess/InjectedBundle/API/c/WKBundlePageBanner.cpp 558 561 -
trunk/Source/WebKit/UIProcess/Cocoa/VideoFullscreenManagerProxy.h
r246928 r257127 191 191 HashMap<uint64_t, int> m_clientCounts; 192 192 }; 193 193 194 194 } // namespace WebKit 195 195 -
trunk/Source/WebKit/WebKit.xcodeproj/project.pbxproj
r257085 r257127 2681 2681 1CBBE49E19B66C53006B7D81 /* WebInspectorUIMessageReceiver.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = WebInspectorUIMessageReceiver.cpp; path = DerivedSources/WebKit2/WebInspectorUIMessageReceiver.cpp; sourceTree = BUILT_PRODUCTS_DIR; }; 2682 2682 1CBBE49F19B66C53006B7D81 /* WebInspectorUIMessages.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = WebInspectorUIMessages.h; path = DerivedSources/WebKit2/WebInspectorUIMessages.h; sourceTree = BUILT_PRODUCTS_DIR; }; 2683 1D0ECEAA23FC858400D172F6 /* RemoteMediaPlayerProxyCocoa.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = RemoteMediaPlayerProxyCocoa.mm; sourceTree = "<group>"; }; 2683 2684 1D32F89823A8465A00B1EA6A /* RemoteMediaResource.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RemoteMediaResource.h; sourceTree = "<group>"; }; 2684 2685 1D32F89923A8468000B1EA6A /* RemoteMediaResource.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = RemoteMediaResource.cpp; sourceTree = "<group>"; }; … … 2697 2698 1DE0D095211CC21300439B5F /* WKShareSheet.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKShareSheet.h; sourceTree = "<group>"; }; 2698 2699 1DE2DFAC23A959F8003E013A /* RemoteMediaResourceIdentifier.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RemoteMediaResourceIdentifier.h; sourceTree = "<group>"; }; 2700 1DFDD0DF23F60E1E00E9B490 /* VideoLayerRemoteCocoa.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = VideoLayerRemoteCocoa.mm; sourceTree = "<group>"; }; 2701 1DFDD0E023F60E1F00E9B490 /* VideoLayerRemoteCocoa.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = VideoLayerRemoteCocoa.h; sourceTree = "<group>"; }; 2702 1DFDD0E223F610F000E9B490 /* VideoLayerRemote.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = VideoLayerRemote.h; sourceTree = "<group>"; }; 2703 1DFDD0E323F610FE00E9B490 /* TextTrackPrivateRemote.messages.in */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = TextTrackPrivateRemote.messages.in; sourceTree = "<group>"; }; 2699 2704 1F0181691858DC1500F92884 /* WKWebProcessPlugInFrame.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKWebProcessPlugInFrame.h; sourceTree = "<group>"; }; 2700 2705 1F01816A1858DC1500F92884 /* WKWebProcessPlugInFrame.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WKWebProcessPlugInFrame.mm; sourceTree = "<group>"; }; … … 5255 5260 isa = PBXGroup; 5256 5261 children = ( 5262 1DAF5A4D23EC9F7900B7B518 /* cocoa */, 5257 5263 071BC57923C93BB900680D7C /* AudioTrackPrivateRemote.cpp */, 5258 5264 071BC57723C93BB700680D7C /* AudioTrackPrivateRemote.h */, … … 5272 5278 07E19F0823D533B90094FFB4 /* TextTrackPrivateRemote.cpp */, 5273 5279 07E19F0923D533BA0094FFB4 /* TextTrackPrivateRemote.h */, 5280 1DFDD0E323F610FE00E9B490 /* TextTrackPrivateRemote.messages.in */, 5281 1DFDD0E223F610F000E9B490 /* VideoLayerRemote.h */, 5274 5282 071BC58323CC2BD500680D7C /* VideoTrackPrivateRemote.cpp */, 5275 5283 071BC58223CC2BD300680D7C /* VideoTrackPrivateRemote.h */, … … 5281 5289 isa = PBXGroup; 5282 5290 children = ( 5291 1D0ECEA923FC84BB00D172F6 /* cocoa */, 5283 5292 071BC57E23CA5DB100680D7C /* RemoteAudioTrackProxy.cpp */, 5284 5293 071BC57F23CA5DB100680D7C /* RemoteAudioTrackProxy.h */, … … 5737 5746 BCC43AB8127B95DC00317F16 /* PlatformPopupMenuData.cpp */, 5738 5747 BCC43AB9127B95DC00317F16 /* PlatformPopupMenuData.h */, 5748 49ECA41B23FCA4860023358D /* PolicyDecision.h */, 5739 5749 E18C92F312DB9E7100CF2AEB /* PrintInfo.cpp */, 5740 5750 E1CC1B8E12D7EADF00625838 /* PrintInfo.h */, … … 5861 5871 4960A3BC23C5286400961842 /* WebViewCategory.h */, 5862 5872 C0337DD0127A2980008FF4F4 /* WebWheelEvent.cpp */, 5863 49ECA41B23FCA4860023358D /* PolicyDecision.h */,5864 5873 ); 5865 5874 path = Shared; … … 6149 6158 ); 6150 6159 path = Automation; 6160 sourceTree = "<group>"; 6161 }; 6162 1D0ECEA923FC84BB00D172F6 /* cocoa */ = { 6163 isa = PBXGroup; 6164 children = ( 6165 1D0ECEAA23FC858400D172F6 /* RemoteMediaPlayerProxyCocoa.mm */, 6166 ); 6167 path = cocoa; 6168 sourceTree = "<group>"; 6169 }; 6170 1DAF5A4D23EC9F7900B7B518 /* cocoa */ = { 6171 isa = PBXGroup; 6172 children = ( 6173 1DFDD0E023F60E1F00E9B490 /* VideoLayerRemoteCocoa.h */, 6174 1DFDD0DF23F60E1E00E9B490 /* VideoLayerRemoteCocoa.mm */, 6175 ); 6176 path = cocoa; 6151 6177 sourceTree = "<group>"; 6152 6178 }; … … 10485 10511 7CD622781739D863005BD7FF /* PluginSandboxProfile.h in Headers */, 10486 10512 1A6FB7AF11E64B6800DB1371 /* PluginView.h in Headers */, 10513 49ECA41C23FCA5D80023358D /* PolicyDecision.h in Headers */, 10487 10514 57FD318122B3515B008D0E8B /* PopUpSOAuthorizationSession.h in Headers */, 10488 10515 83A0ED351F747CCF003299EB /* PreconnectTask.h in Headers */, … … 10778 10805 46C392292316EC4D008EED9B /* WebPageProxyIdentifier.h in Headers */, 10779 10806 BCBD3915125BB1A800D2C29F /* WebPageProxyMessages.h in Headers */, 10780 49ECA41C23FCA5D80023358D /* PolicyDecision.h in Headers */,10781 10807 512127C41908239A00DAF35C /* WebPasteboardOverrides.h in Headers */, 10782 10808 7C4694D11A51E36800AD5845 /* WebPasteboardProxy.h in Headers */, -
trunk/Source/WebKit/WebProcess/GPU/media/MediaPlayerPrivateRemote.cpp
r257125 r257127 35 35 #include "SandboxExtension.h" 36 36 #include "TextTrackPrivateRemote.h" 37 #include "VideoLayerRemote.h" 37 38 #include "VideoTrackPrivateRemote.h" 38 39 #include "WebCoreArgumentCoders.h" … … 43 44 #include <WebCore/PlatformTimeRanges.h> 44 45 #include <wtf/HashMap.h> 46 #include <wtf/MachSendRight.h> 45 47 #include <wtf/MainThread.h> 46 48 #include <wtf/StringPrintStream.h> … … 96 98 void MediaPlayerPrivateRemote::prepareForPlayback(bool privateMode, MediaPlayer::Preload preload, bool preservesPitch, bool prepare) 97 99 { 98 auto layoutRect = m_player->playerContentBoxRect();99 100 auto scale = m_player->playerContentsScale(); 100 101 101 connection().sendWithAsyncReply(Messages::RemoteMediaPlayerProxy::PrepareForPlayback(privateMode, preload, preservesPitch, prepare, layoutRect,scale), [weakThis = makeWeakPtr(*this), this](auto contextId) mutable {102 connection().sendWithAsyncReply(Messages::RemoteMediaPlayerProxy::PrepareForPlayback(privateMode, preload, preservesPitch, prepare, scale), [weakThis = makeWeakPtr(*this), this](auto contextId) mutable { 102 103 if (!weakThis) 103 104 return; … … 106 107 return; 107 108 108 m_video Layer = LayerHostingContext::createPlatformLayerForHostingContext(contextId.value());109 m_videoInlineLayer = createVideoLayerRemote(this, contextId.value()); 109 110 }, m_id); 110 111 } … … 311 312 void MediaPlayerPrivateRemote::firstVideoFrameAvailable() 312 313 { 314 INFO_LOG(LOGIDENTIFIER); 313 315 m_player->firstVideoFrameAvailable(); 314 316 } … … 587 589 PlatformLayer* MediaPlayerPrivateRemote::platformLayer() const 588 590 { 589 return m_video Layer.get();591 return m_videoInlineLayer.get(); 590 592 } 591 593 … … 710 712 return 0; 711 713 } 714 715 #if PLATFORM(COCOA) 716 void MediaPlayerPrivateRemote::setVideoInlineSizeFenced(const IntSize& size, const WTF::MachSendRight& machSendRight) 717 { 718 connection().send(Messages::RemoteMediaPlayerProxy::SetVideoInlineSizeFenced(size, machSendRight), m_id); 719 } 720 #endif 712 721 713 722 void MediaPlayerPrivateRemote::paint(GraphicsContext&, const FloatRect&) -
trunk/Source/WebKit/WebProcess/GPU/media/MediaPlayerPrivateRemote.h
r257125 r257127 39 39 #include <wtf/WeakPtr.h> 40 40 41 namespace WTF { 42 class MachSendRight; 43 } 44 41 45 namespace WebCore { 42 46 class ISOWebVTTCue; … … 92 96 void sizeChanged(WebCore::FloatSize); 93 97 void firstVideoFrameAvailable(); 98 #if PLATFORM(COCOA) 99 void setVideoInlineSizeFenced(const WebCore::IntSize&, const WTF::MachSendRight&); 100 #endif 94 101 95 102 void addRemoteAudioTrack(TrackPrivateRemoteIdentifier, TrackPrivateRemoteConfiguration&&); … … 237 244 bool didLoadingProgress() const final; 238 245 239 // In the Cocoa WebKit port, MediaPlayerPrivateAVFoundationObjC::setSize() does nothing,240 // so the Web process does not need to send IPC messages to call it in the GPU process.241 // Other WebKit ports may need to do that.242 void setSize(const WebCore::IntSize&) final { }243 244 246 void paint(WebCore::GraphicsContext&, const WebCore::FloatRect&) final; 245 246 247 void paintCurrentFrameInContext(WebCore::GraphicsContext&, const WebCore::FloatRect&) final; 247 248 bool copyVideoTextureToPlatformTexture(WebCore::GraphicsContextGLOpenGL*, PlatformGLObject, GCGLenum, GCGLint, GCGLenum, GCGLenum, GCGLenum, bool, bool) final; … … 360 361 WebCore::MediaPlayer* m_player { nullptr }; 361 362 RefPtr<WebCore::PlatformMediaResourceLoader> m_mediaResourceLoader; 362 RetainPtr<PlatformLayer> m_video Layer;363 RetainPtr<PlatformLayer> m_videoInlineLayer; 363 364 RemoteMediaPlayerManager& m_manager; 364 365 WebCore::MediaPlayerEnums::MediaEngineIdentifier m_remoteEngineIdentifier; -
trunk/Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm
r256935 r257127 118 118 #import <WebCore/RenderBlock.h> 119 119 #import <WebCore/RenderImage.h> 120 #import <WebCore/RenderLayer.h> 120 121 #import <WebCore/RenderThemeIOS.h> 121 122 #import <WebCore/RenderView.h>
Note:
See TracChangeset
for help on using the changeset viewer.