Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 32d93d501a5dbc1eb1d660cf40eb8b9556c987a3
https://github.com/WebKit/WebKit/commit/32d93d501a5dbc1eb1d660cf40eb8b9556c987a3
Author: Kimmo Kinnunen <[email protected]>
Date: 2025-04-24 (Thu, 24 Apr 2025)
Changed paths:
M LayoutTests/displaylists/layer-dispay-list-expected.txt
M Source/WebCore/Headers.cmake
M Source/WebCore/Sources.txt
M Source/WebCore/WebCore.xcodeproj/project.pbxproj
M Source/WebCore/html/HTMLCanvasElement.cpp
M Source/WebCore/html/canvas/PaintRenderingContext2D.cpp
M Source/WebCore/html/canvas/PaintRenderingContext2D.h
M Source/WebCore/platform/graphics/FontCascade.cpp
M Source/WebCore/platform/graphics/FontCascade.h
M Source/WebCore/platform/graphics/GraphicsContext.cpp
M Source/WebCore/platform/graphics/GraphicsContext.h
M Source/WebCore/platform/graphics/ImageBufferDisplayListBackend.cpp
M Source/WebCore/platform/graphics/ImageBufferDisplayListBackend.h
M Source/WebCore/platform/graphics/NullGraphicsContext.h
M Source/WebCore/platform/graphics/adwaita/ControlFactoryAdwaita.cpp
M Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp
M Source/WebCore/platform/graphics/ca/GraphicsLayerCA.h
M Source/WebCore/platform/graphics/controls/ControlFactory.cpp
M Source/WebCore/platform/graphics/controls/ControlFactory.h
M Source/WebCore/platform/graphics/displaylists/DisplayList.cpp
M Source/WebCore/platform/graphics/displaylists/DisplayList.h
R
Source/WebCore/platform/graphics/displaylists/DisplayListDrawingContext.cpp
R Source/WebCore/platform/graphics/displaylists/DisplayListDrawingContext.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
R Source/WebCore/platform/graphics/displaylists/DisplayListReplayer.cpp
R Source/WebCore/platform/graphics/displaylists/DisplayListReplayer.h
M Source/WebCore/platform/graphics/ios/controls/ControlFactoryIOS.mm
M Source/WebCore/platform/graphics/mac/controls/ControlFactoryMac.mm
M Source/WebCore/rendering/GlyphDisplayListCache.cpp
M Source/WebCore/rendering/GlyphDisplayListCache.h
M Source/WebCore/rendering/TextPainter.cpp
M Source/WebCore/rendering/TextPainter.h
M Source/WebKit/WebProcess/GPU/graphics/RemoteDisplayListRecorderProxy.cpp
M Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj
M Tools/TestWebKitAPI/Tests/WebCore/DisplayListRecorderTests.cpp
R Tools/TestWebKitAPI/Tests/WebCore/DisplayListTests.cpp
M Tools/TestWebKitAPI/Tests/WebCore/cg/BifurcatedGraphicsContextTestsCG.cpp
Log Message:
-----------
Add display lists as first class GraphicsContext draw object
https://bugs.webkit.org/show_bug.cgi?id=291952
rdar://149851725
Reviewed by Simon Fraser.
Add GraphicsContext::drawDisplayList(). This way later commits can
implement support for display lists that are cached in GPUP via
GraphicsContext polymorphism.
Remove DisplayList::Replayer. DisplayList is a list of display items,
and the playback, for now, is just a for loop.
Remove DisplayList::DrawingContext, it did not serve a purpose.
Makes DisplayList an immutable refcounted type.
* Source/WebCore/Headers.cmake:
* Source/WebCore/Sources.txt:
* Source/WebCore/WebCore.xcodeproj/project.pbxproj:
* Source/WebCore/html/HTMLCanvasElement.cpp:
* Source/WebCore/html/canvas/PaintRenderingContext2D.cpp:
(WebCore::PaintRenderingContext2D::ensureDrawingContext const):
(WebCore::PaintRenderingContext2D::existingDrawingContext const):
(WebCore::PaintRenderingContext2D::replayDisplayList const):
* Source/WebCore/html/canvas/PaintRenderingContext2D.h:
* Source/WebCore/platform/graphics/FontCascade.cpp:
(WebCore::FontCascade::displayListForTextRun const):
* Source/WebCore/platform/graphics/FontCascade.h:
* Source/WebCore/platform/graphics/GraphicsContext.cpp:
(WebCore::GraphicsContext::drawDisplayList):
* Source/WebCore/platform/graphics/GraphicsContext.h:
* Source/WebCore/platform/graphics/ImageBufferDisplayListBackend.cpp:
(WebCore::ImageBufferDisplayListBackend::context):
(WebCore::ImageBufferDisplayListBackend::copyNativeImage):
(WebCore::ImageBufferDisplayListBackend::sinkIntoPDFDocument):
* Source/WebCore/platform/graphics/ImageBufferDisplayListBackend.h:
* Source/WebCore/platform/graphics/NullGraphicsContext.h:
* Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp:
(WebCore::GraphicsLayerCA::recursiveCommitChanges):
(WebCore::GraphicsLayerCA::platformCALayerPaintContents):
* Source/WebCore/platform/graphics/ca/GraphicsLayerCA.h:
* Source/WebCore/platform/graphics/displaylists/DisplayList.cpp:
(WebCore::DisplayList::DisplayList::DisplayList):
(WebCore::DisplayList::DisplayList::append): Deleted.
(WebCore::DisplayList::DisplayList::shrinkToFit): Deleted.
(WebCore::DisplayList::DisplayList::clear): Deleted.
(WebCore::DisplayList::DisplayList::isEmpty const): Deleted.
* Source/WebCore/platform/graphics/displaylists/DisplayList.h:
(WebCore::DisplayList::DisplayList::items const): Deleted.
(WebCore::DisplayList::DisplayList::items): Deleted.
* Source/WebCore/platform/graphics/displaylists/DisplayListDrawingContext.cpp:
Removed.
* Source/WebCore/platform/graphics/displaylists/DisplayListDrawingContext.h:
Removed.
* Source/WebCore/platform/graphics/displaylists/DisplayListItem.cpp:
(WebCore::DisplayList::applyItem):
* Source/WebCore/platform/graphics/displaylists/DisplayListItem.h:
* Source/WebCore/platform/graphics/displaylists/DisplayListItems.cpp:
(WebCore::DisplayList::DrawDisplayList::DrawDisplayList):
(WebCore::DisplayList::DrawDisplayList::displayList const):
(WebCore::DisplayList::DrawDisplayList::apply const):
(WebCore::DisplayList::DrawDisplayList::dump const):
* Source/WebCore/platform/graphics/displaylists/DisplayListItems.h:
(WebCore::DisplayList::DrawDecomposedGlyphs::DrawDecomposedGlyphs):
* Source/WebCore/platform/graphics/displaylists/DisplayListRecorder.cpp:
* Source/WebCore/platform/graphics/displaylists/DisplayListRecorderImpl.cpp:
(WebCore::DisplayList::RecorderImpl::RecorderImpl):
(WebCore::DisplayList::RecorderImpl::takeDisplayList):
(WebCore::DisplayList::RecorderImpl::copyDisplayList):
(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::clipToImageBuffer):
(WebCore::DisplayList::RecorderImpl::clipPath):
(WebCore::DisplayList::RecorderImpl::drawFilteredImageBuffer):
(WebCore::DisplayList::RecorderImpl::drawGlyphsImmediate):
(WebCore::DisplayList::RecorderImpl::drawDecomposedGlyphs):
(WebCore::DisplayList::RecorderImpl::drawDisplayList):
(WebCore::DisplayList::RecorderImpl::drawImageBuffer):
(WebCore::DisplayList::RecorderImpl::drawNativeImageInternal):
(WebCore::DisplayList::RecorderImpl::drawSystemImage):
(WebCore::DisplayList::RecorderImpl::drawPattern):
(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::fillPath):
(WebCore::DisplayList::RecorderImpl::fillEllipse):
(WebCore::DisplayList::RecorderImpl::strokeRect):
(WebCore::DisplayList::RecorderImpl::strokePath):
(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::beginPage):
(WebCore::DisplayList::RecorderImpl::endPage):
(WebCore::DisplayList::RecorderImpl::setURLForRect):
(WebCore::DisplayList::RecorderImpl::appendStateChangeItemIfNecessary):
* Source/WebCore/platform/graphics/displaylists/DisplayListRecorderImpl.h:
(WebCore::DisplayList::RecorderImpl::RecorderImpl):
(WebCore::DisplayList::RecorderImpl::isEmpty const): Deleted.
(WebCore::DisplayList::RecorderImpl::append): Deleted.
* Source/WebCore/platform/graphics/displaylists/DisplayListReplayer.cpp:
Removed.
* Source/WebCore/platform/graphics/displaylists/DisplayListReplayer.h: Removed.
* Source/WebCore/rendering/GlyphDisplayListCache.cpp:
(WebCore::GlyphDisplayListCache::getDisplayList):
(WebCore::GlyphDisplayListCache::get):
(WebCore::GlyphDisplayListCache::getIfExistsImpl):
(WebCore::GlyphDisplayListCache::getIfExists):
* Source/WebCore/rendering/GlyphDisplayListCache.h:
(WebCore::GlyphDisplayListCacheEntry::create):
(WebCore::GlyphDisplayListCacheEntry::displayList):
(WebCore::GlyphDisplayListCacheEntry::GlyphDisplayListCacheEntry):
* Source/WebCore/rendering/TextPainter.cpp:
(WebCore::TextPainter::paintTextOrEmphasisMarks):
(WebCore::TextPainter::cachedGlyphDisplayListsForTextNodeAsText):
* Source/WebCore/rendering/TextPainter.h:
(WebCore::TextPainter::glyphDisplayListIfExists):
* Source/WebKit/WebProcess/GPU/graphics/RemoteDisplayListRecorderProxy.cpp:
* Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* Tools/TestWebKitAPI/Tests/WebCore/DisplayListRecorderTests.cpp:
(TestWebKitAPI::createDisplayListTarget): Deleted.
* Tools/TestWebKitAPI/Tests/WebCore/DisplayListTests.cpp: Removed.
Remove the file, it did not contain any functionality to test. The
test tested that if items are added to a list, items exist in a list.
This is not a relevant test, the list is just a Vector and that is
tested in WTF::Vector tests.
Canonical link: https://commits.webkit.org/294058@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