haikuwebkit/LayoutTests/displaylists/canvas-display-list-expecte...

14 lines
315 B
Plaintext
Raw Permalink Normal View History

Remove the optimization for discarding no operation DisplayList items between Save and Restore items https://bugs.webkit.org/show_bug.cgi?id=208659 Patch by Said Abou-Hallawa <sabouhallawa@apple.com> on 2020-03-05 Reviewed by Simon Fraser. Source/WebCore: This optimization is wrong in the case of drawing a canvas in general. The original implementation of the DisplayList assumes balanced Save/ Restore GraphicsContext. In canvas a GraphicsConext 'save' can be issued in a frame and the corresponding restore is issued many frames later. * platform/graphics/displaylists/DisplayList.cpp: (WebCore::DisplayList::DisplayList::removeItemsFromIndex): Deleted. * platform/graphics/displaylists/DisplayList.h: * platform/graphics/displaylists/DisplayListItems.cpp: (WebCore::DisplayList::operator<<): * platform/graphics/displaylists/DisplayListItems.h: (WebCore::DisplayList::Save::encode const): (WebCore::DisplayList::Save::decode): (WebCore::DisplayList::Save::restoreIndex const): Deleted. (WebCore::DisplayList::Save::setRestoreIndex): Deleted. * platform/graphics/displaylists/DisplayListRecorder.cpp: (WebCore::DisplayList::Recorder::save): (WebCore::DisplayList::Recorder::restore): * platform/graphics/displaylists/DisplayListRecorder.h: (WebCore::DisplayList::Recorder::ContextState::cloneForSave const): LayoutTests: Re-baseline the DisplayList tests. * displaylists/canvas-display-list-expected.txt: * displaylists/extent-includes-shadow-expected.txt: * displaylists/extent-includes-transforms-expected.txt: Canonical link: https://commits.webkit.org/221589@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@257958 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-03-06 00:30:37 +00:00
(save)
Allow canvas to use display-list drawing for testing https://bugs.webkit.org/show_bug.cgi?id=153475 Reviewed by Dean Jackson. Source/WebCore: Optionally have 2D <canvas> use display-list drawing, which is only enabled via Internals for now. Support displayListAsText() and replayDisplayListAsText() on canvas, so we can use it to test playback optimizations. [Note that displayListAsText() always returns an empty string currently, because the display list is cleared when the canvas is painted to the page.] Display list rendering is implemented by giving CanvasRenderingContext2D an optional DisplayListDrawingContext, which packages up a display list, recorder and recording context. The existing paintRenderingResultsToCanvas() is overridden to replay the recorded display list into the primary canvas context. Tracked replay display lists are stored in a static map, keyed by the CanvasRenderingContext2D. Test: displaylists/canvas-display-list.html * html/HTMLCanvasElement.cpp: (WebCore::HTMLCanvasElement::HTMLCanvasElement): (WebCore::HTMLCanvasElement::getContext): (WebCore::HTMLCanvasElement::paint): (WebCore::HTMLCanvasElement::setUsesDisplayListDrawing): (WebCore::HTMLCanvasElement::setTracksDisplayListReplay): (WebCore::HTMLCanvasElement::displayListAsText): (WebCore::HTMLCanvasElement::replayDisplayListAsText): * html/HTMLCanvasElement.h: * html/canvas/CanvasRenderingContext.h: * html/canvas/CanvasRenderingContext2D.cpp: (WebCore::DisplayListDrawingContext::DisplayListDrawingContext): (WebCore::contextDisplayListMap): (WebCore::CanvasRenderingContext2D::~CanvasRenderingContext2D): (WebCore::CanvasRenderingContext2D::setTracksDisplayListReplay): (WebCore::CanvasRenderingContext2D::displayListAsText): (WebCore::CanvasRenderingContext2D::replayDisplayListAsText): (WebCore::CanvasRenderingContext2D::paintRenderingResultsToCanvas): (WebCore::CanvasRenderingContext2D::drawingContext): (WebCore::CanvasRenderingContext2D::CanvasRenderingContext2D): Deleted. * html/canvas/CanvasRenderingContext2D.h: * testing/Internals.cpp: (WebCore::Internals::setElementUsesDisplayListDrawing): (WebCore::Internals::setElementTracksDisplayListReplay): (WebCore::Internals::displayListForElement): (WebCore::Internals::replayDisplayListForElement): LayoutTests: Simple canvas-based display list test. * displaylists/canvas-display-list-expected.txt: Added. * displaylists/canvas-display-list.html: Added. Canonical link: https://commits.webkit.org/171593@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@195646 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2016-01-27 01:53:18 +00:00
(set-state
(change-flags 525456)
Create a new ImageBuffer type for drawing on a DisplayList https://bugs.webkit.org/show_bug.cgi?id=207109 Patch by Said Abou-Hallawa <sabouhallawa@apple.com> on 2020-02-21 Reviewed by Simon Fraser. Source/WebCore: DisplayList::ImageBuffer inherits ConcreteImageBuffer and DrawingContext. The drawing context will be the context of DrawingContext. The operations of ConcreteImageBuffer will have to ensure the recorded display-list is replayed back before getting the pixels of the ImageBufferBackend. * Sources.txt: * WebCore.xcodeproj/project.pbxproj: * html/HTMLCanvasElement.cpp: (WebCore::HTMLCanvasElement::createContext2d): (WebCore::HTMLCanvasElement::setUsesDisplayListDrawing): (WebCore::HTMLCanvasElement::setTracksDisplayListReplay): (WebCore::HTMLCanvasElement::displayListAsText const): (WebCore::HTMLCanvasElement::replayDisplayListAsText const): All the DisplayList operations will be routed to the DrawingContext of the ImageBuffer. (WebCore::HTMLCanvasElement::createImageBuffer const): createImageBuffer() can decide the ImageBuffer type based on the settings and the size of the canvas. * html/HTMLCanvasElement.h: * platform/graphics/ConcreteImageBuffer.h: (WebCore::ConcreteImageBuffer::create): The type of the ImageBuffer will be passed to this function such that it can create instances of derived classes. * platform/graphics/ImageBuffer.cpp: (WebCore::ImageBuffer::create): Create ImageBuffers which record the drawing commands to DisplayLists before committing them to the back-ends. * platform/graphics/ImageBuffer.h: (WebCore::ImageBuffer::drawingContext): (WebCore::ImageBuffer::flushDrawingContext): Add virtual methods to support DisplayList in ImageBuffer. * platform/graphics/PlatformImageBuffer.h: * platform/graphics/RenderingMode.h: Add DisplayList types to RenderingMode and define platform types for DisplayList ImageBuffers. * platform/graphics/displaylists/DisplayListDrawingContext.cpp: Added. (WebCore::DisplayList::DrawingContext::DrawingContext): (WebCore::DisplayList::DrawingContext::setTracksDisplayListReplay): (WebCore::DisplayList::DrawingContext::replayDisplayList): * platform/graphics/displaylists/DisplayListDrawingContext.h: Added. (WebCore::DisplayList::DrawingContext::context const): (WebCore::DisplayList::DrawingContext::displayList): (WebCore::DisplayList::DrawingContext::displayList const): (WebCore::DisplayList::DrawingContext::replayedDisplayList const): DisplayList::DrawingContext holds a recording and an optional replaying back DisplayLists. It also provides a recording GraphicsContext. * platform/graphics/displaylists/DisplayListImageBuffer.h: Added. (WebCore::DisplayList::ImageBuffer::create): (WebCore::DisplayList::ImageBuffer::ImageBuffer): (WebCore::DisplayList::ImageBuffer::~ImageBuffer): Drawing commands will be recorded first because context() is overridden to return the GraphicsContext of DrawingContext. These drawing commands will be flushed before getting the pixels of the back-end because flushDrawingContext() is overridden to replay back the recorded DisplayList to the GraphicsContext of the back-end. LayoutTests: The extra commands are recorded by CanvasBase::setImageBuffer() which used to issue these GraphicsContext commands directly to the backend. With this patch, DisplayList::ImageBuffer does not allow access to the backend context. So all the GraphicsContext commands has to be recorded. * displaylists/canvas-display-list-expected.txt: Canonical link: https://commits.webkit.org/221043@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@257156 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-02-21 20:26:30 +00:00
(stroke-thickness 1.00)
(fill-color #C80000)
(shadows-ignore-transforms 1))
Allow canvas to use display-list drawing for testing https://bugs.webkit.org/show_bug.cgi?id=153475 Reviewed by Dean Jackson. Source/WebCore: Optionally have 2D <canvas> use display-list drawing, which is only enabled via Internals for now. Support displayListAsText() and replayDisplayListAsText() on canvas, so we can use it to test playback optimizations. [Note that displayListAsText() always returns an empty string currently, because the display list is cleared when the canvas is painted to the page.] Display list rendering is implemented by giving CanvasRenderingContext2D an optional DisplayListDrawingContext, which packages up a display list, recorder and recording context. The existing paintRenderingResultsToCanvas() is overridden to replay the recorded display list into the primary canvas context. Tracked replay display lists are stored in a static map, keyed by the CanvasRenderingContext2D. Test: displaylists/canvas-display-list.html * html/HTMLCanvasElement.cpp: (WebCore::HTMLCanvasElement::HTMLCanvasElement): (WebCore::HTMLCanvasElement::getContext): (WebCore::HTMLCanvasElement::paint): (WebCore::HTMLCanvasElement::setUsesDisplayListDrawing): (WebCore::HTMLCanvasElement::setTracksDisplayListReplay): (WebCore::HTMLCanvasElement::displayListAsText): (WebCore::HTMLCanvasElement::replayDisplayListAsText): * html/HTMLCanvasElement.h: * html/canvas/CanvasRenderingContext.h: * html/canvas/CanvasRenderingContext2D.cpp: (WebCore::DisplayListDrawingContext::DisplayListDrawingContext): (WebCore::contextDisplayListMap): (WebCore::CanvasRenderingContext2D::~CanvasRenderingContext2D): (WebCore::CanvasRenderingContext2D::setTracksDisplayListReplay): (WebCore::CanvasRenderingContext2D::displayListAsText): (WebCore::CanvasRenderingContext2D::replayDisplayListAsText): (WebCore::CanvasRenderingContext2D::paintRenderingResultsToCanvas): (WebCore::CanvasRenderingContext2D::drawingContext): (WebCore::CanvasRenderingContext2D::CanvasRenderingContext2D): Deleted. * html/canvas/CanvasRenderingContext2D.h: * testing/Internals.cpp: (WebCore::Internals::setElementUsesDisplayListDrawing): (WebCore::Internals::setElementTracksDisplayListReplay): (WebCore::Internals::displayListForElement): (WebCore::Internals::replayDisplayListForElement): LayoutTests: Simple canvas-based display list test. * displaylists/canvas-display-list-expected.txt: Added. * displaylists/canvas-display-list.html: Added. Canonical link: https://commits.webkit.org/171593@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@195646 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2016-01-27 01:53:18 +00:00
(fill-rect
[Concurrent display lists] Encode display list items directly into shared memory https://bugs.webkit.org/show_bug.cgi?id=218406 Reviewed by Tim Horton. Source/WebCore: This patch refactors display lists (and display list items) in preparation for upcoming changes to allow the GPU and web processes to concurrently read and write display list item data, which allows us to achieve significant improvements in performance on many graphics benchmarks in MotionMark by removing overhead involved in serializing and deserializing display list items over IPC. To implement this, rather than using IPC to encode and decode each item, we will instead store display list items directly in memory shared between the web and GPU processes. This strategy, of course, will not work for display list items that contain pointers. Unfortunately, this affects all display list items at the moment, since all items are subclasses of `DisplayList::Item`, and therefore contain vtable pointers, even if all members are plain data types. Thus, the first step towards being able to read and write items directly in shared memory is to remove this vtable pointer by making display list items no longer inherit from `DrawingItem` or `Item`. Currently, display lists are backed by `Vector<Ref<Item>>`; however, this no longer works once none of the display list items are descended from a common base class. To address this, we introduce `DisplayList::ItemBuffer`, which encapsulates logic to manage one or more data segments that contain display list item data (i.e. display list items stacked adjacent to each other in memory). Display lists now append inline display list items by constructing these items directly inside the item buffer using placement-new. However, many types of display list items do not consist entirely of inline data; some of these are obvious, such as `DrawImage`, `DrawGlyphs`, or `StrokePath` (since a `Path` may be arbitrarily complex). Other out-of- line item types are less obvious: for instance, `FillRoundedRect` is an out-of-line item due to the fact that the color of the rect (`FillRoundedRect::m_color`) may be an extended color, which then contains a pointer. In these cases, we can't simply encode the item in shared memory and read it in the GPU process, since the pointer (if it pointed to anything other than null in the web process) will point to arbitrary memory in the GPU process. Instead, we can leverage our existing IPC infrastructure here by encoding each of these out-of-line items as data and decoding them from this data in the GPU process. To do this, we delegate out to WebKit2 to encode out-of-line display list items using WebKit's `IPC::Encoder`, and pass back a `SharedBuffer` which we then copy into the item buffer. This delegation happens through the `ItemBufferWritingClient` class, which has an implementation in WebKit2. On the decoding side in the GPU process, we then ask `ItemBufferReadingClient` (if set) to convert this encoded data back into a display list item. In WebKit2, we implement this interface and use the corresponding `IPC::Decoder` to decode the data we serialized earlier. If no client is specified or the client does not require custom encoding/decoding for the given item type, we fall back to constructing the item directly inside the writable item buffer data. To make it easier to reason about these new (inheritance-free) display list items, we additionally introduce `ItemHandle`, which wraps a pointer to a display list item and provides several helper methods. The first byte of each item handle always points to an `ItemType`, and the following `N` bytes contain the item itself, where `N` is the size of the item class. Here are some examples of how to use an `ItemHandle`: `DisplayList::ItemType type = itemHandle.type();` (This matches the current inheritance model) `if (itemHandle.is<StrokePath>()) {...` (Replaces is<> in the current model) `auto& setStateItem = itemHandle.get<SetState>();` (Replaces downcast<> in the current model) `itemHandle.apply(myGraphicsContext);` (This matches the current inheritance model) `bool isDrawingItem = itemHandle.isDrawingItem();` (Replaces checks for `is<DrawingItem>(item)`) When writing display lists for the GPU process, the writing client (a `ItemBufferWritingClient`) will be asked to provide `ItemBufferHandle`s where the item buffer will place item data (whether encoded, or as an inline object). However, when using display lists outside of this context (e.g. in other parts of WebCore, such as the glyph drawing cache), we don't have a `ItemBufferWritingClient`. To handle this, the item buffer instead allocates its own (non-shared-memory) buffers, which it manages and deletes when it is done. If any out-of-line items are constructed within these buffers, `ItemBuffer` will additionally call their destructors prior to deleting these buffers. See per-change comments below for more details. * Headers.cmake: * Sources.txt: * WebCore.xcodeproj/project.pbxproj: * platform/graphics/GraphicsContext.h: * platform/graphics/displaylists/DisplayList.cpp: (WebCore::DisplayList::DisplayList::DisplayList): (WebCore::DisplayList::DisplayList::operator=): Implement the move assignment operator and move constructor by exchanging ownership of the item buffer. (WebCore::DisplayList::DisplayList::clear): (WebCore::DisplayList::DisplayList::shouldDumpForFlags): (WebCore::DisplayList::DisplayList::asText const): (WebCore::DisplayList::DisplayList::dump const): Adjust the format when printing display lists to `TextStream`. Now that drawing item extents are tracked on the display list rather than being on each drawing item, we print them out after each item (as opposed to being in the middle of each item). (WebCore::DisplayList::DisplayList::sizeInBytes const): Tally up the size of the display list by taking the sum of the sizes of each readonly segment, as well as the writable buffer size. (WebCore::DisplayList::DisplayList::isEmpty const): A DisplayList is empty if it contains no item data: in other words, there are no readonly buffer segments, and there is also nothing written to the writable buffer segment. (WebCore::DisplayList::DisplayList::itemBuffer): (WebCore::DisplayList::DisplayList::setItemBufferClient): (WebCore::DisplayList::DisplayList::forEachItemBuffer const): Add a helper to iterate over each ItemBufferHandle in the display list. This includes all readonly handles, and then the writable handle (if it exists). (WebCore::DisplayList::DisplayList::setTracksDrawingItemExtents): Add an option to allow the display list to track drawing item extents. Currently, display lists always track extents for drawing items; however, when propagating display lists to the GPU process for playback, these extents were never sent along with IPC, and so this ended up just being unnecessary work. Additionally, the initial clip in the GPU process is also never set, so computing these extents never helped. That said, drawing item extents are still printed out for the purposes of testing, so we need to keep this logic intact; this refactoring only disables extent computation for display lists being sent to the GPU process via remote image buffers. In a future patch, we could refactor this so that drawing items contain extent rects as inline data that can be consulted in the GPU process. (WebCore::DisplayList::DisplayList::append): Display list items are no longer constructed ahead of time, and then appended to the display list. Instead, `append` now takes the type of the item to append as a template typename argument, as well as the arguments that will be used to construct the item. (WebCore::DisplayList::DisplayList::iterator::atEnd const): (WebCore::DisplayList::DisplayList::iterator::updateCurrentItem): (WebCore::DisplayList::DisplayList::iterator::advance): (WebCore::DisplayList::DisplayList::iterator::clearCurrentItem): (WebCore::DisplayList::DisplayList::iterator::moveToEnd): (WebCore::DisplayList::DisplayList::iterator::moveCursorToStartOfCurrentBuffer): Implement a C++ iterator for DisplayList. This makes it possible to write code like this: ``` // Suppose displayList is an instance of DisplayList::DisplayList. for (auto [item, extent] : displayList) { // Do things with item, which is a DisplayList::ItemHandle. // Maybe do things with extent, which is an Optional<FloatRect>. } ``` * platform/graphics/displaylists/DisplayList.h: (WebCore::DisplayList::DisplayList::tracksDrawingItemExtents const): (WebCore::DisplayList::DisplayList::iterator::iterator): (WebCore::DisplayList::DisplayList::iterator::~iterator): (WebCore::DisplayList::DisplayList::iterator::operator==): (WebCore::DisplayList::DisplayList::iterator::operator!=): (WebCore::DisplayList::DisplayList::iterator::operator++): (WebCore::DisplayList::DisplayList::iterator::operator* const): (WebCore::DisplayList::DisplayList::begin const): (WebCore::DisplayList::DisplayList::end const): (WebCore::DisplayList::DisplayList::itemBufferIfExists const): (WebCore::DisplayList::DisplayList::addDrawingItemExtent): (WebCore::DisplayList::DisplayList::append): (WebCore::DisplayList::Item::type const): Deleted. (WebCore::DisplayList::Item::isDrawingItem const): Deleted. (WebCore::DisplayList::DisplayList::list const): Deleted. (WebCore::DisplayList::DisplayList::itemAt): Deleted. (WebCore::DisplayList::DisplayList::isEmpty const): Deleted. (WebCore::DisplayList::DisplayList::appendItem): Deleted. (WebCore::DisplayList::DisplayList::list): Deleted. (WebCore::DisplayList::DisplayList::encode const): Deleted. (WebCore::DisplayList::DisplayList::decode): Deleted. Remove the ability to `encode` and `decode` display lists, for the time being. For the communication between the web and GPU processes, we now use `SharedDisplayListHandle`. Unfortunately, this does mean that the extant `ClipToDrawingCommands` display list item will be broken for the time being. In a followup patch, I plan to reimplement `DisplayList::encode` and `decode` in the new inline item model by encoding each item (either as inline data or via `IPC::Encoder::encodeSingleObject`). However, this is contingent on all display list item types (e.g. `DrawImage` and `DrawGlyph`) not relying on `IPC::Attachment` for encoding, so support for `ClipToDrawingCommands` will need to wait until after fonts and images are working. * platform/graphics/displaylists/DisplayListDrawGlyphsRecorderCoreText.cpp: (WebCore::DisplayList::DrawGlyphsRecorder::recordDrawGlyphs): (WebCore::DisplayList::DrawGlyphsRecorder::recordDrawImage): * platform/graphics/displaylists/DisplayListDrawGlyphsRecorderHarfBuzz.cpp: (WebCore::DisplayList::DrawGlyphsRecorder::drawGlyphs): * platform/graphics/displaylists/DisplayListDrawGlyphsRecorderWin.cpp: (WebCore::DisplayList::DrawGlyphsRecorder::drawGlyphs): Change these to use the new templated `DisplayList::append` method. * platform/graphics/displaylists/DisplayListDrawingContext.h: (WebCore::DisplayList::DrawingContext::takeDisplayList): Use `std::exchange` instead of `WTFMove`. This is actually necessary in order to ensure correctness (i.e. no leaks or double-freeing), since the `DisplayList` instance that is being moved from needs to be empty so that it does not try to call destructors on the items formerly inside of it. * platform/graphics/displaylists/DisplayListItemBuffer.cpp: Added. (WebCore::DisplayList::ItemHandle::apply): (WebCore::DisplayList::ItemHandle::destroy): Add helper methods to apply a display list item to a `GraphicsContext` and call the display list item's destructor, respectively. (WebCore::DisplayList::ItemHandle::copyTo const): Add a helper method to copy the item into the destination handle (calling the copy constructor of the item type in the process). This is used when copying a validated display list item into the temporary item buffer in `DisplayList::iterator`. (WebCore::DisplayList::ItemBuffer::ItemBuffer): (WebCore::DisplayList::ItemBuffer::~ItemBuffer): (WebCore::DisplayList::m_allocatedBuffers): In the case where there is no `m_writingClient` (for instance, when using in-process `DisplayList`s to optimize text painting), the display list item buffer is responsible for creating and managing data buffers. As such, it needs to remember to free any buffers that it allocated when appending, and must also destroy any out-of-line display list items (i.e. items with nontrivial destructors) when it is finished. (WebCore::DisplayList::m_readOnlyBuffers): (WebCore::DisplayList::m_writableBuffer): (WebCore::DisplayList::m_writtenNumberOfBytes): See main ChangeLog entry above for more details. (WebCore::DisplayList::ItemBuffer::operator=): (WebCore::DisplayList::ItemBuffer::createItemBuffer): (WebCore::DisplayList::ItemBuffer::forEachItemBuffer const): (WebCore::DisplayList::ItemBuffer::clear): (WebCore::DisplayList::ItemBuffer::swapWritableBufferIfNeeded): (WebCore::DisplayList::ItemBuffer::appendDataAndLength): * platform/graphics/displaylists/DisplayListItemBuffer.h: Added. (WebCore::DisplayList::ItemBufferHandle::operator bool const): (WebCore::DisplayList::ItemBufferHandle::operator! const): (WebCore::DisplayList::ItemHandle::operator bool const): (WebCore::DisplayList::ItemHandle::operator! const): (WebCore::DisplayList::ItemHandle::type const): (WebCore::DisplayList::ItemHandle::size const): (WebCore::DisplayList::ItemHandle::is const): (WebCore::DisplayList::ItemHandle::get const): (WebCore::DisplayList::ItemBufferWritingClient::~ItemBufferWritingClient): (WebCore::DisplayList::ItemBufferReadingClient::~ItemBufferReadingClient): (WebCore::DisplayList::ItemBuffer::sizeInBytes const): (WebCore::DisplayList::ItemBuffer::isEmpty const): (WebCore::DisplayList::ItemBuffer::append): (WebCore::DisplayList::ItemBuffer::setClient): (WebCore::DisplayList::ItemBuffer::readOnlyBuffers const): (WebCore::DisplayList::ItemBuffer::uncheckedAppend): * platform/graphics/displaylists/DisplayListItems.cpp: The changes in this file make up most of the code churn in this patch, but the changes are mostly mechanical. In summary, this patch: - Add static constexprs for the `ItemType` of each display list item class, as well as whether or not each class is inline, and also whether or not each class is a drawing item. - Remove `encode` and `decode` methods from inline item classes. - Remove all overridden methods; each class now implements individual methods to `apply`, compute `globalBounds` (if applicable), and compute `localBounds` (again, if applicable). - Adjusts textstream dumping helpers, so that they no longer dump as a `DrawingItem` before dumping each member. (WebCore::DisplayList::SetInlineFillGradient::SetInlineFillGradient): (WebCore::DisplayList::SetState::SetState): (WebCore::DisplayList::DrawGlyphs::DrawGlyphs): (WebCore::DisplayList::DrawGlyphs::generateGlyphBuffer const): (WebCore::DisplayList::DrawGlyphs::apply const): (WebCore::DisplayList::operator<<): (WebCore::DisplayList::DrawNativeImage::DrawNativeImage): (WebCore::DisplayList::DrawPattern::DrawPattern): (WebCore::DisplayList::DrawLinesForText::DrawLinesForText): (WebCore::DisplayList::DrawFocusRingRects::DrawFocusRingRects): (WebCore::DisplayList::FillRectWithGradient::FillRectWithGradient): (WebCore::DisplayList::PutImageData::PutImageData): (WebCore::DisplayList::PaintFrameForMedia::PaintFrameForMedia): (WebCore::DisplayList::Item::Item): Deleted. (WebCore::DisplayList::Item::sizeInBytes): Deleted. (WebCore::DisplayList::DrawingItem::DrawingItem): Deleted. (WebCore::DisplayList::Save::Save): Deleted. (WebCore::DisplayList::Restore::Restore): Deleted. (WebCore::DisplayList::Translate::Translate): Deleted. (WebCore::DisplayList::Rotate::Rotate): Deleted. (WebCore::DisplayList::Scale::Scale): Deleted. (WebCore::DisplayList::SetCTM::SetCTM): Deleted. (WebCore::DisplayList::ConcatenateCTM::ConcatenateCTM): Deleted. (WebCore::DisplayList::SetInlineFillGradient::create): Deleted. (WebCore::DisplayList::SetInlineFillColor::create): Deleted. (WebCore::DisplayList::SetInlineStrokeColor::create): Deleted. (WebCore::DisplayList::SetStrokeThickness::create): Deleted. (WebCore::DisplayList::SetLineCap::SetLineCap): Deleted. (WebCore::DisplayList::SetLineDash::SetLineDash): Deleted. (WebCore::DisplayList::SetLineJoin::SetLineJoin): Deleted. (WebCore::DisplayList::SetMiterLimit::SetMiterLimit): Deleted. (WebCore::DisplayList::ClearShadow::ClearShadow): Deleted. (WebCore::DisplayList::Clip::Clip): Deleted. (WebCore::DisplayList::ClipOut::ClipOut): Deleted. (WebCore::DisplayList::ClipOutToPath::ClipOutToPath): Deleted. (WebCore::DisplayList::ClipPath::ClipPath): Deleted. (WebCore::DisplayList::ClipToDrawingCommands::ClipToDrawingCommands): Deleted. (WebCore::DisplayList::DrawGlyphs::localBounds const): Deleted. (WebCore::DisplayList::DrawImage::DrawImage): Deleted. (WebCore::DisplayList::DrawTiledImage::DrawTiledImage): Deleted. (WebCore::DisplayList::DrawTiledScaledImage::DrawTiledScaledImage): Deleted. (WebCore::DisplayList::DrawImageBuffer::DrawImageBuffer): Deleted. (WebCore::DisplayList::DrawRect::DrawRect): Deleted. (WebCore::DisplayList::DrawLine::DrawLine): Deleted. (WebCore::DisplayList::DrawDotsForDocumentMarker::DrawDotsForDocumentMarker): Deleted. (WebCore::DisplayList::DrawEllipse::DrawEllipse): Deleted. (WebCore::DisplayList::DrawPath::DrawPath): Deleted. (WebCore::DisplayList::DrawFocusRingPath::DrawFocusRingPath): Deleted. (WebCore::DisplayList::FillRect::FillRect): Deleted. (WebCore::DisplayList::FillRectWithColor::FillRectWithColor): Deleted. (WebCore::DisplayList::FillCompositedRect::FillCompositedRect): Deleted. (WebCore::DisplayList::FillRoundedRect::FillRoundedRect): Deleted. (WebCore::DisplayList::FillRectWithRoundedHole::FillRectWithRoundedHole): Deleted. (WebCore::DisplayList::FillInlinePath::FillInlinePath): Deleted. (WebCore::DisplayList::FillPath::FillPath): Deleted. (WebCore::DisplayList::FillEllipse::FillEllipse): Deleted. (WebCore::DisplayList::PaintFrameForMedia::create): Deleted. (WebCore::DisplayList::StrokeRect::StrokeRect): Deleted. (WebCore::DisplayList::StrokeEllipse::StrokeEllipse): Deleted. (WebCore::DisplayList::StrokeInlinePath::StrokeInlinePath): Deleted. (WebCore::DisplayList::StrokePath::StrokePath): Deleted. (WebCore::DisplayList::ClearRect::ClearRect): Deleted. (WebCore::DisplayList::BeginTransparencyLayer::BeginTransparencyLayer): Deleted. (WebCore::DisplayList::EndTransparencyLayer::EndTransparencyLayer): Deleted. (WebCore::DisplayList::ApplyStrokePattern::ApplyStrokePattern): Deleted. (WebCore::DisplayList::ApplyFillPattern::ApplyFillPattern): Deleted. (WebCore::DisplayList::ApplyDeviceScaleFactor::ApplyDeviceScaleFactor): Deleted. * platform/graphics/displaylists/DisplayListItems.h: (WebCore::DisplayList::Save::localBounds const): (WebCore::DisplayList::Save::globalBounds const): (WebCore::DisplayList::Restore::localBounds const): (WebCore::DisplayList::Restore::globalBounds const): (WebCore::DisplayList::Translate::Translate): (WebCore::DisplayList::Translate::localBounds const): (WebCore::DisplayList::Translate::globalBounds const): (WebCore::DisplayList::Rotate::Rotate): (WebCore::DisplayList::Rotate::localBounds const): (WebCore::DisplayList::Rotate::globalBounds const): (WebCore::DisplayList::Scale::Scale): (WebCore::DisplayList::Scale::localBounds const): (WebCore::DisplayList::Scale::globalBounds const): (WebCore::DisplayList::SetCTM::SetCTM): (WebCore::DisplayList::SetCTM::localBounds const): (WebCore::DisplayList::SetCTM::globalBounds const): (WebCore::DisplayList::ConcatenateCTM::ConcatenateCTM): (WebCore::DisplayList::ConcatenateCTM::localBounds const): (WebCore::DisplayList::ConcatenateCTM::globalBounds const): (WebCore::DisplayList::SetInlineFillGradient::localBounds const): (WebCore::DisplayList::SetInlineFillGradient::globalBounds const): (WebCore::DisplayList::SetInlineFillColor::SetInlineFillColor): (WebCore::DisplayList::SetInlineFillColor::color const): (WebCore::DisplayList::SetInlineFillColor::localBounds const): (WebCore::DisplayList::SetInlineFillColor::globalBounds const): (WebCore::DisplayList::SetInlineStrokeColor::SetInlineStrokeColor): (WebCore::DisplayList::SetInlineStrokeColor::color const): (WebCore::DisplayList::SetInlineStrokeColor::localBounds const): (WebCore::DisplayList::SetInlineStrokeColor::globalBounds const): (WebCore::DisplayList::SetStrokeThickness::SetStrokeThickness): (WebCore::DisplayList::SetStrokeThickness::thickness const): (WebCore::DisplayList::SetStrokeThickness::localBounds const): (WebCore::DisplayList::SetStrokeThickness::globalBounds const): (WebCore::DisplayList::SetState::localBounds const): (WebCore::DisplayList::SetState::globalBounds const): (WebCore::DisplayList::SetState::decode): (WebCore::DisplayList::SetLineCap::SetLineCap): (WebCore::DisplayList::SetLineCap::localBounds const): (WebCore::DisplayList::SetLineCap::globalBounds const): (WebCore::DisplayList::SetLineDash::SetLineDash): (WebCore::DisplayList::SetLineDash::localBounds const): (WebCore::DisplayList::SetLineDash::globalBounds const): (WebCore::DisplayList::SetLineDash::decode): (WebCore::DisplayList::SetLineJoin::SetLineJoin): (WebCore::DisplayList::SetLineJoin::localBounds const): (WebCore::DisplayList::SetLineJoin::globalBounds const): (WebCore::DisplayList::SetMiterLimit::SetMiterLimit): (WebCore::DisplayList::SetMiterLimit::localBounds const): (WebCore::DisplayList::SetMiterLimit::globalBounds const): (WebCore::DisplayList::ClearShadow::localBounds const): (WebCore::DisplayList::ClearShadow::globalBounds const): (WebCore::DisplayList::Clip::Clip): (WebCore::DisplayList::Clip::rect const): (WebCore::DisplayList::Clip::localBounds const): (WebCore::DisplayList::Clip::globalBounds const): (WebCore::DisplayList::ClipOut::ClipOut): (WebCore::DisplayList::ClipOut::rect const): (WebCore::DisplayList::ClipOut::localBounds const): (WebCore::DisplayList::ClipOut::globalBounds const): (WebCore::DisplayList::ClipOutToPath::ClipOutToPath): (WebCore::DisplayList::ClipOutToPath::localBounds const): (WebCore::DisplayList::ClipOutToPath::globalBounds const): (WebCore::DisplayList::ClipOutToPath::decode): (WebCore::DisplayList::ClipPath::ClipPath): (WebCore::DisplayList::ClipPath::localBounds const): (WebCore::DisplayList::ClipPath::globalBounds const): (WebCore::DisplayList::ClipPath::decode): (WebCore::DisplayList::ClipToDrawingCommands::ClipToDrawingCommands): (WebCore::DisplayList::ClipToDrawingCommands::localBounds const): (WebCore::DisplayList::ClipToDrawingCommands::globalBounds const): (WebCore::DisplayList::ClipToDrawingCommands::encode const): (WebCore::DisplayList::ClipToDrawingCommands::decode): (WebCore::DisplayList::DrawGlyphs::globalBounds const): (WebCore::DisplayList::DrawGlyphs::localBounds const): (WebCore::DisplayList::DrawGlyphs::encode const): (WebCore::DisplayList::DrawGlyphs::decode): (WebCore::DisplayList::DrawImage::DrawImage): (WebCore::DisplayList::DrawImage::globalBounds const): (WebCore::DisplayList::DrawImage::localBounds const): (WebCore::DisplayList::DrawImage::decode): (WebCore::DisplayList::DrawTiledImage::DrawTiledImage): (WebCore::DisplayList::DrawTiledImage::globalBounds const): (WebCore::DisplayList::DrawTiledImage::localBounds const): (WebCore::DisplayList::DrawTiledImage::decode): (WebCore::DisplayList::DrawTiledScaledImage::DrawTiledScaledImage): (WebCore::DisplayList::DrawTiledScaledImage::globalBounds const): (WebCore::DisplayList::DrawTiledScaledImage::localBounds const): (WebCore::DisplayList::DrawTiledScaledImage::decode): (WebCore::DisplayList::DrawImageBuffer::DrawImageBuffer): (WebCore::DisplayList::DrawImageBuffer::globalBounds const): (WebCore::DisplayList::DrawImageBuffer::localBounds const): (WebCore::DisplayList::DrawImageBuffer::decode): (WebCore::DisplayList::DrawNativeImage::source const): (WebCore::DisplayList::DrawNativeImage::destinationRect const): (WebCore::DisplayList::DrawNativeImage::globalBounds const): (WebCore::DisplayList::DrawNativeImage::localBounds const): (WebCore::DisplayList::DrawNativeImage::decode): (WebCore::DisplayList::DrawPattern::DrawPattern): (WebCore::DisplayList::DrawPattern::globalBounds const): (WebCore::DisplayList::DrawPattern::localBounds const): (WebCore::DisplayList::DrawPattern::decode): (WebCore::DisplayList::BeginTransparencyLayer::BeginTransparencyLayer): (WebCore::DisplayList::BeginTransparencyLayer::localBounds const): (WebCore::DisplayList::BeginTransparencyLayer::globalBounds const): (WebCore::DisplayList::EndTransparencyLayer::localBounds const): (WebCore::DisplayList::EndTransparencyLayer::globalBounds const): (WebCore::DisplayList::DrawRect::DrawRect): (WebCore::DisplayList::DrawRect::globalBounds const): (WebCore::DisplayList::DrawRect::localBounds const): (WebCore::DisplayList::DrawLine::DrawLine): (WebCore::DisplayList::DrawLine::globalBounds const): (WebCore::DisplayList::DrawLinesForText::globalBounds const): (WebCore::DisplayList::DrawLinesForText::decode): (WebCore::DisplayList::DrawDotsForDocumentMarker::DrawDotsForDocumentMarker): (WebCore::DisplayList::DrawDotsForDocumentMarker::globalBounds const): (WebCore::DisplayList::DrawEllipse::DrawEllipse): (WebCore::DisplayList::DrawEllipse::rect const): (WebCore::DisplayList::DrawEllipse::globalBounds const): (WebCore::DisplayList::DrawEllipse::localBounds const): (WebCore::DisplayList::DrawPath::DrawPath): (WebCore::DisplayList::DrawPath::globalBounds const): (WebCore::DisplayList::DrawPath::localBounds const): (WebCore::DisplayList::DrawPath::decode): (WebCore::DisplayList::DrawFocusRingPath::DrawFocusRingPath): (WebCore::DisplayList::DrawFocusRingPath::globalBounds const): (WebCore::DisplayList::DrawFocusRingPath::decode): (WebCore::DisplayList::DrawFocusRingRects::globalBounds const): (WebCore::DisplayList::DrawFocusRingRects::decode): (WebCore::DisplayList::FillRect::FillRect): (WebCore::DisplayList::FillRect::rect const): (WebCore::DisplayList::FillRect::globalBounds const): (WebCore::DisplayList::FillRect::localBounds const): (WebCore::DisplayList::FillRectWithColor::FillRectWithColor): (WebCore::DisplayList::FillRectWithColor::globalBounds const): (WebCore::DisplayList::FillRectWithColor::localBounds const): (WebCore::DisplayList::FillRectWithColor::decode): (WebCore::DisplayList::FillRectWithGradient::rect const): (WebCore::DisplayList::FillRectWithGradient::gradient const): (WebCore::DisplayList::FillRectWithGradient::globalBounds const): (WebCore::DisplayList::FillRectWithGradient::localBounds const): (WebCore::DisplayList::FillRectWithGradient::decode): (WebCore::DisplayList::FillCompositedRect::FillCompositedRect): (WebCore::DisplayList::FillCompositedRect::globalBounds const): (WebCore::DisplayList::FillCompositedRect::localBounds const): (WebCore::DisplayList::FillCompositedRect::decode): (WebCore::DisplayList::FillRoundedRect::FillRoundedRect): (WebCore::DisplayList::FillRoundedRect::globalBounds const): (WebCore::DisplayList::FillRoundedRect::localBounds const): (WebCore::DisplayList::FillRoundedRect::decode): (WebCore::DisplayList::FillRectWithRoundedHole::FillRectWithRoundedHole): (WebCore::DisplayList::FillRectWithRoundedHole::globalBounds const): (WebCore::DisplayList::FillRectWithRoundedHole::localBounds const): (WebCore::DisplayList::FillRectWithRoundedHole::decode): (WebCore::DisplayList::FillInlinePath::FillInlinePath): (WebCore::DisplayList::FillInlinePath::globalBounds const): (WebCore::DisplayList::FillInlinePath::localBounds const): (WebCore::DisplayList::FillPath::FillPath): (WebCore::DisplayList::FillPath::globalBounds const): (WebCore::DisplayList::FillPath::localBounds const): (WebCore::DisplayList::FillPath::decode): (WebCore::DisplayList::FillEllipse::FillEllipse): (WebCore::DisplayList::FillEllipse::globalBounds const): (WebCore::DisplayList::FillEllipse::localBounds const): (WebCore::DisplayList::PutImageData::imageData const): (WebCore::DisplayList::PutImageData::localBounds const): (WebCore::DisplayList::PutImageData::globalBounds const): (WebCore::DisplayList::PutImageData::encode const): (WebCore::DisplayList::PutImageData::decode): (WebCore::DisplayList::PaintFrameForMedia::localBounds const): (WebCore::DisplayList::PaintFrameForMedia::globalBounds const): (WebCore::DisplayList::StrokeRect::StrokeRect): (WebCore::DisplayList::StrokeRect::globalBounds const): (WebCore::DisplayList::StrokeInlinePath::StrokeInlinePath): (WebCore::DisplayList::StrokeInlinePath::globalBounds const): (WebCore::DisplayList::StrokePath::StrokePath): (WebCore::DisplayList::StrokePath::globalBounds const): (WebCore::DisplayList::StrokePath::decode): (WebCore::DisplayList::StrokeEllipse::StrokeEllipse): (WebCore::DisplayList::StrokeEllipse::rect const): (WebCore::DisplayList::StrokeEllipse::globalBounds const): (WebCore::DisplayList::ClearRect::ClearRect): (WebCore::DisplayList::ClearRect::rect const): (WebCore::DisplayList::ClearRect::globalBounds const): (WebCore::DisplayList::ClearRect::localBounds const): (WebCore::DisplayList::ApplyStrokePattern::localBounds const): (WebCore::DisplayList::ApplyStrokePattern::globalBounds const): (WebCore::DisplayList::ApplyFillPattern::localBounds const): (WebCore::DisplayList::ApplyFillPattern::globalBounds const): (WebCore::DisplayList::ApplyDeviceScaleFactor::ApplyDeviceScaleFactor): (WebCore::DisplayList::ApplyDeviceScaleFactor::localBounds const): (WebCore::DisplayList::ApplyDeviceScaleFactor::globalBounds const): (WebCore::DisplayList::DrawingItem::setExtent): Deleted. (WebCore::DisplayList::DrawingItem::extent const): Deleted. (WebCore::DisplayList::DrawingItem::extentKnown const): Deleted. (WebCore::DisplayList::DrawingItem::localBounds const): Deleted. (WebCore::DisplayList::DrawingItem::globalBounds const): Deleted. (WebCore::DisplayList::Save::create): Deleted. (WebCore::DisplayList::Save::encode const): Deleted. (WebCore::DisplayList::Save::decode): Deleted. (WebCore::DisplayList::Restore::create): Deleted. (WebCore::DisplayList::Restore::encode const): Deleted. (WebCore::DisplayList::Restore::decode): Deleted. (WebCore::DisplayList::Translate::create): Deleted. (WebCore::DisplayList::Translate::encode const): Deleted. (WebCore::DisplayList::Translate::decode): Deleted. (WebCore::DisplayList::Rotate::create): Deleted. (WebCore::DisplayList::Rotate::encode const): Deleted. (WebCore::DisplayList::Rotate::decode): Deleted. (WebCore::DisplayList::Scale::create): Deleted. (WebCore::DisplayList::Scale::encode const): Deleted. (WebCore::DisplayList::Scale::decode): Deleted. (WebCore::DisplayList::SetCTM::create): Deleted. (WebCore::DisplayList::SetCTM::encode const): Deleted. (WebCore::DisplayList::SetCTM::decode): Deleted. (WebCore::DisplayList::ConcatenateCTM::create): Deleted. (WebCore::DisplayList::ConcatenateCTM::encode const): Deleted. (WebCore::DisplayList::ConcatenateCTM::decode): Deleted. (WebCore::DisplayList::SetInlineFillGradient::create): Deleted. (WebCore::DisplayList::SetInlineFillGradient::encode const): Deleted. (WebCore::DisplayList::SetInlineFillGradient::decode): Deleted. (WebCore::DisplayList::SetInlineFillColor::encode const): Deleted. (WebCore::DisplayList::SetInlineFillColor::decode): Deleted. (WebCore::DisplayList::SetInlineStrokeColor::encode const): Deleted. (WebCore::DisplayList::SetInlineStrokeColor::decode): Deleted. (WebCore::DisplayList::SetStrokeThickness::encode const): Deleted. (WebCore::DisplayList::SetStrokeThickness::decode): Deleted. (WebCore::DisplayList::SetState::create): Deleted. (WebCore::DisplayList::SetLineCap::create): Deleted. (WebCore::DisplayList::SetLineCap::encode const): Deleted. (WebCore::DisplayList::SetLineCap::decode): Deleted. (WebCore::DisplayList::SetLineDash::create): Deleted. (WebCore::DisplayList::SetLineJoin::create): Deleted. (WebCore::DisplayList::SetLineJoin::encode const): Deleted. (WebCore::DisplayList::SetLineJoin::decode): Deleted. (WebCore::DisplayList::SetMiterLimit::create): Deleted. (WebCore::DisplayList::SetMiterLimit::encode const): Deleted. (WebCore::DisplayList::SetMiterLimit::decode): Deleted. (WebCore::DisplayList::ClearShadow::create): Deleted. (WebCore::DisplayList::ClearShadow::encode const): Deleted. (WebCore::DisplayList::ClearShadow::decode): Deleted. (WebCore::DisplayList::Clip::create): Deleted. (WebCore::DisplayList::Clip::encode const): Deleted. (WebCore::DisplayList::Clip::decode): Deleted. (WebCore::DisplayList::ClipOut::create): Deleted. (WebCore::DisplayList::ClipOut::encode const): Deleted. (WebCore::DisplayList::ClipOut::decode): Deleted. (WebCore::DisplayList::ClipOutToPath::create): Deleted. (WebCore::DisplayList::ClipPath::create): Deleted. (WebCore::DisplayList::ClipToDrawingCommands::create): Deleted. (WebCore::DisplayList::DrawGlyphs::create): Deleted. (WebCore::DisplayList::DrawImage::create): Deleted. (WebCore::DisplayList::DrawTiledImage::create): Deleted. (WebCore::DisplayList::DrawTiledScaledImage::create): Deleted. (WebCore::DisplayList::DrawImageBuffer::create): Deleted. (WebCore::DisplayList::DrawNativeImage::create): Deleted. (WebCore::DisplayList::DrawPattern::create): Deleted. (WebCore::DisplayList::BeginTransparencyLayer::create): Deleted. (WebCore::DisplayList::BeginTransparencyLayer::encode const): Deleted. (WebCore::DisplayList::BeginTransparencyLayer::decode): Deleted. (WebCore::DisplayList::EndTransparencyLayer::create): Deleted. (WebCore::DisplayList::EndTransparencyLayer::encode const): Deleted. (WebCore::DisplayList::EndTransparencyLayer::decode): Deleted. (WebCore::DisplayList::DrawRect::create): Deleted. (WebCore::DisplayList::DrawRect::encode const): Deleted. (WebCore::DisplayList::DrawRect::decode): Deleted. (WebCore::DisplayList::DrawLine::create): Deleted. (WebCore::DisplayList::DrawLine::encode const): Deleted. (WebCore::DisplayList::DrawLine::decode): Deleted. (WebCore::DisplayList::DrawLinesForText::create): Deleted. (WebCore::DisplayList::DrawDotsForDocumentMarker::create): Deleted. (WebCore::DisplayList::DrawDotsForDocumentMarker::encode const): Deleted. (WebCore::DisplayList::DrawDotsForDocumentMarker::decode): Deleted. (WebCore::DisplayList::DrawEllipse::create): Deleted. (WebCore::DisplayList::DrawEllipse::encode const): Deleted. (WebCore::DisplayList::DrawEllipse::decode): Deleted. (WebCore::DisplayList::DrawPath::create): Deleted. (WebCore::DisplayList::DrawFocusRingPath::create): Deleted. (WebCore::DisplayList::DrawFocusRingRects::create): Deleted. (WebCore::DisplayList::FillRect::create): Deleted. (WebCore::DisplayList::FillRect::encode const): Deleted. (WebCore::DisplayList::FillRect::decode): Deleted. (WebCore::DisplayList::FillRectWithColor::create): Deleted. (WebCore::DisplayList::FillRectWithGradient::create): Deleted. (WebCore::DisplayList::FillCompositedRect::create): Deleted. (WebCore::DisplayList::FillRoundedRect::create): Deleted. (WebCore::DisplayList::FillRectWithRoundedHole::create): Deleted. (WebCore::DisplayList::FillInlinePath::create): Deleted. (WebCore::DisplayList::FillInlinePath::encode const): Deleted. (WebCore::DisplayList::FillInlinePath::decode): Deleted. (WebCore::DisplayList::FillPath::create): Deleted. (WebCore::DisplayList::FillEllipse::create): Deleted. (WebCore::DisplayList::FillEllipse::encode const): Deleted. (WebCore::DisplayList::FillEllipse::decode): Deleted. (WebCore::DisplayList::PutImageData::create): Deleted. (WebCore::DisplayList::PaintFrameForMedia::encode const): Deleted. (WebCore::DisplayList::PaintFrameForMedia::decode): Deleted. (WebCore::DisplayList::StrokeRect::create): Deleted. (WebCore::DisplayList::StrokeRect::encode const): Deleted. (WebCore::DisplayList::StrokeRect::decode): Deleted. (WebCore::DisplayList::StrokeInlinePath::create): Deleted. (WebCore::DisplayList::StrokeInlinePath::encode const): Deleted. (WebCore::DisplayList::StrokeInlinePath::decode): Deleted. (WebCore::DisplayList::StrokePath::create): Deleted. (WebCore::DisplayList::StrokeEllipse::create): Deleted. (WebCore::DisplayList::StrokeEllipse::encode const): Deleted. (WebCore::DisplayList::StrokeEllipse::decode): Deleted. (WebCore::DisplayList::ClearRect::create): Deleted. (WebCore::DisplayList::ClearRect::encode const): Deleted. (WebCore::DisplayList::ClearRect::decode): Deleted. (WebCore::DisplayList::ApplyStrokePattern::create): Deleted. (WebCore::DisplayList::ApplyStrokePattern::encode const): Deleted. (WebCore::DisplayList::ApplyStrokePattern::decode): Deleted. (WebCore::DisplayList::ApplyFillPattern::create): Deleted. (WebCore::DisplayList::ApplyFillPattern::encode const): Deleted. (WebCore::DisplayList::ApplyFillPattern::decode): Deleted. (WebCore::DisplayList::ApplyDeviceScaleFactor::create): Deleted. (WebCore::DisplayList::ApplyDeviceScaleFactor::encode const): Deleted. (WebCore::DisplayList::ApplyDeviceScaleFactor::decode): Deleted. (WebCore::DisplayList::Item::encode const): Deleted. (WebCore::DisplayList::Item::decode): Deleted. Delete the generic `Item::encode` and `Item::decode` methods, since only out-of-line display list items have encode and decode functions now. * platform/graphics/displaylists/DisplayListRecorder.cpp: (WebCore::DisplayList::Recorder::putImageData): (WebCore::DisplayList::Recorder::appendStateChangeItem): (WebCore::DisplayList::Recorder::clearShadow): (WebCore::DisplayList::Recorder::setLineCap): (WebCore::DisplayList::Recorder::setLineDash): (WebCore::DisplayList::Recorder::setLineJoin): (WebCore::DisplayList::Recorder::setMiterLimit): (WebCore::DisplayList::Recorder::drawImage): (WebCore::DisplayList::Recorder::drawTiledImage): (WebCore::DisplayList::Recorder::drawImageBuffer): (WebCore::DisplayList::Recorder::drawNativeImage): (WebCore::DisplayList::Recorder::drawPattern): (WebCore::DisplayList::Recorder::save): (WebCore::DisplayList::Recorder::restore): (WebCore::DisplayList::Recorder::translate): (WebCore::DisplayList::Recorder::rotate): (WebCore::DisplayList::Recorder::scale): (WebCore::DisplayList::Recorder::concatCTM): (WebCore::DisplayList::Recorder::setCTM): (WebCore::DisplayList::Recorder::beginTransparencyLayer): (WebCore::DisplayList::Recorder::endTransparencyLayer): (WebCore::DisplayList::Recorder::drawRect): (WebCore::DisplayList::Recorder::drawLine): (WebCore::DisplayList::Recorder::drawLinesForText): (WebCore::DisplayList::Recorder::drawDotsForDocumentMarker): (WebCore::DisplayList::Recorder::drawEllipse): (WebCore::DisplayList::Recorder::drawPath): (WebCore::DisplayList::Recorder::drawFocusRing): (WebCore::DisplayList::Recorder::fillRect): (WebCore::DisplayList::Recorder::fillRoundedRect): (WebCore::DisplayList::Recorder::fillRectWithRoundedHole): (WebCore::DisplayList::Recorder::fillPath): (WebCore::DisplayList::Recorder::fillEllipse): (WebCore::DisplayList::Recorder::strokeRect): (WebCore::DisplayList::Recorder::strokePath): (WebCore::DisplayList::Recorder::strokeEllipse): (WebCore::DisplayList::Recorder::clearRect): (WebCore::DisplayList::Recorder::applyStrokePattern): (WebCore::DisplayList::Recorder::applyFillPattern): (WebCore::DisplayList::Recorder::clip): (WebCore::DisplayList::Recorder::clipOut): (WebCore::DisplayList::Recorder::clipPath): (WebCore::DisplayList::Recorder::clipToDrawingCommands): (WebCore::DisplayList::Recorder::paintFrameForMedia): (WebCore::DisplayList::Recorder::applyDeviceScaleFactor): Change these methods that append display list items en masse, such that they go from this: `m_displayList.append(Foo::create(arg1, arg2, arg3));` ...to this: `m_displayList.append<Foo>(arg1, arg2, arg3);` (WebCore::DisplayList::Recorder::extentFromLocalBounds const): (WebCore::DisplayList::Recorder::appendItemAndUpdateExtent): Deleted. (WebCore::DisplayList::Recorder::appendItem): Deleted. (WebCore::DisplayList::Recorder::updateItemExtent const): Deleted. Extents are now automatically updated (unless otherwise specified) for any drawing items that are appended. * platform/graphics/displaylists/DisplayListRecorder.h: (WebCore::DisplayList::Recorder::append): * platform/graphics/displaylists/DisplayListReplayer.cpp: (WebCore::DisplayList::Replayer::replay): * platform/graphics/displaylists/DisplayListReplayer.h: (WebCore::DisplayList::Replayer::Delegate::apply): Source/WebKit: Adjust for changes to display lists and display list items in WebCore (see Source/WebCore/ChangeLog for more information). In particular, we implement the reading and writing client hooks consulted by ItemBuffer, and we also add a temporary mechanism that allows RemoteRenderingBackendProxy (in the web process) to send display list item data through shared memory to the RemoteRenderingBackend (in the GPU process). This temporary mechanism does not attempt to make any reading or writing in shared memory concurrent between the GPU and web processes, and exists only to make sure that rendering with the GPU process still works using these new display list items. In the next patch, I will add a simple concurrent reader/writer model for display list processing between the web and GPU processes, and (in doing so) revert most of the changes in `RemoteRenderingBackend` and `RemoteRenderingBackendProxy` below. See comments below for more detail. * GPUProcess/graphics/RemoteImageBuffer.h: (WebKit::RemoteImageBuffer::decodeAndCreate): * GPUProcess/graphics/RemoteRenderingBackend.cpp: (WebKit::RemoteRenderingBackend::applyResourceItem): (WebKit::RemoteRenderingBackend::applyMediaItem): Refactor these to take `WebCore::DisplayList::ItemHandle`. (WebKit::RemoteRenderingBackend::applyDisplayList): (WebKit::RemoteRenderingBackend::flushDisplayList): (WebKit::RemoteRenderingBackend::flushDisplayListAndCommit): (WebKit::RemoteRenderingBackend::didCreateSharedItemData): * GPUProcess/graphics/RemoteRenderingBackend.h: * GPUProcess/graphics/RemoteRenderingBackend.messages.in: * Scripts/webkit/messages.py: * Shared/SharedDisplayListHandle.cpp: Added. (WebKit::SharedDisplayListHandle::SharedDisplayListHandle): (WebKit::SharedDisplayListHandle::createDisplayList const): * Shared/SharedDisplayListHandle.h: Added. Add a WebKit2 helper class that represents display list data in shared memory that is propagated from the web process to the GPU process. In the next patch, this class will be rewritten to support concurrent display list reading and writing, with specialized subclasses in service of both the reader (i.e. the GPU process) and the writer (i.e. the web process). (WebKit::SharedDisplayListHandle::SharedDisplayListHandle): (WebKit::SharedDisplayListHandle::encode const): (WebKit::SharedDisplayListHandle::decode): * Sources.txt: * WebKit.xcodeproj/project.pbxproj: * WebProcess/GPU/graphics/RemoteImageBufferProxy.h: (WebKit::RemoteImageBufferProxy::RemoteImageBufferProxy): * WebProcess/GPU/graphics/RemoteRenderingBackendProxy.cpp: (WebKit::RemoteRenderingBackendProxy::flushDisplayList): (WebKit::RemoteRenderingBackendProxy::flushDisplayListAndCommit): (WebKit::RemoteRenderingBackendProxy::createItemBuffer): * WebProcess/GPU/graphics/RemoteRenderingBackendProxy.h: * WebProcess/GPU/graphics/RemoteRenderingBackendProxy.messages.in: * WebProcess/GPU/graphics/RemoteResourceCacheProxy.cpp: LayoutTests: Rebaseline several existing (non-GPU-process) display list tests to account for a slight tweak in the format in which display lists are dumped as text. More specifically, drawing item extents are now dumped after each drawing item, rather than before. * displaylists/canvas-display-list-expected.txt: * displaylists/extent-includes-shadow-expected.txt: * displaylists/extent-includes-transforms-expected.txt: * displaylists/layer-dispay-list-expected.txt: * displaylists/replay-skip-clipped-rect-expected.txt: Canonical link: https://commits.webkit.org/231320@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@269525 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-11-06 18:54:52 +00:00
(rect at (10,10) size 55x50) extent at (10,140) size 55x50)
[Concurrent display lists] Add alternate versions of existing display list items that only contain inline data https://bugs.webkit.org/show_bug.cgi?id=218259 Reviewed by Tim Horton. Source/WebCore: In preparation for supporting concurrent generation and consumption of display list items in the GPU process, add new variants of some existing display list items that contain only "inline data" (i.e. no pointers). No change in behavior; see below for more details. * platform/graphics/Path.cpp: (WebCore::Path::isEmpty const): (WebCore::Path::addQuadCurveTo): (WebCore::Path::addBezierCurveTo): (WebCore::Path::Path): * platform/graphics/Path.h: Add a helper method to convert `InlinePathData` to `Path`. (WebCore::Path::inlineData const): (WebCore::Path::encode const): (WebCore::Path::hasInlineData const): Rename `hasAnyInlineData` to just `hasInlineData`, and make it public. (WebCore::Path::releasePlatformPathIfPossible const): Deleted. Additionally, remove `releasePlatformPathIfPossible()` altogether. This method was used to ensure that `StrokePath` and `FillPath` wouldn't keep their `Path`'s platform `CGPathRef`s around after applying the item in the GPU process, which leads to accumulating a pool of unused `CGPathRef`s after playing back a display list that contains many `Path` objects. However, since `StrokeInlinePath` and `FillInlinePath` now exist, the `Path` object we create when applying those items is always going to be temporary, which allows us to avoid this problem. (WebCore::Path::hasAnyInlineData const): Deleted. * platform/graphics/cg/PathCG.cpp: (WebCore::Path::platformPath const): (WebCore::Path::isNull const): * platform/graphics/displaylists/DisplayList.h: * platform/graphics/displaylists/DisplayListItems.cpp: (WebCore::DisplayList::Item::sizeInBytes): (WebCore::DisplayList::SetInlineFillGradient::SetInlineFillGradient): (WebCore::DisplayList::SetInlineFillGradient::gradient const): (WebCore::DisplayList::SetInlineFillGradient::create): (WebCore::DisplayList::SetInlineFillGradient::apply const): (WebCore::DisplayList::SetInlineFillGradient::isInline): Introduce a new SetInlineFillGradient item to represent setting the fill gradient to a gradient with at most 4 color stops, with only inline colors. This inline data is pulled out of the `Gradient` upon construction, and later used to reconstruct a `Gradient` during playback. (WebCore::DisplayList::operator<<): (WebCore::DisplayList::SetInlineFillColor::create): (WebCore::DisplayList::SetInlineFillColor::apply const): Change `SetFillColor` to `SetInlineFillColor`, and make it pass around an `SRGB<uint8_t>` instead of a `Color`, since the latter could contain a pointer to an extended color. (WebCore::DisplayList::SetInlineStrokeColor::create): (WebCore::DisplayList::SetInlineStrokeColor::apply const): Similar to the above, but when setting the stroke color to an inline (non-extended) color. (WebCore::DisplayList::SetStrokeThickness::create): (WebCore::DisplayList::SetStrokeThickness::apply const): (WebCore::DisplayList::FillInlinePath::FillInlinePath): (WebCore::DisplayList::FillInlinePath::apply const): (WebCore::DisplayList::FillPath::apply const): (WebCore::DisplayList::StrokePath::apply const): (WebCore::DisplayList::StrokeInlinePath::localBounds const): (WebCore::DisplayList::StrokeInlinePath::apply const): (WebCore::DisplayList::StrokeInlinePath::StrokeInlinePath): Add `StrokeInlinePath` and `FillInlinePath`, which contain `InlinePathData` instead of `Path` objects and only construct `path()` objects when needed (i.e. when applying to a `GraphicsContext`). (WebCore::DisplayList::SetFillColor::create): Deleted. (WebCore::DisplayList::SetFillColor::apply const): Deleted. (WebCore::DisplayList::SetStrokeState::create): Deleted. (WebCore::DisplayList::SetStrokeState::apply const): Deleted. * platform/graphics/displaylists/DisplayListItems.h: (WebCore::DisplayList::SetInlineFillGradient::create): (WebCore::DisplayList::SetInlineFillGradient::encode const): (WebCore::DisplayList::SetInlineFillGradient::decode): (WebCore::DisplayList::SetInlineFillColor::color const): (WebCore::DisplayList::SetInlineFillColor::SetInlineFillColor): (WebCore::DisplayList::SetInlineFillColor::encode const): (WebCore::DisplayList::SetInlineFillColor::decode): (WebCore::DisplayList::SetInlineStrokeColor::color const): (WebCore::DisplayList::SetInlineStrokeColor::SetInlineStrokeColor): (WebCore::DisplayList::SetInlineStrokeColor::encode const): (WebCore::DisplayList::SetInlineStrokeColor::decode): (WebCore::DisplayList::SetStrokeThickness::thickness const): (WebCore::DisplayList::SetStrokeThickness::SetStrokeThickness): (WebCore::DisplayList::SetStrokeThickness::encode const): (WebCore::DisplayList::SetStrokeThickness::decode): Pull stroke thickness out into its own display list item. (WebCore::DisplayList::FillInlinePath::create): (WebCore::DisplayList::FillInlinePath::path const): (WebCore::DisplayList::FillInlinePath::encode const): (WebCore::DisplayList::FillInlinePath::decode): (WebCore::DisplayList::StrokeInlinePath::create): (WebCore::DisplayList::StrokeInlinePath::path const): (WebCore::DisplayList::StrokeInlinePath::encode const): (WebCore::DisplayList::StrokeInlinePath::decode): (WebCore::DisplayList::Item::encode const): (WebCore::DisplayList::Item::decode): (WebCore::DisplayList::SetFillColor::color const): Deleted. (WebCore::DisplayList::SetFillColor::SetFillColor): Deleted. (WebCore::DisplayList::SetFillColor::encode const): Deleted. (WebCore::DisplayList::SetFillColor::decode): Deleted. (WebCore::DisplayList::SetStrokeState::color const): Deleted. (WebCore::DisplayList::SetStrokeState::hasColor const): Deleted. (WebCore::DisplayList::SetStrokeState::thickness const): Deleted. (WebCore::DisplayList::SetStrokeState::hasThickness const): Deleted. (WebCore::DisplayList::SetStrokeState::SetStrokeState): Deleted. (WebCore::DisplayList::SetStrokeState::encode const): Deleted. (WebCore::DisplayList::SetStrokeState::decode): Deleted. Split `SetStrokeState` out into separate items tracking thickness and stroke color. * platform/graphics/displaylists/DisplayListRecorder.cpp: (WebCore::DisplayList::containsOnlyInlineStateChanges): Refactor this code so that it emits multiple display list items if multiple inline states change. Previously, this was only done for simultaneous stroke color and stroke thickness changes (via the `SetStrokeState` item); this was done to avoid creating more display list items than needed. However, once all inline display list items are constructed directly in shared memory, there will be (almost) zero overhead for splitting this into separate items. (WebCore::DisplayList::Recorder::appendStateChangeItem): (WebCore::DisplayList::Recorder::willAppendItem): (WebCore::DisplayList::Recorder::fillPath): (WebCore::DisplayList::Recorder::strokePath): (WebCore::DisplayList::containsOnlyStrokeColorOrThicknessChange): Deleted. (WebCore::DisplayList::containsOnlyFillColorChange): Deleted. (WebCore::DisplayList::createStateChangeItem): Deleted. Additionally refactor this method so that it is now a private method that appends to `m_displayList`, instead of returning a display list item to be appended. This will become important in a future patch, which will replace the existing `append` method with a templated version that takes the display list item type as a template argument. * platform/graphics/displaylists/DisplayListRecorder.h: LayoutTests: Rebaseline an existing test. * displaylists/canvas-display-list-expected.txt: Canonical link: https://commits.webkit.org/230973@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@269092 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-10-28 02:09:17 +00:00
(set-inline-fill-color
[MotionMark] Add state change items to represent changes to stroke and fill state https://bugs.webkit.org/show_bug.cgi?id=217911 Reviewed by Simon Fraser. Source/WebCore: Add two new display list items to represent changes to stroke thickness and/or stroke color, and fill color. These state changes account for almost all of the state changes in MotionMark's canvas rendering subtests (i.e. lines, arcs, and paths). This significantly reduces the memory overhead caused by maintaining display list items in the web and GPU processes when running Canvas Lines and Canvas Arcs. Currently, each `SetState` item is currently 120 bytes; after this change, each state change item will decrease to either 24 (for `SetFillColor`) or 32 (for `SetStrokeState`) bytes. No change in behavior. * platform/graphics/displaylists/DisplayList.h: (WebCore::DisplayList::Item::isStateItem const): Deleted. (WebCore::DisplayList::Item::isStateItemType): Deleted. Remove a couple of unused methods, as well as an unused constexpr. * platform/graphics/displaylists/DisplayListItems.cpp: (WebCore::DisplayList::Item::sizeInBytes): (WebCore::DisplayList::SetFillColor::create): (WebCore::DisplayList::SetFillColor::apply const): (WebCore::DisplayList::operator<<): Add the `SetFillColor` item, which represents a call to `GraphicsContext::setFillColor`. (WebCore::DisplayList::SetStrokeState::create): (WebCore::DisplayList::SetStrokeState::apply const): Add the `SetStrokeState` item, which represents a call to `GraphicsContext::setStrokeThickness` and/or `GraphicsContext::setStrokeColor`. (WebCore::DisplayList::SetState::accumulate): Deleted. Remove an unused method. * platform/graphics/displaylists/DisplayListItems.h: (WebCore::DisplayList::SetFillColor::color const): (WebCore::DisplayList::SetFillColor::SetFillColor): (WebCore::DisplayList::SetFillColor::encode const): (WebCore::DisplayList::SetFillColor::decode): (WebCore::DisplayList::SetStrokeState::color const): (WebCore::DisplayList::SetStrokeState::hasColor const): (WebCore::DisplayList::SetStrokeState::thickness const): (WebCore::DisplayList::SetStrokeState::hasThickness const): Instead of using two `Optional<T>` members, store two `bool` flags corresponding to thickness and stroke color. This allows us to make the `SetStrokeState` item 32 bytes instead of 40 bytes, due to the extra padding that would otherwise exist after each of the `Optional` members. (WebCore::DisplayList::SetStrokeState::SetStrokeState): (WebCore::DisplayList::SetStrokeState::encode const): (WebCore::DisplayList::SetStrokeState::decode): (WebCore::DisplayList::Item::encode const): (WebCore::DisplayList::Item::decode): * platform/graphics/displaylists/DisplayListRecorder.cpp: (WebCore::DisplayList::containsOnlyStrokeColorOrThicknessChange): (WebCore::DisplayList::containsOnlyFillColorChange): (WebCore::DisplayList::createStateChangeItem): Instead of always appending `SetState` items, append either `SetStrokeState` or `SetFillColor` if the only changed flags are stroke thickness or stroke color, or fill color (respectively). (WebCore::DisplayList::Recorder::willAppendItem): LayoutTests: * displaylists/canvas-display-list-expected.txt: Rebaseline an existing display list item dump test. Canonical link: https://commits.webkit.org/230655@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@268704 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-10-20 00:46:01 +00:00
(color #0000C880))
Allow canvas to use display-list drawing for testing https://bugs.webkit.org/show_bug.cgi?id=153475 Reviewed by Dean Jackson. Source/WebCore: Optionally have 2D <canvas> use display-list drawing, which is only enabled via Internals for now. Support displayListAsText() and replayDisplayListAsText() on canvas, so we can use it to test playback optimizations. [Note that displayListAsText() always returns an empty string currently, because the display list is cleared when the canvas is painted to the page.] Display list rendering is implemented by giving CanvasRenderingContext2D an optional DisplayListDrawingContext, which packages up a display list, recorder and recording context. The existing paintRenderingResultsToCanvas() is overridden to replay the recorded display list into the primary canvas context. Tracked replay display lists are stored in a static map, keyed by the CanvasRenderingContext2D. Test: displaylists/canvas-display-list.html * html/HTMLCanvasElement.cpp: (WebCore::HTMLCanvasElement::HTMLCanvasElement): (WebCore::HTMLCanvasElement::getContext): (WebCore::HTMLCanvasElement::paint): (WebCore::HTMLCanvasElement::setUsesDisplayListDrawing): (WebCore::HTMLCanvasElement::setTracksDisplayListReplay): (WebCore::HTMLCanvasElement::displayListAsText): (WebCore::HTMLCanvasElement::replayDisplayListAsText): * html/HTMLCanvasElement.h: * html/canvas/CanvasRenderingContext.h: * html/canvas/CanvasRenderingContext2D.cpp: (WebCore::DisplayListDrawingContext::DisplayListDrawingContext): (WebCore::contextDisplayListMap): (WebCore::CanvasRenderingContext2D::~CanvasRenderingContext2D): (WebCore::CanvasRenderingContext2D::setTracksDisplayListReplay): (WebCore::CanvasRenderingContext2D::displayListAsText): (WebCore::CanvasRenderingContext2D::replayDisplayListAsText): (WebCore::CanvasRenderingContext2D::paintRenderingResultsToCanvas): (WebCore::CanvasRenderingContext2D::drawingContext): (WebCore::CanvasRenderingContext2D::CanvasRenderingContext2D): Deleted. * html/canvas/CanvasRenderingContext2D.h: * testing/Internals.cpp: (WebCore::Internals::setElementUsesDisplayListDrawing): (WebCore::Internals::setElementTracksDisplayListReplay): (WebCore::Internals::displayListForElement): (WebCore::Internals::replayDisplayListForElement): LayoutTests: Simple canvas-based display list test. * displaylists/canvas-display-list-expected.txt: Added. * displaylists/canvas-display-list.html: Added. Canonical link: https://commits.webkit.org/171593@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@195646 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2016-01-27 01:53:18 +00:00
(fill-rect
[Concurrent display lists] Encode display list items directly into shared memory https://bugs.webkit.org/show_bug.cgi?id=218406 Reviewed by Tim Horton. Source/WebCore: This patch refactors display lists (and display list items) in preparation for upcoming changes to allow the GPU and web processes to concurrently read and write display list item data, which allows us to achieve significant improvements in performance on many graphics benchmarks in MotionMark by removing overhead involved in serializing and deserializing display list items over IPC. To implement this, rather than using IPC to encode and decode each item, we will instead store display list items directly in memory shared between the web and GPU processes. This strategy, of course, will not work for display list items that contain pointers. Unfortunately, this affects all display list items at the moment, since all items are subclasses of `DisplayList::Item`, and therefore contain vtable pointers, even if all members are plain data types. Thus, the first step towards being able to read and write items directly in shared memory is to remove this vtable pointer by making display list items no longer inherit from `DrawingItem` or `Item`. Currently, display lists are backed by `Vector<Ref<Item>>`; however, this no longer works once none of the display list items are descended from a common base class. To address this, we introduce `DisplayList::ItemBuffer`, which encapsulates logic to manage one or more data segments that contain display list item data (i.e. display list items stacked adjacent to each other in memory). Display lists now append inline display list items by constructing these items directly inside the item buffer using placement-new. However, many types of display list items do not consist entirely of inline data; some of these are obvious, such as `DrawImage`, `DrawGlyphs`, or `StrokePath` (since a `Path` may be arbitrarily complex). Other out-of- line item types are less obvious: for instance, `FillRoundedRect` is an out-of-line item due to the fact that the color of the rect (`FillRoundedRect::m_color`) may be an extended color, which then contains a pointer. In these cases, we can't simply encode the item in shared memory and read it in the GPU process, since the pointer (if it pointed to anything other than null in the web process) will point to arbitrary memory in the GPU process. Instead, we can leverage our existing IPC infrastructure here by encoding each of these out-of-line items as data and decoding them from this data in the GPU process. To do this, we delegate out to WebKit2 to encode out-of-line display list items using WebKit's `IPC::Encoder`, and pass back a `SharedBuffer` which we then copy into the item buffer. This delegation happens through the `ItemBufferWritingClient` class, which has an implementation in WebKit2. On the decoding side in the GPU process, we then ask `ItemBufferReadingClient` (if set) to convert this encoded data back into a display list item. In WebKit2, we implement this interface and use the corresponding `IPC::Decoder` to decode the data we serialized earlier. If no client is specified or the client does not require custom encoding/decoding for the given item type, we fall back to constructing the item directly inside the writable item buffer data. To make it easier to reason about these new (inheritance-free) display list items, we additionally introduce `ItemHandle`, which wraps a pointer to a display list item and provides several helper methods. The first byte of each item handle always points to an `ItemType`, and the following `N` bytes contain the item itself, where `N` is the size of the item class. Here are some examples of how to use an `ItemHandle`: `DisplayList::ItemType type = itemHandle.type();` (This matches the current inheritance model) `if (itemHandle.is<StrokePath>()) {...` (Replaces is<> in the current model) `auto& setStateItem = itemHandle.get<SetState>();` (Replaces downcast<> in the current model) `itemHandle.apply(myGraphicsContext);` (This matches the current inheritance model) `bool isDrawingItem = itemHandle.isDrawingItem();` (Replaces checks for `is<DrawingItem>(item)`) When writing display lists for the GPU process, the writing client (a `ItemBufferWritingClient`) will be asked to provide `ItemBufferHandle`s where the item buffer will place item data (whether encoded, or as an inline object). However, when using display lists outside of this context (e.g. in other parts of WebCore, such as the glyph drawing cache), we don't have a `ItemBufferWritingClient`. To handle this, the item buffer instead allocates its own (non-shared-memory) buffers, which it manages and deletes when it is done. If any out-of-line items are constructed within these buffers, `ItemBuffer` will additionally call their destructors prior to deleting these buffers. See per-change comments below for more details. * Headers.cmake: * Sources.txt: * WebCore.xcodeproj/project.pbxproj: * platform/graphics/GraphicsContext.h: * platform/graphics/displaylists/DisplayList.cpp: (WebCore::DisplayList::DisplayList::DisplayList): (WebCore::DisplayList::DisplayList::operator=): Implement the move assignment operator and move constructor by exchanging ownership of the item buffer. (WebCore::DisplayList::DisplayList::clear): (WebCore::DisplayList::DisplayList::shouldDumpForFlags): (WebCore::DisplayList::DisplayList::asText const): (WebCore::DisplayList::DisplayList::dump const): Adjust the format when printing display lists to `TextStream`. Now that drawing item extents are tracked on the display list rather than being on each drawing item, we print them out after each item (as opposed to being in the middle of each item). (WebCore::DisplayList::DisplayList::sizeInBytes const): Tally up the size of the display list by taking the sum of the sizes of each readonly segment, as well as the writable buffer size. (WebCore::DisplayList::DisplayList::isEmpty const): A DisplayList is empty if it contains no item data: in other words, there are no readonly buffer segments, and there is also nothing written to the writable buffer segment. (WebCore::DisplayList::DisplayList::itemBuffer): (WebCore::DisplayList::DisplayList::setItemBufferClient): (WebCore::DisplayList::DisplayList::forEachItemBuffer const): Add a helper to iterate over each ItemBufferHandle in the display list. This includes all readonly handles, and then the writable handle (if it exists). (WebCore::DisplayList::DisplayList::setTracksDrawingItemExtents): Add an option to allow the display list to track drawing item extents. Currently, display lists always track extents for drawing items; however, when propagating display lists to the GPU process for playback, these extents were never sent along with IPC, and so this ended up just being unnecessary work. Additionally, the initial clip in the GPU process is also never set, so computing these extents never helped. That said, drawing item extents are still printed out for the purposes of testing, so we need to keep this logic intact; this refactoring only disables extent computation for display lists being sent to the GPU process via remote image buffers. In a future patch, we could refactor this so that drawing items contain extent rects as inline data that can be consulted in the GPU process. (WebCore::DisplayList::DisplayList::append): Display list items are no longer constructed ahead of time, and then appended to the display list. Instead, `append` now takes the type of the item to append as a template typename argument, as well as the arguments that will be used to construct the item. (WebCore::DisplayList::DisplayList::iterator::atEnd const): (WebCore::DisplayList::DisplayList::iterator::updateCurrentItem): (WebCore::DisplayList::DisplayList::iterator::advance): (WebCore::DisplayList::DisplayList::iterator::clearCurrentItem): (WebCore::DisplayList::DisplayList::iterator::moveToEnd): (WebCore::DisplayList::DisplayList::iterator::moveCursorToStartOfCurrentBuffer): Implement a C++ iterator for DisplayList. This makes it possible to write code like this: ``` // Suppose displayList is an instance of DisplayList::DisplayList. for (auto [item, extent] : displayList) { // Do things with item, which is a DisplayList::ItemHandle. // Maybe do things with extent, which is an Optional<FloatRect>. } ``` * platform/graphics/displaylists/DisplayList.h: (WebCore::DisplayList::DisplayList::tracksDrawingItemExtents const): (WebCore::DisplayList::DisplayList::iterator::iterator): (WebCore::DisplayList::DisplayList::iterator::~iterator): (WebCore::DisplayList::DisplayList::iterator::operator==): (WebCore::DisplayList::DisplayList::iterator::operator!=): (WebCore::DisplayList::DisplayList::iterator::operator++): (WebCore::DisplayList::DisplayList::iterator::operator* const): (WebCore::DisplayList::DisplayList::begin const): (WebCore::DisplayList::DisplayList::end const): (WebCore::DisplayList::DisplayList::itemBufferIfExists const): (WebCore::DisplayList::DisplayList::addDrawingItemExtent): (WebCore::DisplayList::DisplayList::append): (WebCore::DisplayList::Item::type const): Deleted. (WebCore::DisplayList::Item::isDrawingItem const): Deleted. (WebCore::DisplayList::DisplayList::list const): Deleted. (WebCore::DisplayList::DisplayList::itemAt): Deleted. (WebCore::DisplayList::DisplayList::isEmpty const): Deleted. (WebCore::DisplayList::DisplayList::appendItem): Deleted. (WebCore::DisplayList::DisplayList::list): Deleted. (WebCore::DisplayList::DisplayList::encode const): Deleted. (WebCore::DisplayList::DisplayList::decode): Deleted. Remove the ability to `encode` and `decode` display lists, for the time being. For the communication between the web and GPU processes, we now use `SharedDisplayListHandle`. Unfortunately, this does mean that the extant `ClipToDrawingCommands` display list item will be broken for the time being. In a followup patch, I plan to reimplement `DisplayList::encode` and `decode` in the new inline item model by encoding each item (either as inline data or via `IPC::Encoder::encodeSingleObject`). However, this is contingent on all display list item types (e.g. `DrawImage` and `DrawGlyph`) not relying on `IPC::Attachment` for encoding, so support for `ClipToDrawingCommands` will need to wait until after fonts and images are working. * platform/graphics/displaylists/DisplayListDrawGlyphsRecorderCoreText.cpp: (WebCore::DisplayList::DrawGlyphsRecorder::recordDrawGlyphs): (WebCore::DisplayList::DrawGlyphsRecorder::recordDrawImage): * platform/graphics/displaylists/DisplayListDrawGlyphsRecorderHarfBuzz.cpp: (WebCore::DisplayList::DrawGlyphsRecorder::drawGlyphs): * platform/graphics/displaylists/DisplayListDrawGlyphsRecorderWin.cpp: (WebCore::DisplayList::DrawGlyphsRecorder::drawGlyphs): Change these to use the new templated `DisplayList::append` method. * platform/graphics/displaylists/DisplayListDrawingContext.h: (WebCore::DisplayList::DrawingContext::takeDisplayList): Use `std::exchange` instead of `WTFMove`. This is actually necessary in order to ensure correctness (i.e. no leaks or double-freeing), since the `DisplayList` instance that is being moved from needs to be empty so that it does not try to call destructors on the items formerly inside of it. * platform/graphics/displaylists/DisplayListItemBuffer.cpp: Added. (WebCore::DisplayList::ItemHandle::apply): (WebCore::DisplayList::ItemHandle::destroy): Add helper methods to apply a display list item to a `GraphicsContext` and call the display list item's destructor, respectively. (WebCore::DisplayList::ItemHandle::copyTo const): Add a helper method to copy the item into the destination handle (calling the copy constructor of the item type in the process). This is used when copying a validated display list item into the temporary item buffer in `DisplayList::iterator`. (WebCore::DisplayList::ItemBuffer::ItemBuffer): (WebCore::DisplayList::ItemBuffer::~ItemBuffer): (WebCore::DisplayList::m_allocatedBuffers): In the case where there is no `m_writingClient` (for instance, when using in-process `DisplayList`s to optimize text painting), the display list item buffer is responsible for creating and managing data buffers. As such, it needs to remember to free any buffers that it allocated when appending, and must also destroy any out-of-line display list items (i.e. items with nontrivial destructors) when it is finished. (WebCore::DisplayList::m_readOnlyBuffers): (WebCore::DisplayList::m_writableBuffer): (WebCore::DisplayList::m_writtenNumberOfBytes): See main ChangeLog entry above for more details. (WebCore::DisplayList::ItemBuffer::operator=): (WebCore::DisplayList::ItemBuffer::createItemBuffer): (WebCore::DisplayList::ItemBuffer::forEachItemBuffer const): (WebCore::DisplayList::ItemBuffer::clear): (WebCore::DisplayList::ItemBuffer::swapWritableBufferIfNeeded): (WebCore::DisplayList::ItemBuffer::appendDataAndLength): * platform/graphics/displaylists/DisplayListItemBuffer.h: Added. (WebCore::DisplayList::ItemBufferHandle::operator bool const): (WebCore::DisplayList::ItemBufferHandle::operator! const): (WebCore::DisplayList::ItemHandle::operator bool const): (WebCore::DisplayList::ItemHandle::operator! const): (WebCore::DisplayList::ItemHandle::type const): (WebCore::DisplayList::ItemHandle::size const): (WebCore::DisplayList::ItemHandle::is const): (WebCore::DisplayList::ItemHandle::get const): (WebCore::DisplayList::ItemBufferWritingClient::~ItemBufferWritingClient): (WebCore::DisplayList::ItemBufferReadingClient::~ItemBufferReadingClient): (WebCore::DisplayList::ItemBuffer::sizeInBytes const): (WebCore::DisplayList::ItemBuffer::isEmpty const): (WebCore::DisplayList::ItemBuffer::append): (WebCore::DisplayList::ItemBuffer::setClient): (WebCore::DisplayList::ItemBuffer::readOnlyBuffers const): (WebCore::DisplayList::ItemBuffer::uncheckedAppend): * platform/graphics/displaylists/DisplayListItems.cpp: The changes in this file make up most of the code churn in this patch, but the changes are mostly mechanical. In summary, this patch: - Add static constexprs for the `ItemType` of each display list item class, as well as whether or not each class is inline, and also whether or not each class is a drawing item. - Remove `encode` and `decode` methods from inline item classes. - Remove all overridden methods; each class now implements individual methods to `apply`, compute `globalBounds` (if applicable), and compute `localBounds` (again, if applicable). - Adjusts textstream dumping helpers, so that they no longer dump as a `DrawingItem` before dumping each member. (WebCore::DisplayList::SetInlineFillGradient::SetInlineFillGradient): (WebCore::DisplayList::SetState::SetState): (WebCore::DisplayList::DrawGlyphs::DrawGlyphs): (WebCore::DisplayList::DrawGlyphs::generateGlyphBuffer const): (WebCore::DisplayList::DrawGlyphs::apply const): (WebCore::DisplayList::operator<<): (WebCore::DisplayList::DrawNativeImage::DrawNativeImage): (WebCore::DisplayList::DrawPattern::DrawPattern): (WebCore::DisplayList::DrawLinesForText::DrawLinesForText): (WebCore::DisplayList::DrawFocusRingRects::DrawFocusRingRects): (WebCore::DisplayList::FillRectWithGradient::FillRectWithGradient): (WebCore::DisplayList::PutImageData::PutImageData): (WebCore::DisplayList::PaintFrameForMedia::PaintFrameForMedia): (WebCore::DisplayList::Item::Item): Deleted. (WebCore::DisplayList::Item::sizeInBytes): Deleted. (WebCore::DisplayList::DrawingItem::DrawingItem): Deleted. (WebCore::DisplayList::Save::Save): Deleted. (WebCore::DisplayList::Restore::Restore): Deleted. (WebCore::DisplayList::Translate::Translate): Deleted. (WebCore::DisplayList::Rotate::Rotate): Deleted. (WebCore::DisplayList::Scale::Scale): Deleted. (WebCore::DisplayList::SetCTM::SetCTM): Deleted. (WebCore::DisplayList::ConcatenateCTM::ConcatenateCTM): Deleted. (WebCore::DisplayList::SetInlineFillGradient::create): Deleted. (WebCore::DisplayList::SetInlineFillColor::create): Deleted. (WebCore::DisplayList::SetInlineStrokeColor::create): Deleted. (WebCore::DisplayList::SetStrokeThickness::create): Deleted. (WebCore::DisplayList::SetLineCap::SetLineCap): Deleted. (WebCore::DisplayList::SetLineDash::SetLineDash): Deleted. (WebCore::DisplayList::SetLineJoin::SetLineJoin): Deleted. (WebCore::DisplayList::SetMiterLimit::SetMiterLimit): Deleted. (WebCore::DisplayList::ClearShadow::ClearShadow): Deleted. (WebCore::DisplayList::Clip::Clip): Deleted. (WebCore::DisplayList::ClipOut::ClipOut): Deleted. (WebCore::DisplayList::ClipOutToPath::ClipOutToPath): Deleted. (WebCore::DisplayList::ClipPath::ClipPath): Deleted. (WebCore::DisplayList::ClipToDrawingCommands::ClipToDrawingCommands): Deleted. (WebCore::DisplayList::DrawGlyphs::localBounds const): Deleted. (WebCore::DisplayList::DrawImage::DrawImage): Deleted. (WebCore::DisplayList::DrawTiledImage::DrawTiledImage): Deleted. (WebCore::DisplayList::DrawTiledScaledImage::DrawTiledScaledImage): Deleted. (WebCore::DisplayList::DrawImageBuffer::DrawImageBuffer): Deleted. (WebCore::DisplayList::DrawRect::DrawRect): Deleted. (WebCore::DisplayList::DrawLine::DrawLine): Deleted. (WebCore::DisplayList::DrawDotsForDocumentMarker::DrawDotsForDocumentMarker): Deleted. (WebCore::DisplayList::DrawEllipse::DrawEllipse): Deleted. (WebCore::DisplayList::DrawPath::DrawPath): Deleted. (WebCore::DisplayList::DrawFocusRingPath::DrawFocusRingPath): Deleted. (WebCore::DisplayList::FillRect::FillRect): Deleted. (WebCore::DisplayList::FillRectWithColor::FillRectWithColor): Deleted. (WebCore::DisplayList::FillCompositedRect::FillCompositedRect): Deleted. (WebCore::DisplayList::FillRoundedRect::FillRoundedRect): Deleted. (WebCore::DisplayList::FillRectWithRoundedHole::FillRectWithRoundedHole): Deleted. (WebCore::DisplayList::FillInlinePath::FillInlinePath): Deleted. (WebCore::DisplayList::FillPath::FillPath): Deleted. (WebCore::DisplayList::FillEllipse::FillEllipse): Deleted. (WebCore::DisplayList::PaintFrameForMedia::create): Deleted. (WebCore::DisplayList::StrokeRect::StrokeRect): Deleted. (WebCore::DisplayList::StrokeEllipse::StrokeEllipse): Deleted. (WebCore::DisplayList::StrokeInlinePath::StrokeInlinePath): Deleted. (WebCore::DisplayList::StrokePath::StrokePath): Deleted. (WebCore::DisplayList::ClearRect::ClearRect): Deleted. (WebCore::DisplayList::BeginTransparencyLayer::BeginTransparencyLayer): Deleted. (WebCore::DisplayList::EndTransparencyLayer::EndTransparencyLayer): Deleted. (WebCore::DisplayList::ApplyStrokePattern::ApplyStrokePattern): Deleted. (WebCore::DisplayList::ApplyFillPattern::ApplyFillPattern): Deleted. (WebCore::DisplayList::ApplyDeviceScaleFactor::ApplyDeviceScaleFactor): Deleted. * platform/graphics/displaylists/DisplayListItems.h: (WebCore::DisplayList::Save::localBounds const): (WebCore::DisplayList::Save::globalBounds const): (WebCore::DisplayList::Restore::localBounds const): (WebCore::DisplayList::Restore::globalBounds const): (WebCore::DisplayList::Translate::Translate): (WebCore::DisplayList::Translate::localBounds const): (WebCore::DisplayList::Translate::globalBounds const): (WebCore::DisplayList::Rotate::Rotate): (WebCore::DisplayList::Rotate::localBounds const): (WebCore::DisplayList::Rotate::globalBounds const): (WebCore::DisplayList::Scale::Scale): (WebCore::DisplayList::Scale::localBounds const): (WebCore::DisplayList::Scale::globalBounds const): (WebCore::DisplayList::SetCTM::SetCTM): (WebCore::DisplayList::SetCTM::localBounds const): (WebCore::DisplayList::SetCTM::globalBounds const): (WebCore::DisplayList::ConcatenateCTM::ConcatenateCTM): (WebCore::DisplayList::ConcatenateCTM::localBounds const): (WebCore::DisplayList::ConcatenateCTM::globalBounds const): (WebCore::DisplayList::SetInlineFillGradient::localBounds const): (WebCore::DisplayList::SetInlineFillGradient::globalBounds const): (WebCore::DisplayList::SetInlineFillColor::SetInlineFillColor): (WebCore::DisplayList::SetInlineFillColor::color const): (WebCore::DisplayList::SetInlineFillColor::localBounds const): (WebCore::DisplayList::SetInlineFillColor::globalBounds const): (WebCore::DisplayList::SetInlineStrokeColor::SetInlineStrokeColor): (WebCore::DisplayList::SetInlineStrokeColor::color const): (WebCore::DisplayList::SetInlineStrokeColor::localBounds const): (WebCore::DisplayList::SetInlineStrokeColor::globalBounds const): (WebCore::DisplayList::SetStrokeThickness::SetStrokeThickness): (WebCore::DisplayList::SetStrokeThickness::thickness const): (WebCore::DisplayList::SetStrokeThickness::localBounds const): (WebCore::DisplayList::SetStrokeThickness::globalBounds const): (WebCore::DisplayList::SetState::localBounds const): (WebCore::DisplayList::SetState::globalBounds const): (WebCore::DisplayList::SetState::decode): (WebCore::DisplayList::SetLineCap::SetLineCap): (WebCore::DisplayList::SetLineCap::localBounds const): (WebCore::DisplayList::SetLineCap::globalBounds const): (WebCore::DisplayList::SetLineDash::SetLineDash): (WebCore::DisplayList::SetLineDash::localBounds const): (WebCore::DisplayList::SetLineDash::globalBounds const): (WebCore::DisplayList::SetLineDash::decode): (WebCore::DisplayList::SetLineJoin::SetLineJoin): (WebCore::DisplayList::SetLineJoin::localBounds const): (WebCore::DisplayList::SetLineJoin::globalBounds const): (WebCore::DisplayList::SetMiterLimit::SetMiterLimit): (WebCore::DisplayList::SetMiterLimit::localBounds const): (WebCore::DisplayList::SetMiterLimit::globalBounds const): (WebCore::DisplayList::ClearShadow::localBounds const): (WebCore::DisplayList::ClearShadow::globalBounds const): (WebCore::DisplayList::Clip::Clip): (WebCore::DisplayList::Clip::rect const): (WebCore::DisplayList::Clip::localBounds const): (WebCore::DisplayList::Clip::globalBounds const): (WebCore::DisplayList::ClipOut::ClipOut): (WebCore::DisplayList::ClipOut::rect const): (WebCore::DisplayList::ClipOut::localBounds const): (WebCore::DisplayList::ClipOut::globalBounds const): (WebCore::DisplayList::ClipOutToPath::ClipOutToPath): (WebCore::DisplayList::ClipOutToPath::localBounds const): (WebCore::DisplayList::ClipOutToPath::globalBounds const): (WebCore::DisplayList::ClipOutToPath::decode): (WebCore::DisplayList::ClipPath::ClipPath): (WebCore::DisplayList::ClipPath::localBounds const): (WebCore::DisplayList::ClipPath::globalBounds const): (WebCore::DisplayList::ClipPath::decode): (WebCore::DisplayList::ClipToDrawingCommands::ClipToDrawingCommands): (WebCore::DisplayList::ClipToDrawingCommands::localBounds const): (WebCore::DisplayList::ClipToDrawingCommands::globalBounds const): (WebCore::DisplayList::ClipToDrawingCommands::encode const): (WebCore::DisplayList::ClipToDrawingCommands::decode): (WebCore::DisplayList::DrawGlyphs::globalBounds const): (WebCore::DisplayList::DrawGlyphs::localBounds const): (WebCore::DisplayList::DrawGlyphs::encode const): (WebCore::DisplayList::DrawGlyphs::decode): (WebCore::DisplayList::DrawImage::DrawImage): (WebCore::DisplayList::DrawImage::globalBounds const): (WebCore::DisplayList::DrawImage::localBounds const): (WebCore::DisplayList::DrawImage::decode): (WebCore::DisplayList::DrawTiledImage::DrawTiledImage): (WebCore::DisplayList::DrawTiledImage::globalBounds const): (WebCore::DisplayList::DrawTiledImage::localBounds const): (WebCore::DisplayList::DrawTiledImage::decode): (WebCore::DisplayList::DrawTiledScaledImage::DrawTiledScaledImage): (WebCore::DisplayList::DrawTiledScaledImage::globalBounds const): (WebCore::DisplayList::DrawTiledScaledImage::localBounds const): (WebCore::DisplayList::DrawTiledScaledImage::decode): (WebCore::DisplayList::DrawImageBuffer::DrawImageBuffer): (WebCore::DisplayList::DrawImageBuffer::globalBounds const): (WebCore::DisplayList::DrawImageBuffer::localBounds const): (WebCore::DisplayList::DrawImageBuffer::decode): (WebCore::DisplayList::DrawNativeImage::source const): (WebCore::DisplayList::DrawNativeImage::destinationRect const): (WebCore::DisplayList::DrawNativeImage::globalBounds const): (WebCore::DisplayList::DrawNativeImage::localBounds const): (WebCore::DisplayList::DrawNativeImage::decode): (WebCore::DisplayList::DrawPattern::DrawPattern): (WebCore::DisplayList::DrawPattern::globalBounds const): (WebCore::DisplayList::DrawPattern::localBounds const): (WebCore::DisplayList::DrawPattern::decode): (WebCore::DisplayList::BeginTransparencyLayer::BeginTransparencyLayer): (WebCore::DisplayList::BeginTransparencyLayer::localBounds const): (WebCore::DisplayList::BeginTransparencyLayer::globalBounds const): (WebCore::DisplayList::EndTransparencyLayer::localBounds const): (WebCore::DisplayList::EndTransparencyLayer::globalBounds const): (WebCore::DisplayList::DrawRect::DrawRect): (WebCore::DisplayList::DrawRect::globalBounds const): (WebCore::DisplayList::DrawRect::localBounds const): (WebCore::DisplayList::DrawLine::DrawLine): (WebCore::DisplayList::DrawLine::globalBounds const): (WebCore::DisplayList::DrawLinesForText::globalBounds const): (WebCore::DisplayList::DrawLinesForText::decode): (WebCore::DisplayList::DrawDotsForDocumentMarker::DrawDotsForDocumentMarker): (WebCore::DisplayList::DrawDotsForDocumentMarker::globalBounds const): (WebCore::DisplayList::DrawEllipse::DrawEllipse): (WebCore::DisplayList::DrawEllipse::rect const): (WebCore::DisplayList::DrawEllipse::globalBounds const): (WebCore::DisplayList::DrawEllipse::localBounds const): (WebCore::DisplayList::DrawPath::DrawPath): (WebCore::DisplayList::DrawPath::globalBounds const): (WebCore::DisplayList::DrawPath::localBounds const): (WebCore::DisplayList::DrawPath::decode): (WebCore::DisplayList::DrawFocusRingPath::DrawFocusRingPath): (WebCore::DisplayList::DrawFocusRingPath::globalBounds const): (WebCore::DisplayList::DrawFocusRingPath::decode): (WebCore::DisplayList::DrawFocusRingRects::globalBounds const): (WebCore::DisplayList::DrawFocusRingRects::decode): (WebCore::DisplayList::FillRect::FillRect): (WebCore::DisplayList::FillRect::rect const): (WebCore::DisplayList::FillRect::globalBounds const): (WebCore::DisplayList::FillRect::localBounds const): (WebCore::DisplayList::FillRectWithColor::FillRectWithColor): (WebCore::DisplayList::FillRectWithColor::globalBounds const): (WebCore::DisplayList::FillRectWithColor::localBounds const): (WebCore::DisplayList::FillRectWithColor::decode): (WebCore::DisplayList::FillRectWithGradient::rect const): (WebCore::DisplayList::FillRectWithGradient::gradient const): (WebCore::DisplayList::FillRectWithGradient::globalBounds const): (WebCore::DisplayList::FillRectWithGradient::localBounds const): (WebCore::DisplayList::FillRectWithGradient::decode): (WebCore::DisplayList::FillCompositedRect::FillCompositedRect): (WebCore::DisplayList::FillCompositedRect::globalBounds const): (WebCore::DisplayList::FillCompositedRect::localBounds const): (WebCore::DisplayList::FillCompositedRect::decode): (WebCore::DisplayList::FillRoundedRect::FillRoundedRect): (WebCore::DisplayList::FillRoundedRect::globalBounds const): (WebCore::DisplayList::FillRoundedRect::localBounds const): (WebCore::DisplayList::FillRoundedRect::decode): (WebCore::DisplayList::FillRectWithRoundedHole::FillRectWithRoundedHole): (WebCore::DisplayList::FillRectWithRoundedHole::globalBounds const): (WebCore::DisplayList::FillRectWithRoundedHole::localBounds const): (WebCore::DisplayList::FillRectWithRoundedHole::decode): (WebCore::DisplayList::FillInlinePath::FillInlinePath): (WebCore::DisplayList::FillInlinePath::globalBounds const): (WebCore::DisplayList::FillInlinePath::localBounds const): (WebCore::DisplayList::FillPath::FillPath): (WebCore::DisplayList::FillPath::globalBounds const): (WebCore::DisplayList::FillPath::localBounds const): (WebCore::DisplayList::FillPath::decode): (WebCore::DisplayList::FillEllipse::FillEllipse): (WebCore::DisplayList::FillEllipse::globalBounds const): (WebCore::DisplayList::FillEllipse::localBounds const): (WebCore::DisplayList::PutImageData::imageData const): (WebCore::DisplayList::PutImageData::localBounds const): (WebCore::DisplayList::PutImageData::globalBounds const): (WebCore::DisplayList::PutImageData::encode const): (WebCore::DisplayList::PutImageData::decode): (WebCore::DisplayList::PaintFrameForMedia::localBounds const): (WebCore::DisplayList::PaintFrameForMedia::globalBounds const): (WebCore::DisplayList::StrokeRect::StrokeRect): (WebCore::DisplayList::StrokeRect::globalBounds const): (WebCore::DisplayList::StrokeInlinePath::StrokeInlinePath): (WebCore::DisplayList::StrokeInlinePath::globalBounds const): (WebCore::DisplayList::StrokePath::StrokePath): (WebCore::DisplayList::StrokePath::globalBounds const): (WebCore::DisplayList::StrokePath::decode): (WebCore::DisplayList::StrokeEllipse::StrokeEllipse): (WebCore::DisplayList::StrokeEllipse::rect const): (WebCore::DisplayList::StrokeEllipse::globalBounds const): (WebCore::DisplayList::ClearRect::ClearRect): (WebCore::DisplayList::ClearRect::rect const): (WebCore::DisplayList::ClearRect::globalBounds const): (WebCore::DisplayList::ClearRect::localBounds const): (WebCore::DisplayList::ApplyStrokePattern::localBounds const): (WebCore::DisplayList::ApplyStrokePattern::globalBounds const): (WebCore::DisplayList::ApplyFillPattern::localBounds const): (WebCore::DisplayList::ApplyFillPattern::globalBounds const): (WebCore::DisplayList::ApplyDeviceScaleFactor::ApplyDeviceScaleFactor): (WebCore::DisplayList::ApplyDeviceScaleFactor::localBounds const): (WebCore::DisplayList::ApplyDeviceScaleFactor::globalBounds const): (WebCore::DisplayList::DrawingItem::setExtent): Deleted. (WebCore::DisplayList::DrawingItem::extent const): Deleted. (WebCore::DisplayList::DrawingItem::extentKnown const): Deleted. (WebCore::DisplayList::DrawingItem::localBounds const): Deleted. (WebCore::DisplayList::DrawingItem::globalBounds const): Deleted. (WebCore::DisplayList::Save::create): Deleted. (WebCore::DisplayList::Save::encode const): Deleted. (WebCore::DisplayList::Save::decode): Deleted. (WebCore::DisplayList::Restore::create): Deleted. (WebCore::DisplayList::Restore::encode const): Deleted. (WebCore::DisplayList::Restore::decode): Deleted. (WebCore::DisplayList::Translate::create): Deleted. (WebCore::DisplayList::Translate::encode const): Deleted. (WebCore::DisplayList::Translate::decode): Deleted. (WebCore::DisplayList::Rotate::create): Deleted. (WebCore::DisplayList::Rotate::encode const): Deleted. (WebCore::DisplayList::Rotate::decode): Deleted. (WebCore::DisplayList::Scale::create): Deleted. (WebCore::DisplayList::Scale::encode const): Deleted. (WebCore::DisplayList::Scale::decode): Deleted. (WebCore::DisplayList::SetCTM::create): Deleted. (WebCore::DisplayList::SetCTM::encode const): Deleted. (WebCore::DisplayList::SetCTM::decode): Deleted. (WebCore::DisplayList::ConcatenateCTM::create): Deleted. (WebCore::DisplayList::ConcatenateCTM::encode const): Deleted. (WebCore::DisplayList::ConcatenateCTM::decode): Deleted. (WebCore::DisplayList::SetInlineFillGradient::create): Deleted. (WebCore::DisplayList::SetInlineFillGradient::encode const): Deleted. (WebCore::DisplayList::SetInlineFillGradient::decode): Deleted. (WebCore::DisplayList::SetInlineFillColor::encode const): Deleted. (WebCore::DisplayList::SetInlineFillColor::decode): Deleted. (WebCore::DisplayList::SetInlineStrokeColor::encode const): Deleted. (WebCore::DisplayList::SetInlineStrokeColor::decode): Deleted. (WebCore::DisplayList::SetStrokeThickness::encode const): Deleted. (WebCore::DisplayList::SetStrokeThickness::decode): Deleted. (WebCore::DisplayList::SetState::create): Deleted. (WebCore::DisplayList::SetLineCap::create): Deleted. (WebCore::DisplayList::SetLineCap::encode const): Deleted. (WebCore::DisplayList::SetLineCap::decode): Deleted. (WebCore::DisplayList::SetLineDash::create): Deleted. (WebCore::DisplayList::SetLineJoin::create): Deleted. (WebCore::DisplayList::SetLineJoin::encode const): Deleted. (WebCore::DisplayList::SetLineJoin::decode): Deleted. (WebCore::DisplayList::SetMiterLimit::create): Deleted. (WebCore::DisplayList::SetMiterLimit::encode const): Deleted. (WebCore::DisplayList::SetMiterLimit::decode): Deleted. (WebCore::DisplayList::ClearShadow::create): Deleted. (WebCore::DisplayList::ClearShadow::encode const): Deleted. (WebCore::DisplayList::ClearShadow::decode): Deleted. (WebCore::DisplayList::Clip::create): Deleted. (WebCore::DisplayList::Clip::encode const): Deleted. (WebCore::DisplayList::Clip::decode): Deleted. (WebCore::DisplayList::ClipOut::create): Deleted. (WebCore::DisplayList::ClipOut::encode const): Deleted. (WebCore::DisplayList::ClipOut::decode): Deleted. (WebCore::DisplayList::ClipOutToPath::create): Deleted. (WebCore::DisplayList::ClipPath::create): Deleted. (WebCore::DisplayList::ClipToDrawingCommands::create): Deleted. (WebCore::DisplayList::DrawGlyphs::create): Deleted. (WebCore::DisplayList::DrawImage::create): Deleted. (WebCore::DisplayList::DrawTiledImage::create): Deleted. (WebCore::DisplayList::DrawTiledScaledImage::create): Deleted. (WebCore::DisplayList::DrawImageBuffer::create): Deleted. (WebCore::DisplayList::DrawNativeImage::create): Deleted. (WebCore::DisplayList::DrawPattern::create): Deleted. (WebCore::DisplayList::BeginTransparencyLayer::create): Deleted. (WebCore::DisplayList::BeginTransparencyLayer::encode const): Deleted. (WebCore::DisplayList::BeginTransparencyLayer::decode): Deleted. (WebCore::DisplayList::EndTransparencyLayer::create): Deleted. (WebCore::DisplayList::EndTransparencyLayer::encode const): Deleted. (WebCore::DisplayList::EndTransparencyLayer::decode): Deleted. (WebCore::DisplayList::DrawRect::create): Deleted. (WebCore::DisplayList::DrawRect::encode const): Deleted. (WebCore::DisplayList::DrawRect::decode): Deleted. (WebCore::DisplayList::DrawLine::create): Deleted. (WebCore::DisplayList::DrawLine::encode const): Deleted. (WebCore::DisplayList::DrawLine::decode): Deleted. (WebCore::DisplayList::DrawLinesForText::create): Deleted. (WebCore::DisplayList::DrawDotsForDocumentMarker::create): Deleted. (WebCore::DisplayList::DrawDotsForDocumentMarker::encode const): Deleted. (WebCore::DisplayList::DrawDotsForDocumentMarker::decode): Deleted. (WebCore::DisplayList::DrawEllipse::create): Deleted. (WebCore::DisplayList::DrawEllipse::encode const): Deleted. (WebCore::DisplayList::DrawEllipse::decode): Deleted. (WebCore::DisplayList::DrawPath::create): Deleted. (WebCore::DisplayList::DrawFocusRingPath::create): Deleted. (WebCore::DisplayList::DrawFocusRingRects::create): Deleted. (WebCore::DisplayList::FillRect::create): Deleted. (WebCore::DisplayList::FillRect::encode const): Deleted. (WebCore::DisplayList::FillRect::decode): Deleted. (WebCore::DisplayList::FillRectWithColor::create): Deleted. (WebCore::DisplayList::FillRectWithGradient::create): Deleted. (WebCore::DisplayList::FillCompositedRect::create): Deleted. (WebCore::DisplayList::FillRoundedRect::create): Deleted. (WebCore::DisplayList::FillRectWithRoundedHole::create): Deleted. (WebCore::DisplayList::FillInlinePath::create): Deleted. (WebCore::DisplayList::FillInlinePath::encode const): Deleted. (WebCore::DisplayList::FillInlinePath::decode): Deleted. (WebCore::DisplayList::FillPath::create): Deleted. (WebCore::DisplayList::FillEllipse::create): Deleted. (WebCore::DisplayList::FillEllipse::encode const): Deleted. (WebCore::DisplayList::FillEllipse::decode): Deleted. (WebCore::DisplayList::PutImageData::create): Deleted. (WebCore::DisplayList::PaintFrameForMedia::encode const): Deleted. (WebCore::DisplayList::PaintFrameForMedia::decode): Deleted. (WebCore::DisplayList::StrokeRect::create): Deleted. (WebCore::DisplayList::StrokeRect::encode const): Deleted. (WebCore::DisplayList::StrokeRect::decode): Deleted. (WebCore::DisplayList::StrokeInlinePath::create): Deleted. (WebCore::DisplayList::StrokeInlinePath::encode const): Deleted. (WebCore::DisplayList::StrokeInlinePath::decode): Deleted. (WebCore::DisplayList::StrokePath::create): Deleted. (WebCore::DisplayList::StrokeEllipse::create): Deleted. (WebCore::DisplayList::StrokeEllipse::encode const): Deleted. (WebCore::DisplayList::StrokeEllipse::decode): Deleted. (WebCore::DisplayList::ClearRect::create): Deleted. (WebCore::DisplayList::ClearRect::encode const): Deleted. (WebCore::DisplayList::ClearRect::decode): Deleted. (WebCore::DisplayList::ApplyStrokePattern::create): Deleted. (WebCore::DisplayList::ApplyStrokePattern::encode const): Deleted. (WebCore::DisplayList::ApplyStrokePattern::decode): Deleted. (WebCore::DisplayList::ApplyFillPattern::create): Deleted. (WebCore::DisplayList::ApplyFillPattern::encode const): Deleted. (WebCore::DisplayList::ApplyFillPattern::decode): Deleted. (WebCore::DisplayList::ApplyDeviceScaleFactor::create): Deleted. (WebCore::DisplayList::ApplyDeviceScaleFactor::encode const): Deleted. (WebCore::DisplayList::ApplyDeviceScaleFactor::decode): Deleted. (WebCore::DisplayList::Item::encode const): Deleted. (WebCore::DisplayList::Item::decode): Deleted. Delete the generic `Item::encode` and `Item::decode` methods, since only out-of-line display list items have encode and decode functions now. * platform/graphics/displaylists/DisplayListRecorder.cpp: (WebCore::DisplayList::Recorder::putImageData): (WebCore::DisplayList::Recorder::appendStateChangeItem): (WebCore::DisplayList::Recorder::clearShadow): (WebCore::DisplayList::Recorder::setLineCap): (WebCore::DisplayList::Recorder::setLineDash): (WebCore::DisplayList::Recorder::setLineJoin): (WebCore::DisplayList::Recorder::setMiterLimit): (WebCore::DisplayList::Recorder::drawImage): (WebCore::DisplayList::Recorder::drawTiledImage): (WebCore::DisplayList::Recorder::drawImageBuffer): (WebCore::DisplayList::Recorder::drawNativeImage): (WebCore::DisplayList::Recorder::drawPattern): (WebCore::DisplayList::Recorder::save): (WebCore::DisplayList::Recorder::restore): (WebCore::DisplayList::Recorder::translate): (WebCore::DisplayList::Recorder::rotate): (WebCore::DisplayList::Recorder::scale): (WebCore::DisplayList::Recorder::concatCTM): (WebCore::DisplayList::Recorder::setCTM): (WebCore::DisplayList::Recorder::beginTransparencyLayer): (WebCore::DisplayList::Recorder::endTransparencyLayer): (WebCore::DisplayList::Recorder::drawRect): (WebCore::DisplayList::Recorder::drawLine): (WebCore::DisplayList::Recorder::drawLinesForText): (WebCore::DisplayList::Recorder::drawDotsForDocumentMarker): (WebCore::DisplayList::Recorder::drawEllipse): (WebCore::DisplayList::Recorder::drawPath): (WebCore::DisplayList::Recorder::drawFocusRing): (WebCore::DisplayList::Recorder::fillRect): (WebCore::DisplayList::Recorder::fillRoundedRect): (WebCore::DisplayList::Recorder::fillRectWithRoundedHole): (WebCore::DisplayList::Recorder::fillPath): (WebCore::DisplayList::Recorder::fillEllipse): (WebCore::DisplayList::Recorder::strokeRect): (WebCore::DisplayList::Recorder::strokePath): (WebCore::DisplayList::Recorder::strokeEllipse): (WebCore::DisplayList::Recorder::clearRect): (WebCore::DisplayList::Recorder::applyStrokePattern): (WebCore::DisplayList::Recorder::applyFillPattern): (WebCore::DisplayList::Recorder::clip): (WebCore::DisplayList::Recorder::clipOut): (WebCore::DisplayList::Recorder::clipPath): (WebCore::DisplayList::Recorder::clipToDrawingCommands): (WebCore::DisplayList::Recorder::paintFrameForMedia): (WebCore::DisplayList::Recorder::applyDeviceScaleFactor): Change these methods that append display list items en masse, such that they go from this: `m_displayList.append(Foo::create(arg1, arg2, arg3));` ...to this: `m_displayList.append<Foo>(arg1, arg2, arg3);` (WebCore::DisplayList::Recorder::extentFromLocalBounds const): (WebCore::DisplayList::Recorder::appendItemAndUpdateExtent): Deleted. (WebCore::DisplayList::Recorder::appendItem): Deleted. (WebCore::DisplayList::Recorder::updateItemExtent const): Deleted. Extents are now automatically updated (unless otherwise specified) for any drawing items that are appended. * platform/graphics/displaylists/DisplayListRecorder.h: (WebCore::DisplayList::Recorder::append): * platform/graphics/displaylists/DisplayListReplayer.cpp: (WebCore::DisplayList::Replayer::replay): * platform/graphics/displaylists/DisplayListReplayer.h: (WebCore::DisplayList::Replayer::Delegate::apply): Source/WebKit: Adjust for changes to display lists and display list items in WebCore (see Source/WebCore/ChangeLog for more information). In particular, we implement the reading and writing client hooks consulted by ItemBuffer, and we also add a temporary mechanism that allows RemoteRenderingBackendProxy (in the web process) to send display list item data through shared memory to the RemoteRenderingBackend (in the GPU process). This temporary mechanism does not attempt to make any reading or writing in shared memory concurrent between the GPU and web processes, and exists only to make sure that rendering with the GPU process still works using these new display list items. In the next patch, I will add a simple concurrent reader/writer model for display list processing between the web and GPU processes, and (in doing so) revert most of the changes in `RemoteRenderingBackend` and `RemoteRenderingBackendProxy` below. See comments below for more detail. * GPUProcess/graphics/RemoteImageBuffer.h: (WebKit::RemoteImageBuffer::decodeAndCreate): * GPUProcess/graphics/RemoteRenderingBackend.cpp: (WebKit::RemoteRenderingBackend::applyResourceItem): (WebKit::RemoteRenderingBackend::applyMediaItem): Refactor these to take `WebCore::DisplayList::ItemHandle`. (WebKit::RemoteRenderingBackend::applyDisplayList): (WebKit::RemoteRenderingBackend::flushDisplayList): (WebKit::RemoteRenderingBackend::flushDisplayListAndCommit): (WebKit::RemoteRenderingBackend::didCreateSharedItemData): * GPUProcess/graphics/RemoteRenderingBackend.h: * GPUProcess/graphics/RemoteRenderingBackend.messages.in: * Scripts/webkit/messages.py: * Shared/SharedDisplayListHandle.cpp: Added. (WebKit::SharedDisplayListHandle::SharedDisplayListHandle): (WebKit::SharedDisplayListHandle::createDisplayList const): * Shared/SharedDisplayListHandle.h: Added. Add a WebKit2 helper class that represents display list data in shared memory that is propagated from the web process to the GPU process. In the next patch, this class will be rewritten to support concurrent display list reading and writing, with specialized subclasses in service of both the reader (i.e. the GPU process) and the writer (i.e. the web process). (WebKit::SharedDisplayListHandle::SharedDisplayListHandle): (WebKit::SharedDisplayListHandle::encode const): (WebKit::SharedDisplayListHandle::decode): * Sources.txt: * WebKit.xcodeproj/project.pbxproj: * WebProcess/GPU/graphics/RemoteImageBufferProxy.h: (WebKit::RemoteImageBufferProxy::RemoteImageBufferProxy): * WebProcess/GPU/graphics/RemoteRenderingBackendProxy.cpp: (WebKit::RemoteRenderingBackendProxy::flushDisplayList): (WebKit::RemoteRenderingBackendProxy::flushDisplayListAndCommit): (WebKit::RemoteRenderingBackendProxy::createItemBuffer): * WebProcess/GPU/graphics/RemoteRenderingBackendProxy.h: * WebProcess/GPU/graphics/RemoteRenderingBackendProxy.messages.in: * WebProcess/GPU/graphics/RemoteResourceCacheProxy.cpp: LayoutTests: Rebaseline several existing (non-GPU-process) display list tests to account for a slight tweak in the format in which display lists are dumped as text. More specifically, drawing item extents are now dumped after each drawing item, rather than before. * displaylists/canvas-display-list-expected.txt: * displaylists/extent-includes-shadow-expected.txt: * displaylists/extent-includes-transforms-expected.txt: * displaylists/layer-dispay-list-expected.txt: * displaylists/replay-skip-clipped-rect-expected.txt: Canonical link: https://commits.webkit.org/231320@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@269525 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-11-06 18:54:52 +00:00
(rect at (30,30) size 55x50) extent at (30,120) size 55x50)