[webkit-changes] [WebKit/WebKit] da7f1a: Move more painting code to BackgroundPainter
Antti Koivisto
noreply at github.com
Fri Sep 9 08:58:04 PDT 2022
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: da7f1abe0ba98769541491ccf549e553b9cd1669
https://github.com/WebKit/WebKit/commit/da7f1abe0ba98769541491ccf549e553b9cd1669
Author: Antti Koivisto <antti at apple.com>
Date: 2022-09-09 (Fri, 09 Sep 2022)
Changed paths:
M Source/WebCore/rendering/BackgroundPainter.cpp
M Source/WebCore/rendering/BackgroundPainter.h
M Source/WebCore/rendering/InlineBoxPainter.cpp
M Source/WebCore/rendering/RenderBox.cpp
M Source/WebCore/rendering/RenderBox.h
M Source/WebCore/rendering/RenderBoxModelObject.cpp
M Source/WebCore/rendering/RenderBoxModelObject.h
M Source/WebCore/rendering/RenderLayerBacking.cpp
M Source/WebCore/rendering/RenderTableCell.cpp
Log Message:
-----------
Move more painting code to BackgroundPainter
https://bugs.webkit.org/show_bug.cgi?id=244927
<rdar://problem/99735898>.
Reviewed by Alan Bujtas.
Move more background painting code out from RenderObjects to a dedicated painter class.
* Source/WebCore/rendering/BackgroundPainter.cpp:
(WebCore::BackgroundImageGeometry::BackgroundImageGeometry):
(WebCore::BackgroundPainter::paintFillLayers):
(WebCore::BackgroundPainter::paintFillLayer):
(WebCore::BackgroundPainter::backgroundRoundedRectAdjustedForBleedAvoidance const):
(WebCore::BackgroundPainter::backgroundRoundedRect const):
(WebCore::getSpace):
(WebCore::resolveEdgeRelativeLength):
(WebCore::pixelSnapBackgroundImageGeometryForPainting):
(WebCore::BackgroundPainter::calculateBackgroundImageGeometry):
(WebCore::BackgroundPainter::calculateFillTileSize):
(WebCore::BackgroundPainter::getBackgroundRoundedRect const): Deleted.
* Source/WebCore/rendering/BackgroundPainter.h:
(WebCore::BackgroundImageGeometry::relativePhase const):
(WebCore::BackgroundImageGeometry::clip):
Make BackgroundImageGeometry a struct and add tileSizeWithoutPixelSnapping so calculateBackgroundImageGeometry
can return it and does not need to deal with updating SVG container context itself.
* Source/WebCore/rendering/InlineBoxPainter.cpp:
(WebCore::InlineBoxPainter::paintFillLayers):
* Source/WebCore/rendering/RenderBox.cpp:
(WebCore::RenderBox::paintRootBoxFillLayers):
(WebCore::RenderBox::paintBackground):
(WebCore::RenderBox::getBackgroundPaintedExtent const):
(WebCore::RenderBox::paintMaskImages):
(WebCore::RenderBox::maskClipRect):
(WebCore::RenderBox::repaintLayerRectsForImage):
(WebCore::RenderBox::paintFillLayers): Deleted.
* Source/WebCore/rendering/RenderBox.h:
* Source/WebCore/rendering/RenderBoxModelObject.cpp:
(WebCore::RenderBoxModelObject::calculateFillTileSize const): Deleted.
(WebCore::pixelSnapBackgroundImageGeometryForPainting): Deleted.
(WebCore::getSpace): Deleted.
(WebCore::resolveEdgeRelativeLength): Deleted.
(WebCore::RenderBoxModelObject::calculateBackgroundImageGeometry const): Deleted.
(WebCore::RenderBoxModelObject::getGeometryForBackgroundImage const): Deleted.
* Source/WebCore/rendering/RenderBoxModelObject.h:
(WebCore::BackgroundImageGeometry::BackgroundImageGeometry): Deleted.
(WebCore::BackgroundImageGeometry::destRect const): Deleted.
(WebCore::BackgroundImageGeometry::phase const): Deleted.
(WebCore::BackgroundImageGeometry::tileSize const): Deleted.
(WebCore::BackgroundImageGeometry::spaceSize const): Deleted.
(WebCore::BackgroundImageGeometry::hasNonLocalGeometry const): Deleted.
(WebCore::BackgroundImageGeometry::relativePhase const): Deleted.
(WebCore::BackgroundImageGeometry::clip): Deleted.
* Source/WebCore/rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::updateDirectlyCompositedBackgroundImage):
* Source/WebCore/rendering/RenderTableCell.cpp:
(WebCore::RenderTableCell::paintBackgroundsBehindCell):
Canonical link: https://commits.webkit.org/254301@main
More information about the webkit-changes
mailing list