-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Address post review comments for <https://commits.webkit.org/272703@main> #22543
Address post review comments for <https://commits.webkit.org/272703@main> #22543
Conversation
EWS run on previous version of this PR (hash c583e68) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had a few questions about the patch, so I'm not comfortable approving quite yet (see below).
|
||
m_configuration.videoLayerSize = size; | ||
setVideoLayerSizeIfPossible(size); | ||
|
||
m_player->setVideoLayerSizeFenced(size, WTFMove(machSendRight)); | ||
m_player->setVideoLayerSizeFenced(size, WTFMove(machSendRight), [] { }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we want to pass a no-op completion handler here? Does our completion handler not need to run after the player sets its layer size?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if the below code for committing the hosting update coordinator should be the completion handler for m_player->setVideoLayerSizeFenced
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You are completely right, this has been addressed in the latest version of the patch.
if (m_inlineLayerHostingContext) | ||
m_inlineLayerHostingContext->commit(); | ||
[hostingUpdateCoordinator commit]; | ||
completionHandler(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We only use completionHandler
if USE(EXTENSIONKIT)
is true. I think this might create a compile error for platforms that don't use EXTENSIONKIT
; you might need to add a UNUSED_PARAM(completionHandler)
as an #else
here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alternatively (and probably better style-wise) would be to call the completionHandler outside of the #if USE(EXTENSIONKIT)
block.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking below at MediaPlayerPrivateRemote::setVideoLayerSizeFenced
, it seems even more wrong that we pass a no-op completion handler, then run code that invokes the completion handler, since setVideoLayerSizeFenced
clearly triggers async remote calls in some cases. I think that means we will sometimes call our completion handler before the async work completes, which doesn't seem right.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I believe you are right. I have addressed this and the compile issue in the latest version.
c583e68
to
cdaebc9
Compare
EWS run on previous version of this PR (hash cdaebc9) |
cdaebc9
to
d565792
Compare
EWS run on previous version of this PR (hash d565792) |
d565792
to
c6be3db
Compare
EWS run on previous version of this PR (hash c6be3db) |
c6be3db
to
f662f25
Compare
EWS run on previous version of this PR (hash f662f25) |
f662f25
to
c1f0fdc
Compare
EWS run on previous version of this PR (hash c1f0fdc) |
c1f0fdc
to
dcce7ae
Compare
EWS run on previous version of this PR (hash dcce7ae) |
dcce7ae
to
d9859aa
Compare
EWS run on previous version of this PR (hash d9859aa) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for making those changes. I think this looks correct, though it would be best for an expert like Tim or Simon to review.
} | ||
|
||
#if USE(EXTENSIONKIT) | ||
auto pid = m_page->process().processPool().gpuProcess()->processID(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's not great to have to two ends of this communication (here and RemoteMediaPlayerProxyCocoa
) be in two separate classes. It would be much nicer to factor all the SEHosting
/xpc goop into its own class that both ends use.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That is a very good point! Will fix.
Thanks for reviewing!
d9859aa
to
d27d4a5
Compare
EWS run on previous version of this PR (hash d27d4a5) |
d27d4a5
to
022ae01
Compare
EWS run on previous version of this PR (hash 022ae01) |
022ae01
to
fcd62a3
Compare
EWS run on previous version of this PR (hash fcd62a3) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good -- thanks for taking the time to address all of these comments! r+
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
r=me, but the commit message should be updated to reflect the most recent implementation choices.
Will do! Thanks for reviewing! |
fcd62a3
to
ebe5c3d
Compare
EWS run on current version of this PR (hash ebe5c3d) |
> https://bugs.webkit.org/show_bug.cgi?id=267275 rdar://120867428 Reviewed by Jer Noble and Brent Fulgham. This patch is addressing post review comments for <https://commits.webkit.org/272703@main>. It also makes sure that commit is called on the update coordinator in the UI process right after the message is sent to the WebContent process to update the layer size. Additionally, this patch addresses an issue where we did not update the hosting handle in the UI process when the context ID changed. This issue would stop video rendering in certain cases. * Source/WebCore/platform/cocoa/VideoPresentationModelVideoElement.mm: (WebCore::VideoPresentationModelVideoElement::setVideoSizeFenced): * Source/WebKit/GPUProcess/media/cocoa/RemoteMediaPlayerProxyCocoa.mm: (WebKit::RemoteMediaPlayerProxy::setVideoLayerSizeFenced): * Source/WebKit/Platform/cocoa/LayerHostingContext.h: (WebKit::LayerHostingContext::hostable const): * Source/WebKit/Platform/cocoa/LayerHostingContext.mm: (WebKit::LayerHostingContext::createForExternalHostingProcess): (WebKit::LayerHostingContext::~LayerHostingContext): (WebKit::LayerHostingContext::contextID const): (WebKit::LayerHostingContext::setFencePort): (WebKit::LayerHostingContext::createHostingUpdateCoordinator): (WebKit::LayerHostingContext::createHostingHandle): (WebKit::LayerHostingContext::commit): Deleted. * Source/WebKit/Platform/spi/Cocoa/ExtensionKitSPI.h: * Source/WebKit/UIProcess/Cocoa/VideoPresentationManagerProxy.mm: (WebKit::VideoPresentationManagerProxy::createLayerHostViewWithID): (WebKit::VideoPresentationManagerProxy::setVideoLayerFrame): (-[WKLayerHostView dealloc]): Deleted. Canonical link: https://commits.webkit.org/273143@main
ebe5c3d
to
90be7bc
Compare
Committed 273143@main (90be7bc): https://commits.webkit.org/273143@main Reviewed commits have been landed. Closing PR #22543 and removing active labels. |
90be7bc
ebe5c3d
π§ͺ wpe-wk2π§ͺ mac-wk1π§ͺ gtk-wk2