[webkit-changes] [WebKit/WebKit] fe314e: Use a new type PathCloseSubpath instead of std::mo...

Cameron McCormack noreply at github.com
Mon Jul 24 14:01:07 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: fe314ea4b982abb2cf203a909be9c5fc180cbcb0
      https://github.com/WebKit/WebKit/commit/fe314ea4b982abb2cf203a909be9c5fc180cbcb0
  Author: Cameron McCormack <heycam at apple.com>
  Date:   2023-07-24 (Mon, 24 Jul 2023)

  Changed paths:
    M Source/WebCore/platform/graphics/PathSegment.cpp
    M Source/WebCore/platform/graphics/PathSegment.h
    M Source/WebCore/platform/graphics/PathSegmentData.cpp
    M Source/WebCore/platform/graphics/PathSegmentData.h
    M Source/WebCore/platform/graphics/PathStream.cpp
    M Source/WebCore/platform/graphics/cairo/PathCairo.cpp
    M Source/WebCore/platform/graphics/cg/PathCG.cpp
    M Source/WebKit/GPUProcess/graphics/PathSegment.serialization.in

  Log Message:
  -----------
  Use a new type PathCloseSubpath instead of std::monostate to represent a close command in PathSegment
https://bugs.webkit.org/show_bug.cgi?id=259430
rdar://problem/112741404

Reviewed by Simon Fraser.

Adding an empty struct lets us treat this command like all the others,
and not special case it in the WTF::switchOn calls in PathSegment.cpp.

* Source/WebCore/platform/graphics/PathSegment.cpp:
(WebCore::PathSegment::calculateEndPoint const):
(WebCore::PathSegment::extendFastBoundingRect const):
(WebCore::PathSegment::extendBoundingRect const):
(WebCore::PathSegment::addToImpl const):
(WebCore::PathSegment::applyElements const):
(WebCore::operator<<):
* Source/WebCore/platform/graphics/PathSegment.h:
(WebCore::PathSegment::isCloseSubPath const):
* Source/WebCore/platform/graphics/PathSegmentData.cpp:
(WebCore::PathCloseSubpath::calculateEndPoint const):
(WebCore::PathCloseSubpath::extendFastBoundingRect const):
(WebCore::PathCloseSubpath::extendBoundingRect const):
(WebCore::PathCloseSubpath::addToImpl const):
(WebCore::PathCloseSubpath::applyElements const):
(WebCore::operator<<):
* Source/WebCore/platform/graphics/PathSegmentData.h:
* Source/WebCore/platform/graphics/PathStream.cpp:
(WebCore::PathStream::closeSubpath):
* Source/WebCore/platform/graphics/cg/PathCG.cpp:
(WebCore::pathSegmentApplierCallback):
* Source/WebKit/GPUProcess/graphics/PathSegment.serialization.in:

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




More information about the webkit-changes mailing list