Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: fd19fa9d7bfd5ba4df872d79f4419243c14d3b65
https://github.com/WebKit/WebKit/commit/fd19fa9d7bfd5ba4df872d79f4419243c14d3b65
Author: Kimmo Kinnunen <[email protected]>
Date: 2025-04-23 (Wed, 23 Apr 2025)
Changed paths:
M Source/WebCore/Headers.cmake
M Source/WebCore/SaferCPPExpectations/UncheckedLocalVarsCheckerExpectations
M Source/WebCore/SaferCPPExpectations/UncountedCallArgsCheckerExpectations
M Source/WebCore/SaferCPPExpectations/UncountedLocalVarsCheckerExpectations
M Source/WebCore/WebCore.xcodeproj/project.pbxproj
M Source/WebCore/platform/graphics/displaylists/DisplayList.cpp
M Source/WebCore/platform/graphics/displaylists/DisplayList.h
M
Source/WebCore/platform/graphics/displaylists/DisplayListDrawingContext.cpp
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.cpp
M Source/WebCore/platform/graphics/displaylists/DisplayListReplayer.h
R Source/WebCore/platform/graphics/displaylists/DisplayListResourceHeap.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/WebProcess/GPU/graphics/RemoteDisplayListRecorderProxy.cpp
M Source/WebKit/WebProcess/GPU/graphics/RemoteDisplayListRecorderProxy.h
M Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj
R Tools/TestWebKitAPI/Tests/WebCore/cg/DisplayListTestsCG.cpp
Log Message:
-----------
GPUP: Excessive indirection in drawing images
https://bugs.webkit.org/show_bug.cgi?id=291679
rdar://problem/149472987
Reviewed by Simon Fraser.
DisplayListRecorder would contain redundant virtual function dispatches
for image drawing, catching the drawNativeImageInternal, drawImageBuffer
and such commands in the base class and forwarding them as record*
commands.
Fix these performance problems by:
Catch the virtual functions in RecorderImpl and
RemoteDisplayListRecorderProxy. There is no shared functionality in
local display lists vs and IPC drawing implementations.
Continuation of 284963@main, 292642@main, 293477@main.
Since all local display list items simply ref the item they need,
there is no need for DisplayList::ResourceCache and DisplayListTestsCG.
Remove these.
Future commits will remove more of the no-op code and symbols in
WebCore::DisplayList namespace and simplify the use of DisplayList.
* Source/WebCore/Headers.cmake:
* Source/WebCore/WebCore.xcodeproj/project.pbxproj:
* Source/WebCore/platform/graphics/displaylists/DisplayList.cpp:
(WebCore::DisplayList::DisplayList::clear):
(WebCore::DisplayList::DisplayList::cacheImageBuffer): Deleted.
(WebCore::DisplayList::DisplayList::cacheNativeImage): Deleted.
* Source/WebCore/platform/graphics/displaylists/DisplayList.h:
(WebCore::DisplayList::DisplayList::items):
(WebCore::DisplayList::DisplayList::resourceHeap const): Deleted.
* Source/WebCore/platform/graphics/displaylists/DisplayListDrawingContext.cpp:
(WebCore::DisplayList::DrawingContext::replayDisplayList):
* Source/WebCore/platform/graphics/displaylists/DisplayListItem.cpp:
(WebCore::DisplayList::applyItem):
(WebCore::DisplayList::isValid): Deleted.
(WebCore::DisplayList::applyFilteredImageBufferItem): Deleted.
(WebCore::DisplayList::applyImageBufferItem): Deleted.
(WebCore::DisplayList::applyNativeImageItem): Deleted.
(WebCore::DisplayList::applySourceImageItem): Deleted.
(WebCore::DisplayList::applySetStateItem): Deleted.
* Source/WebCore/platform/graphics/displaylists/DisplayListItem.h:
* Source/WebCore/platform/graphics/displaylists/DisplayListItems.cpp:
(WebCore::DisplayList::ClipToImageBuffer::apply const):
(WebCore::DisplayList::ClipToImageBuffer::dump const):
(WebCore::DisplayList::DrawFilteredImageBuffer::apply const):
(WebCore::DisplayList::DrawFilteredImageBuffer::dump const):
(WebCore::DisplayList::DrawImageBuffer::apply const):
(WebCore::DisplayList::DrawImageBuffer::dump const):
(WebCore::DisplayList::DrawNativeImage::apply const):
(WebCore::DisplayList::DrawNativeImage::dump const):
(WebCore::DisplayList::DrawPatternNativeImage::apply const):
(WebCore::DisplayList::DrawPatternNativeImage::dump const):
(WebCore::DisplayList::DrawPatternImageBuffer::apply const):
(WebCore::DisplayList::DrawPatternImageBuffer::dump const):
(WebCore::DisplayList::DrawFilteredImageBuffer::DrawFilteredImageBuffer):
Deleted.
(WebCore::DisplayList::DrawPattern::DrawPattern): Deleted.
(WebCore::DisplayList::DrawPattern::apply const): Deleted.
(WebCore::DisplayList::DrawPattern::dump const): Deleted.
* Source/WebCore/platform/graphics/displaylists/DisplayListItems.h:
(WebCore::DisplayList::ClipToImageBuffer::ClipToImageBuffer):
(WebCore::DisplayList::ClipToImageBuffer::imageBuffer const):
(WebCore::DisplayList::DrawFilteredImageBuffer::DrawFilteredImageBuffer):
(WebCore::DisplayList::DrawFilteredImageBuffer::sourceImage const):
(WebCore::DisplayList::DrawImageBuffer::DrawImageBuffer):
(WebCore::DisplayList::DrawImageBuffer::imageBuffer const):
(WebCore::DisplayList::DrawNativeImage::DrawNativeImage):
(WebCore::DisplayList::DrawNativeImage::nativeImage const):
(WebCore::DisplayList::DrawPatternNativeImage::DrawPatternNativeImage):
(WebCore::DisplayList::DrawPatternNativeImage::nativeImage const):
(WebCore::DisplayList::DrawPatternNativeImage::destRect const):
(WebCore::DisplayList::DrawPatternNativeImage::tileRect const):
(WebCore::DisplayList::DrawPatternNativeImage::patternTransform const):
(WebCore::DisplayList::DrawPatternNativeImage::phase const):
(WebCore::DisplayList::DrawPatternNativeImage::spacing const):
(WebCore::DisplayList::DrawPatternNativeImage::options const):
(WebCore::DisplayList::DrawPatternImageBuffer::DrawPatternImageBuffer):
(WebCore::DisplayList::DrawPatternImageBuffer::imageBuffer const):
(WebCore::DisplayList::ClipToImageBuffer::imageBufferIdentifier const): Deleted.
(WebCore::DisplayList::ClipToImageBuffer::isValid const): Deleted.
(WebCore::DisplayList::DrawFilteredImageBuffer::sourceImageIdentifier const):
Deleted.
(WebCore::DisplayList::DrawImageBuffer::imageBufferIdentifier const): Deleted.
(WebCore::DisplayList::DrawImageBuffer::isValid const): Deleted.
(WebCore::DisplayList::DrawNativeImage::imageIdentifier const): Deleted.
(WebCore::DisplayList::DrawNativeImage::isValid const): Deleted.
(WebCore::DisplayList::DrawPattern::DrawPattern): Deleted.
(WebCore::DisplayList::DrawPattern::imageIdentifier const): Deleted.
(WebCore::DisplayList::DrawPattern::destRect const): Deleted.
(WebCore::DisplayList::DrawPattern::tileRect const): Deleted.
(WebCore::DisplayList::DrawPattern::patternTransform const): Deleted.
(WebCore::DisplayList::DrawPattern::phase const): Deleted.
(WebCore::DisplayList::DrawPattern::spacing const): Deleted.
(WebCore::DisplayList::DrawPattern::options const): Deleted.
(WebCore::DisplayList::DrawPattern::isValid const): Deleted.
* Source/WebCore/platform/graphics/displaylists/DisplayListRecorder.cpp:
(WebCore::DisplayList::Recorder::decomposeDrawGlyphsIfNeeded):
(WebCore::DisplayList::Recorder::updateStateForClipToImageBuffer):
(WebCore::DisplayList::Recorder::drawFilteredImageBuffer): Deleted.
(WebCore::DisplayList::Recorder::drawGlyphs): Deleted.
(WebCore::DisplayList::Recorder::drawImageBuffer): Deleted.
(WebCore::DisplayList::Recorder::drawNativeImageInternal): Deleted.
(WebCore::DisplayList::Recorder::drawSystemImage): Deleted.
(WebCore::DisplayList::Recorder::drawPattern): Deleted.
(WebCore::DisplayList::Recorder::clipToImageBuffer): Deleted.
* Source/WebCore/platform/graphics/displaylists/DisplayListRecorder.h:
(WebCore::DisplayList::Recorder::recordDrawPattern): Deleted.
* Source/WebCore/platform/graphics/displaylists/DisplayListRecorderImpl.cpp:
(WebCore::DisplayList::RecorderImpl::clipToImageBuffer):
(WebCore::DisplayList::RecorderImpl::drawFilteredImageBuffer):
(WebCore::DisplayList::RecorderImpl::drawGlyphs):
(WebCore::DisplayList::RecorderImpl::drawImageBuffer):
(WebCore::DisplayList::RecorderImpl::drawNativeImageInternal):
(WebCore::DisplayList::RecorderImpl::drawSystemImage):
(WebCore::DisplayList::RecorderImpl::drawPattern):
(WebCore::DisplayList::RecorderImpl::recordClipToImageBuffer): Deleted.
(WebCore::DisplayList::RecorderImpl::recordDrawFilteredImageBuffer): Deleted.
(WebCore::DisplayList::RecorderImpl::recordDrawImageBuffer): Deleted.
(WebCore::DisplayList::RecorderImpl::recordDrawNativeImage): Deleted.
(WebCore::DisplayList::RecorderImpl::recordDrawSystemImage): Deleted.
(WebCore::DisplayList::RecorderImpl::recordDrawPattern): Deleted.
(WebCore::DisplayList::RecorderImpl::recordResourceUse): Deleted.
* Source/WebCore/platform/graphics/displaylists/DisplayListRecorderImpl.h:
(WebCore::DisplayList::RecorderImpl::recordDrawPattern): Deleted.
* Source/WebCore/platform/graphics/displaylists/DisplayListReplayer.cpp:
(WebCore::DisplayList::Replayer::Replayer):
(WebCore::DisplayList::Replayer::replay):
* Source/WebCore/platform/graphics/displaylists/DisplayListReplayer.h:
* Source/WebCore/platform/graphics/displaylists/DisplayListResourceHeap.h:
Removed.
* Source/WebCore/rendering/TextPainter.cpp:
(WebCore::TextPainter::paintTextOrEmphasisMarks):
* Source/WebKit/GPUProcess/graphics/RemoteDisplayListRecorder.cpp:
(WebKit::RemoteDisplayListRecorder::drawPatternNativeImage):
(WebKit::RemoteDisplayListRecorder::drawPatternImageBuffer):
(WebKit::RemoteDisplayListRecorder::drawPattern): Deleted.
* Source/WebKit/GPUProcess/graphics/RemoteDisplayListRecorder.h:
* Source/WebKit/GPUProcess/graphics/RemoteDisplayListRecorder.messages.in:
* Source/WebKit/WebProcess/GPU/graphics/RemoteDisplayListRecorderProxy.cpp:
(WebKit::RemoteDisplayListRecorderProxy::clipToImageBuffer):
(WebKit::RemoteDisplayListRecorderProxy::drawFilteredImageBuffer):
(WebKit::RemoteDisplayListRecorderProxy::drawGlyphs):
(WebKit::RemoteDisplayListRecorderProxy::drawImageBuffer):
(WebKit::RemoteDisplayListRecorderProxy::drawNativeImageInternal):
(WebKit::RemoteDisplayListRecorderProxy::drawSystemImage):
(WebKit::RemoteDisplayListRecorderProxy::drawPattern):
(WebKit::RemoteDisplayListRecorderProxy::recordClipToImageBuffer): Deleted.
(WebKit::RemoteDisplayListRecorderProxy::recordDrawFilteredImageBuffer):
Deleted.
(WebKit::RemoteDisplayListRecorderProxy::recordDrawImageBuffer): Deleted.
(WebKit::RemoteDisplayListRecorderProxy::recordDrawNativeImage): Deleted.
(WebKit::RemoteDisplayListRecorderProxy::recordDrawSystemImage): Deleted.
(WebKit::RemoteDisplayListRecorderProxy::recordDrawPattern): Deleted.
* Source/WebKit/WebProcess/GPU/graphics/RemoteDisplayListRecorderProxy.h:
(WebKit::RemoteDisplayListRecorderProxy::drawPattern):
(WebKit::RemoteDisplayListRecorderProxy::recordDrawPattern): Deleted.
* Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* Tools/TestWebKitAPI/Tests/WebCore/cg/DisplayListTestsCG.cpp: Removed.
Canonical link: https://commits.webkit.org/294001@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes