Diff
Modified: trunk/LayoutTests/ChangeLog (286588 => 286589)
--- trunk/LayoutTests/ChangeLog 2021-12-07 06:20:45 UTC (rev 286588)
+++ trunk/LayoutTests/ChangeLog 2021-12-07 07:19:06 UTC (rev 286589)
@@ -1,3 +1,18 @@
+2021-12-06 Said Abou-Hallawa <s...@apple.com>
+
+ [GPU Process] [Filters] Make FilterEffect::externalRepresentation() and its overridable functions work iteratively
+ https://bugs.webkit.org/show_bug.cgi?id=233893
+
+ Reviewed by Cameron McCormack.
+
+ Add missing closing quotations in the expected results of some of the
+ filter layout tests.
+
+ * svg/filters/feDropShadow-expected.txt:
+ * svg/filters/feDropShadow-subregion-expected.txt:
+ * svg/filters/feDropShadow-zero-deviation-expected.txt:
+ * svg/repaint/filter-child-repaint-expected.txt:
+
2021-12-06 Lauro Moura <lmo...@igalia.com>
[GLIB] Small gardening
Modified: trunk/LayoutTests/svg/filters/feDropShadow-expected.txt (286588 => 286589)
--- trunk/LayoutTests/svg/filters/feDropShadow-expected.txt 2021-12-07 06:20:45 UTC (rev 286588)
+++ trunk/LayoutTests/svg/filters/feDropShadow-expected.txt 2021-12-07 07:19:06 UTC (rev 286589)
@@ -4,28 +4,28 @@
RenderSVGRoot {svg} at (0,0) size 684x334
RenderSVGHiddenContainer {defs} at (0,0) size 0x0
RenderSVGResourceFilter {filter} [id="drop-shadow-1"] [filterUnits=objectBoundingBox] [primitiveUnits=userSpaceOnUse]
- [feDropShadow stdDeviation="2.00, 2.00" dx="2.00" dy="2.00" flood-color="#008000" flood-opacity="1.00]
+ [feDropShadow stdDeviation="2.00, 2.00" dx="2.00" dy="2.00" flood-color="#008000" flood-opacity="1.00"]
[SourceGraphic]
RenderSVGResourceFilter {filter} [id="drop-shadow-2"] [filterUnits=objectBoundingBox] [primitiveUnits=userSpaceOnUse]
- [feDropShadow stdDeviation="0.00, 0.00" dx="0.00" dy="0.00" flood-color="#008000" flood-opacity="1.00]
+ [feDropShadow stdDeviation="0.00, 0.00" dx="0.00" dy="0.00" flood-color="#008000" flood-opacity="1.00"]
[SourceGraphic]
RenderSVGResourceFilter {filter} [id="drop-shadow-3"] [filterUnits=objectBoundingBox] [primitiveUnits=userSpaceOnUse]
- [feDropShadow stdDeviation="0.00, 10.00" dx="5.00" dy="5.00" flood-color="#008000" flood-opacity="1.00]
+ [feDropShadow stdDeviation="0.00, 10.00" dx="5.00" dy="5.00" flood-color="#008000" flood-opacity="1.00"]
[SourceGraphic]
RenderSVGResourceFilter {filter} [id="drop-shadow-4"] [filterUnits=objectBoundingBox] [primitiveUnits=userSpaceOnUse]
- [feDropShadow stdDeviation="10.00, 0.00" dx="5.00" dy="5.00" flood-color="#008000" flood-opacity="1.00]
+ [feDropShadow stdDeviation="10.00, 0.00" dx="5.00" dy="5.00" flood-color="#008000" flood-opacity="1.00"]
[SourceGraphic]
RenderSVGResourceFilter {filter} [id="drop-shadow-5"] [filterUnits=objectBoundingBox] [primitiveUnits=userSpaceOnUse]
- [feDropShadow stdDeviation="10.00, 10.00" dx="5.00" dy="5.00" flood-color="#008000" flood-opacity="1.00]
+ [feDropShadow stdDeviation="10.00, 10.00" dx="5.00" dy="5.00" flood-color="#008000" flood-opacity="1.00"]
[SourceGraphic]
RenderSVGResourceFilter {filter} [id="drop-shadow-6"] [filterUnits=objectBoundingBox] [primitiveUnits=userSpaceOnUse]
- [feDropShadow stdDeviation="10.00, 10.00" dx="-5.00" dy="-5.00" flood-color="#008000" flood-opacity="1.00]
+ [feDropShadow stdDeviation="10.00, 10.00" dx="-5.00" dy="-5.00" flood-color="#008000" flood-opacity="1.00"]
[SourceGraphic]
RenderSVGResourceFilter {filter} [id="drop-shadow-7"] [filterUnits=objectBoundingBox] [primitiveUnits=userSpaceOnUse]
- [feDropShadow stdDeviation="128.00, 128.00" dx="0.00" dy="0.00" flood-color="#008000" flood-opacity="1.00]
+ [feDropShadow stdDeviation="128.00, 128.00" dx="0.00" dy="0.00" flood-color="#008000" flood-opacity="1.00"]
[SourceGraphic]
RenderSVGResourceFilter {filter} [id="drop-shadow-8"] [filterUnits=objectBoundingBox] [primitiveUnits=userSpaceOnUse]
- [feDropShadow stdDeviation="10.00, 10.00" dx="5.00" dy="5.00" flood-color="#008000" flood-opacity="0.50]
+ [feDropShadow stdDeviation="10.00, 10.00" dx="5.00" dy="5.00" flood-color="#008000" flood-opacity="0.50"]
[SourceGraphic]
RenderSVGEllipse {circle} at (0,0) size 159x159 [stroke={[type=SOLID] [color=#0000FF] [stroke width=5.00]}] [fill={[type=SOLID] [color=#FFFF00]}] [cx=75.00] [cy=75.00] [r=70.00]
[filter="drop-shadow-1"] RenderSVGResourceFilter {filter} at (-9,-9) size 168x168
Modified: trunk/LayoutTests/svg/filters/feDropShadow-subregion-expected.txt (286588 => 286589)
--- trunk/LayoutTests/svg/filters/feDropShadow-subregion-expected.txt 2021-12-07 06:20:45 UTC (rev 286588)
+++ trunk/LayoutTests/svg/filters/feDropShadow-subregion-expected.txt 2021-12-07 07:19:06 UTC (rev 286589)
@@ -5,7 +5,7 @@
RenderSVGHiddenContainer {defs} at (0,0) size 0x0
RenderSVGResourceFilter {filter} [id="DropShadow"] [filterUnits=objectBoundingBox] [primitiveUnits=userSpaceOnUse]
[feComposite operation="OVER"]
- [feDropShadow stdDeviation="10.00, 10.00" dx="10.00" dy="10.00" flood-color="#FF0000" flood-opacity="1.00]
+ [feDropShadow stdDeviation="10.00, 10.00" dx="10.00" dy="10.00" flood-color="#FF0000" flood-opacity="1.00"]
[SourceGraphic]
[feOffset dx="10.00" dy="10.00"]
[SourceGraphic]
Modified: trunk/LayoutTests/svg/filters/feDropShadow-zero-deviation-expected.txt (286588 => 286589)
--- trunk/LayoutTests/svg/filters/feDropShadow-zero-deviation-expected.txt 2021-12-07 06:20:45 UTC (rev 286588)
+++ trunk/LayoutTests/svg/filters/feDropShadow-zero-deviation-expected.txt 2021-12-07 07:19:06 UTC (rev 286589)
@@ -4,10 +4,10 @@
RenderSVGRoot {svg} at (49,19) size 12x32
RenderSVGHiddenContainer {defs} at (0,0) size 0x0
RenderSVGResourceFilter {filter} [id="f1"] [filterUnits=objectBoundingBox] [primitiveUnits=userSpaceOnUse]
- [feDropShadow stdDeviation="0.00, 1.00" dx="2.00" dy="2.00" flood-color="#000000" flood-opacity="1.00]
+ [feDropShadow stdDeviation="0.00, 1.00" dx="2.00" dy="2.00" flood-color="#000000" flood-opacity="1.00"]
[SourceGraphic]
RenderSVGResourceFilter {filter} [id="f2"] [filterUnits=objectBoundingBox] [primitiveUnits=userSpaceOnUse]
- [feDropShadow stdDeviation="1.00, 0.00" dx="2.00" dy="2.00" flood-color="#000000" flood-opacity="1.00]
+ [feDropShadow stdDeviation="1.00, 0.00" dx="2.00" dy="2.00" flood-color="#000000" flood-opacity="1.00"]
[SourceGraphic]
RenderSVGRect {rect} at (49,19) size 12x12 [fill={[type=SOLID] [color=#008000]}] [x=50.00] [y=20.00] [width=10.00] [height=10.00]
[filter="f1"] RenderSVGResourceFilter {filter} at (49,19) size 12x12
Modified: trunk/LayoutTests/svg/repaint/filter-child-repaint-expected.txt (286588 => 286589)
--- trunk/LayoutTests/svg/repaint/filter-child-repaint-expected.txt 2021-12-07 06:20:45 UTC (rev 286588)
+++ trunk/LayoutTests/svg/repaint/filter-child-repaint-expected.txt 2021-12-07 07:19:06 UTC (rev 286589)
@@ -4,7 +4,7 @@
RenderSVGRoot {svg} at (0,0) size 106x106
RenderSVGHiddenContainer {defs} at (0,0) size 0x0
RenderSVGResourceFilter {filter} [id="dropShadow"] [filterUnits=objectBoundingBox] [primitiveUnits=userSpaceOnUse]
- [feDropShadow stdDeviation="2.00, 2.00" dx="3.00" dy="3.00" flood-color="#000000" flood-opacity="1.00]
+ [feDropShadow stdDeviation="2.00, 2.00" dx="3.00" dy="3.00" flood-color="#000000" flood-opacity="1.00"]
[SourceGraphic]
RenderSVGContainer {g} at (0,0) size 106x106
[filter="dropShadow"] RenderSVGResourceFilter {filter} at (-9.60,-9.60) size 115.20x115.20
Modified: trunk/Source/WebCore/ChangeLog (286588 => 286589)
--- trunk/Source/WebCore/ChangeLog 2021-12-07 06:20:45 UTC (rev 286588)
+++ trunk/Source/WebCore/ChangeLog 2021-12-07 07:19:06 UTC (rev 286589)
@@ -1,3 +1,103 @@
+2021-12-06 Said Abou-Hallawa <s...@apple.com>
+
+ [GPU Process] [Filters] Make FilterEffect::externalRepresentation() and its overridable functions work iteratively
+ https://bugs.webkit.org/show_bug.cgi?id=233893
+
+ Reviewed by Cameron McCormack.
+
+ This is a step towards removing the inputEffect() from FilterEffect.
+
+ -- The enum FliterEffect::RepresentationType is replaced by
+ FilterRepresentation.
+
+ -- CSSFilter calls its functions from left to right to dump their
+ externalRepresentation.
+
+ -- SVGFilter uses its _expression_ to dump its graph of FilterEffects.
+
+ -- Since SourceAlpha is a built-in effect it does not need to dump
+ SourceGraphic as its input.
+
+ * platform/graphics/filters/FEBlend.cpp:
+ (WebCore::FEBlend::externalRepresentation const):
+ * platform/graphics/filters/FEBlend.h:
+ * platform/graphics/filters/FEColorMatrix.cpp:
+ (WebCore::FEColorMatrix::externalRepresentation const):
+ * platform/graphics/filters/FEColorMatrix.h:
+ * platform/graphics/filters/FEComponentTransfer.cpp:
+ (WebCore::FEComponentTransfer::externalRepresentation const):
+ * platform/graphics/filters/FEComponentTransfer.h:
+ * platform/graphics/filters/FEComposite.cpp:
+ (WebCore::FEComposite::externalRepresentation const):
+ * platform/graphics/filters/FEComposite.h:
+ * platform/graphics/filters/FEConvolveMatrix.cpp:
+ (WebCore::FEConvolveMatrix::externalRepresentation const):
+ * platform/graphics/filters/FEConvolveMatrix.h:
+ * platform/graphics/filters/FEDiffuseLighting.cpp:
+ (WebCore::FEDiffuseLighting::externalRepresentation const):
+ * platform/graphics/filters/FEDiffuseLighting.h:
+ * platform/graphics/filters/FEDisplacementMap.cpp:
+ (WebCore::FEDisplacementMap::externalRepresentation const):
+ * platform/graphics/filters/FEDisplacementMap.h:
+ * platform/graphics/filters/FEDropShadow.cpp:
+ (WebCore::FEDropShadow::externalRepresentation const):
+ * platform/graphics/filters/FEDropShadow.h:
+ * platform/graphics/filters/FEFlood.cpp:
+ (WebCore::FEFlood::externalRepresentation const):
+ * platform/graphics/filters/FEFlood.h:
+ * platform/graphics/filters/FEGaussianBlur.cpp:
+ (WebCore::FEGaussianBlur::externalRepresentation const):
+ * platform/graphics/filters/FEGaussianBlur.h:
+ * platform/graphics/filters/FEMerge.cpp:
+ (WebCore::FEMerge::externalRepresentation const):
+ * platform/graphics/filters/FEMerge.h:
+ * platform/graphics/filters/FEMorphology.cpp:
+ (WebCore::FEMorphology::externalRepresentation const):
+ * platform/graphics/filters/FEMorphology.h:
+ * platform/graphics/filters/FEOffset.cpp:
+ (WebCore::FEOffset::externalRepresentation const):
+ * platform/graphics/filters/FEOffset.h:
+ * platform/graphics/filters/FESpecularLighting.cpp:
+ (WebCore::FESpecularLighting::externalRepresentation const):
+ * platform/graphics/filters/FESpecularLighting.h:
+ * platform/graphics/filters/FETile.cpp:
+ (WebCore::FETile::externalRepresentation const):
+ * platform/graphics/filters/FETile.h:
+ * platform/graphics/filters/FETurbulence.cpp:
+ (WebCore::FETurbulence::externalRepresentation const):
+ * platform/graphics/filters/FETurbulence.h:
+ * platform/graphics/filters/Filter.h:
+ * platform/graphics/filters/FilterEffect.cpp:
+ (WebCore::FilterEffect::externalRepresentation const):
+ (WebCore::operator<<):
+ * platform/graphics/filters/FilterEffect.h:
+ * platform/graphics/filters/FilterFunction.h:
+ * platform/graphics/filters/SourceAlpha.cpp:
+ (WebCore::SourceAlpha::externalRepresentation const):
+ * platform/graphics/filters/SourceAlpha.h:
+ * platform/graphics/filters/SourceGraphic.cpp:
+ (WebCore::SourceGraphic::externalRepresentation const):
+ * platform/graphics/filters/SourceGraphic.h:
+ * rendering/CSSFilter.cpp:
+ (WebCore::CSSFilter::externalRepresentation const):
+ * rendering/CSSFilter.h:
+ * rendering/svg/SVGRenderTreeAsText.cpp:
+ (WebCore::writeSVGResourceContainer):
+ * svg/graphics/filters/SVGFEImage.cpp:
+ (WebCore::FEImage::externalRepresentation const):
+ * svg/graphics/filters/SVGFEImage.h:
+ * svg/graphics/filters/SVGFilter.cpp:
+ (WebCore::SVGFilter::externalRepresentation const):
+ * svg/graphics/filters/SVGFilter.h:
+ * svg/graphics/filters/SVGFilterBuilder.cpp:
+ (WebCore::effectGeometryFlagsForElement):
+ (WebCore::SVGFilterBuilder::buildFilterEffects):
+ (WebCore::SVGFilterBuilder::buildEffectExpression const):
+ (WebCore::SVGFilterBuilder::buildExpression const):
+ (WebCore::boundarySetFlagsForElement): Deleted.
+ * svg/graphics/filters/SVGFilterBuilder.h:
+ * svg/graphics/filters/SVGFilterExpression.h:
+
2021-12-06 Patrick Angle <pan...@apple.com>
[Cocoa] Web Inspector: Unify Grid overlay drawing code
Modified: trunk/Source/WebCore/platform/graphics/filters/FEBlend.cpp (286588 => 286589)
--- trunk/Source/WebCore/platform/graphics/filters/FEBlend.cpp 2021-12-07 06:20:45 UTC (rev 286588)
+++ trunk/Source/WebCore/platform/graphics/filters/FEBlend.cpp 2021-12-07 07:19:06 UTC (rev 286589)
@@ -57,15 +57,14 @@
return FilterEffectApplier::create<FEBlendSoftwareApplier>(*this);
}
-TextStream& FEBlend::externalRepresentation(TextStream& ts, RepresentationType representation) const
+TextStream& FEBlend::externalRepresentation(TextStream& ts, FilterRepresentation representation) const
{
ts << indent << "[feBlend";
FilterEffect::externalRepresentation(ts, representation);
- ts << " mode=\"" << (m_mode == BlendMode::Normal ? "normal" : compositeOperatorName(CompositeOperator::SourceOver, m_mode)) << "\"]\n";
- TextStream::IndentScope indentScope(ts);
- inputEffect(0)->externalRepresentation(ts, representation);
- inputEffect(1)->externalRepresentation(ts, representation);
+ ts << " mode=\"" << (m_mode == BlendMode::Normal ? "normal" : compositeOperatorName(CompositeOperator::SourceOver, m_mode));
+
+ ts << "\"]\n";
return ts;
}
Modified: trunk/Source/WebCore/platform/graphics/filters/FEBlend.h (286588 => 286589)
--- trunk/Source/WebCore/platform/graphics/filters/FEBlend.h 2021-12-07 06:20:45 UTC (rev 286588)
+++ trunk/Source/WebCore/platform/graphics/filters/FEBlend.h 2021-12-07 07:19:06 UTC (rev 286589)
@@ -46,7 +46,7 @@
void platformApplyNEON(unsigned char* srcPixelArrayA, unsigned char* srcPixelArrayB, unsigned char* dstPixelArray,
unsigned colorArrayLength);
- WTF::TextStream& externalRepresentation(WTF::TextStream&, RepresentationType) const override;
+ WTF::TextStream& externalRepresentation(WTF::TextStream&, FilterRepresentation) const override;
BlendMode m_mode;
};
Modified: trunk/Source/WebCore/platform/graphics/filters/FEColorMatrix.cpp (286588 => 286589)
--- trunk/Source/WebCore/platform/graphics/filters/FEColorMatrix.cpp 2021-12-07 06:20:45 UTC (rev 286588)
+++ trunk/Source/WebCore/platform/graphics/filters/FEColorMatrix.cpp 2021-12-07 07:19:06 UTC (rev 286589)
@@ -141,10 +141,11 @@
return ts;
}
-TextStream& FEColorMatrix::externalRepresentation(TextStream& ts, RepresentationType representation) const
+TextStream& FEColorMatrix::externalRepresentation(TextStream& ts, FilterRepresentation representation) const
{
ts << indent << "[feColorMatrix";
FilterEffect::externalRepresentation(ts, representation);
+
ts << " type=\"" << m_type << "\"";
if (!m_values.isEmpty()) {
ts << " values=\"";
@@ -153,15 +154,13 @@
while (ptr < end) {
ts << *ptr;
++ptr;
- if (ptr < end)
+ if (ptr < end)
ts << " ";
}
ts << "\"";
}
+
ts << "]\n";
-
- TextStream::IndentScope indentScope(ts);
- inputEffect(0)->externalRepresentation(ts, representation);
return ts;
}
Modified: trunk/Source/WebCore/platform/graphics/filters/FEColorMatrix.h (286588 => 286589)
--- trunk/Source/WebCore/platform/graphics/filters/FEColorMatrix.h 2021-12-07 06:20:45 UTC (rev 286588)
+++ trunk/Source/WebCore/platform/graphics/filters/FEColorMatrix.h 2021-12-07 07:19:06 UTC (rev 286589)
@@ -63,7 +63,7 @@
std::unique_ptr<FilterEffectApplier> createApplier(const Filter&) const override;
- WTF::TextStream& externalRepresentation(WTF::TextStream&, RepresentationType) const override;
+ WTF::TextStream& externalRepresentation(WTF::TextStream&, FilterRepresentation) const override;
ColorMatrixType m_type;
Vector<float> m_values;
Modified: trunk/Source/WebCore/platform/graphics/filters/FEComponentTransfer.cpp (286588 => 286589)
--- trunk/Source/WebCore/platform/graphics/filters/FEComponentTransfer.cpp 2021-12-07 06:20:45 UTC (rev 286588)
+++ trunk/Source/WebCore/platform/graphics/filters/FEComponentTransfer.cpp 2021-12-07 07:19:06 UTC (rev 286589)
@@ -116,21 +116,21 @@
return ts;
}
-TextStream& FEComponentTransfer::externalRepresentation(TextStream& ts, RepresentationType representation) const
+TextStream& FEComponentTransfer::externalRepresentation(TextStream& ts, FilterRepresentation representation) const
{
ts << indent << "[feComponentTransfer";
FilterEffect::externalRepresentation(ts, representation);
ts << "\n";
+
{
TextStream::IndentScope indentScope(ts, 2);
ts << indent << "{red: " << m_redFunction << "}\n";
ts << indent << "{green: " << m_greenFunction << "}\n";
ts << indent << "{blue: " << m_blueFunction << "}\n";
- ts << indent << "{alpha: " << m_alphaFunction << "}]\n";
+ ts << indent << "{alpha: " << m_alphaFunction << "}";
}
- TextStream::IndentScope indentScope(ts);
- inputEffect(0)->externalRepresentation(ts, representation);
+ ts << "]\n";
return ts;
}
Modified: trunk/Source/WebCore/platform/graphics/filters/FEComponentTransfer.h (286588 => 286589)
--- trunk/Source/WebCore/platform/graphics/filters/FEComponentTransfer.h 2021-12-07 06:20:45 UTC (rev 286588)
+++ trunk/Source/WebCore/platform/graphics/filters/FEComponentTransfer.h 2021-12-07 07:19:06 UTC (rev 286589)
@@ -74,7 +74,7 @@
std::unique_ptr<FilterEffectApplier> createApplier(const Filter&) const override;
- WTF::TextStream& externalRepresentation(WTF::TextStream&, RepresentationType) const override;
+ WTF::TextStream& externalRepresentation(WTF::TextStream&, FilterRepresentation) const override;
ComponentTransferFunction m_redFunction;
ComponentTransferFunction m_greenFunction;
Modified: trunk/Source/WebCore/platform/graphics/filters/FEComposite.cpp (286588 => 286589)
--- trunk/Source/WebCore/platform/graphics/filters/FEComposite.cpp 2021-12-07 06:20:45 UTC (rev 286588)
+++ trunk/Source/WebCore/platform/graphics/filters/FEComposite.cpp 2021-12-07 07:19:06 UTC (rev 286589)
@@ -142,18 +142,16 @@
return ts;
}
-TextStream& FEComposite::externalRepresentation(TextStream& ts, RepresentationType representation) const
+TextStream& FEComposite::externalRepresentation(TextStream& ts, FilterRepresentation representation) const
{
ts << indent << "[feComposite";
FilterEffect::externalRepresentation(ts, representation);
+
ts << " operation=\"" << m_type << "\"";
if (m_type == FECOMPOSITE_OPERATOR_ARITHMETIC)
ts << " k1=\"" << m_k1 << "\" k2=\"" << m_k2 << "\" k3=\"" << m_k3 << "\" k4=\"" << m_k4 << "\"";
+
ts << "]\n";
-
- TextStream::IndentScope indentScope(ts);
- inputEffect(0)->externalRepresentation(ts, representation);
- inputEffect(1)->externalRepresentation(ts, representation);
return ts;
}
Modified: trunk/Source/WebCore/platform/graphics/filters/FEComposite.h (286588 => 286589)
--- trunk/Source/WebCore/platform/graphics/filters/FEComposite.h 2021-12-07 06:20:45 UTC (rev 286588)
+++ trunk/Source/WebCore/platform/graphics/filters/FEComposite.h 2021-12-07 07:19:06 UTC (rev 286589)
@@ -69,7 +69,7 @@
std::unique_ptr<FilterEffectApplier> createApplier(const Filter&) const override;
- WTF::TextStream& externalRepresentation(WTF::TextStream&, RepresentationType) const override;
+ WTF::TextStream& externalRepresentation(WTF::TextStream&, FilterRepresentation) const override;
inline void platformArithmeticSoftware(const Uint8ClampedArray& source, Uint8ClampedArray& destination, float k1, float k2, float k3, float k4);
Modified: trunk/Source/WebCore/platform/graphics/filters/FEConvolveMatrix.cpp (286588 => 286589)
--- trunk/Source/WebCore/platform/graphics/filters/FEConvolveMatrix.cpp 2021-12-07 06:20:45 UTC (rev 286588)
+++ trunk/Source/WebCore/platform/graphics/filters/FEConvolveMatrix.cpp 2021-12-07 07:19:06 UTC (rev 286589)
@@ -143,21 +143,21 @@
return ts;
}
-TextStream& FEConvolveMatrix::externalRepresentation(TextStream& ts, RepresentationType representation) const
+TextStream& FEConvolveMatrix::externalRepresentation(TextStream& ts, FilterRepresentation representation) const
{
ts << indent << "[feConvolveMatrix";
FilterEffect::externalRepresentation(ts, representation);
- ts << " order=\"" << m_kernelSize << "\" "
- << "kernelMatrix=\"" << m_kernelMatrix << "\" "
- << "divisor=\"" << m_divisor << "\" "
- << "bias=\"" << m_bias << "\" "
- << "target=\"" << m_targetOffset << "\" "
- << "edgeMode=\"" << m_edgeMode << "\" "
- << "kernelUnitLength=\"" << m_kernelUnitLength << "\" "
- << "preserveAlpha=\"" << m_preserveAlpha << "\"]\n";
- TextStream::IndentScope indentScope(ts);
- inputEffect(0)->externalRepresentation(ts, representation);
+ ts << " order=\"" << m_kernelSize << "\"";
+ ts << " kernelMatrix=\"" << m_kernelMatrix << "\"";
+ ts << " divisor=\"" << m_divisor << "\"";
+ ts << " bias=\"" << m_bias << "\"";
+ ts << " target=\"" << m_targetOffset << "\"";
+ ts << " edgeMode=\"" << m_edgeMode << "\"";
+ ts << " kernelUnitLength=\"" << m_kernelUnitLength << "\"";
+ ts << " preserveAlpha=\"" << m_preserveAlpha << "\"";
+
+ ts << "]\n";
return ts;
}
Modified: trunk/Source/WebCore/platform/graphics/filters/FEConvolveMatrix.h (286588 => 286589)
--- trunk/Source/WebCore/platform/graphics/filters/FEConvolveMatrix.h 2021-12-07 06:20:45 UTC (rev 286588)
+++ trunk/Source/WebCore/platform/graphics/filters/FEConvolveMatrix.h 2021-12-07 07:19:06 UTC (rev 286589)
@@ -74,7 +74,7 @@
std::unique_ptr<FilterEffectApplier> createApplier(const Filter&) const override;
- WTF::TextStream& externalRepresentation(WTF::TextStream&, RepresentationType) const override;
+ WTF::TextStream& externalRepresentation(WTF::TextStream&, FilterRepresentation) const override;
IntSize m_kernelSize;
float m_divisor;
Modified: trunk/Source/WebCore/platform/graphics/filters/FEDiffuseLighting.cpp (286588 => 286589)
--- trunk/Source/WebCore/platform/graphics/filters/FEDiffuseLighting.cpp 2021-12-07 06:20:45 UTC (rev 286588)
+++ trunk/Source/WebCore/platform/graphics/filters/FEDiffuseLighting.cpp 2021-12-07 07:19:06 UTC (rev 286589)
@@ -47,16 +47,16 @@
return true;
}
-TextStream& FEDiffuseLighting::externalRepresentation(TextStream& ts, RepresentationType representation) const
+TextStream& FEDiffuseLighting::externalRepresentation(TextStream& ts, FilterRepresentation representation) const
{
ts << indent << "[feDiffuseLighting";
FilterEffect::externalRepresentation(ts, representation);
- ts << " surfaceScale=\"" << m_surfaceScale << "\" "
- << "diffuseConstant=\"" << m_diffuseConstant << "\" "
- << "kernelUnitLength=\"" << m_kernelUnitLengthX << ", " << m_kernelUnitLengthY << "\"]\n";
- TextStream::IndentScope indentScope(ts);
- inputEffect(0)->externalRepresentation(ts, representation);
+ ts << " surfaceScale=\"" << m_surfaceScale << "\"";
+ ts << " diffuseConstant=\"" << m_diffuseConstant << "\"";
+ ts << " kernelUnitLength=\"" << m_kernelUnitLengthX << ", " << m_kernelUnitLengthY << "\"";
+
+ ts << "]\n";
return ts;
}
Modified: trunk/Source/WebCore/platform/graphics/filters/FEDiffuseLighting.h (286588 => 286589)
--- trunk/Source/WebCore/platform/graphics/filters/FEDiffuseLighting.h 2021-12-07 06:20:45 UTC (rev 286588)
+++ trunk/Source/WebCore/platform/graphics/filters/FEDiffuseLighting.h 2021-12-07 07:19:06 UTC (rev 286589)
@@ -35,7 +35,7 @@
float diffuseConstant() const { return m_diffuseConstant; }
bool setDiffuseConstant(float);
- WTF::TextStream& externalRepresentation(WTF::TextStream&, RepresentationType) const override;
+ WTF::TextStream& externalRepresentation(WTF::TextStream&, FilterRepresentation) const override;
template<class Decoder> static std::optional<Ref<FEDiffuseLighting>> decode(Decoder&);
Modified: trunk/Source/WebCore/platform/graphics/filters/FEDisplacementMap.cpp (286588 => 286589)
--- trunk/Source/WebCore/platform/graphics/filters/FEDisplacementMap.cpp 2021-12-07 06:20:45 UTC (rev 286588)
+++ trunk/Source/WebCore/platform/graphics/filters/FEDisplacementMap.cpp 2021-12-07 07:19:06 UTC (rev 286589)
@@ -116,17 +116,16 @@
return ts;
}
-TextStream& FEDisplacementMap::externalRepresentation(TextStream& ts, RepresentationType representation) const
+TextStream& FEDisplacementMap::externalRepresentation(TextStream& ts, FilterRepresentation representation) const
{
ts << indent << "[feDisplacementMap";
FilterEffect::externalRepresentation(ts, representation);
- ts << " scale=\"" << m_scale << "\" "
- << "xChannelSelector=\"" << m_xChannelSelector << "\" "
- << "yChannelSelector=\"" << m_yChannelSelector << "\"]\n";
- TextStream::IndentScope indentScope(ts);
- inputEffect(0)->externalRepresentation(ts, representation);
- inputEffect(1)->externalRepresentation(ts, representation);
+ ts << " scale=\"" << m_scale << "\"";
+ ts << " xChannelSelector=\"" << m_xChannelSelector << "\"";
+ ts << " yChannelSelector=\"" << m_yChannelSelector << "\"";
+
+ ts << "]\n";
return ts;
}
Modified: trunk/Source/WebCore/platform/graphics/filters/FEDisplacementMap.h (286588 => 286589)
--- trunk/Source/WebCore/platform/graphics/filters/FEDisplacementMap.h 2021-12-07 06:20:45 UTC (rev 286588)
+++ trunk/Source/WebCore/platform/graphics/filters/FEDisplacementMap.h 2021-12-07 07:19:06 UTC (rev 286589)
@@ -61,7 +61,7 @@
std::unique_ptr<FilterEffectApplier> createApplier(const Filter&) const override;
- WTF::TextStream& externalRepresentation(WTF::TextStream&, RepresentationType) const override;
+ WTF::TextStream& externalRepresentation(WTF::TextStream&, FilterRepresentation) const override;
ChannelSelectorType m_xChannelSelector;
ChannelSelectorType m_yChannelSelector;
Modified: trunk/Source/WebCore/platform/graphics/filters/FEDropShadow.cpp (286588 => 286589)
--- trunk/Source/WebCore/platform/graphics/filters/FEDropShadow.cpp 2021-12-07 06:20:45 UTC (rev 286588)
+++ trunk/Source/WebCore/platform/graphics/filters/FEDropShadow.cpp 2021-12-07 07:19:06 UTC (rev 286589)
@@ -77,14 +77,17 @@
return FilterEffectApplier::create<FEDropShadowSoftwareApplier>(*this);
}
-TextStream& FEDropShadow::externalRepresentation(TextStream& ts, RepresentationType representation) const
+TextStream& FEDropShadow::externalRepresentation(TextStream& ts, FilterRepresentation representation) const
{
ts << indent <<"[feDropShadow";
FilterEffect::externalRepresentation(ts, representation);
- ts << " stdDeviation=\"" << m_stdX << ", " << m_stdY << "\" dx=\"" << m_dx << "\" dy=\"" << m_dy << "\" flood-color=\"" << serializationForRenderTreeAsText(m_shadowColor) <<"\" flood-opacity=\"" << m_shadowOpacity << "]\n";
- TextStream::IndentScope indentScope(ts);
- inputEffect(0)->externalRepresentation(ts, representation);
+ ts << " stdDeviation=\"" << m_stdX << ", " << m_stdY << "\"";
+ ts << " dx=\"" << m_dx << "\" dy=\"" << m_dy << "\"";
+ ts << " flood-color=\"" << serializationForRenderTreeAsText(m_shadowColor) << "\"";
+ ts << " flood-opacity=\"" << m_shadowOpacity << "\"";
+
+ ts << "]\n";
return ts;
}
Modified: trunk/Source/WebCore/platform/graphics/filters/FEDropShadow.h (286588 => 286589)
--- trunk/Source/WebCore/platform/graphics/filters/FEDropShadow.h 2021-12-07 06:20:45 UTC (rev 286588)
+++ trunk/Source/WebCore/platform/graphics/filters/FEDropShadow.h 2021-12-07 07:19:06 UTC (rev 286589)
@@ -59,7 +59,7 @@
std::unique_ptr<FilterEffectApplier> createApplier(const Filter&) const override;
- WTF::TextStream& externalRepresentation(WTF::TextStream&, RepresentationType) const override;
+ WTF::TextStream& externalRepresentation(WTF::TextStream&, FilterRepresentation) const override;
float m_stdX;
float m_stdY;
Modified: trunk/Source/WebCore/platform/graphics/filters/FEFlood.cpp (286588 => 286589)
--- trunk/Source/WebCore/platform/graphics/filters/FEFlood.cpp 2021-12-07 06:20:45 UTC (rev 286588)
+++ trunk/Source/WebCore/platform/graphics/filters/FEFlood.cpp 2021-12-07 07:19:06 UTC (rev 286589)
@@ -69,12 +69,15 @@
return FilterEffectApplier::create<FEFloodSoftwareApplier>(*this);
}
-TextStream& FEFlood::externalRepresentation(TextStream& ts, RepresentationType representation) const
+TextStream& FEFlood::externalRepresentation(TextStream& ts, FilterRepresentation representation) const
{
ts << indent << "[feFlood";
FilterEffect::externalRepresentation(ts, representation);
- ts << " flood-color=\"" << serializationForRenderTreeAsText(floodColor()) << "\" "
- << "flood-opacity=\"" << floodOpacity() << "\"]\n";
+
+ ts << " flood-color=\"" << serializationForRenderTreeAsText(floodColor()) << "\"";
+ ts << " flood-opacity=\"" << floodOpacity() << "\"";
+
+ ts << "]\n";
return ts;
}
Modified: trunk/Source/WebCore/platform/graphics/filters/FEFlood.h (286588 => 286589)
--- trunk/Source/WebCore/platform/graphics/filters/FEFlood.h 2021-12-07 06:20:45 UTC (rev 286588)
+++ trunk/Source/WebCore/platform/graphics/filters/FEFlood.h 2021-12-07 07:19:06 UTC (rev 286589)
@@ -53,7 +53,7 @@
std::unique_ptr<FilterEffectApplier> createApplier(const Filter&) const override;
- WTF::TextStream& externalRepresentation(WTF::TextStream&, RepresentationType) const override;
+ WTF::TextStream& externalRepresentation(WTF::TextStream&, FilterRepresentation) const override;
Color m_floodColor;
float m_floodOpacity;
Modified: trunk/Source/WebCore/platform/graphics/filters/FEGaussianBlur.cpp (286588 => 286589)
--- trunk/Source/WebCore/platform/graphics/filters/FEGaussianBlur.cpp 2021-12-07 06:20:45 UTC (rev 286588)
+++ trunk/Source/WebCore/platform/graphics/filters/FEGaussianBlur.cpp 2021-12-07 07:19:06 UTC (rev 286589)
@@ -136,14 +136,14 @@
return FilterEffectApplier::create<FEGaussianBlurSoftwareApplier>(*this);
}
-TextStream& FEGaussianBlur::externalRepresentation(TextStream& ts, RepresentationType representation) const
+TextStream& FEGaussianBlur::externalRepresentation(TextStream& ts, FilterRepresentation representation) const
{
ts << indent << "[feGaussianBlur";
FilterEffect::externalRepresentation(ts, representation);
- ts << " stdDeviation=\"" << m_stdX << ", " << m_stdY << "\"]\n";
- TextStream::IndentScope indentScope(ts);
- inputEffect(0)->externalRepresentation(ts, representation);
+ ts << " stdDeviation=\"" << m_stdX << ", " << m_stdY << "\"";
+
+ ts << "]\n";
return ts;
}
Modified: trunk/Source/WebCore/platform/graphics/filters/FEGaussianBlur.h (286588 => 286589)
--- trunk/Source/WebCore/platform/graphics/filters/FEGaussianBlur.h 2021-12-07 06:20:45 UTC (rev 286588)
+++ trunk/Source/WebCore/platform/graphics/filters/FEGaussianBlur.h 2021-12-07 07:19:06 UTC (rev 286589)
@@ -58,7 +58,7 @@
std::unique_ptr<FilterEffectApplier> createApplier(const Filter&) const override;
- WTF::TextStream& externalRepresentation(WTF::TextStream&, RepresentationType) const override;
+ WTF::TextStream& externalRepresentation(WTF::TextStream&, FilterRepresentation) const override;
float m_stdX;
float m_stdY;
Modified: trunk/Source/WebCore/platform/graphics/filters/FEMerge.cpp (286588 => 286589)
--- trunk/Source/WebCore/platform/graphics/filters/FEMerge.cpp 2021-12-07 06:20:45 UTC (rev 286588)
+++ trunk/Source/WebCore/platform/graphics/filters/FEMerge.cpp 2021-12-07 07:19:06 UTC (rev 286589)
@@ -45,17 +45,14 @@
return FilterEffectApplier::create<FEMergeSoftwareApplier>(*this);
}
-TextStream& FEMerge::externalRepresentation(TextStream& ts, RepresentationType representation) const
+TextStream& FEMerge::externalRepresentation(TextStream& ts, FilterRepresentation representation) const
{
ts << indent << "[feMerge";
FilterEffect::externalRepresentation(ts, representation);
- unsigned size = numberOfEffectInputs();
- ASSERT(size > 0);
- ts << " mergeNodes=\"" << size << "\"]\n";
- TextStream::IndentScope indentScope(ts);
- for (unsigned i = 0; i < size; ++i)
- inputEffect(i)->externalRepresentation(ts, representation);
+ ts << " mergeNodes=\"" << m_numberOfEffectInputs << "\"";
+
+ ts << "]\n";
return ts;
}
Modified: trunk/Source/WebCore/platform/graphics/filters/FEMerge.h (286588 => 286589)
--- trunk/Source/WebCore/platform/graphics/filters/FEMerge.h 2021-12-07 06:20:45 UTC (rev 286588)
+++ trunk/Source/WebCore/platform/graphics/filters/FEMerge.h 2021-12-07 07:19:06 UTC (rev 286589)
@@ -38,7 +38,7 @@
std::unique_ptr<FilterEffectApplier> createApplier(const Filter&) const override;
- WTF::TextStream& externalRepresentation(WTF::TextStream&, RepresentationType) const override;
+ WTF::TextStream& externalRepresentation(WTF::TextStream&, FilterRepresentation) const override;
unsigned m_numberOfEffectInputs { 0 };
};
Modified: trunk/Source/WebCore/platform/graphics/filters/FEMorphology.cpp (286588 => 286589)
--- trunk/Source/WebCore/platform/graphics/filters/FEMorphology.cpp 2021-12-07 06:20:45 UTC (rev 286588)
+++ trunk/Source/WebCore/platform/graphics/filters/FEMorphology.cpp 2021-12-07 07:19:06 UTC (rev 286589)
@@ -101,15 +101,15 @@
return ts;
}
-TextStream& FEMorphology::externalRepresentation(TextStream& ts, RepresentationType representation) const
+TextStream& FEMorphology::externalRepresentation(TextStream& ts, FilterRepresentation representation) const
{
ts << indent << "[feMorphology";
FilterEffect::externalRepresentation(ts, representation);
- ts << " operator=\"" << morphologyOperator() << "\" "
- << "radius=\"" << radiusX() << ", " << radiusY() << "\"]\n";
- TextStream::IndentScope indentScope(ts);
- inputEffect(0)->externalRepresentation(ts, representation);
+ ts << " operator=\"" << morphologyOperator() << "\"";
+ ts << " radius=\"" << radiusX() << ", " << radiusY() << "\"";
+
+ ts << "]\n";
return ts;
}
Modified: trunk/Source/WebCore/platform/graphics/filters/FEMorphology.h (286588 => 286589)
--- trunk/Source/WebCore/platform/graphics/filters/FEMorphology.h 2021-12-07 06:20:45 UTC (rev 286588)
+++ trunk/Source/WebCore/platform/graphics/filters/FEMorphology.h 2021-12-07 07:19:06 UTC (rev 286589)
@@ -57,7 +57,7 @@
std::unique_ptr<FilterEffectApplier> createApplier(const Filter&) const override;
- WTF::TextStream& externalRepresentation(WTF::TextStream&, RepresentationType) const override;
+ WTF::TextStream& externalRepresentation(WTF::TextStream&, FilterRepresentation) const override;
MorphologyOperatorType m_type;
float m_radiusX;
Modified: trunk/Source/WebCore/platform/graphics/filters/FEOffset.cpp (286588 => 286589)
--- trunk/Source/WebCore/platform/graphics/filters/FEOffset.cpp 2021-12-07 06:20:45 UTC (rev 286588)
+++ trunk/Source/WebCore/platform/graphics/filters/FEOffset.cpp 2021-12-07 07:19:06 UTC (rev 286589)
@@ -70,14 +70,14 @@
return FilterEffectApplier::create<FEOffsetSoftwareApplier>(*this);
}
-TextStream& FEOffset::externalRepresentation(TextStream& ts, RepresentationType representation) const
+TextStream& FEOffset::externalRepresentation(TextStream& ts, FilterRepresentation representation) const
{
ts << indent << "[feOffset";
FilterEffect::externalRepresentation(ts, representation);
- ts << " dx=\"" << dx() << "\" dy=\"" << dy() << "\"]\n";
- TextStream::IndentScope indentScope(ts);
- inputEffect(0)->externalRepresentation(ts, representation);
+ ts << " dx=\"" << dx() << "\" dy=\"" << dy() << "\"";
+
+ ts << "]\n";
return ts;
}
Modified: trunk/Source/WebCore/platform/graphics/filters/FEOffset.h (286588 => 286589)
--- trunk/Source/WebCore/platform/graphics/filters/FEOffset.h 2021-12-07 06:20:45 UTC (rev 286588)
+++ trunk/Source/WebCore/platform/graphics/filters/FEOffset.h 2021-12-07 07:19:06 UTC (rev 286589)
@@ -48,7 +48,7 @@
std::unique_ptr<FilterEffectApplier> createApplier(const Filter&) const override;
- WTF::TextStream& externalRepresentation(WTF::TextStream&, RepresentationType) const override;
+ WTF::TextStream& externalRepresentation(WTF::TextStream&, FilterRepresentation) const override;
float m_dx;
float m_dy;
Modified: trunk/Source/WebCore/platform/graphics/filters/FESpecularLighting.cpp (286588 => 286589)
--- trunk/Source/WebCore/platform/graphics/filters/FESpecularLighting.cpp 2021-12-07 06:20:45 UTC (rev 286588)
+++ trunk/Source/WebCore/platform/graphics/filters/FESpecularLighting.cpp 2021-12-07 07:19:06 UTC (rev 286589)
@@ -55,16 +55,16 @@
return true;
}
-TextStream& FESpecularLighting::externalRepresentation(TextStream& ts, RepresentationType representation) const
+TextStream& FESpecularLighting::externalRepresentation(TextStream& ts, FilterRepresentation representation) const
{
ts << indent << "[feSpecularLighting";
FilterEffect::externalRepresentation(ts, representation);
- ts << " surfaceScale=\"" << m_surfaceScale << "\" "
- << "specualConstant=\"" << m_specularConstant << "\" "
- << "specularExponent=\"" << m_specularExponent << "\"]\n";
+
+ ts << " surfaceScale=\"" << m_surfaceScale << "\"";
+ ts << " specualConstant=\"" << m_specularConstant << "\"";
+ ts << " specularExponent=\"" << m_specularExponent << "\"";
- TextStream::IndentScope indentScope(ts);
- inputEffect(0)->externalRepresentation(ts, representation);
+ ts << "]\n";
return ts;
}
Modified: trunk/Source/WebCore/platform/graphics/filters/FESpecularLighting.h (286588 => 286589)
--- trunk/Source/WebCore/platform/graphics/filters/FESpecularLighting.h 2021-12-07 06:20:45 UTC (rev 286588)
+++ trunk/Source/WebCore/platform/graphics/filters/FESpecularLighting.h 2021-12-07 07:19:06 UTC (rev 286589)
@@ -36,7 +36,7 @@
float specularExponent() const { return m_specularExponent; }
bool setSpecularExponent(float);
- WTF::TextStream& externalRepresentation(WTF::TextStream&, RepresentationType) const override;
+ WTF::TextStream& externalRepresentation(WTF::TextStream&, FilterRepresentation) const override;
template<class Decoder> static std::optional<Ref<FESpecularLighting>> decode(Decoder&);
Modified: trunk/Source/WebCore/platform/graphics/filters/FETile.cpp (286588 => 286589)
--- trunk/Source/WebCore/platform/graphics/filters/FETile.cpp 2021-12-07 06:20:45 UTC (rev 286588)
+++ trunk/Source/WebCore/platform/graphics/filters/FETile.cpp 2021-12-07 07:19:06 UTC (rev 286589)
@@ -53,15 +53,11 @@
return FilterEffectApplier::create<FETileSoftwareApplier>(*this);
}
-TextStream& FETile::externalRepresentation(TextStream& ts, RepresentationType representation) const
+TextStream& FETile::externalRepresentation(TextStream& ts, FilterRepresentation representation) const
{
ts << indent << "[feTile";
FilterEffect::externalRepresentation(ts, representation);
ts << "]\n";
-
- TextStream::IndentScope indentScope(ts);
- inputEffect(0)->externalRepresentation(ts, representation);
-
return ts;
}
Modified: trunk/Source/WebCore/platform/graphics/filters/FETile.h (286588 => 286589)
--- trunk/Source/WebCore/platform/graphics/filters/FETile.h 2021-12-07 06:20:45 UTC (rev 286588)
+++ trunk/Source/WebCore/platform/graphics/filters/FETile.h 2021-12-07 07:19:06 UTC (rev 286589)
@@ -39,7 +39,7 @@
std::unique_ptr<FilterEffectApplier> createApplier(const Filter&) const override;
- WTF::TextStream& externalRepresentation(WTF::TextStream&, RepresentationType) const override;
+ WTF::TextStream& externalRepresentation(WTF::TextStream&, FilterRepresentation) const override;
};
} // namespace WebCore
Modified: trunk/Source/WebCore/platform/graphics/filters/FETurbulence.cpp (286588 => 286589)
--- trunk/Source/WebCore/platform/graphics/filters/FETurbulence.cpp 2021-12-07 06:20:45 UTC (rev 286588)
+++ trunk/Source/WebCore/platform/graphics/filters/FETurbulence.cpp 2021-12-07 07:19:06 UTC (rev 286589)
@@ -122,15 +122,18 @@
return ts;
}
-TextStream& FETurbulence::externalRepresentation(TextStream& ts, RepresentationType representation) const
+TextStream& FETurbulence::externalRepresentation(TextStream& ts, FilterRepresentation representation) const
{
ts << indent << "[feTurbulence";
FilterEffect::externalRepresentation(ts, representation);
- ts << " type=\"" << type() << "\" "
- << "baseFrequency=\"" << baseFrequencyX() << ", " << baseFrequencyY() << "\" "
- << "seed=\"" << seed() << "\" "
- << "numOctaves=\"" << numOctaves() << "\" "
- << "stitchTiles=\"" << stitchTiles() << "\"]\n";
+
+ ts << " type=\"" << type() << "\"";
+ ts << " baseFrequency=\"" << baseFrequencyX() << ", " << baseFrequencyY() << "\"";
+ ts << " seed=\"" << seed() << "\"";
+ ts << " numOctaves=\"" << numOctaves() << "\"";
+ ts << " stitchTiles=\"" << stitchTiles() << "\"";
+
+ ts << "]\n";
return ts;
}
Modified: trunk/Source/WebCore/platform/graphics/filters/FETurbulence.h (286588 => 286589)
--- trunk/Source/WebCore/platform/graphics/filters/FETurbulence.h 2021-12-07 06:20:45 UTC (rev 286588)
+++ trunk/Source/WebCore/platform/graphics/filters/FETurbulence.h 2021-12-07 07:19:06 UTC (rev 286589)
@@ -67,7 +67,7 @@
std::unique_ptr<FilterEffectApplier> createApplier(const Filter&) const override;
- WTF::TextStream& externalRepresentation(WTF::TextStream&, RepresentationType) const override;
+ WTF::TextStream& externalRepresentation(WTF::TextStream&, FilterRepresentation) const override;
TurbulenceType m_type;
float m_baseFrequencyX;
Modified: trunk/Source/WebCore/platform/graphics/filters/Filter.h (286588 => 286589)
--- trunk/Source/WebCore/platform/graphics/filters/Filter.h 2021-12-07 06:20:45 UTC (rev 286588)
+++ trunk/Source/WebCore/platform/graphics/filters/Filter.h 2021-12-07 07:19:06 UTC (rev 286589)
@@ -21,7 +21,6 @@
#pragma once
-#include "FilterEffectGeometry.h"
#include "FilterFunction.h"
#include "FloatRect.h"
#include "GraphicsTypes.h"
Modified: trunk/Source/WebCore/platform/graphics/filters/FilterEffect.cpp (286588 => 286589)
--- trunk/Source/WebCore/platform/graphics/filters/FilterEffect.cpp 2021-12-07 06:20:45 UTC (rev 286588)
+++ trunk/Source/WebCore/platform/graphics/filters/FilterEffect.cpp 2021-12-07 07:19:06 UTC (rev 286589)
@@ -161,12 +161,12 @@
m_filterImage->transformToColorSpace(destinationColorSpace);
}
-TextStream& FilterEffect::externalRepresentation(TextStream& ts, RepresentationType representationType) const
+TextStream& FilterEffect::externalRepresentation(TextStream& ts, FilterRepresentation representation) const
{
// FIXME: We should dump the subRegions of the filter primitives here later. This isn't
// possible at the moment, because we need more detailed informations from the target object.
- if (representationType == RepresentationType::Debugging) {
+ if (representation == FilterRepresentation::Debugging) {
TextStream::IndentScope indentScope(ts);
ts.dumpProperty("operating colorspace", operatingColorSpace());
ts << "\n" << indent;
@@ -174,11 +174,11 @@
return ts;
}
-TextStream& operator<<(TextStream& ts, const FilterEffect& filter)
+TextStream& operator<<(TextStream& ts, const FilterEffect& effect)
{
// Use a new stream because we want multiline mode for logging filters.
TextStream filterStream;
- filter.externalRepresentation(filterStream, FilterEffect::RepresentationType::Debugging);
+ effect.externalRepresentation(filterStream, FilterRepresentation::Debugging);
return ts << filterStream.release();
}
Modified: trunk/Source/WebCore/platform/graphics/filters/FilterEffect.h (286588 => 286589)
--- trunk/Source/WebCore/platform/graphics/filters/FilterEffect.h 2021-12-07 06:20:45 UTC (rev 286588)
+++ trunk/Source/WebCore/platform/graphics/filters/FilterEffect.h 2021-12-07 07:19:06 UTC (rev 286589)
@@ -58,8 +58,7 @@
const DestinationColorSpace& operatingColorSpace() const { return m_operatingColorSpace; }
virtual void setOperatingColorSpace(const DestinationColorSpace& colorSpace) { m_operatingColorSpace = colorSpace; }
- enum class RepresentationType { TestOutput, Debugging };
- virtual WTF::TextStream& externalRepresentation(WTF::TextStream&, RepresentationType = RepresentationType::TestOutput) const;
+ WTF::TextStream& externalRepresentation(WTF::TextStream&, FilterRepresentation) const override;
protected:
using FilterFunction::FilterFunction;
Modified: trunk/Source/WebCore/platform/graphics/filters/FilterFunction.h (286588 => 286589)
--- trunk/Source/WebCore/platform/graphics/filters/FilterFunction.h 2021-12-07 06:20:45 UTC (rev 286588)
+++ trunk/Source/WebCore/platform/graphics/filters/FilterFunction.h 2021-12-07 07:19:06 UTC (rev 286589)
@@ -39,6 +39,11 @@
class Filter;
+enum class FilterRepresentation : uint8_t {
+ TestOutput,
+ Debugging
+};
+
class FilterFunction : public RefCounted<FilterFunction> {
public:
enum class Type : uint8_t {
@@ -93,6 +98,8 @@
virtual IntOutsets outsets() const { return { }; }
virtual void clearResult() { }
+ virtual WTF::TextStream& externalRepresentation(WTF::TextStream&, FilterRepresentation = FilterRepresentation::TestOutput) const = 0;
+
private:
Type m_filterType;
};
Modified: trunk/Source/WebCore/platform/graphics/filters/SourceAlpha.cpp (286588 => 286589)
--- trunk/Source/WebCore/platform/graphics/filters/SourceAlpha.cpp 2021-12-07 06:20:45 UTC (rev 286588)
+++ trunk/Source/WebCore/platform/graphics/filters/SourceAlpha.cpp 2021-12-07 07:19:06 UTC (rev 286589)
@@ -49,7 +49,7 @@
return FilterEffectApplier::create<SourceAlphaSoftwareApplier>(*this);
}
-TextStream& SourceAlpha::externalRepresentation(TextStream& ts, RepresentationType) const
+TextStream& SourceAlpha::externalRepresentation(TextStream& ts, FilterRepresentation) const
{
ts << indent << "[SourceAlpha]\n";
return ts;
Modified: trunk/Source/WebCore/platform/graphics/filters/SourceAlpha.h (286588 => 286589)
--- trunk/Source/WebCore/platform/graphics/filters/SourceAlpha.h 2021-12-07 06:20:45 UTC (rev 286588)
+++ trunk/Source/WebCore/platform/graphics/filters/SourceAlpha.h 2021-12-07 07:19:06 UTC (rev 286589)
@@ -37,7 +37,7 @@
std::unique_ptr<FilterEffectApplier> createApplier(const Filter&) const override;
- WTF::TextStream& externalRepresentation(WTF::TextStream&, RepresentationType) const override;
+ WTF::TextStream& externalRepresentation(WTF::TextStream&, FilterRepresentation) const override;
};
} //namespace WebCore
Modified: trunk/Source/WebCore/platform/graphics/filters/SourceGraphic.cpp (286588 => 286589)
--- trunk/Source/WebCore/platform/graphics/filters/SourceGraphic.cpp 2021-12-07 06:20:45 UTC (rev 286588)
+++ trunk/Source/WebCore/platform/graphics/filters/SourceGraphic.cpp 2021-12-07 07:19:06 UTC (rev 286589)
@@ -56,7 +56,7 @@
return FilterEffectApplier::create<SourceGraphicSoftwareApplier>(*this);
}
-TextStream& SourceGraphic::externalRepresentation(TextStream& ts, RepresentationType) const
+TextStream& SourceGraphic::externalRepresentation(TextStream& ts, FilterRepresentation) const
{
ts << indent << "[SourceGraphic]\n";
return ts;
Modified: trunk/Source/WebCore/platform/graphics/filters/SourceGraphic.h (286588 => 286589)
--- trunk/Source/WebCore/platform/graphics/filters/SourceGraphic.h 2021-12-07 06:20:45 UTC (rev 286588)
+++ trunk/Source/WebCore/platform/graphics/filters/SourceGraphic.h 2021-12-07 07:19:06 UTC (rev 286589)
@@ -42,7 +42,7 @@
std::unique_ptr<FilterEffectApplier> createApplier(const Filter&) const override;
- WTF::TextStream& externalRepresentation(WTF::TextStream&, RepresentationType) const override;
+ WTF::TextStream& externalRepresentation(WTF::TextStream&, FilterRepresentation) const override;
};
} //namespace WebCore
Modified: trunk/Source/WebCore/rendering/CSSFilter.cpp (286588 => 286589)
--- trunk/Source/WebCore/rendering/CSSFilter.cpp 2021-12-07 06:20:45 UTC (rev 286588)
+++ trunk/Source/WebCore/rendering/CSSFilter.cpp 2021-12-07 07:19:06 UTC (rev 286589)
@@ -404,4 +404,22 @@
return m_outsets;
}
+TextStream& CSSFilter::externalRepresentation(TextStream& ts, FilterRepresentation representation) const
+{
+ unsigned level = 0;
+
+ for (auto it = m_functions.rbegin(), end = m_functions.rend(); it != end; ++it) {
+ auto& function = *it;
+
+ // SourceAlpha is a built-in effect. No need to say SourceGraphic is its input.
+ if (function->filterType() == FilterEffect::Type::SourceAlpha)
+ ++it;
+
+ TextStream::IndentScope indentScope(ts, level++);
+ function->externalRepresentation(ts, representation);
+ }
+
+ return ts;
+}
+
} // namespace WebCore
Modified: trunk/Source/WebCore/rendering/CSSFilter.h (286588 => 286589)
--- trunk/Source/WebCore/rendering/CSSFilter.h 2021-12-07 06:20:45 UTC (rev 286588)
+++ trunk/Source/WebCore/rendering/CSSFilter.h 2021-12-07 07:19:06 UTC (rev 286589)
@@ -68,6 +68,8 @@
bool supportsCoreImageRendering() const final;
#endif
+ WTF::TextStream& externalRepresentation(WTF::TextStream&, FilterRepresentation) const final;
+
bool m_hasFilterThatMovesPixels { false };
bool m_hasFilterThatShouldBeRestrictedBySecurityOrigin { false };
Modified: trunk/Source/WebCore/rendering/svg/SVGRenderTreeAsText.cpp (286588 => 286589)
--- trunk/Source/WebCore/rendering/svg/SVGRenderTreeAsText.cpp 2021-12-07 06:20:45 UTC (rev 286588)
+++ trunk/Source/WebCore/rendering/svg/SVGRenderTreeAsText.cpp 2021-12-07 07:19:06 UTC (rev 286589)
@@ -434,9 +434,7 @@
auto dummyFilter = SVGFilter::create(filter.filterElement(), builder, RenderingMode::Unaccelerated, dummyScale, dummyRect, dummyRect);
if (dummyFilter) {
TextStream::IndentScope indentScope(ts);
-
- if (auto lastEffect = dummyFilter->lastEffect())
- lastEffect->externalRepresentation(ts);
+ dummyFilter->externalRepresentation(ts, FilterRepresentation::TestOutput);
}
} else if (resource.resourceType() == ClipperResourceType) {
const auto& clipper = static_cast<const RenderSVGResourceClipper&>(resource);
Modified: trunk/Source/WebCore/svg/graphics/filters/SVGFEImage.cpp (286588 => 286589)
--- trunk/Source/WebCore/svg/graphics/filters/SVGFEImage.cpp 2021-12-07 06:20:45 UTC (rev 286588)
+++ trunk/Source/WebCore/svg/graphics/filters/SVGFEImage.cpp 2021-12-07 07:19:06 UTC (rev 286589)
@@ -112,12 +112,15 @@
return FilterEffectApplier::create<FEImageSoftwareApplier>(*this);
}
-TextStream& FEImage::externalRepresentation(TextStream& ts, RepresentationType representation) const
+TextStream& FEImage::externalRepresentation(TextStream& ts, FilterRepresentation representation) const
{
ts << indent << "[feImage";
FilterEffect::externalRepresentation(ts, representation);
- ts << " image-size=\"" << m_sourceImageRect.width() << "x" << m_sourceImageRect.height() << "\"]\n";
+
+ ts << " image-size=\"" << m_sourceImageRect.width() << "x" << m_sourceImageRect.height() << "\"";
// FIXME: should this dump also object returned by SVGFEImage::image() ?
+
+ ts << "]\n";
return ts;
}
Modified: trunk/Source/WebCore/svg/graphics/filters/SVGFEImage.h (286588 => 286589)
--- trunk/Source/WebCore/svg/graphics/filters/SVGFEImage.h 2021-12-07 06:20:45 UTC (rev 286588)
+++ trunk/Source/WebCore/svg/graphics/filters/SVGFEImage.h 2021-12-07 07:19:06 UTC (rev 286589)
@@ -54,7 +54,7 @@
std::unique_ptr<FilterEffectApplier> createApplier(const Filter&) const final;
- WTF::TextStream& externalRepresentation(WTF::TextStream&, RepresentationType) const final;
+ WTF::TextStream& externalRepresentation(WTF::TextStream&, FilterRepresentation) const final;
SourceImage m_sourceImage;
FloatRect m_sourceImageRect;
Modified: trunk/Source/WebCore/svg/graphics/filters/SVGFilter.cpp (286588 => 286589)
--- trunk/Source/WebCore/svg/graphics/filters/SVGFilter.cpp 2021-12-07 06:20:45 UTC (rev 286588)
+++ trunk/Source/WebCore/svg/graphics/filters/SVGFilter.cpp 2021-12-07 07:19:06 UTC (rev 286589)
@@ -133,4 +133,20 @@
term.effect->clearResult();
}
+TextStream& SVGFilter::externalRepresentation(TextStream& ts, FilterRepresentation representation) const
+{
+ for (auto it = m_expression.rbegin(), end = m_expression.rend(); it != end; ++it) {
+ auto& term = *it;
+
+ // SourceAlpha is a built-in effect. No need to say SourceGraphic is its input.
+ if (term.effect->filterType() == FilterEffect::Type::SourceAlpha)
+ ++it;
+
+ TextStream::IndentScope indentScope(ts, term.level);
+ term.effect->externalRepresentation(ts, representation);
+ }
+
+ return ts;
+}
+
} // namespace WebCore
Modified: trunk/Source/WebCore/svg/graphics/filters/SVGFilter.h (286588 => 286589)
--- trunk/Source/WebCore/svg/graphics/filters/SVGFilter.h 2021-12-07 06:20:45 UTC (rev 286588)
+++ trunk/Source/WebCore/svg/graphics/filters/SVGFilter.h 2021-12-07 07:19:06 UTC (rev 286589)
@@ -46,6 +46,8 @@
RefPtr<FilterImage> apply() final;
+ WTF::TextStream& externalRepresentation(WTF::TextStream&, FilterRepresentation) const final;
+
private:
SVGFilter(RenderingMode, const FloatSize& filterScale, ClipOperation, const FloatRect& filterRegion, const FloatRect& targetBoundingBox, SVGUnitTypes::SVGUnitType primitiveUnits);
Modified: trunk/Source/WebCore/svg/graphics/filters/SVGFilterBuilder.cpp (286588 => 286589)
--- trunk/Source/WebCore/svg/graphics/filters/SVGFilterBuilder.cpp 2021-12-07 06:20:45 UTC (rev 286588)
+++ trunk/Source/WebCore/svg/graphics/filters/SVGFilterBuilder.cpp 2021-12-07 07:19:06 UTC (rev 286589)
@@ -41,7 +41,7 @@
addBuiltinEffects();
}
-static OptionSet<FilterEffectGeometry::Flags> boundarySetFlagsForElement(SVGElement& element)
+static OptionSet<FilterEffectGeometry::Flags> effectGeometryFlagsForElement(SVGElement& element)
{
OptionSet<FilterEffectGeometry::Flags> flags;
@@ -108,7 +108,7 @@
if (!effect)
break;
- if (auto flags = boundarySetFlagsForElement(effectElement)) {
+ if (auto flags = effectGeometryFlagsForElement(effectElement)) {
auto effectBoundaries = SVGLengthContext::resolveRectangle<SVGFilterPrimitiveStandardAttributes>(&effectElement, m_primitiveUnits, m_targetBoundingBox);
m_effectGeometryMap.add(*effect, FilterEffectGeometry(effectBoundaries, flags));
}
@@ -209,7 +209,7 @@
return std::nullopt;
}
-bool SVGFilterBuilder::buildEffectExpression(const RefPtr<FilterEffect>& effect, FilterEffectVector& stack, SVGFilterExpression& _expression_) const
+bool SVGFilterBuilder::buildEffectExpression(const RefPtr<FilterEffect>& effect, FilterEffectVector& stack, unsigned level, SVGFilterExpression& _expression_) const
{
// A cycle is detected.
if (stack.contains(effect))
@@ -217,10 +217,10 @@
stack.append(effect);
- _expression_.append({ *effect, effectGeometry(*effect) });
+ _expression_.append({ *effect, effectGeometry(*effect), level });
for (auto& inputEffect : effect->inputEffects()) {
- if (!buildEffectExpression(inputEffect, stack, _expression_))
+ if (!buildEffectExpression(inputEffect, stack, level + 1, _expression_))
return false;
}
@@ -237,7 +237,7 @@
return false;
FilterEffectVector stack;
- if (!buildEffectExpression(m_lastEffect, stack, _expression_))
+ if (!buildEffectExpression(m_lastEffect, stack, 0, _expression_))
return false;
_expression_.reverse();
Modified: trunk/Source/WebCore/svg/graphics/filters/SVGFilterBuilder.h (286588 => 286589)
--- trunk/Source/WebCore/svg/graphics/filters/SVGFilterBuilder.h 2021-12-07 06:20:45 UTC (rev 286588)
+++ trunk/Source/WebCore/svg/graphics/filters/SVGFilterBuilder.h 2021-12-07 07:19:06 UTC (rev 286589)
@@ -79,7 +79,7 @@
}
std::optional<FilterEffectGeometry> effectGeometry(FilterEffect&) const;
- bool buildEffectExpression(const RefPtr<FilterEffect>&, FilterEffectVector& stack, SVGFilterExpression&) const;
+ bool buildEffectExpression(const RefPtr<FilterEffect>&, FilterEffectVector& stack, unsigned level, SVGFilterExpression&) const;
HashMap<AtomString, RefPtr<FilterEffect>> m_builtinEffects;
HashMap<AtomString, RefPtr<FilterEffect>> m_namedEffects;
Modified: trunk/Source/WebCore/svg/graphics/filters/SVGFilterExpression.h (286588 => 286589)
--- trunk/Source/WebCore/svg/graphics/filters/SVGFilterExpression.h 2021-12-07 06:20:45 UTC (rev 286588)
+++ trunk/Source/WebCore/svg/graphics/filters/SVGFilterExpression.h 2021-12-07 07:19:06 UTC (rev 286589)
@@ -35,6 +35,7 @@
struct SVGFilterExpressionTerm {
Ref<FilterEffect> effect;
std::optional<FilterEffectGeometry> geometry;
+ unsigned level;
};
using SVGFilterExpression = Vector<SVGFilterExpressionTerm>;