[webkit-changes] [WebKit/WebKit] d6bd01: [Filters] Introduce GraphicsStyle and add it to Gr...

Said Abou-Hallawa noreply at github.com
Wed Nov 23 17:24:36 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: d6bd013ec6badee83d7af668ae1f5535714507f1
      https://github.com/WebKit/WebKit/commit/d6bd013ec6badee83d7af668ae1f5535714507f1
  Author: Said Abou-Hallawa <said at apple.com>
  Date:   2022-11-23 (Wed, 23 Nov 2022)

  Changed paths:
    M Source/WTF/wtf/text/TextStream.h
    M Source/WebCore/Headers.cmake
    M Source/WebCore/PAL/pal/spi/cg/CoreGraphicsSPI.h
    M Source/WebCore/Sources.txt
    M Source/WebCore/WebCore.xcodeproj/project.pbxproj
    M Source/WebCore/platform/graphics/GraphicsContextState.cpp
    M Source/WebCore/platform/graphics/GraphicsContextState.h
    A Source/WebCore/platform/graphics/GraphicsStyle.cpp
    A Source/WebCore/platform/graphics/GraphicsStyle.h
    M Source/WebCore/platform/graphics/cg/GraphicsContextCG.cpp

  Log Message:
  -----------
  [Filters] Introduce GraphicsStyle and add it to GraphicsContext and GraphicsContextState
https://bugs.webkit.org/show_bug.cgi?id=248197
rdar://102591759

Reviewed by Cameron McCormack.

This will allow applying a GraphicsStyle to all the following drawing commands.
Some of FilterEffects can be expressed as GraphicsStyles. Applying a FilterEffect
using CoreGraphics will be done by setting GraphicsStyle to the GraphicsContext
before drawing the sourceImage of the Filter.

The plan is use transparency layers to control beginning, ending and nesting
GraphicsStyles.

* Source/WTF/wtf/text/TextStream.h:
(WTF::operator<<):
* Source/WebCore/Headers.cmake:
* Source/WebCore/PAL/pal/spi/cg/CoreGraphicsSPI.h:
* Source/WebCore/Sources.txt:
* Source/WebCore/WebCore.xcodeproj/project.pbxproj:
* Source/WebCore/platform/graphics/GraphicsContextState.cpp:
(WebCore::stateChangeName):
(WebCore::GraphicsContextState::dump const):
* Source/WebCore/platform/graphics/GraphicsContextState.h:
(WebCore::GraphicsContextState::style const):
(WebCore::GraphicsContextState::setStyle):
(WebCore::GraphicsContextState::encode const):
(WebCore::GraphicsContextState::decode):
* Source/WebCore/platform/graphics/GraphicsStyle.cpp: Added.
(WebCore::operator<<):
* Source/WebCore/platform/graphics/GraphicsStyle.h: Added.
(WebCore::operator==):
(WebCore::GraphicsDropShadow::encode const):
(WebCore::GraphicsDropShadow::decode):
(WebCore::GraphicsGaussianBlur::encode const):
(WebCore::GraphicsGaussianBlur::decode):
(WebCore::GraphicsColorMatrix::encode const):
(WebCore::GraphicsColorMatrix::decode):
* Source/WebCore/platform/graphics/cg/GraphicsContextCG.cpp:
(WebCore::setCGStyle):
(WebCore::GraphicsContextCG::didUpdateState):

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




More information about the webkit-changes mailing list