Title: [286867] trunk/Source/WebCore
- Revision
- 286867
- Author
- s...@apple.com
- Date
- 2021-12-10 11:55:25 -0800 (Fri, 10 Dec 2021)
Log Message
[GPU Process] [Filters] Address review comments after r285597
https://bugs.webkit.org/show_bug.cgi?id=234130
Reviewed by Darin Adler.
Most of the comments in https://bugs.webkit.org/show_bug.cgi?id=232457
have already been addressed. This patch covers the unaddressed ones.
* platform/graphics/filters/software/FEMorphologySoftwareApplier.cpp:
(WebCore::FEMorphologySoftwareApplier::apply const):
Remove wasteful ceilf() calls
* rendering/RenderLayerFilters.cpp:
(WebCore::RenderLayerFilters::buildFilter):
Capitalize the sentence in the FIXME comments.
* rendering/svg/RenderSVGResourceFilter.cpp:
(WebCore::RenderSVGResourceFilter::applyResource):
Use 'auto' in a few places where the type can be deduced.
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (286866 => 286867)
--- trunk/Source/WebCore/ChangeLog 2021-12-10 19:37:38 UTC (rev 286866)
+++ trunk/Source/WebCore/ChangeLog 2021-12-10 19:55:25 UTC (rev 286867)
@@ -1,3 +1,25 @@
+2021-12-10 Said Abou-Hallawa <s...@apple.com>
+
+ [GPU Process] [Filters] Address review comments after r285597
+ https://bugs.webkit.org/show_bug.cgi?id=234130
+
+ Reviewed by Darin Adler.
+
+ Most of the comments in https://bugs.webkit.org/show_bug.cgi?id=232457
+ have already been addressed. This patch covers the unaddressed ones.
+
+ * platform/graphics/filters/software/FEMorphologySoftwareApplier.cpp:
+ (WebCore::FEMorphologySoftwareApplier::apply const):
+ Remove wasteful ceilf() calls
+
+ * rendering/RenderLayerFilters.cpp:
+ (WebCore::RenderLayerFilters::buildFilter):
+ Capitalize the sentence in the FIXME comments.
+
+ * rendering/svg/RenderSVGResourceFilter.cpp:
+ (WebCore::RenderSVGResourceFilter::applyResource):
+ Use 'auto' in a few places where the type can be deduced.
+
2021-12-10 Gabriel Nava Marino <gnavamar...@apple.com>
nullptr deref in ComputeFloatOffsetForLineLayoutAdapter<FloatingObject::FloatLeft>::updateOffsetIfNeeded
Modified: trunk/Source/WebCore/platform/graphics/filters/software/FEMorphologySoftwareApplier.cpp (286866 => 286867)
--- trunk/Source/WebCore/platform/graphics/filters/software/FEMorphologySoftwareApplier.cpp 2021-12-10 19:37:38 UTC (rev 286866)
+++ trunk/Source/WebCore/platform/graphics/filters/software/FEMorphologySoftwareApplier.cpp 2021-12-10 19:55:25 UTC (rev 286867)
@@ -182,10 +182,10 @@
paintingData.type = m_effect.morphologyOperator();
paintingData.srcPixelArray = &sourcePixelArray;
paintingData.dstPixelArray = &destinationPixelArray;
- paintingData.width = ceilf(effectDrawingRect.width());
- paintingData.height = ceilf(effectDrawingRect.height());
- paintingData.radiusX = ceilf(radiusX);
- paintingData.radiusY = ceilf(radiusY);
+ paintingData.width = effectDrawingRect.width();
+ paintingData.height = effectDrawingRect.height();
+ paintingData.radiusX = radiusX;
+ paintingData.radiusY = radiusY;
applyPlatform(paintingData);
return true;
Modified: trunk/Source/WebCore/rendering/RenderLayerFilters.cpp (286866 => 286867)
--- trunk/Source/WebCore/rendering/RenderLayerFilters.cpp 2021-12-10 19:37:38 UTC (rev 286866)
+++ trunk/Source/WebCore/rendering/RenderLayerFilters.cpp 2021-12-10 19:55:25 UTC (rev 286867)
@@ -120,7 +120,7 @@
{
// If the filter fails to build, remove it from the layer. It will still attempt to
// go through regular processing (e.g. compositing), but never apply anything.
- // FIXME: this rebuilds the entire effects chain even if the filter style didn't change.
+ // FIXME: This rebuilds the entire effects chain even if the filter style didn't change.
m_filter = CSSFilter::create(renderer, renderer.style().filter(), renderingMode, FloatSize { scaleFactor, scaleFactor }, Filter::ClipOperation::Unite, m_targetBoundingBox);
}
@@ -158,7 +158,7 @@
if (m_targetBoundingBox != targetBoundingBox) {
m_targetBoundingBox = targetBoundingBox;
- // FIXME: this rebuilds the entire effects chain even if the filter style didn't change.
+ // FIXME: This rebuilds the entire effects chain even if the filter style didn't change.
m_filter = CSSFilter::create(renderer, renderer.style().filter(), m_filter->renderingMode(), m_filter->filterScale(), Filter::ClipOperation::Unite, m_targetBoundingBox);
}
Modified: trunk/Source/WebCore/rendering/svg/RenderSVGResourceFilter.cpp (286866 => 286867)
--- trunk/Source/WebCore/rendering/svg/RenderSVGResourceFilter.cpp 2021-12-10 19:37:38 UTC (rev 286866)
+++ trunk/Source/WebCore/rendering/svg/RenderSVGResourceFilter.cpp 2021-12-10 19:55:25 UTC (rev 286867)
@@ -108,7 +108,7 @@
}
// Determine absolute transformation matrix for filter.
- AffineTransform absoluteTransform = SVGRenderingContext::calculateTransformationToOutermostCoordinateSystem(renderer);
+ auto absoluteTransform = SVGRenderingContext::calculateTransformationToOutermostCoordinateSystem(renderer);
if (!absoluteTransform.isInvertible()) {
m_rendererFilterDataMap.remove(&renderer);
return false;
@@ -147,7 +147,7 @@
}
// Change the coordinate transformation applied to the filtered element to reflect the resolution of the filter.
- AffineTransform effectiveTransform = AffineTransform(filterScale.width(), 0, 0, filterScale.height(), 0, 0);
+ auto effectiveTransform = AffineTransform(filterScale.width(), 0, 0, filterScale.height(), 0, 0);
#if ENABLE(DESTINATION_COLOR_SPACE_LINEAR_SRGB)
auto colorSpace = DestinationColorSpace::LinearSRGB();
@@ -161,7 +161,7 @@
return false;
}
- GraphicsContext& sourceGraphicContext = sourceGraphic->context();
+ auto& sourceGraphicContext = sourceGraphic->context();
filterData->sourceGraphicBuffer = WTFMove(sourceGraphic);
filterData->savedContext = context;
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes