Branch: refs/heads/main Home: https://github.com/WebKit/WebKit Commit: 5910db50c2cdffce5ef0fe0cd12f5925029d0ec0 https://github.com/WebKit/WebKit/commit/5910db50c2cdffce5ef0fe0cd12f5925029d0ec0 Author: Kimmo Kinnunen <kkinnu...@apple.com> Date: 2024-10-10 (Thu, 10 Oct 2024)
Changed paths: 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/WebKit/Shared/DisplayListArgumentCoders.serialization.in M Source/WebKit/WebProcess/GPU/graphics/RemoteDisplayListRecorderProxy.cpp M Source/WebKit/WebProcess/GPU/graphics/RemoteDisplayListRecorderProxy.h Log Message: ----------- Remove excessive indirection with sending remote drawing commands (part 1) https://bugs.webkit.org/show_bug.cgi?id=279759 rdar://136070541 Reviewed by Simon Fraser. DisplayList::Recorder interface would cause overly many virtual function calls and would prevent backend-specific caching behavior. Consider callgraph for `context->save()`: Recorder::save() <vfunc> RemoteDisplayListRecorderProxy::recordSave() <vfunc> Instead, fix it in this patch to be: RemoteDisplayListRecorderProxy::recordSave() <vfunc> Recorder::updateStateForSave() <normal func> In future patches, this allows useResource calls to record and return backend command specific data without the need for this data to leak into the WebCore. For example, current identifiers should not be defined in WebCore at all, but they are, since useResource is there. In this part 1, change the commands that are the most straight-forward. * Source/WebCore/platform/graphics/displaylists/DisplayListItems.cpp: (WebCore::DisplayList::DrawLinesForText::DrawLinesForText): (WebCore::DisplayList::DrawLinesForText::apply const): (WebCore::DisplayList::DrawLinesForText::dump const): * Source/WebCore/platform/graphics/displaylists/DisplayListItems.h: (WebCore::DisplayList::DrawLinesForText::point const): (WebCore::DisplayList::DrawLinesForText::setBlockLocation): Deleted. (WebCore::DisplayList::DrawLinesForText::blockLocation const): Deleted. (WebCore::DisplayList::DrawLinesForText::localAnchor const): Deleted. * Source/WebCore/platform/graphics/displaylists/DisplayListRecorder.cpp: (WebCore::DisplayList::Recorder::updateStateForSave): (WebCore::DisplayList::Recorder::updateStateForRestore): (WebCore::DisplayList::Recorder::updateStateForTranslate): (WebCore::DisplayList::Recorder::updateStateForRotate): (WebCore::DisplayList::Recorder::updateStateForScale): (WebCore::DisplayList::Recorder::updateStateForConcatCTM): (WebCore::DisplayList::Recorder::updateStateForSetCTM): (WebCore::DisplayList::Recorder::updateStateForBeginTransparencyLayer): (WebCore::DisplayList::Recorder::updateStateForEndTransparencyLayer): (WebCore::DisplayList::Recorder::updateStateForResetClip): (WebCore::DisplayList::Recorder::updateStateForClip): (WebCore::DisplayList::Recorder::updateStateForClipRoundedRect): (WebCore::DisplayList::Recorder::updateStateForClipOut): (WebCore::DisplayList::Recorder::updateStateForClipOutRoundedRect): (WebCore::DisplayList::Recorder::updateStateForClipPath): (WebCore::DisplayList::Recorder::updateStateForApplyDeviceScaleFactor): (WebCore::DisplayList::Recorder::setLineCap): Deleted. (WebCore::DisplayList::Recorder::setLineDash): Deleted. (WebCore::DisplayList::Recorder::setLineJoin): Deleted. (WebCore::DisplayList::Recorder::setMiterLimit): Deleted. (WebCore::DisplayList::Recorder::save): Deleted. (WebCore::DisplayList::Recorder::restore): Deleted. (WebCore::DisplayList::Recorder::translate): Deleted. (WebCore::DisplayList::Recorder::rotate): Deleted. (WebCore::DisplayList::Recorder::scale): Deleted. (WebCore::DisplayList::Recorder::concatCTM): Deleted. (WebCore::DisplayList::Recorder::setCTM): Deleted. (WebCore::DisplayList::Recorder::beginTransparencyLayer): Deleted. (WebCore::DisplayList::Recorder::endTransparencyLayer): Deleted. (WebCore::DisplayList::Recorder::drawRect): Deleted. (WebCore::DisplayList::Recorder::drawLine): Deleted. (WebCore::DisplayList::Recorder::drawLinesForText): Deleted. (WebCore::DisplayList::Recorder::drawDotsForDocumentMarker): Deleted. (WebCore::DisplayList::Recorder::drawEllipse): Deleted. (WebCore::DisplayList::Recorder::drawPath): Deleted. (WebCore::DisplayList::Recorder::drawFocusRing): Deleted. (WebCore::DisplayList::Recorder::fillRect): Deleted. (WebCore::DisplayList::Recorder::fillRoundedRect): Deleted. (WebCore::DisplayList::Recorder::fillRectWithRoundedHole): Deleted. (WebCore::DisplayList::Recorder::fillEllipse): Deleted. (WebCore::DisplayList::Recorder::strokeRect): Deleted. (WebCore::DisplayList::Recorder::strokeEllipse): Deleted. (WebCore::DisplayList::Recorder::clearRect): Deleted. (WebCore::DisplayList::Recorder::applyStrokePattern): Deleted. (WebCore::DisplayList::Recorder::applyFillPattern): Deleted. (WebCore::DisplayList::Recorder::drawControlPart): Deleted. (WebCore::DisplayList::Recorder::resetClip): Deleted. (WebCore::DisplayList::Recorder::clip): Deleted. (WebCore::DisplayList::Recorder::clipRoundedRect): Deleted. (WebCore::DisplayList::Recorder::clipOut): Deleted. (WebCore::DisplayList::Recorder::clipOutRoundedRect): Deleted. (WebCore::DisplayList::Recorder::clipPath): Deleted. (WebCore::DisplayList::Recorder::drawVideoFrame): Deleted. (WebCore::DisplayList::Recorder::applyDeviceScaleFactor): Deleted. * Source/WebCore/platform/graphics/displaylists/DisplayListRecorder.h: (WebCore::DisplayList::Recorder::recordDrawPattern): * Source/WebCore/platform/graphics/displaylists/DisplayListRecorderImpl.cpp: (WebCore::DisplayList::RecorderImpl::save): (WebCore::DisplayList::RecorderImpl::restore): (WebCore::DisplayList::RecorderImpl::translate): (WebCore::DisplayList::RecorderImpl::rotate): (WebCore::DisplayList::RecorderImpl::scale): (WebCore::DisplayList::RecorderImpl::setCTM): (WebCore::DisplayList::RecorderImpl::concatCTM): (WebCore::DisplayList::RecorderImpl::setLineCap): (WebCore::DisplayList::RecorderImpl::setLineDash): (WebCore::DisplayList::RecorderImpl::setLineJoin): (WebCore::DisplayList::RecorderImpl::setMiterLimit): (WebCore::DisplayList::RecorderImpl::resetClip): (WebCore::DisplayList::RecorderImpl::clip): (WebCore::DisplayList::RecorderImpl::clipRoundedRect): (WebCore::DisplayList::RecorderImpl::clipOut): (WebCore::DisplayList::RecorderImpl::clipOutRoundedRect): (WebCore::DisplayList::RecorderImpl::clipPath): (WebCore::DisplayList::RecorderImpl::beginTransparencyLayer): (WebCore::DisplayList::RecorderImpl::endTransparencyLayer): (WebCore::DisplayList::RecorderImpl::drawRect): (WebCore::DisplayList::RecorderImpl::drawLine): (WebCore::DisplayList::RecorderImpl::drawLinesForText): (WebCore::DisplayList::RecorderImpl::drawDotsForDocumentMarker): (WebCore::DisplayList::RecorderImpl::drawEllipse): (WebCore::DisplayList::RecorderImpl::drawPath): (WebCore::DisplayList::RecorderImpl::drawFocusRing): (WebCore::DisplayList::RecorderImpl::fillRect): (WebCore::DisplayList::RecorderImpl::fillRoundedRect): (WebCore::DisplayList::RecorderImpl::fillRectWithRoundedHole): (WebCore::DisplayList::RecorderImpl::fillEllipse): (WebCore::DisplayList::RecorderImpl::drawVideoFrame): (WebCore::DisplayList::RecorderImpl::strokeRect): (WebCore::DisplayList::RecorderImpl::strokeEllipse): (WebCore::DisplayList::RecorderImpl::clearRect): (WebCore::DisplayList::RecorderImpl::drawControlPart): (WebCore::DisplayList::RecorderImpl::applyStrokePattern): (WebCore::DisplayList::RecorderImpl::applyFillPattern): (WebCore::DisplayList::RecorderImpl::applyDeviceScaleFactor): (WebCore::DisplayList::RecorderImpl::recordSave): Deleted. (WebCore::DisplayList::RecorderImpl::recordRestore): Deleted. (WebCore::DisplayList::RecorderImpl::recordTranslate): Deleted. (WebCore::DisplayList::RecorderImpl::recordRotate): Deleted. (WebCore::DisplayList::RecorderImpl::recordScale): Deleted. (WebCore::DisplayList::RecorderImpl::recordSetCTM): Deleted. (WebCore::DisplayList::RecorderImpl::recordConcatenateCTM): Deleted. (WebCore::DisplayList::RecorderImpl::recordSetLineCap): Deleted. (WebCore::DisplayList::RecorderImpl::recordSetLineDash): Deleted. (WebCore::DisplayList::RecorderImpl::recordSetLineJoin): Deleted. (WebCore::DisplayList::RecorderImpl::recordSetMiterLimit): Deleted. (WebCore::DisplayList::RecorderImpl::recordResetClip): Deleted. (WebCore::DisplayList::RecorderImpl::recordClip): Deleted. (WebCore::DisplayList::RecorderImpl::recordClipRoundedRect): Deleted. (WebCore::DisplayList::RecorderImpl::recordClipOut): Deleted. (WebCore::DisplayList::RecorderImpl::recordClipOutRoundedRect): Deleted. (WebCore::DisplayList::RecorderImpl::recordClipOutToPath): Deleted. (WebCore::DisplayList::RecorderImpl::recordClipPath): Deleted. (WebCore::DisplayList::RecorderImpl::recordBeginTransparencyLayer): Deleted. (WebCore::DisplayList::RecorderImpl::recordEndTransparencyLayer): Deleted. (WebCore::DisplayList::RecorderImpl::recordDrawRect): Deleted. (WebCore::DisplayList::RecorderImpl::recordDrawLine): Deleted. (WebCore::DisplayList::RecorderImpl::recordDrawLinesForText): Deleted. (WebCore::DisplayList::RecorderImpl::recordDrawDotsForDocumentMarker): Deleted. (WebCore::DisplayList::RecorderImpl::recordDrawEllipse): Deleted. (WebCore::DisplayList::RecorderImpl::recordDrawPath): Deleted. (WebCore::DisplayList::RecorderImpl::recordDrawFocusRingPath): Deleted. (WebCore::DisplayList::RecorderImpl::recordDrawFocusRingRects): Deleted. (WebCore::DisplayList::RecorderImpl::recordFillRect): Deleted. (WebCore::DisplayList::RecorderImpl::recordFillRectWithColor): Deleted. (WebCore::DisplayList::RecorderImpl::recordFillRectWithGradient): Deleted. (WebCore::DisplayList::RecorderImpl::recordFillRectWithGradientAndSpaceTransform): Deleted. (WebCore::DisplayList::RecorderImpl::recordFillCompositedRect): Deleted. (WebCore::DisplayList::RecorderImpl::recordFillRoundedRect): Deleted. (WebCore::DisplayList::RecorderImpl::recordFillRectWithRoundedHole): Deleted. (WebCore::DisplayList::RecorderImpl::recordFillEllipse): Deleted. (WebCore::DisplayList::RecorderImpl::recordDrawVideoFrame): Deleted. (WebCore::DisplayList::RecorderImpl::recordStrokeRect): Deleted. (WebCore::DisplayList::RecorderImpl::recordStrokeEllipse): Deleted. (WebCore::DisplayList::RecorderImpl::recordClearRect): Deleted. (WebCore::DisplayList::RecorderImpl::recordDrawControlPart): Deleted. (WebCore::DisplayList::RecorderImpl::recordApplyStrokePattern): Deleted. (WebCore::DisplayList::RecorderImpl::recordApplyFillPattern): Deleted. (WebCore::DisplayList::RecorderImpl::recordApplyDeviceScaleFactor): Deleted. * Source/WebCore/platform/graphics/displaylists/DisplayListRecorderImpl.h: (WebCore::DisplayList::RecorderImpl::recordDrawPattern): * Source/WebKit/Shared/DisplayListArgumentCoders.serialization.in: * Source/WebKit/WebProcess/GPU/graphics/RemoteDisplayListRecorderProxy.cpp: (WebKit::RemoteDisplayListRecorderProxy::save): (WebKit::RemoteDisplayListRecorderProxy::restore): (WebKit::RemoteDisplayListRecorderProxy::translate): (WebKit::RemoteDisplayListRecorderProxy::rotate): (WebKit::RemoteDisplayListRecorderProxy::scale): (WebKit::RemoteDisplayListRecorderProxy::setCTM): (WebKit::RemoteDisplayListRecorderProxy::concatCTM): (WebKit::RemoteDisplayListRecorderProxy::setLineCap): (WebKit::RemoteDisplayListRecorderProxy::setLineDash): (WebKit::RemoteDisplayListRecorderProxy::setLineJoin): (WebKit::RemoteDisplayListRecorderProxy::setMiterLimit): (WebKit::RemoteDisplayListRecorderProxy::clip): (WebKit::RemoteDisplayListRecorderProxy::clipRoundedRect): (WebKit::RemoteDisplayListRecorderProxy::clipOut): (WebKit::RemoteDisplayListRecorderProxy::clipOutRoundedRect): (WebKit::RemoteDisplayListRecorderProxy::clipPath): (WebKit::RemoteDisplayListRecorderProxy::resetClip): (WebKit::RemoteDisplayListRecorderProxy::beginTransparencyLayer): (WebKit::RemoteDisplayListRecorderProxy::endTransparencyLayer): (WebKit::RemoteDisplayListRecorderProxy::drawRect): (WebKit::RemoteDisplayListRecorderProxy::drawLine): (WebKit::RemoteDisplayListRecorderProxy::drawLinesForText): (WebKit::RemoteDisplayListRecorderProxy::drawDotsForDocumentMarker): (WebKit::RemoteDisplayListRecorderProxy::drawEllipse): (WebKit::RemoteDisplayListRecorderProxy::drawPath): (WebKit::RemoteDisplayListRecorderProxy::drawFocusRing): (WebKit::RemoteDisplayListRecorderProxy::fillRect): (WebKit::RemoteDisplayListRecorderProxy::fillRoundedRect): (WebKit::RemoteDisplayListRecorderProxy::fillRectWithRoundedHole): (WebKit::RemoteDisplayListRecorderProxy::fillEllipse): (WebKit::RemoteDisplayListRecorderProxy::drawVideoFrame): (WebKit::RemoteDisplayListRecorderProxy::strokeRect): (WebKit::RemoteDisplayListRecorderProxy::strokeEllipse): (WebKit::RemoteDisplayListRecorderProxy::clearRect): (WebKit::RemoteDisplayListRecorderProxy::drawControlPart): (WebKit::RemoteDisplayListRecorderProxy::applyStrokePattern): (WebKit::RemoteDisplayListRecorderProxy::applyFillPattern): (WebKit::RemoteDisplayListRecorderProxy::applyDeviceScaleFactor): (WebKit::RemoteDisplayListRecorderProxy::recordSave): Deleted. (WebKit::RemoteDisplayListRecorderProxy::recordRestore): Deleted. (WebKit::RemoteDisplayListRecorderProxy::recordTranslate): Deleted. (WebKit::RemoteDisplayListRecorderProxy::recordRotate): Deleted. (WebKit::RemoteDisplayListRecorderProxy::recordScale): Deleted. (WebKit::RemoteDisplayListRecorderProxy::recordSetCTM): Deleted. (WebKit::RemoteDisplayListRecorderProxy::recordConcatenateCTM): Deleted. (WebKit::RemoteDisplayListRecorderProxy::recordSetLineCap): Deleted. (WebKit::RemoteDisplayListRecorderProxy::recordSetLineDash): Deleted. (WebKit::RemoteDisplayListRecorderProxy::recordSetLineJoin): Deleted. (WebKit::RemoteDisplayListRecorderProxy::recordSetMiterLimit): Deleted. (WebKit::RemoteDisplayListRecorderProxy::recordClip): Deleted. (WebKit::RemoteDisplayListRecorderProxy::recordClipRoundedRect): Deleted. (WebKit::RemoteDisplayListRecorderProxy::recordClipOut): Deleted. (WebKit::RemoteDisplayListRecorderProxy::recordClipOutRoundedRect): Deleted. (WebKit::RemoteDisplayListRecorderProxy::recordClipOutToPath): Deleted. (WebKit::RemoteDisplayListRecorderProxy::recordClipPath): Deleted. (WebKit::RemoteDisplayListRecorderProxy::recordResetClip): Deleted. (WebKit::RemoteDisplayListRecorderProxy::recordBeginTransparencyLayer): Deleted. (WebKit::RemoteDisplayListRecorderProxy::recordEndTransparencyLayer): Deleted. (WebKit::RemoteDisplayListRecorderProxy::recordDrawRect): Deleted. (WebKit::RemoteDisplayListRecorderProxy::recordDrawLine): Deleted. (WebKit::RemoteDisplayListRecorderProxy::recordDrawLinesForText): Deleted. (WebKit::RemoteDisplayListRecorderProxy::recordDrawDotsForDocumentMarker): Deleted. (WebKit::RemoteDisplayListRecorderProxy::recordDrawEllipse): Deleted. (WebKit::RemoteDisplayListRecorderProxy::recordDrawPath): Deleted. (WebKit::RemoteDisplayListRecorderProxy::recordDrawFocusRingPath): Deleted. (WebKit::RemoteDisplayListRecorderProxy::recordDrawFocusRingRects): Deleted. (WebKit::RemoteDisplayListRecorderProxy::recordFillRect): Deleted. (WebKit::RemoteDisplayListRecorderProxy::recordFillRectWithColor): Deleted. (WebKit::RemoteDisplayListRecorderProxy::recordFillRectWithGradient): Deleted. (WebKit::RemoteDisplayListRecorderProxy::recordFillRectWithGradientAndSpaceTransform): Deleted. (WebKit::RemoteDisplayListRecorderProxy::recordFillCompositedRect): Deleted. (WebKit::RemoteDisplayListRecorderProxy::recordFillRoundedRect): Deleted. (WebKit::RemoteDisplayListRecorderProxy::recordFillRectWithRoundedHole): Deleted. (WebKit::RemoteDisplayListRecorderProxy::recordFillEllipse): Deleted. (WebKit::RemoteDisplayListRecorderProxy::recordDrawVideoFrame): Deleted. (WebKit::RemoteDisplayListRecorderProxy::recordStrokeRect): Deleted. (WebKit::RemoteDisplayListRecorderProxy::recordStrokeEllipse): Deleted. (WebKit::RemoteDisplayListRecorderProxy::recordClearRect): Deleted. (WebKit::RemoteDisplayListRecorderProxy::recordDrawControlPart): Deleted. (WebKit::RemoteDisplayListRecorderProxy::recordApplyStrokePattern): Deleted. (WebKit::RemoteDisplayListRecorderProxy::recordApplyFillPattern): Deleted. (WebKit::RemoteDisplayListRecorderProxy::recordApplyDeviceScaleFactor): Deleted. * Source/WebKit/WebProcess/GPU/graphics/RemoteDisplayListRecorderProxy.h: (WebKit::RemoteDisplayListRecorderProxy::recordDrawPattern): Canonical link: https://commits.webkit.org/284963@main To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications _______________________________________________ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes