You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[GPU Process] (REGRESSION r285597): Set the filterRegion of the CSSFilter after it is created
https://bugs.webkit.org/show_bug.cgi?id=233849
Reviewed by Cameron McCormack.
Source/WebCore:
In this patch:
1. sourceImageRect is no longer passed as an argument to SVGFilter. It
should be passed only when SVGFilter::apply() is called.
2. CSSFilter::create() will create and build the FilterFunctions from the
FilterOperations. So we have to pass the targetBoundingBox since the
FilterEffects will need it when calculating the outsets.
3. The steps in RenderLayerFilters::beginFilterEffect() are:
a) Recreate the CSSFilter if the targetBoundingBox changes.
b) Calculate the filterRegion = targetBoundingBox + outsets
c) Clamp the filterRegion if needed. This will change the filterScale.
d) Set sourceImageRect = filterRegion.
e) Recreate the sourceImage if needed.
f) setup the context for drawing the target renderer.
4. Managing the targetBoundingBox and the filterRegion is moved from
CSSFilter to RenderLayerFilters.
* css/CSSFilterImageValue.cpp:
(WebCore::CSSFilterImageValue::image):
* platform/graphics/filters/Filter.cpp:
(WebCore::Filter::Filter):
* platform/graphics/filters/Filter.h:
(WebCore::Filter::Filter):
* rendering/CSSFilter.cpp:
(WebCore::CSSFilter::create):
(WebCore::CSSFilter::CSSFilter):
(WebCore::createSVGFilter):
(WebCore::CSSFilter::buildFilterFunctions):
(WebCore::CSSFilter::apply):
(WebCore::CSSFilter::setFilterRegion):
(WebCore::m_hasFilterThatShouldBeRestrictedBySecurityOrigin): Deleted.
(WebCore::CSSFilter::updateBackingStoreRect): Deleted.
(WebCore::CSSFilter::computeSourceImageRectForDirtyRect): Deleted.
(WebCore::CSSFilter::setSourceImageRect): Deleted.
* rendering/CSSFilter.h:
* rendering/RenderLayerFilters.cpp:
(WebCore::RenderLayerFilters::buildFilter):
(WebCore::RenderLayerFilters::allocateBackingStoreIfNeeded):
(WebCore::RenderLayerFilters::beginFilterEffect):
(WebCore::RenderLayerFilters::applyFilterEffect):
(WebCore::RenderLayerFilters::allocateBackingStore): Deleted.
* rendering/RenderLayerFilters.h:
* rendering/svg/RenderSVGResourceFilter.cpp:
(WebCore::RenderSVGResourceFilter::applyResource):
* rendering/svg/SVGRenderTreeAsText.cpp:
(WebCore::writeSVGResourceContainer):
* svg/graphics/filters/SVGFilter.cpp:
(WebCore::SVGFilter::create):
(WebCore::SVGFilter::SVGFilter):
* svg/graphics/filters/SVGFilter.h:
LayoutTests:
Unskip layout tests which were skipped in r285597.
* TestExpectations:
Canonical link: https://commits.webkit.org/244878@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@286546 268f45cc-cd09-0410-ab3c-d52691b4dbfc
0 commit comments