Bug 249248
Summary: | [GPU Process] [FormControls] Route drawing the ControlPart through GraphicsContext | ||
---|---|---|---|
Product: | WebKit | Reporter: | Said Abou-Hallawa <sabouhallawa> |
Component: | Layout and Rendering | Assignee: | Said Abou-Hallawa <sabouhallawa> |
Status: | RESOLVED FIXED | ||
Severity: | Normal | CC: | bfulgham, Hironori.Fujii, simon.fraser, webkit-bug-importer, zalan |
Priority: | P2 | Keywords: | InRadar |
Version: | WebKit Nightly Build | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Bug Depends on: | |||
Bug Blocks: | 249168 |
Said Abou-Hallawa
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 | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Radar WebKit Bug Importer
<rdar://problem/103315944>
Simon Fraser (smfr)
> RenderBox::paintBoxDecorations() will call GraphicsContext::drawControlPart()
What role will RenderTheme play in this code path?
Said Abou-Hallawa
Pull request: https://github.com/WebKit/WebKit/pull/7566
EWS
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
(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.