RESOLVED WONTFIX 219468
[GPU Process] Record changes in GraphicsContextState as individual DisplayList items
https://bugs.webkit.org/show_bug.cgi?id=219468
Summary [GPU Process] Record changes in GraphicsContextState as individual DisplayLis...
Tim Horton
Reported 2020-12-02 17:55:16 PST
SHOULD NEVER BE REACHED Source/WebKit/Platform/IPC/Encoder.h(110) : static RefPtr<WebCore::SharedBuffer> IPC::Encoder::encodeSingleObject(const T &) [T = WebCore::DisplayList::SetState] WTFCrash WTFCrashWithInfo(int, char const*, char const*, int) WTF::RefPtr<WebCore::SharedBuffer, WTF::RawPtrTraits<WebCore::SharedBuffer>, WTF::DefaultRefDerefTraits<WebCore::SharedBuffer> > IPC::Encoder::encodeSingleObject<WebCore::DisplayList::SetState>(WebCore::DisplayList::SetState const&) WebKit::RemoteImageBufferProxy<WebKit::ImageBufferShareableMappedIOSurfaceBackend>::encodeItem(WebCore::DisplayList::ItemHandle) const non-virtual thunk to WebKit::RemoteImageBufferProxy<WebKit::ImageBufferShareableMappedIOSurfaceBackend>::encodeItem(WebCore::DisplayList::ItemHandle) const WebCore::DisplayList::ItemBuffer::appendEncodedData(WebCore::DisplayList::ItemHandle) void WebCore::DisplayList::ItemBuffer::append<WebCore::DisplayList::SetState, WebCore::GraphicsContextState const&, WTF::OptionSet<WebCore::GraphicsContextState::Change>&>(WebCore::GraphicsContextState const&, WTF::OptionSet<WebCore::GraphicsContextState::Change>&) void WebCore::DisplayList::DisplayList::append<WebCore::DisplayList::SetState, WebCore::GraphicsContextState const&, WTF::OptionSet<WebCore::GraphicsContextState::Change>&>(WebCore::GraphicsContextState const&, WTF::OptionSet<WebCore::GraphicsContextState::Change>&) void WebCore::DisplayList::Recorder::append<WebCore::DisplayList::SetState, WebCore::GraphicsContextState const&, WTF::OptionSet<WebCore::GraphicsContextState::Change>&>(WebCore::GraphicsContextState const&, WTF::OptionSet<WebCore::GraphicsContextState::Change>&) WebCore::DisplayList::Recorder::appendStateChangeItem(WebCore::GraphicsContextStateChange const&, WTF::OptionSet<WebCore::GraphicsContextState::Change>)
Attachments
WIP (112.13 KB, patch)
2020-12-19 12:06 PST, Said Abou-Hallawa
no flags
WIP (135.41 KB, patch)
2020-12-20 11:00 PST, Said Abou-Hallawa
no flags
Patch (134.89 KB, patch)
2020-12-21 01:33 PST, Said Abou-Hallawa
no flags
WIP (117.26 KB, patch)
2021-02-05 01:48 PST, Said Abou-Hallawa
ews-feeder: commit-queue-
WIP (118.24 KB, patch)
2021-02-05 02:06 PST, Said Abou-Hallawa
no flags
WIP (123.74 KB, patch)
2021-02-05 11:22 PST, Said Abou-Hallawa
no flags
WIP (122.25 KB, patch)
2021-02-05 14:48 PST, Said Abou-Hallawa
no flags
Patch (127.67 KB, patch)
2021-02-05 21:57 PST, Said Abou-Hallawa
no flags
Patch (129.03 KB, patch)
2021-02-06 00:50 PST, Said Abou-Hallawa
no flags
Patch (42.74 KB, patch)
2021-02-14 00:50 PST, Said Abou-Hallawa
no flags
Patch (46.25 KB, patch)
2021-02-14 12:52 PST, Said Abou-Hallawa
no flags
Patch (45.72 KB, patch)
2021-02-15 11:38 PST, Said Abou-Hallawa
no flags
Patch (95.95 KB, patch)
2021-02-16 22:53 PST, Said Abou-Hallawa
no flags
Patch (97.52 KB, patch)
2021-02-17 01:45 PST, Said Abou-Hallawa
no flags
Tim Horton
Comment 1 2020-12-02 17:55:32 PST
For example, canvas/philip/tests/2d.composite.globalAlpha.canvaspattern.html
Tim Horton
Comment 2 2020-12-02 17:56:04 PST
The problem is, SetState is encoded using encodeSingleObject, but it has things like Pattern hanging off of it.
Radar WebKit Bug Importer
Comment 3 2020-12-02 19:22:48 PST
Tim Horton
Comment 4 2020-12-02 19:28:23 PST
And Pattern has an Image that it encodes with ImageHandle. We either need a subdisplaylist for the pattern or to instead cache that image ahead of time.
Said Abou-Hallawa
Comment 5 2020-12-19 12:06:45 PST
Said Abou-Hallawa
Comment 6 2020-12-20 11:00:50 PST
Said Abou-Hallawa
Comment 7 2020-12-21 01:33:12 PST
Said Abou-Hallawa
Comment 8 2021-02-05 01:48:59 PST
Said Abou-Hallawa
Comment 9 2021-02-05 02:06:37 PST
Said Abou-Hallawa
Comment 10 2021-02-05 11:22:11 PST
Said Abou-Hallawa
Comment 11 2021-02-05 14:48:41 PST
Said Abou-Hallawa
Comment 12 2021-02-05 21:57:26 PST
Said Abou-Hallawa
Comment 13 2021-02-06 00:50:25 PST
Wenson Hsieh
Comment 14 2021-02-08 14:02:14 PST
Comment on attachment 419497 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=419497&action=review > Source/WebCore/platform/graphics/displaylists/DisplayListItems.h:170 > +class SetInlineState { It looks like SetInlineState doesn't include RGBA (non-extended) stroke color or fill changes, which (IIRC) make up the bulk of state changes in Paths, Lines and Arcs in MotionMark. I think this could encompass changes to fill and stroke color that only use SRGBA<uint8_t> as well, to keep most of the state change items in these fully inline in those three subtests. Though, perhaps this could be done as a followup.
Said Abou-Hallawa
Comment 15 2021-02-09 12:44:15 PST
Comment on attachment 419497 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=419497&action=review >> Source/WebCore/platform/graphics/displaylists/DisplayListItems.h:170 >> +class SetInlineState { > > It looks like SetInlineState doesn't include RGBA (non-extended) stroke color or fill changes, which (IIRC) make up the bulk of state changes in Paths, Lines and Arcs in MotionMark. I think this could encompass changes to fill and stroke color that only use SRGBA<uint8_t> as well, to keep most of the state change items in these fully inline in those three subtests. > > Though, perhaps this could be done as a followup. Yes this is right. I wrote a similar comment in the ChangeLog above. "Future work is to make SetInlineState handle more cases for colors and gradients." But I will try to do this inline changes in the patch of this bug to avoid introducing regression.
Said Abou-Hallawa
Comment 16 2021-02-14 00:50:20 PST
Said Abou-Hallawa
Comment 17 2021-02-14 12:52:29 PST
Said Abou-Hallawa
Comment 18 2021-02-15 11:38:32 PST
Said Abou-Hallawa
Comment 19 2021-02-16 22:53:45 PST
Said Abou-Hallawa
Comment 20 2021-02-17 01:45:58 PST
Note You need to log in before you can comment on or make changes to this bug.