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>)
For example, canvas/philip/tests/2d.composite.globalAlpha.canvaspattern.html
The problem is, SetState is encoded using encodeSingleObject, but it has things like Pattern hanging off of it.
<rdar://problem/71921036>
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.
Created attachment 416572 [details] WIP
Created attachment 416584 [details] WIP
Created attachment 416597 [details] Patch
Created attachment 419374 [details] WIP
Created attachment 419375 [details] WIP
Created attachment 419437 [details] WIP
Created attachment 419468 [details] WIP
Created attachment 419493 [details] Patch
Created attachment 419497 [details] Patch
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.
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.
Created attachment 420236 [details] Patch
Created attachment 420249 [details] Patch
Created attachment 420343 [details] Patch
Created attachment 420601 [details] Patch
Created attachment 420617 [details] Patch