RESOLVED FIXED 249248
[GPU Process] [FormControls] Route drawing the ControlPart through GraphicsContext
https://bugs.webkit.org/show_bug.cgi?id=249248
Summary [GPU Process] [FormControls] Route drawing the ControlPart through GraphicsCo...
Said Abou-Hallawa
Reported 2022-12-13 12:56:17 PST
We will make RenderBox create a ControlPart from its DOM element. We will start by the MeterPart as an example for the whole workflow since it is a simple control. RenderBox::paintBoxDecorations() will call GraphicsContext::drawControlPart() which will delegate the call to ControlPart::draw(). ControlPart::draw() will create the PlatformControl using its ControlFactory. On macOS the ControlFactory will be of type ControlFactoryMac and the PlatformControl will be of type MeterMac. ControlPart::draw() will call MeterMac::draw() which will call AppKit to draw the NSLevelIndicatorCell. For GPUP a new DisplayList item named DrawControlPart will be added. This will route the display to RemoteDisplayListRecorder which will call drawControlPart() from its ImageBuffer context. Because ControlFactoryMac will use a single NSLevelIndicatorCell for all MeterMac it creates, there should be a ControlFactoryMac per rendering thread in GPUP. So each RemoteDisplayListRecorder should have one ControlFactoryMac and should set it all in the ControlParts its renders through ControlPart::setControlFactory().
Attachments
Radar WebKit Bug Importer
Comment 1 2022-12-13 12:56:48 PST
Simon Fraser (smfr)
Comment 2 2022-12-13 12:57:33 PST
> RenderBox::paintBoxDecorations() will call GraphicsContext::drawControlPart() What role will RenderTheme play in this code path?
Said Abou-Hallawa
Comment 3 2022-12-13 13:07:40 PST
EWS
Comment 4 2022-12-16 02:33:23 PST
Committed 257981@main (27e83068fe9e): <https://commits.webkit.org/257981@main> Reviewed commits have been landed. Closing PR #7566 and removing active labels.
Said Abou-Hallawa
Comment 5 2022-12-16 07:06:54 PST
(In reply to Simon Fraser (smfr) from comment #2) > > RenderBox::paintBoxDecorations() will call GraphicsContext::drawControlPart() > > What role will RenderTheme play in this code path? RenderTheme will create the ControlPart from the RenderBox and its renderer. RenderThemeMac will answer questions specific to macOS when creating the ControlPart.
Note You need to log in before you can comment on or make changes to this bug.