<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[286164] trunk/Source/WebCore</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/286164">286164</a></dd>
<dt>Author</dt> <dd>said@apple.com</dd>
<dt>Date</dt> <dd>2021-11-25 03:44:44 -0800 (Thu, 25 Nov 2021)</dd>
</dl>

<h3>Log Message</h3>
<pre>[GPU Process] Make FilterEffect appliers take FilterImages in their apply() methods
https://bugs.webkit.org/show_bug.cgi?id=233487

Reviewed by Cameron McCormack.

Eventually the FilterImage will be removed from FilterEffect. So this is
a step towards making the FilterEffect hold the effect data only. To do
his change, FilterImage needs to hold two new members: primitiveSubregion
and isAlphaImage.

FilterEffect::setIsAlphaImage() is not needed and isAlphaImage() will be
a virtual function but it will be renamed resultIsAlphaImage(). The result
of this function will be stored in the result FilterImage.

FEGaussianBlurSoftwareApplier::apply() is the only user of isAlphaImage.

* WebCore.xcodeproj/project.pbxproj:
* platform/graphics/filters/FEBlend.cpp:
(WebCore::FEBlend::platformApplySoftware):
* platform/graphics/filters/FEColorMatrix.cpp:
(WebCore::FEColorMatrix::resultIsAlphaImage const):
(WebCore::FEColorMatrix::platformApplySoftware):
* platform/graphics/filters/FEColorMatrix.h:
* platform/graphics/filters/FEComponentTransfer.cpp:
(WebCore::FEComponentTransfer::platformApplySoftware):
* platform/graphics/filters/FEComposite.cpp:
(WebCore::FEComposite::platformApplySoftware):
* platform/graphics/filters/FEConvolveMatrix.cpp:
(WebCore::FEConvolveMatrix::platformApplySoftware):
* platform/graphics/filters/FEDisplacementMap.cpp:
(WebCore::FEDisplacementMap::platformApplySoftware):
* platform/graphics/filters/FEDropShadow.cpp:
(WebCore::FEDropShadow::platformApplySoftware):
* platform/graphics/filters/FEFlood.cpp:
(WebCore::FEFlood::platformApplySoftware):
* platform/graphics/filters/FEGaussianBlur.cpp:
(WebCore::FEGaussianBlur::resultIsAlphaImage const):
(WebCore::FEGaussianBlur::platformApplySoftware):
* platform/graphics/filters/FEGaussianBlur.h:
* platform/graphics/filters/FELighting.cpp:
(WebCore::FELighting::platformApplySoftware):
* platform/graphics/filters/FEMerge.cpp:
(WebCore::FEMerge::platformApplySoftware):
* platform/graphics/filters/FEMorphology.cpp:
(WebCore::FEMorphology::resultIsAlphaImage const):
(WebCore::FEMorphology::platformApplySoftware):
* platform/graphics/filters/FEMorphology.h:
* platform/graphics/filters/FEOffset.cpp:
(WebCore::FEOffset::resultIsAlphaImage const):
(WebCore::FEOffset::platformApplySoftware):
* platform/graphics/filters/FEOffset.h:
* platform/graphics/filters/FETile.cpp:
(WebCore::FETile::resultIsAlphaImage const):
(WebCore::FETile::platformApplySoftware):
* platform/graphics/filters/FETile.h:
* platform/graphics/filters/FETurbulence.cpp:
(WebCore::FETurbulence::platformApplySoftware):
* platform/graphics/filters/Filter.h:
(WebCore::Filter::maxEffectRect const):
* platform/graphics/filters/FilterEffect.cpp:
(WebCore::FilterEffect::apply):
(WebCore::FilterEffect::inputFilterImages const):
(WebCore::FilterEffect::externalRepresentation const):
(WebCore::FilterEffect::createResult): Deleted.
(WebCore::FilterEffect::imageBufferResult): Deleted.
(WebCore::FilterEffect::pixelBufferResult): Deleted.
(WebCore::FilterEffect::getPixelBufferResult): Deleted.
(WebCore::FilterEffect::copyPixelBufferResult const): Deleted.
* platform/graphics/filters/FilterEffect.h:
(WebCore::FilterEffect::filterImage const):
(WebCore::FilterEffect::resultIsAlphaImage const):
(WebCore::FilterEffect::isAlphaImage const): Deleted.
(WebCore::FilterEffect::setIsAlphaImage): Deleted.
(WebCore::FilterEffect::normalizedFloats): Deleted.
* platform/graphics/filters/FilterEffectApplier.h:
* platform/graphics/filters/FilterImage.cpp:
(WebCore::FilterImage::create):
(WebCore::FilterImage::FilterImage):
* platform/graphics/filters/FilterImage.h:
(WebCore::FilterImage::primitiveSubregion const):
(WebCore::FilterImage::isAlphaImage const):
* platform/graphics/filters/FilterImageVector.h: Copied from Source/WebCore/platform/graphics/filters/FilterEffectApplier.h.
* platform/graphics/filters/SourceAlpha.cpp:
(WebCore::SourceAlpha::platformApplySoftware):
* platform/graphics/filters/SourceGraphic.cpp:
(WebCore::SourceGraphic::platformApplySoftware):
* platform/graphics/filters/software/FEBlendSoftwareApplier.cpp:
(WebCore::FEBlendSoftwareApplier::apply):
* platform/graphics/filters/software/FEBlendSoftwareApplier.h:
* platform/graphics/filters/software/FEColorMatrixSoftwareApplier.cpp:
(WebCore::FEColorMatrixSoftwareApplier::apply):
* platform/graphics/filters/software/FEColorMatrixSoftwareApplier.h:
* platform/graphics/filters/software/FEComponentTransferSoftwareApplier.cpp:
(WebCore::FEComponentTransferSoftwareApplier::apply):
* platform/graphics/filters/software/FEComponentTransferSoftwareApplier.h:
* platform/graphics/filters/software/FECompositeSoftwareApplier.cpp:
(WebCore::FECompositeSoftwareApplier::applyArithmetic):
(WebCore::FECompositeSoftwareApplier::applyNonArithmetic):
(WebCore::FECompositeSoftwareApplier::apply):
* platform/graphics/filters/software/FECompositeSoftwareApplier.h:
* platform/graphics/filters/software/FEConvolveMatrixSoftwareApplier.cpp:
(WebCore::FEConvolveMatrixSoftwareApplier::apply):
* platform/graphics/filters/software/FEConvolveMatrixSoftwareApplier.h:
* platform/graphics/filters/software/FEDisplacementMapSoftwareApplier.cpp:
(WebCore::FEDisplacementMapSoftwareApplier::apply):
* platform/graphics/filters/software/FEDisplacementMapSoftwareApplier.h:
* platform/graphics/filters/software/FEDropShadowSoftwareApplier.cpp:
(WebCore::FEDropShadowSoftwareApplier::apply):
* platform/graphics/filters/software/FEDropShadowSoftwareApplier.h:
* platform/graphics/filters/software/FEFloodSoftwareApplier.cpp:
(WebCore::FEFloodSoftwareApplier::apply):
* platform/graphics/filters/software/FEFloodSoftwareApplier.h:
* platform/graphics/filters/software/FEGaussianBlurSoftwareApplier.cpp:
(WebCore::FEGaussianBlurSoftwareApplier::apply):
* platform/graphics/filters/software/FEGaussianBlurSoftwareApplier.h:
* platform/graphics/filters/software/FELightingSoftwareApplier.cpp:
(WebCore::FELightingSoftwareApplier::apply):
* platform/graphics/filters/software/FELightingSoftwareApplier.h:
* platform/graphics/filters/software/FEMergeSoftwareApplier.cpp:
(WebCore::FEMergeSoftwareApplier::apply):
* platform/graphics/filters/software/FEMergeSoftwareApplier.h:
* platform/graphics/filters/software/FEMorphologySoftwareApplier.cpp:
(WebCore::FEMorphologySoftwareApplier::apply):
* platform/graphics/filters/software/FEMorphologySoftwareApplier.h:
* platform/graphics/filters/software/FEOffsetSoftwareApplier.cpp:
(WebCore::FEOffsetSoftwareApplier::apply):
* platform/graphics/filters/software/FEOffsetSoftwareApplier.h:
* platform/graphics/filters/software/FETileSoftwareApplier.cpp:
(WebCore::FETileSoftwareApplier::apply):
* platform/graphics/filters/software/FETileSoftwareApplier.h:
* platform/graphics/filters/software/FETurbulenceSoftwareApplier.cpp:
(WebCore::FETurbulenceSoftwareApplier::apply):
* platform/graphics/filters/software/FETurbulenceSoftwareApplier.h:
* platform/graphics/filters/software/SourceAlphaSoftwareApplier.cpp:
(WebCore::SourceAlphaSoftwareApplier::apply):
* platform/graphics/filters/software/SourceAlphaSoftwareApplier.h:
* platform/graphics/filters/software/SourceGraphicSoftwareApplier.cpp:
(WebCore::SourceGraphicSoftwareApplier::apply):
* platform/graphics/filters/software/SourceGraphicSoftwareApplier.h:
* rendering/CSSFilter.cpp:
(WebCore::CSSFilter::output):
* rendering/svg/RenderSVGResourceFilter.cpp:
(WebCore::RenderSVGResourceFilter::postApplyResource):
* svg/graphics/filters/SVGFEImage.cpp:
(WebCore::FEImageSoftwareApplier::apply):
(WebCore::FEImage::platformApplySoftware):</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreWebCorexcodeprojprojectpbxproj">trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsfiltersFEBlendcpp">trunk/Source/WebCore/platform/graphics/filters/FEBlend.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsfiltersFEColorMatrixcpp">trunk/Source/WebCore/platform/graphics/filters/FEColorMatrix.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsfiltersFEColorMatrixh">trunk/Source/WebCore/platform/graphics/filters/FEColorMatrix.h</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsfiltersFEComponentTransfercpp">trunk/Source/WebCore/platform/graphics/filters/FEComponentTransfer.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsfiltersFECompositecpp">trunk/Source/WebCore/platform/graphics/filters/FEComposite.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsfiltersFEConvolveMatrixcpp">trunk/Source/WebCore/platform/graphics/filters/FEConvolveMatrix.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsfiltersFEDisplacementMapcpp">trunk/Source/WebCore/platform/graphics/filters/FEDisplacementMap.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsfiltersFEDropShadowcpp">trunk/Source/WebCore/platform/graphics/filters/FEDropShadow.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsfiltersFEFloodcpp">trunk/Source/WebCore/platform/graphics/filters/FEFlood.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsfiltersFEGaussianBlurcpp">trunk/Source/WebCore/platform/graphics/filters/FEGaussianBlur.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsfiltersFEGaussianBlurh">trunk/Source/WebCore/platform/graphics/filters/FEGaussianBlur.h</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsfiltersFELightingcpp">trunk/Source/WebCore/platform/graphics/filters/FELighting.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsfiltersFEMergecpp">trunk/Source/WebCore/platform/graphics/filters/FEMerge.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsfiltersFEMorphologycpp">trunk/Source/WebCore/platform/graphics/filters/FEMorphology.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsfiltersFEMorphologyh">trunk/Source/WebCore/platform/graphics/filters/FEMorphology.h</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsfiltersFEOffsetcpp">trunk/Source/WebCore/platform/graphics/filters/FEOffset.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsfiltersFEOffseth">trunk/Source/WebCore/platform/graphics/filters/FEOffset.h</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsfiltersFETilecpp">trunk/Source/WebCore/platform/graphics/filters/FETile.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsfiltersFETileh">trunk/Source/WebCore/platform/graphics/filters/FETile.h</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsfiltersFETurbulencecpp">trunk/Source/WebCore/platform/graphics/filters/FETurbulence.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsfiltersFilterh">trunk/Source/WebCore/platform/graphics/filters/Filter.h</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsfiltersFilterEffectcpp">trunk/Source/WebCore/platform/graphics/filters/FilterEffect.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsfiltersFilterEffecth">trunk/Source/WebCore/platform/graphics/filters/FilterEffect.h</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsfiltersFilterEffectApplierh">trunk/Source/WebCore/platform/graphics/filters/FilterEffectApplier.h</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsfiltersFilterImagecpp">trunk/Source/WebCore/platform/graphics/filters/FilterImage.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsfiltersFilterImageh">trunk/Source/WebCore/platform/graphics/filters/FilterImage.h</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsfiltersSourceAlphacpp">trunk/Source/WebCore/platform/graphics/filters/SourceAlpha.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsfiltersSourceGraphiccpp">trunk/Source/WebCore/platform/graphics/filters/SourceGraphic.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsfilterssoftwareFEBlendSoftwareAppliercpp">trunk/Source/WebCore/platform/graphics/filters/software/FEBlendSoftwareApplier.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsfilterssoftwareFEBlendSoftwareApplierh">trunk/Source/WebCore/platform/graphics/filters/software/FEBlendSoftwareApplier.h</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsfilterssoftwareFEColorMatrixSoftwareAppliercpp">trunk/Source/WebCore/platform/graphics/filters/software/FEColorMatrixSoftwareApplier.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsfilterssoftwareFEColorMatrixSoftwareApplierh">trunk/Source/WebCore/platform/graphics/filters/software/FEColorMatrixSoftwareApplier.h</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsfilterssoftwareFEComponentTransferSoftwareAppliercpp">trunk/Source/WebCore/platform/graphics/filters/software/FEComponentTransferSoftwareApplier.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsfilterssoftwareFEComponentTransferSoftwareApplierh">trunk/Source/WebCore/platform/graphics/filters/software/FEComponentTransferSoftwareApplier.h</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsfilterssoftwareFECompositeSoftwareAppliercpp">trunk/Source/WebCore/platform/graphics/filters/software/FECompositeSoftwareApplier.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsfilterssoftwareFECompositeSoftwareApplierh">trunk/Source/WebCore/platform/graphics/filters/software/FECompositeSoftwareApplier.h</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsfilterssoftwareFEConvolveMatrixSoftwareAppliercpp">trunk/Source/WebCore/platform/graphics/filters/software/FEConvolveMatrixSoftwareApplier.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsfilterssoftwareFEConvolveMatrixSoftwareApplierh">trunk/Source/WebCore/platform/graphics/filters/software/FEConvolveMatrixSoftwareApplier.h</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsfilterssoftwareFEDisplacementMapSoftwareAppliercpp">trunk/Source/WebCore/platform/graphics/filters/software/FEDisplacementMapSoftwareApplier.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsfilterssoftwareFEDisplacementMapSoftwareApplierh">trunk/Source/WebCore/platform/graphics/filters/software/FEDisplacementMapSoftwareApplier.h</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsfilterssoftwareFEDropShadowSoftwareAppliercpp">trunk/Source/WebCore/platform/graphics/filters/software/FEDropShadowSoftwareApplier.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsfilterssoftwareFEDropShadowSoftwareApplierh">trunk/Source/WebCore/platform/graphics/filters/software/FEDropShadowSoftwareApplier.h</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsfilterssoftwareFEFloodSoftwareAppliercpp">trunk/Source/WebCore/platform/graphics/filters/software/FEFloodSoftwareApplier.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsfilterssoftwareFEFloodSoftwareApplierh">trunk/Source/WebCore/platform/graphics/filters/software/FEFloodSoftwareApplier.h</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsfilterssoftwareFEGaussianBlurSoftwareAppliercpp">trunk/Source/WebCore/platform/graphics/filters/software/FEGaussianBlurSoftwareApplier.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsfilterssoftwareFEGaussianBlurSoftwareApplierh">trunk/Source/WebCore/platform/graphics/filters/software/FEGaussianBlurSoftwareApplier.h</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsfilterssoftwareFELightingSoftwareAppliercpp">trunk/Source/WebCore/platform/graphics/filters/software/FELightingSoftwareApplier.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsfilterssoftwareFELightingSoftwareApplierh">trunk/Source/WebCore/platform/graphics/filters/software/FELightingSoftwareApplier.h</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsfilterssoftwareFEMergeSoftwareAppliercpp">trunk/Source/WebCore/platform/graphics/filters/software/FEMergeSoftwareApplier.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsfilterssoftwareFEMergeSoftwareApplierh">trunk/Source/WebCore/platform/graphics/filters/software/FEMergeSoftwareApplier.h</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsfilterssoftwareFEMorphologySoftwareAppliercpp">trunk/Source/WebCore/platform/graphics/filters/software/FEMorphologySoftwareApplier.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsfilterssoftwareFEMorphologySoftwareApplierh">trunk/Source/WebCore/platform/graphics/filters/software/FEMorphologySoftwareApplier.h</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsfilterssoftwareFEOffsetSoftwareAppliercpp">trunk/Source/WebCore/platform/graphics/filters/software/FEOffsetSoftwareApplier.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsfilterssoftwareFEOffsetSoftwareApplierh">trunk/Source/WebCore/platform/graphics/filters/software/FEOffsetSoftwareApplier.h</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsfilterssoftwareFETileSoftwareAppliercpp">trunk/Source/WebCore/platform/graphics/filters/software/FETileSoftwareApplier.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsfilterssoftwareFETileSoftwareApplierh">trunk/Source/WebCore/platform/graphics/filters/software/FETileSoftwareApplier.h</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsfilterssoftwareFETurbulenceSoftwareAppliercpp">trunk/Source/WebCore/platform/graphics/filters/software/FETurbulenceSoftwareApplier.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsfilterssoftwareFETurbulenceSoftwareApplierh">trunk/Source/WebCore/platform/graphics/filters/software/FETurbulenceSoftwareApplier.h</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsfilterssoftwareSourceAlphaSoftwareAppliercpp">trunk/Source/WebCore/platform/graphics/filters/software/SourceAlphaSoftwareApplier.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsfilterssoftwareSourceAlphaSoftwareApplierh">trunk/Source/WebCore/platform/graphics/filters/software/SourceAlphaSoftwareApplier.h</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsfilterssoftwareSourceGraphicSoftwareAppliercpp">trunk/Source/WebCore/platform/graphics/filters/software/SourceGraphicSoftwareApplier.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsfilterssoftwareSourceGraphicSoftwareApplierh">trunk/Source/WebCore/platform/graphics/filters/software/SourceGraphicSoftwareApplier.h</a></li>
<li><a href="#trunkSourceWebCorerenderingCSSFiltercpp">trunk/Source/WebCore/rendering/CSSFilter.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingsvgRenderSVGResourceFiltercpp">trunk/Source/WebCore/rendering/svg/RenderSVGResourceFilter.cpp</a></li>
<li><a href="#trunkSourceWebCoresvggraphicsfiltersSVGFEImagecpp">trunk/Source/WebCore/svg/graphics/filters/SVGFEImage.cpp</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreplatformgraphicsfiltersFilterImageVectorh">trunk/Source/WebCore/platform/graphics/filters/FilterImageVector.h</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (286163 => 286164)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog   2021-11-25 09:58:12 UTC (rev 286163)
+++ trunk/Source/WebCore/ChangeLog      2021-11-25 11:44:44 UTC (rev 286164)
</span><span class="lines">@@ -1,3 +1,152 @@
</span><ins>+2021-11-25  Said Abou-Hallawa  <said@apple.com>
+
+        [GPU Process] Make FilterEffect appliers take FilterImages in their apply() methods
+        https://bugs.webkit.org/show_bug.cgi?id=233487
+
+        Reviewed by Cameron McCormack.
+
+        Eventually the FilterImage will be removed from FilterEffect. So this is
+        a step towards making the FilterEffect hold the effect data only. To do 
+        his change, FilterImage needs to hold two new members: primitiveSubregion
+        and isAlphaImage.
+
+        FilterEffect::setIsAlphaImage() is not needed and isAlphaImage() will be
+        a virtual function but it will be renamed resultIsAlphaImage(). The result 
+        of this function will be stored in the result FilterImage.
+
+        FEGaussianBlurSoftwareApplier::apply() is the only user of isAlphaImage.
+
+        * WebCore.xcodeproj/project.pbxproj:
+        * platform/graphics/filters/FEBlend.cpp:
+        (WebCore::FEBlend::platformApplySoftware):
+        * platform/graphics/filters/FEColorMatrix.cpp:
+        (WebCore::FEColorMatrix::resultIsAlphaImage const):
+        (WebCore::FEColorMatrix::platformApplySoftware):
+        * platform/graphics/filters/FEColorMatrix.h:
+        * platform/graphics/filters/FEComponentTransfer.cpp:
+        (WebCore::FEComponentTransfer::platformApplySoftware):
+        * platform/graphics/filters/FEComposite.cpp:
+        (WebCore::FEComposite::platformApplySoftware):
+        * platform/graphics/filters/FEConvolveMatrix.cpp:
+        (WebCore::FEConvolveMatrix::platformApplySoftware):
+        * platform/graphics/filters/FEDisplacementMap.cpp:
+        (WebCore::FEDisplacementMap::platformApplySoftware):
+        * platform/graphics/filters/FEDropShadow.cpp:
+        (WebCore::FEDropShadow::platformApplySoftware):
+        * platform/graphics/filters/FEFlood.cpp:
+        (WebCore::FEFlood::platformApplySoftware):
+        * platform/graphics/filters/FEGaussianBlur.cpp:
+        (WebCore::FEGaussianBlur::resultIsAlphaImage const):
+        (WebCore::FEGaussianBlur::platformApplySoftware):
+        * platform/graphics/filters/FEGaussianBlur.h:
+        * platform/graphics/filters/FELighting.cpp:
+        (WebCore::FELighting::platformApplySoftware):
+        * platform/graphics/filters/FEMerge.cpp:
+        (WebCore::FEMerge::platformApplySoftware):
+        * platform/graphics/filters/FEMorphology.cpp:
+        (WebCore::FEMorphology::resultIsAlphaImage const):
+        (WebCore::FEMorphology::platformApplySoftware):
+        * platform/graphics/filters/FEMorphology.h:
+        * platform/graphics/filters/FEOffset.cpp:
+        (WebCore::FEOffset::resultIsAlphaImage const):
+        (WebCore::FEOffset::platformApplySoftware):
+        * platform/graphics/filters/FEOffset.h:
+        * platform/graphics/filters/FETile.cpp:
+        (WebCore::FETile::resultIsAlphaImage const):
+        (WebCore::FETile::platformApplySoftware):
+        * platform/graphics/filters/FETile.h:
+        * platform/graphics/filters/FETurbulence.cpp:
+        (WebCore::FETurbulence::platformApplySoftware):
+        * platform/graphics/filters/Filter.h:
+        (WebCore::Filter::maxEffectRect const):
+        * platform/graphics/filters/FilterEffect.cpp:
+        (WebCore::FilterEffect::apply):
+        (WebCore::FilterEffect::inputFilterImages const):
+        (WebCore::FilterEffect::externalRepresentation const):
+        (WebCore::FilterEffect::createResult): Deleted.
+        (WebCore::FilterEffect::imageBufferResult): Deleted.
+        (WebCore::FilterEffect::pixelBufferResult): Deleted.
+        (WebCore::FilterEffect::getPixelBufferResult): Deleted.
+        (WebCore::FilterEffect::copyPixelBufferResult const): Deleted.
+        * platform/graphics/filters/FilterEffect.h:
+        (WebCore::FilterEffect::filterImage const):
+        (WebCore::FilterEffect::resultIsAlphaImage const):
+        (WebCore::FilterEffect::isAlphaImage const): Deleted.
+        (WebCore::FilterEffect::setIsAlphaImage): Deleted.
+        (WebCore::FilterEffect::normalizedFloats): Deleted.
+        * platform/graphics/filters/FilterEffectApplier.h:
+        * platform/graphics/filters/FilterImage.cpp:
+        (WebCore::FilterImage::create):
+        (WebCore::FilterImage::FilterImage):
+        * platform/graphics/filters/FilterImage.h:
+        (WebCore::FilterImage::primitiveSubregion const):
+        (WebCore::FilterImage::isAlphaImage const):
+        * platform/graphics/filters/FilterImageVector.h: Copied from Source/WebCore/platform/graphics/filters/FilterEffectApplier.h.
+        * platform/graphics/filters/SourceAlpha.cpp:
+        (WebCore::SourceAlpha::platformApplySoftware):
+        * platform/graphics/filters/SourceGraphic.cpp:
+        (WebCore::SourceGraphic::platformApplySoftware):
+        * platform/graphics/filters/software/FEBlendSoftwareApplier.cpp:
+        (WebCore::FEBlendSoftwareApplier::apply):
+        * platform/graphics/filters/software/FEBlendSoftwareApplier.h:
+        * platform/graphics/filters/software/FEColorMatrixSoftwareApplier.cpp:
+        (WebCore::FEColorMatrixSoftwareApplier::apply):
+        * platform/graphics/filters/software/FEColorMatrixSoftwareApplier.h:
+        * platform/graphics/filters/software/FEComponentTransferSoftwareApplier.cpp:
+        (WebCore::FEComponentTransferSoftwareApplier::apply):
+        * platform/graphics/filters/software/FEComponentTransferSoftwareApplier.h:
+        * platform/graphics/filters/software/FECompositeSoftwareApplier.cpp:
+        (WebCore::FECompositeSoftwareApplier::applyArithmetic):
+        (WebCore::FECompositeSoftwareApplier::applyNonArithmetic):
+        (WebCore::FECompositeSoftwareApplier::apply):
+        * platform/graphics/filters/software/FECompositeSoftwareApplier.h:
+        * platform/graphics/filters/software/FEConvolveMatrixSoftwareApplier.cpp:
+        (WebCore::FEConvolveMatrixSoftwareApplier::apply):
+        * platform/graphics/filters/software/FEConvolveMatrixSoftwareApplier.h:
+        * platform/graphics/filters/software/FEDisplacementMapSoftwareApplier.cpp:
+        (WebCore::FEDisplacementMapSoftwareApplier::apply):
+        * platform/graphics/filters/software/FEDisplacementMapSoftwareApplier.h:
+        * platform/graphics/filters/software/FEDropShadowSoftwareApplier.cpp:
+        (WebCore::FEDropShadowSoftwareApplier::apply):
+        * platform/graphics/filters/software/FEDropShadowSoftwareApplier.h:
+        * platform/graphics/filters/software/FEFloodSoftwareApplier.cpp:
+        (WebCore::FEFloodSoftwareApplier::apply):
+        * platform/graphics/filters/software/FEFloodSoftwareApplier.h:
+        * platform/graphics/filters/software/FEGaussianBlurSoftwareApplier.cpp:
+        (WebCore::FEGaussianBlurSoftwareApplier::apply):
+        * platform/graphics/filters/software/FEGaussianBlurSoftwareApplier.h:
+        * platform/graphics/filters/software/FELightingSoftwareApplier.cpp:
+        (WebCore::FELightingSoftwareApplier::apply):
+        * platform/graphics/filters/software/FELightingSoftwareApplier.h:
+        * platform/graphics/filters/software/FEMergeSoftwareApplier.cpp:
+        (WebCore::FEMergeSoftwareApplier::apply):
+        * platform/graphics/filters/software/FEMergeSoftwareApplier.h:
+        * platform/graphics/filters/software/FEMorphologySoftwareApplier.cpp:
+        (WebCore::FEMorphologySoftwareApplier::apply):
+        * platform/graphics/filters/software/FEMorphologySoftwareApplier.h:
+        * platform/graphics/filters/software/FEOffsetSoftwareApplier.cpp:
+        (WebCore::FEOffsetSoftwareApplier::apply):
+        * platform/graphics/filters/software/FEOffsetSoftwareApplier.h:
+        * platform/graphics/filters/software/FETileSoftwareApplier.cpp:
+        (WebCore::FETileSoftwareApplier::apply):
+        * platform/graphics/filters/software/FETileSoftwareApplier.h:
+        * platform/graphics/filters/software/FETurbulenceSoftwareApplier.cpp:
+        (WebCore::FETurbulenceSoftwareApplier::apply):
+        * platform/graphics/filters/software/FETurbulenceSoftwareApplier.h:
+        * platform/graphics/filters/software/SourceAlphaSoftwareApplier.cpp:
+        (WebCore::SourceAlphaSoftwareApplier::apply):
+        * platform/graphics/filters/software/SourceAlphaSoftwareApplier.h:
+        * platform/graphics/filters/software/SourceGraphicSoftwareApplier.cpp:
+        (WebCore::SourceGraphicSoftwareApplier::apply):
+        * platform/graphics/filters/software/SourceGraphicSoftwareApplier.h:
+        * rendering/CSSFilter.cpp:
+        (WebCore::CSSFilter::output):
+        * rendering/svg/RenderSVGResourceFilter.cpp:
+        (WebCore::RenderSVGResourceFilter::postApplyResource):
+        * svg/graphics/filters/SVGFEImage.cpp:
+        (WebCore::FEImageSoftwareApplier::apply):
+        (WebCore::FEImage::platformApplySoftware):
+
</ins><span class="cx"> 2021-11-25  Carlos Garcia Campos  <cgarcia@igalia.com>
</span><span class="cx"> 
</span><span class="cx">         Unreviewed. Fix GTK distcheck build
</span></span></pre></div>
<a id="trunkSourceWebCoreWebCorexcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (286163 => 286164)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj   2021-11-25 09:58:12 UTC (rev 286163)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj      2021-11-25 11:44:44 UTC (rev 286164)
</span><span class="lines">@@ -10931,6 +10931,7 @@
</span><span class="cx">          72A13AD7274DE57800E2A88E /* SourceGraphicSoftwareApplier.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SourceGraphicSoftwareApplier.h; sourceTree = "<group>"; };
</span><span class="cx">          72B4EF74274E233300293C2F /* FEBlendSoftwareApplier.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = FEBlendSoftwareApplier.h; sourceTree = "<group>"; };
</span><span class="cx">          72B4EF75274E233400293C2F /* FEBlendSoftwareApplier.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = FEBlendSoftwareApplier.cpp; sourceTree = "<group>"; };
</span><ins>+               72B4EF7C274EE37F00293C2F /* FilterImageVector.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = FilterImageVector.h; sourceTree = "<group>"; };
</ins><span class="cx">           72BAC3A423E17327008D741C /* ImageBufferBackend.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ImageBufferBackend.cpp; sourceTree = "<group>"; };
</span><span class="cx">          72BAC3A523E17328008D741C /* ImageBufferBackend.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ImageBufferBackend.h; sourceTree = "<group>"; };
</span><span class="cx">          72BAC3A623E17328008D741C /* PlatformImageBuffer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PlatformImageBuffer.h; sourceTree = "<group>"; };
</span><span class="lines">@@ -26027,6 +26028,7 @@
</span><span class="cx">                          7262D756272A174100C56A09 /* FilterFunction.h */,
</span><span class="cx">                          72435EF5273D07670005E7EE /* FilterImage.cpp */,
</span><span class="cx">                          72435EF4273D07670005E7EE /* FilterImage.h */,
</span><ins>+                               72B4EF7C274EE37F00293C2F /* FilterImageVector.h */,
</ins><span class="cx">                           49ECEB631499790D00CDD3A4 /* FilterOperation.cpp */,
</span><span class="cx">                          49ECEB641499790D00CDD3A4 /* FilterOperation.h */,
</span><span class="cx">                          49ECEB651499790D00CDD3A4 /* FilterOperations.cpp */,
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsfiltersFEBlendcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/filters/FEBlend.cpp (286163 => 286164)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/filters/FEBlend.cpp       2021-11-25 09:58:12 UTC (rev 286163)
+++ trunk/Source/WebCore/platform/graphics/filters/FEBlend.cpp  2021-11-25 11:44:44 UTC (rev 286164)
</span><span class="lines">@@ -53,7 +53,7 @@
</span><span class="cx"> 
</span><span class="cx"> bool FEBlend::platformApplySoftware(const Filter& filter)
</span><span class="cx"> {
</span><del>-    return FEBlendSoftwareApplier(*this).apply(filter, inputEffects());
</del><ins>+    return FEBlendSoftwareApplier(*this).apply(filter, inputFilterImages(), *filterImage());
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> TextStream& FEBlend::externalRepresentation(TextStream& ts, RepresentationType representation) const
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsfiltersFEColorMatrixcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/filters/FEColorMatrix.cpp (286163 => 286164)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/filters/FEColorMatrix.cpp 2021-11-25 09:58:12 UTC (rev 286163)
+++ trunk/Source/WebCore/platform/graphics/filters/FEColorMatrix.cpp    2021-11-25 11:44:44 UTC (rev 286164)
</span><span class="lines">@@ -93,9 +93,14 @@
</span><span class="cx">     return normalizedValues;
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+bool FEColorMatrix::resultIsAlphaImage() const
+{
+    return m_type == FECOLORMATRIX_TYPE_LUMINANCETOALPHA;
+}
+
</ins><span class="cx"> bool FEColorMatrix::platformApplySoftware(const Filter& filter)
</span><span class="cx"> {
</span><del>-    return FEColorMatrixSoftwareApplier(*this).apply(filter, inputEffects());
</del><ins>+    return FEColorMatrixSoftwareApplier(*this).apply(filter, inputFilterImages(), *filterImage());
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> static TextStream& operator<<(TextStream& ts, const ColorMatrixType& type)
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsfiltersFEColorMatrixh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/filters/FEColorMatrix.h (286163 => 286164)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/filters/FEColorMatrix.h   2021-11-25 09:58:12 UTC (rev 286163)
+++ trunk/Source/WebCore/platform/graphics/filters/FEColorMatrix.h      2021-11-25 11:44:44 UTC (rev 286164)
</span><span class="lines">@@ -52,6 +52,8 @@
</span><span class="cx"> private:
</span><span class="cx">     FEColorMatrix(ColorMatrixType, Vector<float>&&);
</span><span class="cx"> 
</span><ins>+    bool resultIsAlphaImage() const override;
+
</ins><span class="cx">     bool platformApplySoftware(const Filter&) override;
</span><span class="cx"> 
</span><span class="cx">     WTF::TextStream& externalRepresentation(WTF::TextStream&, RepresentationType) const override;
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsfiltersFEComponentTransfercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/filters/FEComponentTransfer.cpp (286163 => 286164)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/filters/FEComponentTransfer.cpp   2021-11-25 09:58:12 UTC (rev 286163)
+++ trunk/Source/WebCore/platform/graphics/filters/FEComponentTransfer.cpp      2021-11-25 11:44:44 UTC (rev 286164)
</span><span class="lines">@@ -46,7 +46,7 @@
</span><span class="cx"> 
</span><span class="cx"> bool FEComponentTransfer::platformApplySoftware(const Filter& filter)
</span><span class="cx"> {
</span><del>-    return FEComponentTransferSoftwareApplier(*this).apply(filter, inputEffects());
</del><ins>+    return FEComponentTransferSoftwareApplier(*this).apply(filter, inputFilterImages(), *filterImage());
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> static TextStream& operator<<(TextStream& ts, ComponentTransferType type)
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsfiltersFECompositecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/filters/FEComposite.cpp (286163 => 286164)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/filters/FEComposite.cpp   2021-11-25 09:58:12 UTC (rev 286163)
+++ trunk/Source/WebCore/platform/graphics/filters/FEComposite.cpp      2021-11-25 11:44:44 UTC (rev 286164)
</span><span class="lines">@@ -109,7 +109,7 @@
</span><span class="cx"> 
</span><span class="cx"> bool FEComposite::platformApplySoftware(const Filter& filter)
</span><span class="cx"> {
</span><del>-    return FECompositeSoftwareApplier(*this).apply(filter, inputEffects());
</del><ins>+    return FECompositeSoftwareApplier(*this).apply(filter, inputFilterImages(), *filterImage());
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> static TextStream& operator<<(TextStream& ts, const CompositeOperationType& type)
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsfiltersFEConvolveMatrixcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/filters/FEConvolveMatrix.cpp (286163 => 286164)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/filters/FEConvolveMatrix.cpp      2021-11-25 09:58:12 UTC (rev 286163)
+++ trunk/Source/WebCore/platform/graphics/filters/FEConvolveMatrix.cpp 2021-11-25 11:44:44 UTC (rev 286164)
</span><span class="lines">@@ -115,7 +115,7 @@
</span><span class="cx"> 
</span><span class="cx"> bool FEConvolveMatrix::platformApplySoftware(const Filter& filter)
</span><span class="cx"> {
</span><del>-    return FEConvolveMatrixSoftwareApplier(*this).apply(filter, inputEffects());
</del><ins>+    return FEConvolveMatrixSoftwareApplier(*this).apply(filter, inputFilterImages(), *filterImage());
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> static TextStream& operator<<(TextStream& ts, const EdgeModeType& type)
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsfiltersFEDisplacementMapcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/filters/FEDisplacementMap.cpp (286163 => 286164)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/filters/FEDisplacementMap.cpp     2021-11-25 09:58:12 UTC (rev 286163)
+++ trunk/Source/WebCore/platform/graphics/filters/FEDisplacementMap.cpp        2021-11-25 11:44:44 UTC (rev 286164)
</span><span class="lines">@@ -85,7 +85,7 @@
</span><span class="cx"> 
</span><span class="cx"> bool FEDisplacementMap::platformApplySoftware(const Filter& filter)
</span><span class="cx"> {
</span><del>-    return FEDisplacementMapSoftwareApplier(*this).apply(filter, inputEffects());
</del><ins>+    return FEDisplacementMapSoftwareApplier(*this).apply(filter, inputFilterImages(), *filterImage());
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> static TextStream& operator<<(TextStream& ts, const ChannelSelectorType& type)
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsfiltersFEDropShadowcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/filters/FEDropShadow.cpp (286163 => 286164)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/filters/FEDropShadow.cpp  2021-11-25 09:58:12 UTC (rev 286163)
+++ trunk/Source/WebCore/platform/graphics/filters/FEDropShadow.cpp     2021-11-25 11:44:44 UTC (rev 286164)
</span><span class="lines">@@ -68,7 +68,7 @@
</span><span class="cx"> 
</span><span class="cx"> bool FEDropShadow::platformApplySoftware(const Filter& filter)
</span><span class="cx"> {
</span><del>-    return FEDropShadowSoftwareApplier(*this).apply(filter, inputEffects());
</del><ins>+    return FEDropShadowSoftwareApplier(*this).apply(filter, inputFilterImages(), *filterImage());
</ins><span class="cx"> }
</span><span class="cx">     
</span><span class="cx"> IntOutsets FEDropShadow::outsets() const
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsfiltersFEFloodcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/filters/FEFlood.cpp (286163 => 286164)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/filters/FEFlood.cpp       2021-11-25 09:58:12 UTC (rev 286163)
+++ trunk/Source/WebCore/platform/graphics/filters/FEFlood.cpp  2021-11-25 11:44:44 UTC (rev 286164)
</span><span class="lines">@@ -60,7 +60,7 @@
</span><span class="cx"> 
</span><span class="cx"> bool FEFlood::platformApplySoftware(const Filter& filter)
</span><span class="cx"> {
</span><del>-    return FEFloodSoftwareApplier(*this).apply(filter, inputEffects());
</del><ins>+    return FEFloodSoftwareApplier(*this).apply(filter, { }, *filterImage());
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> TextStream& FEFlood::externalRepresentation(TextStream& ts, RepresentationType representation) const
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsfiltersFEGaussianBlurcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/filters/FEGaussianBlur.cpp (286163 => 286164)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/filters/FEGaussianBlur.cpp        2021-11-25 09:58:12 UTC (rev 286163)
+++ trunk/Source/WebCore/platform/graphics/filters/FEGaussianBlur.cpp   2021-11-25 11:44:44 UTC (rev 286164)
</span><span class="lines">@@ -125,11 +125,6 @@
</span><span class="cx">     setAbsolutePaintRect(enclosingIntRect(absolutePaintRect));
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-bool FEGaussianBlur::platformApplySoftware(const Filter& filter)
-{
-    return FEGaussianBlurSoftwareApplier(*this).apply(filter, inputEffects());
-}
-
</del><span class="cx"> IntOutsets FEGaussianBlur::outsets() const
</span><span class="cx"> {
</span><span class="cx">     IntSize outsetSize = calculateOutsetSize({ m_stdX, m_stdY });
</span><span class="lines">@@ -136,6 +131,16 @@
</span><span class="cx">     return { outsetSize.height(), outsetSize.width(), outsetSize.height(), outsetSize.width() };
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+bool FEGaussianBlur::resultIsAlphaImage() const
+{
+    return inputEffect(0)->resultIsAlphaImage();
+}
+
+bool FEGaussianBlur::platformApplySoftware(const Filter& filter)
+{
+    return FEGaussianBlurSoftwareApplier(*this).apply(filter, inputFilterImages(), *filterImage());
+}
+
</ins><span class="cx"> TextStream& FEGaussianBlur::externalRepresentation(TextStream& ts, RepresentationType representation) const
</span><span class="cx"> {
</span><span class="cx">     ts << indent << "[feGaussianBlur";
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsfiltersFEGaussianBlurh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/filters/FEGaussianBlur.h (286163 => 286164)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/filters/FEGaussianBlur.h  2021-11-25 09:58:12 UTC (rev 286163)
+++ trunk/Source/WebCore/platform/graphics/filters/FEGaussianBlur.h     2021-11-25 11:44:44 UTC (rev 286164)
</span><span class="lines">@@ -51,6 +51,8 @@
</span><span class="cx"> 
</span><span class="cx">     IntOutsets outsets() const override;
</span><span class="cx"> 
</span><ins>+    bool resultIsAlphaImage() const override;
+
</ins><span class="cx">     bool platformApplySoftware(const Filter&) override;
</span><span class="cx"> 
</span><span class="cx">     WTF::TextStream& externalRepresentation(WTF::TextStream&, RepresentationType) const override;
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsfiltersFELightingcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/filters/FELighting.cpp (286163 => 286164)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/filters/FELighting.cpp    2021-11-25 09:58:12 UTC (rev 286163)
+++ trunk/Source/WebCore/platform/graphics/filters/FELighting.cpp       2021-11-25 11:44:44 UTC (rev 286164)
</span><span class="lines">@@ -83,7 +83,7 @@
</span><span class="cx"> 
</span><span class="cx"> bool FELighting::platformApplySoftware(const Filter& filter)
</span><span class="cx"> {
</span><del>-    return FELightingSoftwareApplier(*this).apply(filter, inputEffects());
</del><ins>+    return FELightingSoftwareApplier(*this).apply(filter, inputFilterImages(), *filterImage());
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsfiltersFEMergecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/filters/FEMerge.cpp (286163 => 286164)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/filters/FEMerge.cpp       2021-11-25 09:58:12 UTC (rev 286163)
+++ trunk/Source/WebCore/platform/graphics/filters/FEMerge.cpp  2021-11-25 11:44:44 UTC (rev 286164)
</span><span class="lines">@@ -40,7 +40,7 @@
</span><span class="cx"> 
</span><span class="cx"> bool FEMerge::platformApplySoftware(const Filter& filter)
</span><span class="cx"> {
</span><del>-    return FEMergeSoftwareApplier(*this).apply(filter, inputEffects());
</del><ins>+    return FEMergeSoftwareApplier(*this).apply(filter, inputFilterImages(), *filterImage());
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> TextStream& FEMerge::externalRepresentation(TextStream& ts, RepresentationType representation) const
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsfiltersFEMorphologycpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/filters/FEMorphology.cpp (286163 => 286164)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/filters/FEMorphology.cpp  2021-11-25 09:58:12 UTC (rev 286163)
+++ trunk/Source/WebCore/platform/graphics/filters/FEMorphology.cpp     2021-11-25 11:44:44 UTC (rev 286164)
</span><span class="lines">@@ -79,9 +79,14 @@
</span><span class="cx">     setAbsolutePaintRect(enclosingIntRect(paintRect));
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+bool FEMorphology::resultIsAlphaImage() const
+{
+    return inputEffect(0)->resultIsAlphaImage();
+}
+
</ins><span class="cx"> bool FEMorphology::platformApplySoftware(const Filter& filter)
</span><span class="cx"> {
</span><del>-    return FEMorphologySoftwareApplier(*this).apply(filter, inputEffects());
</del><ins>+    return FEMorphologySoftwareApplier(*this).apply(filter, inputFilterImages(), *filterImage());
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> static TextStream& operator<<(TextStream& ts, const MorphologyOperatorType& type)
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsfiltersFEMorphologyh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/filters/FEMorphology.h (286163 => 286164)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/filters/FEMorphology.h    2021-11-25 09:58:12 UTC (rev 286163)
+++ trunk/Source/WebCore/platform/graphics/filters/FEMorphology.h       2021-11-25 11:44:44 UTC (rev 286164)
</span><span class="lines">@@ -50,6 +50,8 @@
</span><span class="cx"> 
</span><span class="cx">     void determineAbsolutePaintRect(const Filter&) override;
</span><span class="cx"> 
</span><ins>+    bool resultIsAlphaImage() const override;
+
</ins><span class="cx">     bool platformApplySoftware(const Filter&) override;
</span><span class="cx"> 
</span><span class="cx">     WTF::TextStream& externalRepresentation(WTF::TextStream&, RepresentationType) const override;
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsfiltersFEOffsetcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/filters/FEOffset.cpp (286163 => 286164)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/filters/FEOffset.cpp      2021-11-25 09:58:12 UTC (rev 286163)
+++ trunk/Source/WebCore/platform/graphics/filters/FEOffset.cpp 2021-11-25 11:44:44 UTC (rev 286164)
</span><span class="lines">@@ -64,9 +64,14 @@
</span><span class="cx">     setAbsolutePaintRect(enclosingIntRect(paintRect));
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+bool FEOffset::resultIsAlphaImage() const
+{
+    return inputEffect(0)->resultIsAlphaImage();
+}
+
</ins><span class="cx"> bool FEOffset::platformApplySoftware(const Filter& filter)
</span><span class="cx"> {
</span><del>-    return FEOffsetSoftwareApplier(*this).apply(filter, inputEffects());
</del><ins>+    return FEOffsetSoftwareApplier(*this).apply(filter, inputFilterImages(), *filterImage());
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> TextStream& FEOffset::externalRepresentation(TextStream& ts, RepresentationType representation) const
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsfiltersFEOffseth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/filters/FEOffset.h (286163 => 286164)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/filters/FEOffset.h        2021-11-25 09:58:12 UTC (rev 286163)
+++ trunk/Source/WebCore/platform/graphics/filters/FEOffset.h   2021-11-25 11:44:44 UTC (rev 286164)
</span><span class="lines">@@ -41,6 +41,8 @@
</span><span class="cx"> 
</span><span class="cx">     void determineAbsolutePaintRect(const Filter&) override;
</span><span class="cx"> 
</span><ins>+    bool resultIsAlphaImage() const override;
+
</ins><span class="cx">     bool platformApplySoftware(const Filter&) override;
</span><span class="cx"> 
</span><span class="cx">     WTF::TextStream& externalRepresentation(WTF::TextStream&, RepresentationType) const override;
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsfiltersFETilecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/filters/FETile.cpp (286163 => 286164)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/filters/FETile.cpp        2021-11-25 09:58:12 UTC (rev 286163)
+++ trunk/Source/WebCore/platform/graphics/filters/FETile.cpp   2021-11-25 11:44:44 UTC (rev 286164)
</span><span class="lines">@@ -23,7 +23,6 @@
</span><span class="cx"> #include "FETile.h"
</span><span class="cx"> 
</span><span class="cx"> #include "FETileSoftwareApplier.h"
</span><del>-#include "GraphicsContext.h"
</del><span class="cx"> #include <wtf/text/TextStream.h>
</span><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="lines">@@ -38,9 +37,14 @@
</span><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+bool FETile::resultIsAlphaImage() const
+{
+    return inputEffect(0)->resultIsAlphaImage();
+}
+
</ins><span class="cx"> bool FETile::platformApplySoftware(const Filter& filter)
</span><span class="cx"> {
</span><del>-    return FETileSoftwareApplier(*this).apply(filter, inputEffects());
</del><ins>+    return FETileSoftwareApplier(*this).apply(filter, inputFilterImages(), *filterImage());
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> TextStream& FETile::externalRepresentation(TextStream& ts, RepresentationType representation) const
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsfiltersFETileh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/filters/FETile.h (286163 => 286164)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/filters/FETile.h  2021-11-25 09:58:12 UTC (rev 286163)
+++ trunk/Source/WebCore/platform/graphics/filters/FETile.h     2021-11-25 11:44:44 UTC (rev 286164)
</span><span class="lines">@@ -35,6 +35,8 @@
</span><span class="cx"> 
</span><span class="cx">     void determineAbsolutePaintRect(const Filter&) override { setAbsolutePaintRect(enclosingIntRect(maxEffectRect())); }
</span><span class="cx"> 
</span><ins>+    bool resultIsAlphaImage() const override;
+
</ins><span class="cx">     bool platformApplySoftware(const Filter&) override;
</span><span class="cx"> 
</span><span class="cx">     WTF::TextStream& externalRepresentation(WTF::TextStream&, RepresentationType) const override;
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsfiltersFETurbulencecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/filters/FETurbulence.cpp (286163 => 286164)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/filters/FETurbulence.cpp  2021-11-25 09:58:12 UTC (rev 286163)
+++ trunk/Source/WebCore/platform/graphics/filters/FETurbulence.cpp     2021-11-25 11:44:44 UTC (rev 286164)
</span><span class="lines">@@ -97,7 +97,7 @@
</span><span class="cx"> 
</span><span class="cx"> bool FETurbulence::platformApplySoftware(const Filter& filter)
</span><span class="cx"> {
</span><del>-    return FETurbulenceSoftwareApplier(*this).apply(filter, inputEffects());
</del><ins>+    return FETurbulenceSoftwareApplier(*this).apply(filter, { }, *filterImage());
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> static TextStream& operator<<(TextStream& ts, TurbulenceType type)
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsfiltersFilterh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/filters/Filter.h (286163 => 286164)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/filters/Filter.h  2021-11-25 09:58:12 UTC (rev 286163)
+++ trunk/Source/WebCore/platform/graphics/filters/Filter.h     2021-11-25 11:44:44 UTC (rev 286164)
</span><span class="lines">@@ -53,6 +53,11 @@
</span><span class="cx">     RenderingMode renderingMode() const { return m_renderingMode; }
</span><span class="cx">     void setRenderingMode(RenderingMode renderingMode) { m_renderingMode = renderingMode; }
</span><span class="cx"> 
</span><ins>+    FloatRect maxEffectRect(const FloatRect& primitiveSubregion) const
+    {
+        return intersection(primitiveSubregion, m_filterRegion);
+    }
+
</ins><span class="cx"> protected:
</span><span class="cx">     Filter(Filter::Type filterType, const FloatSize& filterScale)
</span><span class="cx">         : FilterFunction(filterType)
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsfiltersFilterEffectcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/filters/FilterEffect.cpp (286163 => 286164)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/filters/FilterEffect.cpp  2021-11-25 09:58:12 UTC (rev 286163)
+++ trunk/Source/WebCore/platform/graphics/filters/FilterEffect.cpp     2021-11-25 11:44:44 UTC (rev 286164)
</span><span class="lines">@@ -158,8 +158,9 @@
</span><span class="cx">         for (auto& in : m_inputEffects)
</span><span class="cx">             in->correctPremultipliedResultIfNeeded();
</span><span class="cx">     }
</span><del>-    
-    if (!createResult())
</del><ins>+
+    m_filterImage = FilterImage::create(m_filterPrimitiveSubregion, m_absolutePaintRect, resultIsAlphaImage(), filter.renderingMode(), resultColorSpace());
+    if (!m_filterImage)
</ins><span class="cx">         return false;
</span><span class="cx"> 
</span><span class="cx">     // Add platform specific apply functions here and return earlier.
</span><span class="lines">@@ -166,12 +167,6 @@
</span><span class="cx">     return platformApplySoftware(filter);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-bool FilterEffect::createResult()
-{
-    m_filterImage = FilterImage::create(m_absolutePaintRect, RenderingMode::Unaccelerated, resultColorSpace());
-    return m_filterImage;
-}
-
</del><span class="cx"> void FilterEffect::clearResult()
</span><span class="cx"> {
</span><span class="cx">     m_filterImage = nullptr;
</span><span class="lines">@@ -186,32 +181,16 @@
</span><span class="cx">         effect->clearResultsRecursive();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-ImageBuffer* FilterEffect::imageBufferResult()
</del><ins>+FilterImageVector FilterEffect::inputFilterImages() const
</ins><span class="cx"> {
</span><del>-    if (!hasResult())
-        return nullptr;
-    return m_filterImage->imageBuffer();
-}
</del><ins>+    FilterImageVector filterImages;
</ins><span class="cx"> 
</span><del>-PixelBuffer* FilterEffect::pixelBufferResult(AlphaPremultiplication alphaFormat)
-{
-    if (!hasResult())
-        return nullptr;
-    return m_filterImage->pixelBuffer(alphaFormat);
-}
</del><ins>+    for (auto& inputEffect : m_inputEffects)
+        filterImages.append(*inputEffect->filterImage());
</ins><span class="cx"> 
</span><del>-std::optional<PixelBuffer> FilterEffect::getPixelBufferResult(AlphaPremultiplication alphaFormat, const IntRect& sourceRect, std::optional<DestinationColorSpace> colorSpace)
-{
-    ASSERT(hasResult());
-    return m_filterImage->getPixelBuffer(alphaFormat, sourceRect, colorSpace);
</del><ins>+    return filterImages;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-void FilterEffect::copyPixelBufferResult(PixelBuffer& destinationPixelBuffer, const IntRect& sourceRect) const
-{
-    ASSERT(hasResult());
-    m_filterImage->copyPixelBuffer(destinationPixelBuffer, sourceRect);
-}
-
</del><span class="cx"> void FilterEffect::correctPremultipliedResultIfNeeded()
</span><span class="cx"> {
</span><span class="cx">     if (!hasResult() || !mayProduceInvalidPremultipliedPixels())
</span><span class="lines">@@ -233,7 +212,7 @@
</span><span class="cx">     
</span><span class="cx">     if (representationType == RepresentationType::Debugging) {
</span><span class="cx">         TextStream::IndentScope indentScope(ts);
</span><del>-        ts.dumpProperty("alpha image", m_alphaImage);
</del><ins>+        ts.dumpProperty("alpha image", resultIsAlphaImage());
</ins><span class="cx">         ts.dumpProperty("operating colorspace", operatingColorSpace());
</span><span class="cx">         ts.dumpProperty("result colorspace", resultColorSpace());
</span><span class="cx">         ts << "\n" << indent;
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsfiltersFilterEffecth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/filters/FilterEffect.h (286163 => 286164)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/filters/FilterEffect.h    2021-11-25 09:58:12 UTC (rev 286163)
+++ trunk/Source/WebCore/platform/graphics/filters/FilterEffect.h       2021-11-25 11:44:44 UTC (rev 286164)
</span><span class="lines">@@ -26,6 +26,7 @@
</span><span class="cx"> #include "FilterEffectVector.h"
</span><span class="cx"> #include "FilterFunction.h"
</span><span class="cx"> #include "FilterImage.h"
</span><ins>+#include "FilterImageVector.h"
</ins><span class="cx"> #include "IntRect.h"
</span><span class="cx"> #include <wtf/Vector.h>
</span><span class="cx"> 
</span><span class="lines">@@ -40,16 +41,13 @@
</span><span class="cx"> 
</span><span class="cx"> class FilterEffect : public FilterFunction {
</span><span class="cx"> public:
</span><del>-    bool createResult();
</del><span class="cx">     void clearResult() override;
</span><span class="cx">     void clearResultsRecursive();
</span><del>-
</del><span class="cx">     bool hasResult() const { return m_filterImage; }
</span><span class="cx"> 
</span><del>-    ImageBuffer* imageBufferResult();
-    PixelBuffer* pixelBufferResult(AlphaPremultiplication);
-    std::optional<PixelBuffer> getPixelBufferResult(AlphaPremultiplication, const IntRect& sourceRect, std::optional<DestinationColorSpace> = std::nullopt);
-    void copyPixelBufferResult(PixelBuffer& destinationPixelBuffer, const IntRect& sourceRect) const;
</del><ins>+    FilterImage* filterImage() const { return m_filterImage.get(); }
+    FilterImageVector inputFilterImages() const;
+
</ins><span class="cx">     void correctPremultipliedResultIfNeeded();
</span><span class="cx"> 
</span><span class="cx">     FilterEffectVector& inputEffects() { return m_inputEffects; }
</span><span class="lines">@@ -62,10 +60,6 @@
</span><span class="cx">     // Recurses on inputs.
</span><span class="cx">     FloatRect determineFilterPrimitiveSubregion(const Filter&);
</span><span class="cx"> 
</span><del>-    // Solid black image with different alpha values.
-    bool isAlphaImage() const { return m_alphaImage; }
-    void setIsAlphaImage(bool alphaImage) { m_alphaImage = alphaImage; }
-
</del><span class="cx">     IntRect absolutePaintRect() const { return m_absolutePaintRect; }
</span><span class="cx">     void setAbsolutePaintRect(const IntRect& absolutePaintRect) { m_absolutePaintRect = absolutePaintRect; }
</span><span class="cx"> 
</span><span class="lines">@@ -114,19 +108,13 @@
</span><span class="cx">     const DestinationColorSpace& operatingColorSpace() const { return m_operatingColorSpace; }
</span><span class="cx">     virtual void setOperatingColorSpace(const DestinationColorSpace& colorSpace) { m_operatingColorSpace = colorSpace; }
</span><span class="cx"> 
</span><ins>+    // Solid black image with different alpha values.
+    virtual bool resultIsAlphaImage() const { return false; }
</ins><span class="cx">     virtual const DestinationColorSpace& resultColorSpace() const { return m_operatingColorSpace; }
</span><span class="cx"> 
</span><span class="cx">     virtual void transformResultColorSpace(FilterEffect* in, const int) { in->transformResultColorSpace(m_operatingColorSpace); }
</span><span class="cx">     void transformResultColorSpace(const DestinationColorSpace&);
</span><span class="cx">     
</span><del>-    static Vector<float> normalizedFloats(const Vector<float>& values)
-    {
-        Vector<float> normalizedValues(values.size());
-        for (size_t i = 0; i < values.size(); ++i)
-            normalizedValues[i] = normalizedFloat(values[i]);
-        return normalizedValues;
-    }
-
</del><span class="cx"> protected:
</span><span class="cx">     using FilterFunction::FilterFunction;
</span><span class="cx"> 
</span><span class="lines">@@ -158,7 +146,6 @@
</span><span class="cx">     // filterPrimitiveSubregion mapped to absolute coordinates before clipping.
</span><span class="cx">     FloatRect m_absoluteUnclippedSubregion;
</span><span class="cx"> 
</span><del>-    bool m_alphaImage { false };
</del><span class="cx">     bool m_hasX { false };
</span><span class="cx">     bool m_hasY { false };
</span><span class="cx">     bool m_hasWidth { false };
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsfiltersFilterEffectApplierh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/filters/FilterEffectApplier.h (286163 => 286164)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/filters/FilterEffectApplier.h     2021-11-25 09:58:12 UTC (rev 286163)
+++ trunk/Source/WebCore/platform/graphics/filters/FilterEffectApplier.h        2021-11-25 11:44:44 UTC (rev 286164)
</span><span class="lines">@@ -25,7 +25,7 @@
</span><span class="cx"> 
</span><span class="cx"> #pragma once
</span><span class="cx"> 
</span><del>-#include "FilterEffectVector.h"
</del><ins>+#include "FilterImageVector.h"
</ins><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><span class="lines">@@ -36,7 +36,7 @@
</span><span class="cx">     FilterEffectApplier() = default;
</span><span class="cx">     virtual ~FilterEffectApplier() = default;
</span><span class="cx">     
</span><del>-    virtual bool apply(const Filter&, const FilterEffectVector& inputs) = 0;
</del><ins>+    virtual bool apply(const Filter&, const FilterImageVector& inputs, FilterImage& result) = 0;
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> template<typename FilterEffectType>
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsfiltersFilterImagecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/filters/FilterImage.cpp (286163 => 286164)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/filters/FilterImage.cpp   2021-11-25 09:58:12 UTC (rev 286163)
+++ trunk/Source/WebCore/platform/graphics/filters/FilterImage.cpp      2021-11-25 11:44:44 UTC (rev 286164)
</span><span class="lines">@@ -37,14 +37,16 @@
</span><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><del>-RefPtr<FilterImage> FilterImage::create(const IntRect& absoluteImageRect, RenderingMode renderingMode, const DestinationColorSpace& colorSpace)
</del><ins>+RefPtr<FilterImage> FilterImage::create(const FloatRect& primitiveSubregion, const IntRect& absoluteImageRect, bool isAlphaImage, RenderingMode renderingMode, const DestinationColorSpace& colorSpace)
</ins><span class="cx"> {
</span><span class="cx">     ASSERT(!ImageBuffer::sizeNeedsClamping(absoluteImageRect.size()));
</span><del>-    return adoptRef(new FilterImage(absoluteImageRect, renderingMode, colorSpace));
</del><ins>+    return adoptRef(new FilterImage(primitiveSubregion, absoluteImageRect, isAlphaImage, renderingMode, colorSpace));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-FilterImage::FilterImage(const IntRect& absoluteImageRect, RenderingMode renderingMode, const DestinationColorSpace& colorSpace)
-    : m_absoluteImageRect(absoluteImageRect)
</del><ins>+FilterImage::FilterImage(const FloatRect& primitiveSubregion, const IntRect& absoluteImageRect, bool isAlphaImage, RenderingMode renderingMode, const DestinationColorSpace& colorSpace)
+    : m_primitiveSubregion(primitiveSubregion)
+    , m_absoluteImageRect(absoluteImageRect)
+    , m_isAlphaImage(isAlphaImage)
</ins><span class="cx">     , m_renderingMode(renderingMode)
</span><span class="cx">     , m_colorSpace(colorSpace)
</span><span class="cx"> {
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsfiltersFilterImageh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/filters/FilterImage.h (286163 => 286164)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/filters/FilterImage.h     2021-11-25 09:58:12 UTC (rev 286163)
+++ trunk/Source/WebCore/platform/graphics/filters/FilterImage.h        2021-11-25 11:44:44 UTC (rev 286164)
</span><span class="lines">@@ -38,10 +38,12 @@
</span><span class="cx"> 
</span><span class="cx"> class FilterImage : public RefCounted<FilterImage> {
</span><span class="cx"> public:
</span><del>-    static RefPtr<FilterImage> create(const IntRect& absoluteImageRect, RenderingMode, const DestinationColorSpace&);
</del><ins>+    static RefPtr<FilterImage> create(const FloatRect& primitiveSubregion, const IntRect& absoluteImageRect, bool isAlphaImage, RenderingMode, const DestinationColorSpace&);
</ins><span class="cx"> 
</span><ins>+    FloatRect primitiveSubregion() const { return m_primitiveSubregion; }
</ins><span class="cx">     IntRect absoluteImageRect() const { return m_absoluteImageRect; }
</span><span class="cx"> 
</span><ins>+    bool isAlphaImage() const { return m_isAlphaImage; }
</ins><span class="cx">     RenderingMode renderingMode() const { return m_renderingMode; }
</span><span class="cx">     const DestinationColorSpace& colorSpace() const { return m_colorSpace; }
</span><span class="cx"> 
</span><span class="lines">@@ -55,14 +57,16 @@
</span><span class="cx">     void transformToColorSpace(const DestinationColorSpace&);
</span><span class="cx"> 
</span><span class="cx"> private:
</span><del>-    FilterImage(const IntRect& absoluteImageRect, RenderingMode, const DestinationColorSpace&);
</del><ins>+    FilterImage(const FloatRect& primitiveSubregion, const IntRect& absoluteImageRect, bool isAlphaImage, RenderingMode, const DestinationColorSpace&);
</ins><span class="cx"> 
</span><span class="cx">     std::optional<PixelBuffer>& pixelBufferSlot(AlphaPremultiplication);
</span><span class="cx"> 
</span><span class="cx">     bool requiresPixelBufferColorSpaceConversion(std::optional<DestinationColorSpace>) const;
</span><span class="cx"> 
</span><ins>+    FloatRect m_primitiveSubregion;
</ins><span class="cx">     IntRect m_absoluteImageRect;
</span><span class="cx"> 
</span><ins>+    bool m_isAlphaImage { false };
</ins><span class="cx">     RenderingMode m_renderingMode;
</span><span class="cx">     DestinationColorSpace m_colorSpace;
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsfiltersFilterImageVectorhfromrev286162trunkSourceWebCoreplatformgraphicsfiltersFilterEffectApplierh"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebCore/platform/graphics/filters/FilterImageVector.h (from rev 286162, trunk/Source/WebCore/platform/graphics/filters/FilterEffectApplier.h) (0 => 286164)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/filters/FilterImageVector.h                               (rev 0)
+++ trunk/Source/WebCore/platform/graphics/filters/FilterImageVector.h  2021-11-25 11:44:44 UTC (rev 286164)
</span><span class="lines">@@ -0,0 +1,36 @@
</span><ins>+/*
+ * Copyright (C) 2021 Apple Inc.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#pragma once
+
+#include <wtf/Vector.h>
+
+namespace WebCore {
+
+class FilterImage;
+
+using FilterImageVector = Vector<Ref<FilterImage>>;
+
+} // namespace WebCore
</ins></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsfiltersSourceAlphacpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/filters/SourceAlpha.cpp (286163 => 286164)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/filters/SourceAlpha.cpp   2021-11-25 09:58:12 UTC (rev 286163)
+++ trunk/Source/WebCore/platform/graphics/filters/SourceAlpha.cpp      2021-11-25 11:44:44 UTC (rev 286164)
</span><span class="lines">@@ -47,7 +47,7 @@
</span><span class="cx"> 
</span><span class="cx"> bool SourceAlpha::platformApplySoftware(const Filter& filter)
</span><span class="cx"> {
</span><del>-    return SourceAlphaSoftwareApplier(*this).apply(filter, inputEffects());
</del><ins>+    return SourceAlphaSoftwareApplier(*this).apply(filter, inputFilterImages(), *filterImage());
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> TextStream& SourceAlpha::externalRepresentation(TextStream& ts, RepresentationType) const
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsfiltersSourceGraphiccpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/filters/SourceGraphic.cpp (286163 => 286164)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/filters/SourceGraphic.cpp 2021-11-25 09:58:12 UTC (rev 286163)
+++ trunk/Source/WebCore/platform/graphics/filters/SourceGraphic.cpp    2021-11-25 11:44:44 UTC (rev 286164)
</span><span class="lines">@@ -45,7 +45,7 @@
</span><span class="cx"> 
</span><span class="cx"> bool SourceGraphic::platformApplySoftware(const Filter& filter)
</span><span class="cx"> {
</span><del>-    return SourceGraphicSoftwareApplier(*this).apply(filter, inputEffects());
</del><ins>+    return SourceGraphicSoftwareApplier(*this).apply(filter, { }, *filterImage());
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> TextStream& SourceGraphic::externalRepresentation(TextStream& ts, RepresentationType) const
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsfilterssoftwareFEBlendSoftwareAppliercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/filters/software/FEBlendSoftwareApplier.cpp (286163 => 286164)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/filters/software/FEBlendSoftwareApplier.cpp       2021-11-25 09:58:12 UTC (rev 286163)
+++ trunk/Source/WebCore/platform/graphics/filters/software/FEBlendSoftwareApplier.cpp  2021-11-25 11:44:44 UTC (rev 286164)
</span><span class="lines">@@ -34,23 +34,23 @@
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><span class="cx"> #if !HAVE(ARM_NEON_INTRINSICS)
</span><del>-bool FEBlendSoftwareApplier::apply(const Filter&, const FilterEffectVector& inputEffects)
</del><ins>+bool FEBlendSoftwareApplier::apply(const Filter&, const FilterImageVector& inputs, FilterImage& result)
</ins><span class="cx"> {
</span><del>-    FilterEffect* in = inputEffects[0].get();
-    FilterEffect* in2 = inputEffects[1].get();
</del><ins>+    auto& input = inputs[0].get();
+    auto& input2 = inputs[1].get();
</ins><span class="cx"> 
</span><del>-    auto resultImage = m_effect.imageBufferResult();
</del><ins>+    auto resultImage = result.imageBuffer();
</ins><span class="cx">     if (!resultImage)
</span><span class="cx">         return false;
</span><span class="cx"> 
</span><del>-    auto imageBuffer = in->imageBufferResult();
-    auto imageBuffer2 = in2->imageBufferResult();
-    if (!imageBuffer || !imageBuffer2)
</del><ins>+    auto inputImage = input.imageBuffer();
+    auto inputImage2 = input2.imageBuffer();
+    if (!inputImage || !inputImage2)
</ins><span class="cx">         return false;
</span><span class="cx"> 
</span><del>-    GraphicsContext& filterContext = resultImage->context();
-    filterContext.drawImageBuffer(*imageBuffer2, m_effect.drawingRegionOfInputImage(in2->absolutePaintRect()));
-    filterContext.drawImageBuffer(*imageBuffer, m_effect.drawingRegionOfInputImage(in->absolutePaintRect()), { { }, imageBuffer->logicalSize() }, { CompositeOperator::SourceOver, m_effect.blendMode() });
</del><ins>+    auto& filterContext = resultImage->context();
+    filterContext.drawImageBuffer(*inputImage2, m_effect.drawingRegionOfInputImage(input2.absoluteImageRect()));
+    filterContext.drawImageBuffer(*inputImage, m_effect.drawingRegionOfInputImage(input.absoluteImageRect()), { { }, inputImage->logicalSize() }, { CompositeOperator::SourceOver, m_effect.blendMode() });
</ins><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="cx"> #endif
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsfilterssoftwareFEBlendSoftwareApplierh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/filters/software/FEBlendSoftwareApplier.h (286163 => 286164)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/filters/software/FEBlendSoftwareApplier.h 2021-11-25 09:58:12 UTC (rev 286163)
+++ trunk/Source/WebCore/platform/graphics/filters/software/FEBlendSoftwareApplier.h    2021-11-25 11:44:44 UTC (rev 286164)
</span><span class="lines">@@ -35,7 +35,7 @@
</span><span class="cx"> public:
</span><span class="cx">     using Base::Base;
</span><span class="cx"> 
</span><del>-    bool apply(const Filter&, const FilterEffectVector& inputEffects) override;
</del><ins>+    bool apply(const Filter&, const FilterImageVector& inputs, FilterImage& result) override;
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsfilterssoftwareFEColorMatrixSoftwareAppliercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/filters/software/FEColorMatrixSoftwareApplier.cpp (286163 => 286164)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/filters/software/FEColorMatrixSoftwareApplier.cpp 2021-11-25 09:58:12 UTC (rev 286163)
+++ trunk/Source/WebCore/platform/graphics/filters/software/FEColorMatrixSoftwareApplier.cpp    2021-11-25 11:44:44 UTC (rev 286164)
</span><span class="lines">@@ -259,27 +259,24 @@
</span><span class="cx">     applyPlatformUnaccelerated(pixelBuffer);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-bool FEColorMatrixSoftwareApplier::apply(const Filter&, const FilterEffectVector& inputEffects)
</del><ins>+bool FEColorMatrixSoftwareApplier::apply(const Filter&, const FilterImageVector& inputs, FilterImage& result)
</ins><span class="cx"> {
</span><del>-    auto in = inputEffects[0].get();
</del><ins>+    auto& input = inputs[0].get();
</ins><span class="cx"> 
</span><del>-    auto resultImage = m_effect.imageBufferResult();
</del><ins>+    auto resultImage = result.imageBuffer();
</ins><span class="cx">     if (!resultImage)
</span><span class="cx">         return false;
</span><span class="cx"> 
</span><del>-    auto inBuffer = in->imageBufferResult();
-    if (inBuffer)
-        resultImage->context().drawImageBuffer(*inBuffer, m_effect.drawingRegionOfInputImage(in->absolutePaintRect()));
</del><ins>+    auto inputImage = input.imageBuffer();
+    if (inputImage)
+        resultImage->context().drawImageBuffer(*inputImage, m_effect.drawingRegionOfInputImage(input.absoluteImageRect()));
</ins><span class="cx"> 
</span><del>-    PixelBufferFormat format { AlphaPremultiplication::Unpremultiplied, PixelFormat::RGBA8, m_effect.resultColorSpace() };
</del><ins>+    PixelBufferFormat format { AlphaPremultiplication::Unpremultiplied, PixelFormat::RGBA8, result.colorSpace() };
</ins><span class="cx">     IntRect imageRect(IntPoint(), resultImage->truncatedLogicalSize());
</span><span class="cx">     auto pixelBuffer = resultImage->getPixelBuffer(format, imageRect);
</span><span class="cx">     if (!pixelBuffer)
</span><span class="cx">         return false;
</span><span class="cx"> 
</span><del>-    if (m_effect.type() == FECOLORMATRIX_TYPE_LUMINANCETOALPHA)
-        m_effect.setIsAlphaImage(true);
-
</del><span class="cx">     applyPlatform(*pixelBuffer);
</span><span class="cx">     resultImage->putPixelBuffer(*pixelBuffer, imageRect);
</span><span class="cx">     return true;
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsfilterssoftwareFEColorMatrixSoftwareApplierh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/filters/software/FEColorMatrixSoftwareApplier.h (286163 => 286164)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/filters/software/FEColorMatrixSoftwareApplier.h   2021-11-25 09:58:12 UTC (rev 286163)
+++ trunk/Source/WebCore/platform/graphics/filters/software/FEColorMatrixSoftwareApplier.h      2021-11-25 11:44:44 UTC (rev 286164)
</span><span class="lines">@@ -34,7 +34,7 @@
</span><span class="cx"> public:
</span><span class="cx">     FEColorMatrixSoftwareApplier(FEColorMatrix&);
</span><span class="cx"> 
</span><del>-    bool apply(const Filter&, const FilterEffectVector& inputEffects) override;
</del><ins>+    bool apply(const Filter&, const FilterImageVector& inputs, FilterImage& result) override;
</ins><span class="cx"> 
</span><span class="cx"> private:
</span><span class="cx">     inline void matrix(float& red, float& green, float& blue, float& alpha) const;
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsfilterssoftwareFEComponentTransferSoftwareAppliercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/filters/software/FEComponentTransferSoftwareApplier.cpp (286163 => 286164)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/filters/software/FEComponentTransferSoftwareApplier.cpp   2021-11-25 09:58:12 UTC (rev 286163)
+++ trunk/Source/WebCore/platform/graphics/filters/software/FEComponentTransferSoftwareApplier.cpp      2021-11-25 11:44:44 UTC (rev 286164)
</span><span class="lines">@@ -131,16 +131,16 @@
</span><span class="cx">     }
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-bool FEComponentTransferSoftwareApplier::apply(const Filter&, const FilterEffectVector& inputEffects)
</del><ins>+bool FEComponentTransferSoftwareApplier::apply(const Filter&, const FilterImageVector& inputs, FilterImage& result)
</ins><span class="cx"> {
</span><del>-    FilterEffect* in = inputEffects[0].get();
</del><ins>+    auto& input = inputs[0].get();
</ins><span class="cx">     
</span><del>-    auto destinationPixelBuffer = m_effect.pixelBufferResult(AlphaPremultiplication::Unpremultiplied);
</del><ins>+    auto destinationPixelBuffer = result.pixelBuffer(AlphaPremultiplication::Unpremultiplied);
</ins><span class="cx">     if (!destinationPixelBuffer)
</span><span class="cx">         return false;
</span><span class="cx"> 
</span><del>-    auto drawingRect = m_effect.requestedRegionOfInputPixelBuffer(in->absolutePaintRect());
-    in->copyPixelBufferResult(*destinationPixelBuffer, drawingRect);
</del><ins>+    auto drawingRect = m_effect.requestedRegionOfInputPixelBuffer(input.absoluteImageRect());
+    input.copyPixelBuffer(*destinationPixelBuffer, drawingRect);
</ins><span class="cx"> 
</span><span class="cx">     applyPlatform(*destinationPixelBuffer);
</span><span class="cx">     return true;
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsfilterssoftwareFEComponentTransferSoftwareApplierh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/filters/software/FEComponentTransferSoftwareApplier.h (286163 => 286164)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/filters/software/FEComponentTransferSoftwareApplier.h     2021-11-25 09:58:12 UTC (rev 286163)
+++ trunk/Source/WebCore/platform/graphics/filters/software/FEComponentTransferSoftwareApplier.h        2021-11-25 11:44:44 UTC (rev 286164)
</span><span class="lines">@@ -35,7 +35,7 @@
</span><span class="cx"> public:
</span><span class="cx">     using Base::Base;
</span><span class="cx"> 
</span><del>-    bool apply(const Filter&, const FilterEffectVector& inputEffects) override;
</del><ins>+    bool apply(const Filter&, const FilterImageVector& inputs, FilterImage& result) override;
</ins><span class="cx"> 
</span><span class="cx"> private:
</span><span class="cx">     using LookupTable = std::array<uint8_t, 256>;
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsfilterssoftwareFECompositeSoftwareAppliercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/filters/software/FECompositeSoftwareApplier.cpp (286163 => 286164)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/filters/software/FECompositeSoftwareApplier.cpp   2021-11-25 09:58:12 UTC (rev 286163)
+++ trunk/Source/WebCore/platform/graphics/filters/software/FECompositeSoftwareApplier.cpp      2021-11-25 11:44:44 UTC (rev 286164)
</span><span class="lines">@@ -126,19 +126,19 @@
</span><span class="cx"> }
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-bool FECompositeSoftwareApplier::applyArithmetic(FilterEffect* in, FilterEffect* in2)
</del><ins>+bool FECompositeSoftwareApplier::applyArithmetic(FilterImage& input, FilterImage& input2, FilterImage& result)
</ins><span class="cx"> {
</span><del>-    auto destinationPixelBuffer = m_effect.pixelBufferResult(AlphaPremultiplication::Premultiplied);
</del><ins>+    auto destinationPixelBuffer = result.pixelBuffer(AlphaPremultiplication::Premultiplied);
</ins><span class="cx">     if (!destinationPixelBuffer)
</span><span class="cx">         return false;
</span><span class="cx"> 
</span><del>-    IntRect effectADrawingRect = m_effect.requestedRegionOfInputPixelBuffer(in->absolutePaintRect());
-    auto sourcePixelBuffer = in->getPixelBufferResult(AlphaPremultiplication::Premultiplied, effectADrawingRect, m_effect.operatingColorSpace());
</del><ins>+    IntRect effectADrawingRect = m_effect.requestedRegionOfInputPixelBuffer(input.absoluteImageRect());
+    auto sourcePixelBuffer = input.getPixelBuffer(AlphaPremultiplication::Premultiplied, effectADrawingRect, m_effect.operatingColorSpace());
</ins><span class="cx">     if (!sourcePixelBuffer)
</span><span class="cx">         return false;
</span><span class="cx"> 
</span><del>-    IntRect effectBDrawingRect = m_effect.requestedRegionOfInputPixelBuffer(in2->absolutePaintRect());
-    in2->copyPixelBufferResult(*destinationPixelBuffer, effectBDrawingRect);
</del><ins>+    IntRect effectBDrawingRect = m_effect.requestedRegionOfInputPixelBuffer(input2.absoluteImageRect());
+    input2.copyPixelBuffer(*destinationPixelBuffer, effectBDrawingRect);
</ins><span class="cx"> 
</span><span class="cx">     auto& sourcePixelArray = sourcePixelBuffer->data();
</span><span class="cx">     auto& destinationPixelArray = destinationPixelBuffer->data();
</span><span class="lines">@@ -149,15 +149,15 @@
</span><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-bool FECompositeSoftwareApplier::applyNonArithmetic(FilterEffect* in, FilterEffect* in2)
</del><ins>+bool FECompositeSoftwareApplier::applyNonArithmetic(FilterImage& input, FilterImage& input2, FilterImage& result)
</ins><span class="cx"> {
</span><del>-    auto resultImage = m_effect.imageBufferResult();
</del><ins>+    auto resultImage = result.imageBuffer();
</ins><span class="cx">     if (!resultImage)
</span><span class="cx">         return false;
</span><span class="cx"> 
</span><del>-    auto imageBuffer = in->imageBufferResult();
-    auto imageBuffer2 = in2->imageBufferResult();
-    if (!imageBuffer || !imageBuffer2)
</del><ins>+    auto inputImage = input.imageBuffer();
+    auto inputImage2 = input2.imageBuffer();
+    if (!inputImage || !inputImage2)
</ins><span class="cx">         return false;
</span><span class="cx"> 
</span><span class="cx">     auto& filterContext = resultImage->context();
</span><span class="lines">@@ -167,38 +167,38 @@
</span><span class="cx">         return false;
</span><span class="cx"> 
</span><span class="cx">     case FECOMPOSITE_OPERATOR_OVER:
</span><del>-        filterContext.drawImageBuffer(*imageBuffer2, m_effect.drawingRegionOfInputImage(in2->absolutePaintRect()));
-        filterContext.drawImageBuffer(*imageBuffer, m_effect.drawingRegionOfInputImage(in->absolutePaintRect()));
</del><ins>+        filterContext.drawImageBuffer(*inputImage2, m_effect.drawingRegionOfInputImage(input2.absoluteImageRect()));
+        filterContext.drawImageBuffer(*inputImage, m_effect.drawingRegionOfInputImage(input.absoluteImageRect()));
</ins><span class="cx">         break;
</span><span class="cx"> 
</span><span class="cx">     case FECOMPOSITE_OPERATOR_IN: {
</span><span class="cx">         // Applies only to the intersected region.
</span><del>-        IntRect destinationRect = in->absolutePaintRect();
-        destinationRect.intersect(in2->absolutePaintRect());
-        destinationRect.intersect(m_effect.absolutePaintRect());
</del><ins>+        IntRect destinationRect = input.absoluteImageRect();
+        destinationRect.intersect(input2.absoluteImageRect());
+        destinationRect.intersect(result.absoluteImageRect());
</ins><span class="cx">         if (destinationRect.isEmpty())
</span><span class="cx">             break;
</span><del>-        IntRect adjustedDestinationRect = destinationRect - m_effect.absolutePaintRect().location();
-        IntRect sourceRect = destinationRect - in->absolutePaintRect().location();
-        IntRect source2Rect = destinationRect - in2->absolutePaintRect().location();
-        filterContext.drawImageBuffer(*imageBuffer2, FloatRect(adjustedDestinationRect), FloatRect(source2Rect));
-        filterContext.drawImageBuffer(*imageBuffer, FloatRect(adjustedDestinationRect), FloatRect(sourceRect), { CompositeOperator::SourceIn });
</del><ins>+        IntRect adjustedDestinationRect = destinationRect - result.absoluteImageRect().location();
+        IntRect sourceRect = destinationRect - input.absoluteImageRect().location();
+        IntRect source2Rect = destinationRect - input2.absoluteImageRect().location();
+        filterContext.drawImageBuffer(*inputImage2, FloatRect(adjustedDestinationRect), FloatRect(source2Rect));
+        filterContext.drawImageBuffer(*inputImage, FloatRect(adjustedDestinationRect), FloatRect(sourceRect), { CompositeOperator::SourceIn });
</ins><span class="cx">         break;
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     case FECOMPOSITE_OPERATOR_OUT:
</span><del>-        filterContext.drawImageBuffer(*imageBuffer, m_effect.drawingRegionOfInputImage(in->absolutePaintRect()));
-        filterContext.drawImageBuffer(*imageBuffer2, m_effect.drawingRegionOfInputImage(in2->absolutePaintRect()), { { }, imageBuffer2->logicalSize() }, CompositeOperator::DestinationOut);
</del><ins>+        filterContext.drawImageBuffer(*inputImage, m_effect.drawingRegionOfInputImage(input.absoluteImageRect()));
+        filterContext.drawImageBuffer(*inputImage2, m_effect.drawingRegionOfInputImage(input2.absoluteImageRect()), { { }, inputImage2->logicalSize() }, CompositeOperator::DestinationOut);
</ins><span class="cx">         break;
</span><span class="cx"> 
</span><span class="cx">     case FECOMPOSITE_OPERATOR_ATOP:
</span><del>-        filterContext.drawImageBuffer(*imageBuffer2, m_effect.drawingRegionOfInputImage(in2->absolutePaintRect()));
-        filterContext.drawImageBuffer(*imageBuffer, m_effect.drawingRegionOfInputImage(in->absolutePaintRect()), { { }, imageBuffer->logicalSize() }, CompositeOperator::SourceAtop);
</del><ins>+        filterContext.drawImageBuffer(*inputImage2, m_effect.drawingRegionOfInputImage(input2.absoluteImageRect()));
+        filterContext.drawImageBuffer(*inputImage, m_effect.drawingRegionOfInputImage(input.absoluteImageRect()), { { }, inputImage->logicalSize() }, CompositeOperator::SourceAtop);
</ins><span class="cx">         break;
</span><span class="cx"> 
</span><span class="cx">     case FECOMPOSITE_OPERATOR_XOR:
</span><del>-        filterContext.drawImageBuffer(*imageBuffer2, m_effect.drawingRegionOfInputImage(in2->absolutePaintRect()));
-        filterContext.drawImageBuffer(*imageBuffer, m_effect.drawingRegionOfInputImage(in->absolutePaintRect()), { { }, imageBuffer->logicalSize() }, CompositeOperator::XOR);
</del><ins>+        filterContext.drawImageBuffer(*inputImage2, m_effect.drawingRegionOfInputImage(input2.absoluteImageRect()));
+        filterContext.drawImageBuffer(*inputImage, m_effect.drawingRegionOfInputImage(input.absoluteImageRect()), { { }, inputImage->logicalSize() }, CompositeOperator::XOR);
</ins><span class="cx">         break;
</span><span class="cx"> 
</span><span class="cx">     case FECOMPOSITE_OPERATOR_ARITHMETIC:
</span><span class="lines">@@ -206,8 +206,8 @@
</span><span class="cx">         return false;
</span><span class="cx"> 
</span><span class="cx">     case FECOMPOSITE_OPERATOR_LIGHTER:
</span><del>-        filterContext.drawImageBuffer(*imageBuffer2, m_effect.drawingRegionOfInputImage(in2->absolutePaintRect()));
-        filterContext.drawImageBuffer(*imageBuffer, m_effect.drawingRegionOfInputImage(in->absolutePaintRect()), { { }, imageBuffer->logicalSize() }, CompositeOperator::PlusLighter);
</del><ins>+        filterContext.drawImageBuffer(*inputImage2, m_effect.drawingRegionOfInputImage(input2.absoluteImageRect()));
+        filterContext.drawImageBuffer(*inputImage, m_effect.drawingRegionOfInputImage(input.absoluteImageRect()), { { }, inputImage->logicalSize() }, CompositeOperator::PlusLighter);
</ins><span class="cx">         break;
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="lines">@@ -214,14 +214,14 @@
</span><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-bool FECompositeSoftwareApplier::apply(const Filter&, const FilterEffectVector& inputEffects)
</del><ins>+bool FECompositeSoftwareApplier::apply(const Filter&, const FilterImageVector& inputs, FilterImage& result)
</ins><span class="cx"> {
</span><del>-    FilterEffect* in = inputEffects[0].get();
-    FilterEffect* in2 = inputEffects[1].get();
</del><ins>+    auto& input = inputs[0].get();
+    auto& input2 = inputs[1].get();
</ins><span class="cx"> 
</span><span class="cx">     if (m_effect.operation() == FECOMPOSITE_OPERATOR_ARITHMETIC)
</span><del>-        return applyArithmetic(in, in2);
-    return applyNonArithmetic(in, in2);
</del><ins>+        return applyArithmetic(input, input2, result);
+    return applyNonArithmetic(input, input2, result);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsfilterssoftwareFECompositeSoftwareApplierh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/filters/software/FECompositeSoftwareApplier.h (286163 => 286164)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/filters/software/FECompositeSoftwareApplier.h     2021-11-25 09:58:12 UTC (rev 286163)
+++ trunk/Source/WebCore/platform/graphics/filters/software/FECompositeSoftwareApplier.h        2021-11-25 11:44:44 UTC (rev 286164)
</span><span class="lines">@@ -34,7 +34,7 @@
</span><span class="cx"> public:
</span><span class="cx">     using Base::Base;
</span><span class="cx"> 
</span><del>-    bool apply(const Filter&, const FilterEffectVector& inputEffects) override;
</del><ins>+    bool apply(const Filter&, const FilterImageVector& inputs, FilterImage& result) override;
</ins><span class="cx"> 
</span><span class="cx"> private:
</span><span class="cx">     static uint8_t clampByte(int);
</span><span class="lines">@@ -47,8 +47,8 @@
</span><span class="cx"> 
</span><span class="cx">     static inline void applyPlatformArithmetic(unsigned char* source, unsigned char* destination, int pixelArrayLength, float k1, float k2, float k3, float k4);
</span><span class="cx"> 
</span><del>-    bool applyArithmetic(FilterEffect* in, FilterEffect* in2);
-    bool applyNonArithmetic(FilterEffect* in, FilterEffect* in2);
</del><ins>+    bool applyArithmetic(FilterImage& input, FilterImage& input2, FilterImage& result);
+    bool applyNonArithmetic(FilterImage& input, FilterImage& input2, FilterImage& result);
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsfilterssoftwareFEConvolveMatrixSoftwareAppliercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/filters/software/FEConvolveMatrixSoftwareApplier.cpp (286163 => 286164)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/filters/software/FEConvolveMatrixSoftwareApplier.cpp      2021-11-25 09:58:12 UTC (rev 286163)
+++ trunk/Source/WebCore/platform/graphics/filters/software/FEConvolveMatrixSoftwareApplier.cpp 2021-11-25 11:44:44 UTC (rev 286164)
</span><span class="lines">@@ -286,17 +286,17 @@
</span><span class="cx">         setOuterPixels(paintingData, clipRight, paintingData.targetOffset.y(), paintingData.width, clipBottom);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-bool FEConvolveMatrixSoftwareApplier::apply(const Filter&, const FilterEffectVector& inputEffects)
</del><ins>+bool FEConvolveMatrixSoftwareApplier::apply(const Filter&, const FilterImageVector& inputs, FilterImage& result)
</ins><span class="cx"> {
</span><del>-    FilterEffect* in = inputEffects[0].get();
</del><ins>+    auto& input = inputs[0].get();
</ins><span class="cx"> 
</span><span class="cx">     auto alphaFormat = m_effect.preserveAlpha() ? AlphaPremultiplication::Unpremultiplied : AlphaPremultiplication::Premultiplied;
</span><del>-    auto destinationPixelBuffer = m_effect.pixelBufferResult(alphaFormat);
</del><ins>+    auto destinationPixelBuffer = result.pixelBuffer(alphaFormat);
</ins><span class="cx">     if (!destinationPixelBuffer)
</span><span class="cx">         return false;
</span><span class="cx"> 
</span><del>-    auto effectDrawingRect = m_effect.requestedRegionOfInputPixelBuffer(in->absolutePaintRect());
-    auto sourcePixelBuffer = in->getPixelBufferResult(alphaFormat, effectDrawingRect, m_effect.operatingColorSpace());
</del><ins>+    auto effectDrawingRect = m_effect.requestedRegionOfInputPixelBuffer(input.absoluteImageRect());
+    auto sourcePixelBuffer = input.getPixelBuffer(alphaFormat, effectDrawingRect, m_effect.operatingColorSpace());
</ins><span class="cx">     if (!sourcePixelBuffer)
</span><span class="cx">         return false;
</span><span class="cx"> 
</span><span class="lines">@@ -303,7 +303,7 @@
</span><span class="cx">     auto& sourcePixelArray = sourcePixelBuffer->data();
</span><span class="cx">     auto& destinationPixelArray = destinationPixelBuffer->data();
</span><span class="cx">     
</span><del>-    auto paintSize = m_effect.absolutePaintRect().size();
</del><ins>+    auto paintSize = result.absoluteImageRect().size();
</ins><span class="cx"> 
</span><span class="cx">     PaintingData paintingData = {
</span><span class="cx">         sourcePixelArray,
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsfilterssoftwareFEConvolveMatrixSoftwareApplierh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/filters/software/FEConvolveMatrixSoftwareApplier.h (286163 => 286164)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/filters/software/FEConvolveMatrixSoftwareApplier.h        2021-11-25 09:58:12 UTC (rev 286163)
+++ trunk/Source/WebCore/platform/graphics/filters/software/FEConvolveMatrixSoftwareApplier.h   2021-11-25 11:44:44 UTC (rev 286164)
</span><span class="lines">@@ -37,7 +37,7 @@
</span><span class="cx"> public:
</span><span class="cx">     using Base::Base;
</span><span class="cx"> 
</span><del>-    bool apply(const Filter&, const FilterEffectVector& inputEffects) override;
</del><ins>+    bool apply(const Filter&, const FilterImageVector& inputs, FilterImage& result) override;
</ins><span class="cx"> 
</span><span class="cx"> private:
</span><span class="cx">     struct PaintingData {
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsfilterssoftwareFEDisplacementMapSoftwareAppliercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/filters/software/FEDisplacementMapSoftwareApplier.cpp (286163 => 286164)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/filters/software/FEDisplacementMapSoftwareApplier.cpp     2021-11-25 09:58:12 UTC (rev 286163)
+++ trunk/Source/WebCore/platform/graphics/filters/software/FEDisplacementMapSoftwareApplier.cpp        2021-11-25 11:44:44 UTC (rev 286164)
</span><span class="lines">@@ -49,32 +49,32 @@
</span><span class="cx">     return m_effect.yChannelSelector() - 1;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-bool FEDisplacementMapSoftwareApplier::apply(const Filter& filter, const FilterEffectVector& inputEffects)
</del><ins>+bool FEDisplacementMapSoftwareApplier::apply(const Filter& filter, const FilterImageVector& inputs, FilterImage& result)
</ins><span class="cx"> {
</span><del>-    FilterEffect* in = inputEffects[0].get();
-    FilterEffect* in2 = inputEffects[1].get();
</del><ins>+    auto& input = inputs[0].get();
+    auto& input2 = inputs[1].get();
</ins><span class="cx"> 
</span><del>-    auto destinationPixelBuffer = m_effect.pixelBufferResult(AlphaPremultiplication::Premultiplied);
</del><ins>+    auto destinationPixelBuffer = result.pixelBuffer(AlphaPremultiplication::Premultiplied);
</ins><span class="cx">     if (!destinationPixelBuffer)
</span><span class="cx">         return false;
</span><span class="cx"> 
</span><span class="cx">     auto& destinationPixelArray = destinationPixelBuffer->data();
</span><span class="cx"> 
</span><del>-    auto effectADrawingRect = m_effect.requestedRegionOfInputPixelBuffer(in->absolutePaintRect());
-    auto inputPixelBuffer = in->getPixelBufferResult(AlphaPremultiplication::Premultiplied, effectADrawingRect);
</del><ins>+    auto effectADrawingRect = m_effect.requestedRegionOfInputPixelBuffer(input.absoluteImageRect());
+    auto inputPixelBuffer = input.getPixelBuffer(AlphaPremultiplication::Premultiplied, effectADrawingRect);
</ins><span class="cx"> 
</span><del>-    auto effectBDrawingRect = m_effect.requestedRegionOfInputPixelBuffer(in2->absolutePaintRect());
</del><ins>+    auto effectBDrawingRect = m_effect.requestedRegionOfInputPixelBuffer(input2.absoluteImageRect());
</ins><span class="cx">     // The calculations using the pixel values from ‘in2’ are performed using non-premultiplied color values.
</span><del>-    auto displacementPixelBuffer = in2->getPixelBufferResult(AlphaPremultiplication::Unpremultiplied, effectBDrawingRect);
</del><ins>+    auto displacementPixelBuffer = input2.getPixelBuffer(AlphaPremultiplication::Unpremultiplied, effectBDrawingRect);
</ins><span class="cx">     
</span><span class="cx">     if (!inputPixelBuffer || !displacementPixelBuffer)
</span><span class="cx">         return false;
</span><span class="cx"> 
</span><del>-    auto& inputImage = inputPixelBuffer->data();
-    auto& displacementImage = displacementPixelBuffer->data();
-    ASSERT(inputImage.length() == displacementImage.length());
</del><ins>+    auto& inputPixelArray = inputPixelBuffer->data();
+    auto& displacementPixelArray = displacementPixelBuffer->data();
+    ASSERT(inputPixelArray.length() == displacementPixelArray.length());
</ins><span class="cx"> 
</span><del>-    IntSize paintSize = m_effect.absolutePaintRect().size();
</del><ins>+    IntSize paintSize = result.absoluteImageRect().size();
</ins><span class="cx"> 
</span><span class="cx">     FloatSize scale = filter.scaledByFilterScale({ m_effect.scale(), m_effect.scale() });
</span><span class="cx">     float scaleForColorX = scale.width() / 255.0;
</span><span class="lines">@@ -93,8 +93,8 @@
</span><span class="cx">         for (int x = 0; x < paintSize.width(); ++x) {
</span><span class="cx">             int destinationIndex = lineStartOffset + x * 4;
</span><span class="cx">             
</span><del>-            int srcX = x + static_cast<int>(scaleForColorX * displacementImage.item(destinationIndex + displacementChannelX) + scaledOffsetX);
-            int srcY = y + static_cast<int>(scaleForColorY * displacementImage.item(destinationIndex + displacementChannelY) + scaledOffsetY);
</del><ins>+            int srcX = x + static_cast<int>(scaleForColorX * displacementPixelArray.item(destinationIndex + displacementChannelX) + scaledOffsetX);
+            int srcY = y + static_cast<int>(scaleForColorY * displacementPixelArray.item(destinationIndex + displacementChannelY) + scaledOffsetY);
</ins><span class="cx"> 
</span><span class="cx">             unsigned* destinationPixelPtr = reinterpret_cast<unsigned*>(destinationPixelArray.data() + destinationIndex);
</span><span class="cx">             if (srcX < 0 || srcX >= paintSize.width() || srcY < 0 || srcY >= paintSize.height()) {
</span><span class="lines">@@ -102,7 +102,7 @@
</span><span class="cx">                 continue;
</span><span class="cx">             }
</span><span class="cx"> 
</span><del>-            *destinationPixelPtr = *reinterpret_cast<unsigned*>(inputImage.data() + byteOffsetOfPixel(srcX, srcY, rowBytes));
</del><ins>+            *destinationPixelPtr = *reinterpret_cast<unsigned*>(inputPixelArray.data() + byteOffsetOfPixel(srcX, srcY, rowBytes));
</ins><span class="cx">         }
</span><span class="cx">     }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsfilterssoftwareFEDisplacementMapSoftwareApplierh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/filters/software/FEDisplacementMapSoftwareApplier.h (286163 => 286164)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/filters/software/FEDisplacementMapSoftwareApplier.h       2021-11-25 09:58:12 UTC (rev 286163)
+++ trunk/Source/WebCore/platform/graphics/filters/software/FEDisplacementMapSoftwareApplier.h  2021-11-25 11:44:44 UTC (rev 286164)
</span><span class="lines">@@ -34,7 +34,7 @@
</span><span class="cx"> public:
</span><span class="cx">     FEDisplacementMapSoftwareApplier(FEDisplacementMap&);
</span><span class="cx"> 
</span><del>-    bool apply(const Filter&, const FilterEffectVector& inputEffects) override;
</del><ins>+    bool apply(const Filter&, const FilterImageVector& inputs, FilterImage& result) override;
</ins><span class="cx"> 
</span><span class="cx"> private:
</span><span class="cx">     static inline unsigned byteOffsetOfPixel(unsigned x, unsigned y, unsigned rowBytes)
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsfilterssoftwareFEDropShadowSoftwareAppliercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/filters/software/FEDropShadowSoftwareApplier.cpp (286163 => 286164)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/filters/software/FEDropShadowSoftwareApplier.cpp  2021-11-25 09:58:12 UTC (rev 286163)
+++ trunk/Source/WebCore/platform/graphics/filters/software/FEDropShadowSoftwareApplier.cpp     2021-11-25 11:44:44 UTC (rev 286164)
</span><span class="lines">@@ -30,11 +30,11 @@
</span><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><del>-bool FEDropShadowSoftwareApplier::apply(const Filter& filter, const FilterEffectVector& inputEffects)
</del><ins>+bool FEDropShadowSoftwareApplier::apply(const Filter& filter, const FilterImageVector& inputs, FilterImage& result)
</ins><span class="cx"> {
</span><del>-    FilterEffect* in = inputEffects[0].get();
</del><ins>+    auto& input = inputs[0].get();
</ins><span class="cx"> 
</span><del>-    auto resultImage = m_effect.imageBufferResult();
</del><ins>+    auto resultImage = result.imageBuffer();
</ins><span class="cx">     if (!resultImage)
</span><span class="cx">         return false;
</span><span class="cx"> 
</span><span class="lines">@@ -41,22 +41,22 @@
</span><span class="cx">     FloatSize blurRadius = 2 * filter.scaledByFilterScale({ m_effect.stdDeviationX(), m_effect.stdDeviationY() });
</span><span class="cx">     FloatSize offset = filter.scaledByFilterScale({ m_effect.dx(), m_effect.dy() });
</span><span class="cx"> 
</span><del>-    FloatRect drawingRegion = m_effect.drawingRegionOfInputImage(in->absolutePaintRect());
</del><ins>+    FloatRect drawingRegion = m_effect.drawingRegionOfInputImage(input.absoluteImageRect());
</ins><span class="cx">     FloatRect drawingRegionWithOffset(drawingRegion);
</span><span class="cx">     drawingRegionWithOffset.move(offset);
</span><span class="cx"> 
</span><del>-    auto sourceImage = in->imageBufferResult();
-    if (!sourceImage)
</del><ins>+    auto inputImage = input.imageBuffer();
+    if (!inputImage)
</ins><span class="cx">         return false;
</span><span class="cx"> 
</span><span class="cx">     GraphicsContext& resultContext = resultImage->context();
</span><span class="cx">     resultContext.setAlpha(m_effect.shadowOpacity());
</span><del>-    resultContext.drawImageBuffer(*sourceImage, drawingRegionWithOffset);
</del><ins>+    resultContext.drawImageBuffer(*inputImage, drawingRegionWithOffset);
</ins><span class="cx">     resultContext.setAlpha(1);
</span><span class="cx"> 
</span><span class="cx">     ShadowBlur contextShadow(blurRadius, offset, m_effect.shadowColor());
</span><span class="cx"> 
</span><del>-    PixelBufferFormat format { AlphaPremultiplication::Premultiplied, PixelFormat::RGBA8, m_effect.resultColorSpace() };
</del><ins>+    PixelBufferFormat format { AlphaPremultiplication::Premultiplied, PixelFormat::RGBA8, result.colorSpace() };
</ins><span class="cx">     IntRect shadowArea(IntPoint(), resultImage->truncatedLogicalSize());
</span><span class="cx">     auto pixelBuffer = resultImage->getPixelBuffer(format, shadowArea);
</span><span class="cx">     if (!pixelBuffer)
</span><span class="lines">@@ -68,10 +68,10 @@
</span><span class="cx">     resultImage->putPixelBuffer(*pixelBuffer, shadowArea);
</span><span class="cx"> 
</span><span class="cx">     resultContext.setCompositeOperation(CompositeOperator::SourceIn);
</span><del>-    resultContext.fillRect(FloatRect(FloatPoint(), m_effect.absolutePaintRect().size()), m_effect.shadowColor());
</del><ins>+    resultContext.fillRect(FloatRect(FloatPoint(), result.absoluteImageRect().size()), m_effect.shadowColor());
</ins><span class="cx">     resultContext.setCompositeOperation(CompositeOperator::DestinationOver);
</span><span class="cx"> 
</span><del>-    resultImage->context().drawImageBuffer(*sourceImage, drawingRegion);
</del><ins>+    resultImage->context().drawImageBuffer(*inputImage, drawingRegion);
</ins><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsfilterssoftwareFEDropShadowSoftwareApplierh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/filters/software/FEDropShadowSoftwareApplier.h (286163 => 286164)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/filters/software/FEDropShadowSoftwareApplier.h    2021-11-25 09:58:12 UTC (rev 286163)
+++ trunk/Source/WebCore/platform/graphics/filters/software/FEDropShadowSoftwareApplier.h       2021-11-25 11:44:44 UTC (rev 286164)
</span><span class="lines">@@ -32,7 +32,7 @@
</span><span class="cx"> public:
</span><span class="cx">     using Base::Base;
</span><span class="cx"> 
</span><del>-    bool apply(const Filter&, const FilterEffectVector& inputEffects) override;
</del><ins>+    bool apply(const Filter&, const FilterImageVector& inputs, FilterImage& result) override;
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsfilterssoftwareFEFloodSoftwareAppliercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/filters/software/FEFloodSoftwareApplier.cpp (286163 => 286164)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/filters/software/FEFloodSoftwareApplier.cpp       2021-11-25 09:58:12 UTC (rev 286163)
+++ trunk/Source/WebCore/platform/graphics/filters/software/FEFloodSoftwareApplier.cpp  2021-11-25 11:44:44 UTC (rev 286164)
</span><span class="lines">@@ -30,14 +30,14 @@
</span><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><del>-bool FEFloodSoftwareApplier::apply(const Filter&, const FilterEffectVector&)
</del><ins>+bool FEFloodSoftwareApplier::apply(const Filter&, const FilterImageVector&, FilterImage& result)
</ins><span class="cx"> {
</span><del>-    auto resultImage = m_effect.imageBufferResult();
</del><ins>+    auto resultImage = result.imageBuffer();
</ins><span class="cx">     if (!resultImage)
</span><span class="cx">         return false;
</span><span class="cx"> 
</span><span class="cx">     auto color = m_effect.floodColor().colorWithAlphaMultipliedBy(m_effect.floodOpacity());
</span><del>-    resultImage->context().fillRect(FloatRect(FloatPoint(), m_effect.absolutePaintRect().size()), color);
</del><ins>+    resultImage->context().fillRect(FloatRect(FloatPoint(), result.absoluteImageRect().size()), color);
</ins><span class="cx"> 
</span><span class="cx">     return true;
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsfilterssoftwareFEFloodSoftwareApplierh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/filters/software/FEFloodSoftwareApplier.h (286163 => 286164)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/filters/software/FEFloodSoftwareApplier.h 2021-11-25 09:58:12 UTC (rev 286163)
+++ trunk/Source/WebCore/platform/graphics/filters/software/FEFloodSoftwareApplier.h    2021-11-25 11:44:44 UTC (rev 286164)
</span><span class="lines">@@ -34,7 +34,7 @@
</span><span class="cx"> public:
</span><span class="cx">     using Base::Base;
</span><span class="cx"> 
</span><del>-    bool apply(const Filter&, const FilterEffectVector& inputEffects) override;
</del><ins>+    bool apply(const Filter&, const FilterImageVector& inputs, FilterImage& result) override;
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsfilterssoftwareFEGaussianBlurSoftwareAppliercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/filters/software/FEGaussianBlurSoftwareApplier.cpp (286163 => 286164)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/filters/software/FEGaussianBlurSoftwareApplier.cpp        2021-11-25 09:58:12 UTC (rev 286163)
+++ trunk/Source/WebCore/platform/graphics/filters/software/FEGaussianBlurSoftwareApplier.cpp   2021-11-25 11:44:44 UTC (rev 286164)
</span><span class="lines">@@ -425,30 +425,28 @@
</span><span class="cx">     boxBlurGeneric(ioBuffer, tmpPixelArray, kernelSizeX, kernelSizeY, paintSize, isAlphaImage, edgeMode);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-bool FEGaussianBlurSoftwareApplier::apply(const Filter& filter, const FilterEffectVector& inputEffects)
</del><ins>+bool FEGaussianBlurSoftwareApplier::apply(const Filter& filter, const FilterImageVector& inputs, FilterImage& result)
</ins><span class="cx"> {
</span><del>-    FilterEffect* in = inputEffects[0].get();
</del><ins>+    auto& input = inputs[0].get();
</ins><span class="cx"> 
</span><del>-    auto destinationPixelBuffer = m_effect.pixelBufferResult(AlphaPremultiplication::Premultiplied);
</del><ins>+    auto destinationPixelBuffer = result.pixelBuffer(AlphaPremultiplication::Premultiplied);
</ins><span class="cx">     if (!destinationPixelBuffer)
</span><span class="cx">         return false;
</span><span class="cx"> 
</span><del>-    m_effect.setIsAlphaImage(in->isAlphaImage());
-
-    auto effectDrawingRect = m_effect.requestedRegionOfInputPixelBuffer(in->absolutePaintRect());
-    in->copyPixelBufferResult(*destinationPixelBuffer, effectDrawingRect);
</del><ins>+    auto effectDrawingRect = m_effect.requestedRegionOfInputPixelBuffer(input.absoluteImageRect());
+    input.copyPixelBuffer(*destinationPixelBuffer, effectDrawingRect);
</ins><span class="cx">     if (!m_effect.stdDeviationX() && !m_effect.stdDeviationY())
</span><span class="cx">         return true;
</span><span class="cx"> 
</span><span class="cx">     auto kernelSize = m_effect.calculateKernelSize(filter, { m_effect.stdDeviationX(), m_effect.stdDeviationY() });
</span><span class="cx"> 
</span><del>-    IntSize paintSize = m_effect.absolutePaintRect().size();
</del><ins>+    IntSize paintSize = result.absoluteImageRect().size();
</ins><span class="cx">     auto tmpImageData = Uint8ClampedArray::tryCreateUninitialized(paintSize.area() * 4);
</span><span class="cx">     if (!tmpImageData)
</span><span class="cx">         return false;
</span><span class="cx"> 
</span><span class="cx">     auto& destinationPixelArray = destinationPixelBuffer->data();
</span><del>-    applyPlatform(destinationPixelArray, *tmpImageData, kernelSize.width(), kernelSize.height(), paintSize, m_effect.isAlphaImage(), m_effect.edgeMode());
</del><ins>+    applyPlatform(destinationPixelArray, *tmpImageData, kernelSize.width(), kernelSize.height(), paintSize, result.isAlphaImage(), m_effect.edgeMode());
</ins><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsfilterssoftwareFEGaussianBlurSoftwareApplierh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/filters/software/FEGaussianBlurSoftwareApplier.h (286163 => 286164)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/filters/software/FEGaussianBlurSoftwareApplier.h  2021-11-25 09:58:12 UTC (rev 286163)
+++ trunk/Source/WebCore/platform/graphics/filters/software/FEGaussianBlurSoftwareApplier.h     2021-11-25 11:44:44 UTC (rev 286164)
</span><span class="lines">@@ -36,7 +36,7 @@
</span><span class="cx"> public:
</span><span class="cx">     using Base::Base;
</span><span class="cx"> 
</span><del>-    bool apply(const Filter&, const FilterEffectVector& inputEffects) override;
</del><ins>+    bool apply(const Filter&, const FilterImageVector& inputs, FilterImage& result) override;
</ins><span class="cx"> 
</span><span class="cx"> private:
</span><span class="cx">     struct ApplyParameters {
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsfilterssoftwareFELightingSoftwareAppliercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/filters/software/FELightingSoftwareApplier.cpp (286163 => 286164)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/filters/software/FELightingSoftwareApplier.cpp    2021-11-25 09:58:12 UTC (rev 286163)
+++ trunk/Source/WebCore/platform/graphics/filters/software/FELightingSoftwareApplier.cpp       2021-11-25 11:44:44 UTC (rev 286164)
</span><span class="lines">@@ -391,27 +391,25 @@
</span><span class="cx">     }
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-bool FELightingSoftwareApplier::apply(const Filter&, const FilterEffectVector& inputEffects)
</del><ins>+bool FELightingSoftwareApplier::apply(const Filter&, const FilterImageVector& inputs, FilterImage& result)
</ins><span class="cx"> {
</span><del>-    FilterEffect* in = inputEffects[0].get();
</del><ins>+    auto& input = inputs[0].get();
</ins><span class="cx"> 
</span><del>-    auto destinationPixelBuffer = m_effect.pixelBufferResult(AlphaPremultiplication::Premultiplied);
</del><ins>+    auto destinationPixelBuffer = result.pixelBuffer(AlphaPremultiplication::Premultiplied);
</ins><span class="cx">     if (!destinationPixelBuffer)
</span><span class="cx">         return false;
</span><span class="cx"> 
</span><span class="cx">     auto& destinationPixelArray = destinationPixelBuffer->data();
</span><span class="cx"> 
</span><del>-    m_effect.setIsAlphaImage(false);
</del><ins>+    auto effectDrawingRect = m_effect.requestedRegionOfInputPixelBuffer(input.absoluteImageRect());
+    input.copyPixelBuffer(*destinationPixelBuffer, effectDrawingRect);
</ins><span class="cx"> 
</span><del>-    auto effectDrawingRect = m_effect.requestedRegionOfInputPixelBuffer(in->absolutePaintRect());
-    in->copyPixelBufferResult(*destinationPixelBuffer, effectDrawingRect);
-
</del><span class="cx">     // FIXME: support kernelUnitLengths other than (1,1). The issue here is that the W3
</span><span class="cx">     // standard has no test case for them, and other browsers (like Firefox) has strange
</span><span class="cx">     // output for various kernelUnitLengths, and I am not sure they are reliable.
</span><span class="cx">     // Anyway, feConvolveMatrix should also use the implementation
</span><span class="cx"> 
</span><del>-    IntSize size = IntSize(m_effect.absolutePaintRect().size());
</del><ins>+    IntSize size = IntSize(result.absoluteImageRect().size());
</ins><span class="cx"> 
</span><span class="cx">     // FIXME: do something if width or height (or both) is 1 pixel.
</span><span class="cx">     // The W3 spec does not define this case. Now the filter just returns.
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsfilterssoftwareFELightingSoftwareApplierh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/filters/software/FELightingSoftwareApplier.h (286163 => 286164)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/filters/software/FELightingSoftwareApplier.h      2021-11-25 09:58:12 UTC (rev 286163)
+++ trunk/Source/WebCore/platform/graphics/filters/software/FELightingSoftwareApplier.h 2021-11-25 11:44:44 UTC (rev 286164)
</span><span class="lines">@@ -41,7 +41,7 @@
</span><span class="cx"> public:
</span><span class="cx">     using Base::Base;
</span><span class="cx"> 
</span><del>-    bool apply(const Filter&, const FilterEffectVector& inputEffects) override;
</del><ins>+    bool apply(const Filter&, const FilterImageVector& inputs, FilterImage& result) override;
</ins><span class="cx"> 
</span><span class="cx"> private:
</span><span class="cx">     static constexpr int cPixelSize = 4;
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsfilterssoftwareFEMergeSoftwareAppliercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/filters/software/FEMergeSoftwareApplier.cpp (286163 => 286164)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/filters/software/FEMergeSoftwareApplier.cpp       2021-11-25 09:58:12 UTC (rev 286163)
+++ trunk/Source/WebCore/platform/graphics/filters/software/FEMergeSoftwareApplier.cpp  2021-11-25 11:44:44 UTC (rev 286164)
</span><span class="lines">@@ -29,21 +29,21 @@
</span><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><del>-bool FEMergeSoftwareApplier::apply(const Filter&, const FilterEffectVector& inputEffects)
</del><ins>+bool FEMergeSoftwareApplier::apply(const Filter&, const FilterImageVector& inputs, FilterImage& result)
</ins><span class="cx"> {
</span><del>-    ASSERT(inputEffects.size() > 0);
</del><ins>+    ASSERT(inputs.size() == m_effect.numberOfEffectInputs());
</ins><span class="cx"> 
</span><del>-    auto resultImage = m_effect.imageBufferResult();
</del><ins>+    auto resultImage = result.imageBuffer();
</ins><span class="cx">     if (!resultImage)
</span><span class="cx">         return false;
</span><span class="cx"> 
</span><span class="cx">     auto& filterContext = resultImage->context();
</span><span class="cx"> 
</span><del>-    for (auto& in : inputEffects) {
-        auto inBuffer = in->imageBufferResult();
-        if (!inBuffer)
</del><ins>+    for (auto& input : inputs) {
+        auto inputImage = input->imageBuffer();
+        if (!inputImage)
</ins><span class="cx">             continue;
</span><del>-        filterContext.drawImageBuffer(*inBuffer, m_effect.drawingRegionOfInputImage(in->absolutePaintRect()));
</del><ins>+        filterContext.drawImageBuffer(*inputImage, m_effect.drawingRegionOfInputImage(input->absoluteImageRect()));
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     return true;
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsfilterssoftwareFEMergeSoftwareApplierh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/filters/software/FEMergeSoftwareApplier.h (286163 => 286164)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/filters/software/FEMergeSoftwareApplier.h 2021-11-25 09:58:12 UTC (rev 286163)
+++ trunk/Source/WebCore/platform/graphics/filters/software/FEMergeSoftwareApplier.h    2021-11-25 11:44:44 UTC (rev 286164)
</span><span class="lines">@@ -34,7 +34,7 @@
</span><span class="cx"> public:
</span><span class="cx">     using Base::Base;
</span><span class="cx"> 
</span><del>-    bool apply(const Filter&, const FilterEffectVector& inputEffects) override;
</del><ins>+    bool apply(const Filter&, const FilterImageVector& inputs, FilterImage& result) override;
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsfilterssoftwareFEMorphologySoftwareAppliercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/filters/software/FEMorphologySoftwareApplier.cpp (286163 => 286164)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/filters/software/FEMorphologySoftwareApplier.cpp  2021-11-25 09:58:12 UTC (rev 286163)
+++ trunk/Source/WebCore/platform/graphics/filters/software/FEMorphologySoftwareApplier.cpp     2021-11-25 11:44:44 UTC (rev 286164)
</span><span class="lines">@@ -141,25 +141,23 @@
</span><span class="cx">     applyPlatformGeneric(paintingData, 0, paintingData.height);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-bool FEMorphologySoftwareApplier::apply(const Filter& filter, const FilterEffectVector& inputEffects)
</del><ins>+bool FEMorphologySoftwareApplier::apply(const Filter& filter, const FilterImageVector& inputs, FilterImage& result)
</ins><span class="cx"> {
</span><del>-    FilterEffect* in = inputEffects[0].get();
</del><ins>+    auto& input = inputs[0].get();
</ins><span class="cx"> 
</span><del>-    auto destinationPixelBuffer = m_effect.pixelBufferResult(AlphaPremultiplication::Premultiplied);
</del><ins>+    auto destinationPixelBuffer = result.pixelBuffer(AlphaPremultiplication::Premultiplied);
</ins><span class="cx">     if (!destinationPixelBuffer)
</span><span class="cx">         return false;
</span><span class="cx"> 
</span><del>-    m_effect.setIsAlphaImage(in->isAlphaImage());
-
</del><span class="cx">     auto isDegenerate = [](int radiusX, int radiusY) -> bool {
</span><span class="cx">         return radiusX < 0 || radiusY < 0 || (!radiusX && !radiusY);
</span><span class="cx">     };
</span><span class="cx"> 
</span><del>-    IntRect effectDrawingRect = m_effect.requestedRegionOfInputPixelBuffer(in->absolutePaintRect());
</del><ins>+    IntRect effectDrawingRect = m_effect.requestedRegionOfInputPixelBuffer(input.absoluteImageRect());
</ins><span class="cx">     IntSize radius = flooredIntSize(FloatSize(m_effect.radiusX(), m_effect.radiusY()));
</span><span class="cx"> 
</span><span class="cx">     if (isDegenerate(radius.width(), radius.height())) {
</span><del>-        in->copyPixelBufferResult(*destinationPixelBuffer, effectDrawingRect);
</del><ins>+        input.copyPixelBuffer(*destinationPixelBuffer, effectDrawingRect);
</ins><span class="cx">         return true;
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="lines">@@ -168,11 +166,11 @@
</span><span class="cx">     int radiusY = std::min(effectDrawingRect.height() - 1, radius.height());
</span><span class="cx"> 
</span><span class="cx">     if (isDegenerate(radiusX, radiusY)) {
</span><del>-        in->copyPixelBufferResult(*destinationPixelBuffer, effectDrawingRect);
</del><ins>+        input.copyPixelBuffer(*destinationPixelBuffer, effectDrawingRect);
</ins><span class="cx">         return true;
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    auto sourcePixelBuffer = in->getPixelBufferResult(AlphaPremultiplication::Premultiplied, effectDrawingRect, m_effect.operatingColorSpace());
</del><ins>+    auto sourcePixelBuffer = input.getPixelBuffer(AlphaPremultiplication::Premultiplied, effectDrawingRect, m_effect.operatingColorSpace());
</ins><span class="cx">     if (!sourcePixelBuffer)
</span><span class="cx">         return false;
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsfilterssoftwareFEMorphologySoftwareApplierh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/filters/software/FEMorphologySoftwareApplier.h (286163 => 286164)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/filters/software/FEMorphologySoftwareApplier.h    2021-11-25 09:58:12 UTC (rev 286163)
+++ trunk/Source/WebCore/platform/graphics/filters/software/FEMorphologySoftwareApplier.h       2021-11-25 11:44:44 UTC (rev 286164)
</span><span class="lines">@@ -38,7 +38,7 @@
</span><span class="cx"> public:
</span><span class="cx">     using Base::Base;
</span><span class="cx"> 
</span><del>-    bool apply(const Filter&, const FilterEffectVector& inputEffects) override;
</del><ins>+    bool apply(const Filter&, const FilterImageVector& inputs, FilterImage& result) override;
</ins><span class="cx"> 
</span><span class="cx"> private:
</span><span class="cx">     using ColumnExtrema = Vector<ColorComponents<uint8_t, 4>, 16>;
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsfilterssoftwareFEOffsetSoftwareAppliercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/filters/software/FEOffsetSoftwareApplier.cpp (286163 => 286164)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/filters/software/FEOffsetSoftwareApplier.cpp      2021-11-25 09:58:12 UTC (rev 286163)
+++ trunk/Source/WebCore/platform/graphics/filters/software/FEOffsetSoftwareApplier.cpp 2021-11-25 11:44:44 UTC (rev 286164)
</span><span class="lines">@@ -32,21 +32,19 @@
</span><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><del>-bool FEOffsetSoftwareApplier::apply(const Filter& filter, const FilterEffectVector& inputEffects)
</del><ins>+bool FEOffsetSoftwareApplier::apply(const Filter& filter, const FilterImageVector& inputs, FilterImage& result)
</ins><span class="cx"> {
</span><del>-    FilterEffect* in = inputEffects[0].get();
</del><ins>+    auto& input = inputs[0].get();
</ins><span class="cx"> 
</span><del>-    auto resultImage = m_effect.imageBufferResult();
-    auto inBuffer = in->imageBufferResult();
-    if (!resultImage || !inBuffer)
</del><ins>+    auto resultImage = result.imageBuffer();
+    auto inputImage = input.imageBuffer();
+    if (!resultImage || !inputImage)
</ins><span class="cx">         return false;
</span><span class="cx"> 
</span><del>-    m_effect.setIsAlphaImage(in->isAlphaImage());
-
-    FloatRect drawingRegion = m_effect.drawingRegionOfInputImage(in->absolutePaintRect());
</del><ins>+    FloatRect drawingRegion = m_effect.drawingRegionOfInputImage(input.absoluteImageRect());
</ins><span class="cx">     drawingRegion.move(filter.scaledByFilterScale({ m_effect.dx(), m_effect.dy() }));
</span><del>-    resultImage->context().drawImageBuffer(*inBuffer, drawingRegion);
</del><span class="cx"> 
</span><ins>+    resultImage->context().drawImageBuffer(*inputImage, drawingRegion);
</ins><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsfilterssoftwareFEOffsetSoftwareApplierh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/filters/software/FEOffsetSoftwareApplier.h (286163 => 286164)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/filters/software/FEOffsetSoftwareApplier.h        2021-11-25 09:58:12 UTC (rev 286163)
+++ trunk/Source/WebCore/platform/graphics/filters/software/FEOffsetSoftwareApplier.h   2021-11-25 11:44:44 UTC (rev 286164)
</span><span class="lines">@@ -34,7 +34,7 @@
</span><span class="cx"> public:
</span><span class="cx">     using Base::Base;
</span><span class="cx"> 
</span><del>-    bool apply(const Filter&, const FilterEffectVector& inputEffects) override;
</del><ins>+    bool apply(const Filter&, const FilterImageVector& inputs, FilterImage& result) override;
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsfilterssoftwareFETileSoftwareAppliercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/filters/software/FETileSoftwareApplier.cpp (286163 => 286164)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/filters/software/FETileSoftwareApplier.cpp        2021-11-25 09:58:12 UTC (rev 286163)
+++ trunk/Source/WebCore/platform/graphics/filters/software/FETileSoftwareApplier.cpp   2021-11-25 11:44:44 UTC (rev 286164)
</span><span class="lines">@@ -27,53 +27,47 @@
</span><span class="cx"> #include "Filter.h"
</span><span class="cx"> #include "GraphicsContext.h"
</span><span class="cx"> #include "Pattern.h"
</span><del>-#include "SVGRenderingContext.h"
</del><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><del>-bool FETileSoftwareApplier::apply(const Filter& filter, const FilterEffectVector& inputEffects)
</del><ins>+bool FETileSoftwareApplier::apply(const Filter& filter, const FilterImageVector& inputs, FilterImage& result)
</ins><span class="cx"> {
</span><del>-    FilterEffect* in = inputEffects[0].get();
</del><ins>+    auto& input = inputs[0].get();
</ins><span class="cx"> 
</span><del>-    auto resultImage = m_effect.imageBufferResult();
-    auto inBuffer = in->imageBufferResult();
-    if (!resultImage || !inBuffer)
</del><ins>+    auto resultImage = result.imageBuffer();
+    auto inputImage = input.imageBuffer();
+    if (!resultImage || !inputImage)
</ins><span class="cx">         return false;
</span><span class="cx"> 
</span><del>-    m_effect.setIsAlphaImage(in->isAlphaImage());
</del><ins>+    auto inputImageRect = input.absoluteImageRect();
+    auto resultImageRect = result.absoluteImageRect();
</ins><span class="cx"> 
</span><del>-    // Source input needs more attention. It has the size of the filterRegion but gives the
-    // size of the cutted sourceImage back. This is part of the specification and optimization.
-    FloatRect tileRect = in->maxEffectRect();
-    FloatPoint inMaxEffectLocation = tileRect.location();
-    FloatPoint maxEffectLocation = m_effect.maxEffectRect().location();
-    if (in->filterType() == FilterEffect::Type::SourceGraphic || in->filterType() == FilterEffect::Type::SourceAlpha) {
-        tileRect = filter.filterRegion();
-        tileRect.scale(filter.filterScale());
-    }
</del><ins>+    auto tileRect = filter.maxEffectRect(input.primitiveSubregion());
+    tileRect.scale(filter.filterScale());
</ins><span class="cx"> 
</span><del>-    // FIXME: remove this non-paltform call.
-    auto tileImage = SVGRenderingContext::createImageBuffer(tileRect, tileRect, DestinationColorSpace::SRGB(), filter.renderingMode());
</del><ins>+    auto maxResultRect = filter.maxEffectRect(result.primitiveSubregion());
+    maxResultRect.scale(filter.filterScale());
+
+    auto tileImage = ImageBuffer::create(tileRect.size(), filter.renderingMode(), 1, DestinationColorSpace::SRGB(), PixelFormat::BGRA8);
</ins><span class="cx">     if (!tileImage)
</span><span class="cx">         return false;
</span><span class="cx"> 
</span><del>-    GraphicsContext& tileImageContext = tileImage->context();
-    tileImageContext.translate(-inMaxEffectLocation.x(), -inMaxEffectLocation.y());
-    tileImageContext.drawImageBuffer(*inBuffer, in->absolutePaintRect().location());
</del><ins>+    auto& tileImageContext = tileImage->context();
+    tileImageContext.translate(-tileRect.location());
+    tileImageContext.drawImageBuffer(*inputImage, inputImageRect.location());
</ins><span class="cx"> 
</span><del>-    auto tileImageCopy = ImageBuffer::sinkIntoNativeImage(WTFMove(tileImage));
-    if (!tileImageCopy)
</del><ins>+    auto patternImage = ImageBuffer::sinkIntoNativeImage(WTFMove(tileImage));
+    if (!patternImage)
</ins><span class="cx">         return false;
</span><span class="cx"> 
</span><span class="cx">     AffineTransform patternTransform;
</span><del>-    patternTransform.translate(inMaxEffectLocation - maxEffectLocation);
</del><ins>+    patternTransform.translate(tileRect.location() - maxResultRect.location());
</ins><span class="cx"> 
</span><del>-    auto pattern = Pattern::create(tileImageCopy.releaseNonNull(), { true, true, patternTransform });
</del><ins>+    auto pattern = Pattern::create(patternImage.releaseNonNull(), { true, true, patternTransform });
</ins><span class="cx"> 
</span><del>-    GraphicsContext& filterContext = resultImage->context();
-    filterContext.setFillPattern(WTFMove(pattern));
-    filterContext.fillRect(FloatRect(FloatPoint(), m_effect.absolutePaintRect().size()));
-
</del><ins>+    auto& resultContext = resultImage->context();
+    resultContext.setFillPattern(WTFMove(pattern));
+    resultContext.fillRect(FloatRect(FloatPoint(), resultImageRect.size()));
</ins><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsfilterssoftwareFETileSoftwareApplierh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/filters/software/FETileSoftwareApplier.h (286163 => 286164)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/filters/software/FETileSoftwareApplier.h  2021-11-25 09:58:12 UTC (rev 286163)
+++ trunk/Source/WebCore/platform/graphics/filters/software/FETileSoftwareApplier.h     2021-11-25 11:44:44 UTC (rev 286164)
</span><span class="lines">@@ -34,7 +34,7 @@
</span><span class="cx"> public:
</span><span class="cx">     using Base::Base;
</span><span class="cx"> 
</span><del>-    bool apply(const Filter&, const FilterEffectVector& inputEffects) override;
</del><ins>+    bool apply(const Filter&, const FilterImageVector& inputs, FilterImage& result) override;
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsfilterssoftwareFETurbulenceSoftwareAppliercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/filters/software/FETurbulenceSoftwareApplier.cpp (286163 => 286164)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/filters/software/FETurbulenceSoftwareApplier.cpp  2021-11-25 09:58:12 UTC (rev 286163)
+++ trunk/Source/WebCore/platform/graphics/filters/software/FETurbulenceSoftwareApplier.cpp     2021-11-25 11:44:44 UTC (rev 286164)
</span><span class="lines">@@ -339,13 +339,13 @@
</span><span class="cx">     applyPlatformGeneric(filterRegion, filterScale, pixelArray, paintingData, stitchData, 0, height);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-bool FETurbulenceSoftwareApplier::apply(const Filter& filter, const FilterEffectVector&)
</del><ins>+bool FETurbulenceSoftwareApplier::apply(const Filter& filter, const FilterImageVector&, FilterImage& result)
</ins><span class="cx"> {
</span><del>-    auto destinationPixelBuffer = m_effect.pixelBufferResult(AlphaPremultiplication::Unpremultiplied);
</del><ins>+    auto destinationPixelBuffer = result.pixelBuffer(AlphaPremultiplication::Unpremultiplied);
</ins><span class="cx">     if (!destinationPixelBuffer)
</span><span class="cx">         return false;
</span><span class="cx"> 
</span><del>-    IntSize resultSize(m_effect.absolutePaintRect().size());
</del><ins>+    IntSize resultSize(result.absoluteImageRect().size());
</ins><span class="cx">     if (resultSize.area().hasOverflowed())
</span><span class="cx">         return false;
</span><span class="cx"> 
</span><span class="lines">@@ -356,7 +356,7 @@
</span><span class="cx">         return true;
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    auto tileSize = roundedIntSize(m_effect.filterPrimitiveSubregion().size());
</del><ins>+    auto tileSize = roundedIntSize(result.primitiveSubregion().size());
</ins><span class="cx"> 
</span><span class="cx">     float baseFrequencyX = m_effect.baseFrequencyX();
</span><span class="cx">     float baseFrequencyY = m_effect.baseFrequencyY();
</span><span class="lines">@@ -364,7 +364,7 @@
</span><span class="cx"> 
</span><span class="cx">     auto paintingData = initPaintingData(m_effect.type(), baseFrequencyX, baseFrequencyY, m_effect.numOctaves(), m_effect.seed(), m_effect.stitchTiles(), tileSize);
</span><span class="cx"> 
</span><del>-    applyPlatform(m_effect.absolutePaintRect(), filter.filterScale(), destinationPixelArray, paintingData, stitchData);
</del><ins>+    applyPlatform(result.absoluteImageRect(), filter.filterScale(), destinationPixelArray, paintingData, stitchData);
</ins><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsfilterssoftwareFETurbulenceSoftwareApplierh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/filters/software/FETurbulenceSoftwareApplier.h (286163 => 286164)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/filters/software/FETurbulenceSoftwareApplier.h    2021-11-25 09:58:12 UTC (rev 286163)
+++ trunk/Source/WebCore/platform/graphics/filters/software/FETurbulenceSoftwareApplier.h       2021-11-25 11:44:44 UTC (rev 286164)
</span><span class="lines">@@ -41,7 +41,7 @@
</span><span class="cx"> public:
</span><span class="cx">     using Base::Base;
</span><span class="cx"> 
</span><del>-    bool apply(const Filter&, const FilterEffectVector& inputEffects) override;
</del><ins>+    bool apply(const Filter&, const FilterImageVector& inputs, FilterImage& result) override;
</ins><span class="cx"> 
</span><span class="cx"> private:
</span><span class="cx">     // Produces results in the range [1, 2**31 - 2]. Algorithm is:
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsfilterssoftwareSourceAlphaSoftwareAppliercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/filters/software/SourceAlphaSoftwareApplier.cpp (286163 => 286164)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/filters/software/SourceAlphaSoftwareApplier.cpp   2021-11-25 09:58:12 UTC (rev 286163)
+++ trunk/Source/WebCore/platform/graphics/filters/software/SourceAlphaSoftwareApplier.cpp      2021-11-25 11:44:44 UTC (rev 286164)
</span><span class="lines">@@ -27,24 +27,23 @@
</span><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><del>-bool SourceAlphaSoftwareApplier::apply(const Filter&, const FilterEffectVector& inputEffects)
</del><ins>+bool SourceAlphaSoftwareApplier::apply(const Filter&, const FilterImageVector& inputs, FilterImage& result)
</ins><span class="cx"> {
</span><del>-    FilterEffect* in = inputEffects[0].get();
</del><ins>+    auto& input = inputs[0].get();
</ins><span class="cx"> 
</span><del>-    auto resultImage = m_effect.imageBufferResult();
</del><ins>+    auto resultImage = result.imageBuffer();
</ins><span class="cx">     if (!resultImage)
</span><span class="cx">         return false;
</span><span class="cx">     
</span><del>-    auto imageBuffer = in->imageBufferResult();
-    if (!imageBuffer)
</del><ins>+    auto inputImage = input.imageBuffer();
+    if (!inputImage)
</ins><span class="cx">         return false;
</span><span class="cx"> 
</span><del>-    FloatRect imageRect(FloatPoint(), m_effect.absolutePaintRect().size());
-    GraphicsContext& filterContext = resultImage->context();
</del><ins>+    FloatRect imageRect(FloatPoint(), result.absoluteImageRect().size());
+    auto& filterContext = resultImage->context();
</ins><span class="cx"> 
</span><span class="cx">     filterContext.fillRect(imageRect, Color::black);
</span><del>-    filterContext.drawImageBuffer(*imageBuffer, IntPoint(), CompositeOperator::DestinationIn);
-
</del><ins>+    filterContext.drawImageBuffer(*inputImage, IntPoint(), CompositeOperator::DestinationIn);
</ins><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsfilterssoftwareSourceAlphaSoftwareApplierh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/filters/software/SourceAlphaSoftwareApplier.h (286163 => 286164)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/filters/software/SourceAlphaSoftwareApplier.h     2021-11-25 09:58:12 UTC (rev 286163)
+++ trunk/Source/WebCore/platform/graphics/filters/software/SourceAlphaSoftwareApplier.h        2021-11-25 11:44:44 UTC (rev 286164)
</span><span class="lines">@@ -32,7 +32,7 @@
</span><span class="cx"> public:
</span><span class="cx">     using Base::Base;
</span><span class="cx"> 
</span><del>-    bool apply(const Filter&, const FilterEffectVector& inputEffects) override;
</del><ins>+    bool apply(const Filter&, const FilterImageVector& inputs, FilterImage& result) override;
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsfilterssoftwareSourceGraphicSoftwareAppliercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/filters/software/SourceGraphicSoftwareApplier.cpp (286163 => 286164)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/filters/software/SourceGraphicSoftwareApplier.cpp 2021-11-25 09:58:12 UTC (rev 286163)
+++ trunk/Source/WebCore/platform/graphics/filters/software/SourceGraphicSoftwareApplier.cpp    2021-11-25 11:44:44 UTC (rev 286164)
</span><span class="lines">@@ -27,9 +27,9 @@
</span><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><del>-bool SourceGraphicSoftwareApplier::apply(const Filter& filter, const FilterEffectVector&)
</del><ins>+bool SourceGraphicSoftwareApplier::apply(const Filter& filter, const FilterImageVector&, FilterImage& result)
</ins><span class="cx"> {
</span><del>-    auto resultImage = m_effect.imageBufferResult();
</del><ins>+    auto resultImage = result.imageBuffer();
</ins><span class="cx">     auto sourceImage = filter.sourceImage();
</span><span class="cx">     if (!resultImage || !sourceImage)
</span><span class="cx">         return false;
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsfilterssoftwareSourceGraphicSoftwareApplierh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/filters/software/SourceGraphicSoftwareApplier.h (286163 => 286164)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/filters/software/SourceGraphicSoftwareApplier.h   2021-11-25 09:58:12 UTC (rev 286163)
+++ trunk/Source/WebCore/platform/graphics/filters/software/SourceGraphicSoftwareApplier.h      2021-11-25 11:44:44 UTC (rev 286164)
</span><span class="lines">@@ -33,7 +33,7 @@
</span><span class="cx"> public:
</span><span class="cx">     using Base::Base;
</span><span class="cx"> 
</span><del>-    bool apply(const Filter&, const FilterEffectVector& inputEffects) override;
</del><ins>+    bool apply(const Filter&, const FilterImageVector& inputs, FilterImage& result) override;
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingCSSFiltercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/CSSFilter.cpp (286163 => 286164)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/CSSFilter.cpp     2021-11-25 09:58:12 UTC (rev 286163)
+++ trunk/Source/WebCore/rendering/CSSFilter.cpp        2021-11-25 11:44:44 UTC (rev 286164)
</span><span class="lines">@@ -442,8 +442,11 @@
</span><span class="cx"> {
</span><span class="cx">     if (m_filterRenderer && m_filterRenderer->hasResult())
</span><span class="cx">         return m_filterRenderer->output();
</span><del>-    
-    return lastEffect()->imageBufferResult();
</del><ins>+
+    if (auto result = lastEffect()->filterImage())
+        return result->imageBuffer();
+
+    return nullptr;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void CSSFilter::setSourceImageRect(const FloatRect& sourceImageRect)
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingsvgRenderSVGResourceFiltercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/svg/RenderSVGResourceFilter.cpp (286163 => 286164)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/svg/RenderSVGResourceFilter.cpp   2021-11-25 09:58:12 UTC (rev 286163)
+++ trunk/Source/WebCore/rendering/svg/RenderSVGResourceFilter.cpp      2021-11-25 11:44:44 UTC (rev 286164)
</span><span class="lines">@@ -246,10 +246,10 @@
</span><span class="cx">         }
</span><span class="cx">         filterData.state = FilterData::Built;
</span><span class="cx"> 
</span><del>-        ImageBuffer* resultImage = lastEffect->imageBufferResult();
-        if (resultImage) {
</del><ins>+        if (auto result = lastEffect->filterImage()) {
+            auto resultImage = result->imageBuffer();
</ins><span class="cx">             context->scale(FloatSize(1 / filterData.filter->filterScale().width(), 1 / filterData.filter->filterScale().height()));
</span><del>-            context->drawImageBuffer(*resultImage, lastEffect->absolutePaintRect());
</del><ins>+            context->drawImageBuffer(*resultImage, result->absoluteImageRect());
</ins><span class="cx">             context->scale(filterData.filter->filterScale());
</span><span class="cx">         }
</span><span class="cx">     }
</span></span></pre></div>
<a id="trunkSourceWebCoresvggraphicsfiltersSVGFEImagecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/svg/graphics/filters/SVGFEImage.cpp (286163 => 286164)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/svg/graphics/filters/SVGFEImage.cpp 2021-11-25 09:58:12 UTC (rev 286163)
+++ trunk/Source/WebCore/svg/graphics/filters/SVGFEImage.cpp    2021-11-25 11:44:44 UTC (rev 286164)
</span><span class="lines">@@ -82,16 +82,16 @@
</span><span class="cx"> public:
</span><span class="cx">     using Base::Base;
</span><span class="cx"> 
</span><del>-    bool apply(const Filter&, const FilterEffectVector& inputEffects) override;
</del><ins>+    bool apply(const Filter&, const FilterImageVector& inputs, FilterImage& result) override;
</ins><span class="cx"> };
</span><span class="cx"> 
</span><del>-bool FEImageSoftwareApplier::apply(const Filter& filter, const FilterEffectVector&)
</del><ins>+bool FEImageSoftwareApplier::apply(const Filter& filter, const FilterImageVector&, FilterImage& result)
</ins><span class="cx"> {
</span><del>-    auto resultImage = m_effect.imageBufferResult();
</del><ins>+    auto resultImage = result.imageBuffer();
</ins><span class="cx">     if (!resultImage)
</span><span class="cx">         return false;
</span><span class="cx"> 
</span><del>-    auto primitiveSubregion = m_effect.filterPrimitiveSubregion();
</del><ins>+    auto primitiveSubregion = result.primitiveSubregion();
</ins><span class="cx">     auto& context = resultImage->context();
</span><span class="cx"> 
</span><span class="cx">     WTF::switchOn(m_effect.sourceImage(),
</span><span class="lines">@@ -117,7 +117,7 @@
</span><span class="cx"> 
</span><span class="cx"> bool FEImage::platformApplySoftware(const Filter& filter)
</span><span class="cx"> {
</span><del>-    return FEImageSoftwareApplier(*this).apply(filter, inputEffects());
</del><ins>+    return FEImageSoftwareApplier(*this).apply(filter, { }, *filterImage());
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> TextStream& FEImage::externalRepresentation(TextStream& ts, RepresentationType representation) const
</span></span></pre>
</div>
</div>

</body>
</html>