[webkit-changes] [WebKit/WebKit] c708ae: [GPU Process] Allow replaying back a whole Display...

Said Abou-Hallawa noreply at github.com
Mon Nov 13 21:16:52 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: c708ae60f9fa9abf1d383d35fccb149786f50a54
      https://github.com/WebKit/WebKit/commit/c708ae60f9fa9abf1d383d35fccb149786f50a54
  Author: Said Abou-Hallawa <said at apple.com>
  Date:   2023-11-13 (Mon, 13 Nov 2023)

  Changed paths:
    M Source/WebCore/platform/graphics/GraphicsContext.cpp
    M Source/WebCore/platform/graphics/GraphicsContext.h
    M Source/WebCore/platform/graphics/displaylists/DisplayListItem.cpp
    M Source/WebCore/platform/graphics/displaylists/DisplayListItem.h
    M Source/WebCore/platform/graphics/displaylists/DisplayListItems.cpp
    M Source/WebCore/platform/graphics/displaylists/DisplayListItems.h
    M Source/WebCore/platform/graphics/displaylists/DisplayListRecorder.cpp
    M Source/WebCore/platform/graphics/displaylists/DisplayListRecorder.h
    M Source/WebCore/platform/graphics/displaylists/DisplayListRecorderImpl.cpp
    M Source/WebCore/platform/graphics/displaylists/DisplayListRecorderImpl.h
    M Source/WebCore/platform/graphics/displaylists/DisplayListReplayer.h
    M Source/WebCore/rendering/TextPainter.cpp
    M Source/WebKit/GPUProcess/graphics/RemoteDisplayListRecorder.cpp
    M Source/WebKit/GPUProcess/graphics/RemoteDisplayListRecorder.h
    M Source/WebKit/GPUProcess/graphics/RemoteDisplayListRecorder.messages.in
    M Source/WebKit/GPUProcess/graphics/RemoteResourceCache.h
    M Source/WebKit/Shared/DisplayListArgumentCoders.serialization.in
    M Source/WebKit/Shared/WebCoreArgumentCoders.serialization.in
    M Source/WebKit/WebProcess/GPU/graphics/RemoteDisplayListRecorderProxy.cpp
    M Source/WebKit/WebProcess/GPU/graphics/RemoteDisplayListRecorderProxy.h

  Log Message:
  -----------
  [GPU Process] Allow replaying back a whole DisplayList in GPU Process
https://bugs.webkit.org/show_bug.cgi?id=260181
rdar://113878782

Reviewed by Cameron McCormack.

Add a new DisplayList item called DrawDisplayListItems. Add the needed functions
for recording it and replaying it back. The ResourceHeap will not be stored in
this item. Instead it will be passed as an extra argument to its apply() method.

Add the new method GraphicsContext::drawDisplayListItems() which draws a DisplayList
given ResourceHeap and a destination point.

In Recorder::drawDisplayListItems() record the use all the ResourceHeap resources
and then call recordDrawDisplayListItems().

In RecorderImpl::recordDrawDisplayListItems(), add the item DrawDisplayListItems
to the recording DisplayList.

In RemoteDisplayListRecorderProxy::recordDrawDisplayListItems(), send the message
RemoteDisplayListRecorder.DrawDisplayListItem to GPUProcess.

In RemoteDisplayListRecorder::drawDisplayListItems(), create a DrawDisplayListItems
item given the received DisplayList. Then call its apply() method given the
ResourceHeap of the RemoteResourceCache.

TextPainter will call GraphicsContext::drawDisplayListItems() instead of replaying
the cached DisplayList back.

All DisplayList items have to have ArgumentCoders because DrawDisplayListItems
includes a Vector of DisplayListItem which is a std::variant of all the items.

* Source/WebCore/platform/graphics/GraphicsContext.cpp:
(WebCore::GraphicsContext::drawDisplayListItems):
* Source/WebCore/platform/graphics/GraphicsContext.h:
* Source/WebCore/platform/graphics/displaylists/DisplayListItem.cpp:
(WebCore::DisplayList::applyItem):
* Source/WebCore/platform/graphics/displaylists/DisplayListItems.cpp:
(WebCore::DisplayList::DrawDisplayListItems::DrawDisplayListItems):
(WebCore::DisplayList::DrawDisplayListItems::apply const):
(WebCore::DisplayList::DrawDisplayListItems::dump const):
(WebCore::DisplayList::PaintFrameForMedia::PaintFrameForMedia):
* Source/WebCore/platform/graphics/displaylists/DisplayListItems.h:
(WebCore::DisplayList::DrawFilteredImageBuffer::filter const):
(WebCore::DisplayList::DrawDisplayListItems::items const):
(WebCore::DisplayList::DrawDisplayListItems::destination const):
(WebCore::DisplayList::DrawNativeImage::imageSize const):
(WebCore::DisplayList::DrawNativeImage::source const):
(WebCore::DisplayList::DrawNativeImage::options const):
(WebCore::DisplayList::DrawPattern::options const):
(WebCore::DisplayList::FillLine::line const):
(WebCore::DisplayList::FillArc::arc const):
(WebCore::DisplayList::FillQuadCurve::quadCurve const):
(WebCore::DisplayList::FillBezierCurve::bezierCurve const):
(WebCore::DisplayList::FillPathSegment::segment const):
(WebCore::DisplayList::PaintFrameForMedia::destination const):
(WebCore::DisplayList::StrokeArc::arc const):
(WebCore::DisplayList::StrokeQuadCurve::quadCurve const):
(WebCore::DisplayList::StrokeBezierCurve::bezierCurve const):
(WebCore::DisplayList::StrokePathSegment::segment const):
(WebCore::DisplayList::DrawControlPart::part const):
(WebCore::DisplayList::DrawControlPart::type const):
* Source/WebCore/platform/graphics/displaylists/DisplayListRecorder.cpp:
(WebCore::DisplayList::Recorder::drawDisplayListItems):
* Source/WebCore/platform/graphics/displaylists/DisplayListRecorder.h:
* Source/WebCore/platform/graphics/displaylists/DisplayListRecorderImpl.cpp:
(WebCore::DisplayList::RecorderImpl::recordDrawDisplayListItems):
(WebCore::DisplayList::RecorderImpl::recordPaintFrameForMedia):
* Source/WebCore/platform/graphics/displaylists/DisplayListRecorderImpl.h:
* Source/WebCore/platform/graphics/displaylists/DisplayListReplayer.h:
* Source/WebCore/rendering/TextPainter.cpp:
(WebCore::TextPainter::paintTextOrEmphasisMarks):
* Source/WebKit/GPUProcess/graphics/RemoteDisplayListRecorder.cpp:
(WebKit::RemoteDisplayListRecorder::drawDisplayListItems):
* Source/WebKit/GPUProcess/graphics/RemoteDisplayListRecorder.h:
* Source/WebKit/GPUProcess/graphics/RemoteDisplayListRecorder.messages.in:
* Source/WebKit/GPUProcess/graphics/RemoteResourceCache.h:
(WebKit::RemoteResourceCache::resourceHeap const):
* Source/WebKit/Shared/DisplayListArgumentCoders.serialization.in:
* Source/WebKit/WebProcess/GPU/graphics/RemoteDisplayListRecorderProxy.cpp:
(WebKit::RemoteDisplayListRecorderProxy::recordDrawDisplayListItems):
* Source/WebKit/WebProcess/GPU/graphics/RemoteDisplayListRecorderProxy.h:

Canonical link: https://commits.webkit.org/270688@main




More information about the webkit-changes mailing list