WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
[patch]
Patch, v2
bug-236189-20220206024922.patch (text/plain), 3.03 KB, created by
Nikolas Zimmermann
on 2022-02-06 02:49:24 PST
(
hide
)
Description:
Patch, v2
Filename:
MIME Type:
Creator:
Nikolas Zimmermann
Created:
2022-02-06 02:49:24 PST
Size:
3.03 KB
patch
obsolete
>Subversion Revision: 289165 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index 8caf3e920a67580689d24368ca321d7e7e26b730..0af267d70f00219b307a56549d7fd5990c686ff1 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,28 @@ >+2022-02-06 Nikolas Zimmermann <nzimmermann@igalia.com> >+ >+ [LBSE] Suppress non-foreground paint phases for SVG shapes & images >+ https://bugs.webkit.org/show_bug.cgi?id=236189 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Suppress all paint phases except PaintPhase::Foreground for SVG primitives >+ such as paths, rects, images, etc. - all but RenderSVGContainer. We still >+ have to propagate the paint phases down the SVG render tree through the >+ container hierachy, as there could be <foreignObject> elements that do >+ need all paint phases. >+ >+ If this ever turns out as bottleneck we can keep track of the presence >+ of <foreignObject> elements in a SVG subtree and only selectively propagate >+ the paint phases to those leafs that need them. >+ >+ This optimization was used and tested with all SVG pixel tests in >+ the downstream branch -- so it's well tested that this works fine. >+ >+ Covered by existing tests, no change in behaviour. >+ >+ * rendering/RenderLayer.cpp: >+ (WebCore::RenderLayer::paintForegroundForFragments): >+ > 2022-02-03 Nikolas Zimmermann <nzimmermann@igalia.com> > > [LBSE] Handle RenderSVGShape in SVGRenderSupport::applyStrokeStyleToContext() >diff --git a/Source/WebCore/rendering/RenderLayer.cpp b/Source/WebCore/rendering/RenderLayer.cpp >index 77a8a27812925a5a4672c65df98cf7adb296fde7..2a40d98f2e800fb46c1480bae73792f5b1060713 100644 >--- a/Source/WebCore/rendering/RenderLayer.cpp >+++ b/Source/WebCore/rendering/RenderLayer.cpp >@@ -3818,6 +3818,19 @@ void RenderLayer::paintForegroundForFragments(const LayerFragments& layerFragmen > bool selectionOnly = localPaintingInfo.paintBehavior.contains(PaintBehavior::SelectionOnly); > bool selectionAndBackgroundsOnly = localPaintingInfo.paintBehavior.contains(PaintBehavior::SelectionAndBackgroundsOnly); > >+#if ENABLE(LAYER_BASED_SVG_ENGINE) >+ if (is<RenderSVGModelObject>(renderer()) && !is<RenderSVGContainer>(renderer())) { >+ // SVG containers need to propagate paint phases. This could be saved if we remember somewhere if a SVG subtree >+ // contains e.g. RenderSVGForeignObject objects that do need the individual paint phases. For SVG shapes & SVG images >+ // we can avoid the multiple paintForegroundForFragmentsWithPhase() calls. >+ if (selectionOnly || selectionAndBackgroundsOnly) >+ return; >+ >+ paintForegroundForFragmentsWithPhase(PaintPhase::Foreground, layerFragments, context, localPaintingInfo, localPaintBehavior, subtreePaintRootForRenderer); >+ return; >+ } >+#endif >+ > if (!selectionOnly) > paintForegroundForFragmentsWithPhase(PaintPhase::ChildBlockBackgrounds, layerFragments, context, localPaintingInfo, localPaintBehavior, subtreePaintRootForRenderer); >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 236189
:
451014
|
451030
|
451038