Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 644b784fd5f7d09ad596d31a1c8af4f01fb065cd
      
https://github.com/WebKit/WebKit/commit/644b784fd5f7d09ad596d31a1c8af4f01fb065cd
  Author: Said Abou-Hallawa <[email protected]>
  Date:   2022-11-25 (Fri, 25 Nov 2022)

  Changed paths:
    M Source/WebCore/Sources.txt
    M Source/WebCore/WebCore.xcodeproj/project.pbxproj
    A Source/WebCore/platform/graphics/filters/FilterImageTargetSwitcher.cpp
    A Source/WebCore/platform/graphics/filters/FilterImageTargetSwitcher.h
    M Source/WebCore/platform/graphics/filters/FilterTargetSwitcher.cpp
    M Source/WebCore/platform/graphics/filters/FilterTargetSwitcher.h
    M Source/WebCore/rendering/RenderLayerFilters.cpp
    M Source/WebCore/rendering/RenderLayerFilters.h

  Log Message:
  -----------
  [Filters] Manage applying the CSSFilter using FilterTargetSwitcher
https://bugs.webkit.org/show_bug.cgi?id=248175
rdar://102585518

Reviewed by Simon Fraser.

FilterTargetSwitcher can prepare the drawing context and can apply the filter 
when
the source image drawing is complete. So it will make since if we unify applying
the CSSFilter, SVGFilter and canvas filter by using this class.

This patch will use FilterTargetSwitcher to apply the CSSFilter. In future 
patches
SVGFilter and canvas filter will use it as well.

For applying software filters we will use a variant of FilterTargetSwitcher 
named
FilterImageTargetSwitcher. This class will manage creating the source image and
maintaining the filter results. A new super class of FilterTargetSwitcher will 
be
introduced in future patches for the CoreGraphics filters.

* Source/WebCore/Sources.txt:
* Source/WebCore/WebCore.xcodeproj/project.pbxproj:
* Source/WebCore/platform/graphics/filters/FilterImageTargetSwitcher.cpp: 
Copied from Source/WebCore/platform/graphics/filters/FilterTargetSwitcher.h.
(WebCore::FilterImageTargetSwitcher::FilterImageTargetSwitcher):
(WebCore::FilterImageTargetSwitcher::drawingContext const):
(WebCore::FilterImageTargetSwitcher::didDrawSourceImage):
* Source/WebCore/platform/graphics/filters/FilterImageTargetSwitcher.h: Copied 
from Source/WebCore/platform/graphics/filters/FilterTargetSwitcher.h.
* Source/WebCore/platform/graphics/filters/FilterTargetSwitcher.cpp:
(WebCore::FilterTargetSwitcher::create):
(WebCore::FilterTargetSwitcher::FilterTargetSwitcher):
(WebCore::FilterTargetSwitcher::willDrawSourceImage):
(WebCore::FilterTargetSwitcher::didDrawSourceImage):
(WebCore::FilterTargetSwitcher::~FilterTargetSwitcher): Deleted.
(WebCore::FilterTargetSwitcher::drawingContext const): Deleted.
(WebCore::FilterTargetSwitcher::outsets const): Deleted.
* Source/WebCore/platform/graphics/filters/FilterTargetSwitcher.h:
(WebCore::FilterTargetSwitcher::drawingContext const):
(WebCore::FilterTargetSwitcher::needsRedrawSourceImage):
* Source/WebCore/rendering/RenderLayerFilters.cpp:
(WebCore::RenderLayerFilters::beginFilterEffect):
(WebCore::RenderLayerFilters::applyFilterEffect):
(WebCore::RenderLayerFilters::inputContext): Deleted.
(WebCore::RenderLayerFilters::allocateBackingStoreIfNeeded): Deleted.
* Source/WebCore/rendering/RenderLayerFilters.h:

Canonical link: https://commits.webkit.org/257029@main


_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to