⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 286867 in webkit


Ignore:
Timestamp:
Dec 10, 2021, 11:55:25 AM (5 years ago)
Author:
Said Abou-Hallawa
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.

Location:
trunk/Source/WebCore
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r286866 r286867  
     12021-12-10  Said Abou-Hallawa  <said@apple.com>
     2
     3        [GPU Process] [Filters] Address review comments after r285597
     4        https://bugs.webkit.org/show_bug.cgi?id=234130
     5
     6        Reviewed by Darin Adler.
     7
     8        Most of the comments in https://bugs.webkit.org/show_bug.cgi?id=232457
     9        have already been addressed. This patch covers the unaddressed ones.
     10
     11        * platform/graphics/filters/software/FEMorphologySoftwareApplier.cpp:
     12        (WebCore::FEMorphologySoftwareApplier::apply const):
     13        Remove wasteful ceilf() calls
     14
     15        * rendering/RenderLayerFilters.cpp:
     16        (WebCore::RenderLayerFilters::buildFilter):
     17        Capitalize the sentence in the FIXME comments.
     18
     19        * rendering/svg/RenderSVGResourceFilter.cpp:
     20        (WebCore::RenderSVGResourceFilter::applyResource):
     21        Use 'auto' in a few places where the type can be deduced.
     22
    1232021-12-10  Gabriel Nava Marino  <gnavamarino@apple.com>
    224
  • trunk/Source/WebCore/platform/graphics/filters/software/FEMorphologySoftwareApplier.cpp

    r286287 r286867  
    183183    paintingData.srcPixelArray = &sourcePixelArray;
    184184    paintingData.dstPixelArray = &destinationPixelArray;
    185     paintingData.width = ceilf(effectDrawingRect.width());
    186     paintingData.height = ceilf(effectDrawingRect.height());
    187     paintingData.radiusX = ceilf(radiusX);
    188     paintingData.radiusY = ceilf(radiusY);
     185    paintingData.width = effectDrawingRect.width();
     186    paintingData.height = effectDrawingRect.height();
     187    paintingData.radiusX = radiusX;
     188    paintingData.radiusY = radiusY;
    189189
    190190    applyPlatform(paintingData);
  • trunk/Source/WebCore/rendering/RenderLayerFilters.cpp

    r286835 r286867  
    121121    // If the filter fails to build, remove it from the layer. It will still attempt to
    122122    // go through regular processing (e.g. compositing), but never apply anything.
    123     // FIXME: this rebuilds the entire effects chain even if the filter style didn't change.
     123    // FIXME: This rebuilds the entire effects chain even if the filter style didn't change.
    124124    m_filter = CSSFilter::create(renderer, renderer.style().filter(), renderingMode, FloatSize { scaleFactor, scaleFactor }, Filter::ClipOperation::Unite, m_targetBoundingBox);
    125125}
     
    159159    if (m_targetBoundingBox != targetBoundingBox) {
    160160        m_targetBoundingBox = targetBoundingBox;
    161         // FIXME: this rebuilds the entire effects chain even if the filter style didn't change.
     161        // FIXME: This rebuilds the entire effects chain even if the filter style didn't change.
    162162        m_filter = CSSFilter::create(renderer, renderer.style().filter(), m_filter->renderingMode(), m_filter->filterScale(), Filter::ClipOperation::Unite, m_targetBoundingBox);
    163163    }
  • trunk/Source/WebCore/rendering/svg/RenderSVGResourceFilter.cpp

    r286864 r286867  
    109109
    110110    // Determine absolute transformation matrix for filter.
    111     AffineTransform absoluteTransform = SVGRenderingContext::calculateTransformationToOutermostCoordinateSystem(renderer);
     111    auto absoluteTransform = SVGRenderingContext::calculateTransformationToOutermostCoordinateSystem(renderer);
    112112    if (!absoluteTransform.isInvertible()) {
    113113        m_rendererFilterDataMap.remove(&renderer);
     
    148148
    149149    // Change the coordinate transformation applied to the filtered element to reflect the resolution of the filter.
    150     AffineTransform effectiveTransform = AffineTransform(filterScale.width(), 0, 0, filterScale.height(), 0, 0);
     150    auto effectiveTransform = AffineTransform(filterScale.width(), 0, 0, filterScale.height(), 0, 0);
    151151
    152152#if ENABLE(DESTINATION_COLOR_SPACE_LINEAR_SRGB)
     
    162162    }
    163163   
    164     GraphicsContext& sourceGraphicContext = sourceGraphic->context();
     164    auto& sourceGraphicContext = sourceGraphic->context();
    165165 
    166166    filterData->sourceGraphicBuffer = WTFMove(sourceGraphic);
Note: See TracChangeset for help on using the changeset viewer.