[webkit-changes] [WebKit/WebKit] 027113: ModelProcessModelPlayerProxy should perform the wo...
eddydas
noreply at github.com
Mon Mar 11 16:38:33 PDT 2024
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 027113676fd2bb2657ee93ef93e5aff751129097
https://github.com/WebKit/WebKit/commit/027113676fd2bb2657ee93ef93e5aff751129097
Author: Eddy Wong <eddy_wong at apple.com>
Date: 2024-03-11 (Mon, 11 Mar 2024)
Changed paths:
M Source/WebKit/ModelProcess/cocoa/ModelProcessModelPlayerProxy.h
M Source/WebKit/ModelProcess/cocoa/ModelProcessModelPlayerProxy.mm
A Source/WebKit/ModelProcess/cocoa/WKModelProcessModelLayer.h
A Source/WebKit/ModelProcess/cocoa/WKModelProcessModelLayer.mm
M Source/WebKit/SourcesCocoa.txt
M Source/WebKit/WebKit.xcodeproj/project.pbxproj
Log Message:
-----------
ModelProcessModelPlayerProxy should perform the work of SeparatedModelPlayer directly
rdar://124232154
https://bugs.webkit.org/show_bug.cgi?id=270660
Reviewed by Tim Horton.
ModelProcessModelPlayerProxy should should itself be a WebCore::ModelPlayer,
instead of further delegating it to SeparatedModelPlayer.
SeparatedModelPlayer was designed to work inside UIProcess, and thus has never
been an ideal choice for our purpose. By upstreaming the code from
SeparatedModelPlayer, we can now invoke the ModelPlayer calls directly through
XPC messages from ModelProcessModelPlayer without further boilerplate code
to propagate the calls.
At the same time we also upstream WKSeparatedModelLayer into the new
WKModelProcessModelLayer, which is a thin CALayer subclass just to listen to
layout and opacity changes should they occur.
* Source/WebKit/ModelProcess/cocoa/ModelProcessModelPlayerProxy.h:
Now conforms to WebCore::ModelPlayer properly, so that it can handle
all calls from ModelProcessModelPlayer 1:1.
* Source/WebKit/ModelProcess/cocoa/ModelProcessModelPlayerProxy.mm:
Most code addition here are copied directly from SeparatedModelPlayer.
The rest are empty placeholders to satisfy WebCore::ModelPlayer
for the time being.
(WebKit::ModelProcessModelPlayerProxy::~ModelProcessModelPlayerProxy):
(WebKit::ModelProcessModelPlayerProxy::createLayer):
(WebKit::ModelProcessModelPlayerProxy::loadModel):
(WebKit::makeMeterSizeFromPointSize):
(WebKit::computeExtents):
(WebKit::degreesToRadians):
(WebKit::computeSRT):
(WebKit::effectivePointsPerMeter):
(WebKit::ModelProcessModelPlayerProxy::updateTransform):
(WebKit::ModelProcessModelPlayerProxy::updateOpacity):
(WebKit::ModelProcessModelPlayerProxy::startAnimating):
(WebKit::webDefaultLayerService):
(WebKit::ModelProcessModelPlayerProxy::didFinishLoading):
(WebKit::ModelProcessModelPlayerProxy::didFailLoading):
(WebKit::ModelProcessModelPlayerProxy::load):
(WebKit::ModelProcessModelPlayerProxy::layer):
(WebKit::ModelProcessModelPlayerProxy::layerHostingContextIdentifier):
(WebKit::ModelProcessModelPlayerProxy::enterFullscreen):
(WebKit::ModelProcessModelPlayerProxy::supportsMouseInteraction):
(WebKit::ModelProcessModelPlayerProxy::supportsDragging):
(WebKit::ModelProcessModelPlayerProxy::setInteractionEnabled):
(WebKit::ModelProcessModelPlayerProxy::handleMouseDown):
(WebKit::ModelProcessModelPlayerProxy::handleMouseMove):
(WebKit::ModelProcessModelPlayerProxy::handleMouseUp):
(WebKit::ModelProcessModelPlayerProxy::getCamera):
(WebKit::ModelProcessModelPlayerProxy::setCamera):
(WebKit::ModelProcessModelPlayerProxy::isPlayingAnimation):
(WebKit::ModelProcessModelPlayerProxy::setAnimationIsPlaying):
(WebKit::ModelProcessModelPlayerProxy::isLoopingAnimation):
(WebKit::ModelProcessModelPlayerProxy::setIsLoopingAnimation):
(WebKit::ModelProcessModelPlayerProxy::animationDuration):
(WebKit::ModelProcessModelPlayerProxy::animationCurrentTime):
(WebKit::ModelProcessModelPlayerProxy::setAnimationCurrentTime):
(WebKit::ModelProcessModelPlayerProxy::hasAudio):
(WebKit::ModelProcessModelPlayerProxy::isMuted):
(WebKit::ModelProcessModelPlayerProxy::setIsMuted):
(WebKit::ModelProcessModelPlayerProxy::accessibilityChildren):
* Source/WebKit/ModelProcess/cocoa/WKModelProcessModelLayer.h: Added.
* Source/WebKit/ModelProcess/cocoa/WKModelProcessModelLayer.mm: Added.
(-[WKModelProcessModelLayer setPlayer:]):
(-[WKModelProcessModelLayer player]):
(-[WKModelProcessModelLayer setOpacity:]):
(-[WKModelProcessModelLayer layoutSublayers]):
* Source/WebKit/SourcesCocoa.txt:
* Source/WebKit/WebKit.xcodeproj/project.pbxproj:
Canonical link: https://commits.webkit.org/275940@main
To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications
More information about the webkit-changes
mailing list