[webkit-changes] [WebKit/WebKit] 2caf21: Add a ClosedArc path segment type

Cameron McCormack noreply at github.com
Mon Jan 29 13:24:08 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 2caf219a57a77bfec2cdbbb8c987f186356cfc02
      https://github.com/WebKit/WebKit/commit/2caf219a57a77bfec2cdbbb8c987f186356cfc02
  Author: Cameron McCormack <heycam at apple.com>
  Date:   2024-01-29 (Mon, 29 Jan 2024)

  Changed paths:
    M Source/WebCore/platform/graphics/Path.cpp
    M Source/WebCore/platform/graphics/Path.h
    M Source/WebCore/platform/graphics/PathImpl.h
    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/PathStream.h
    M Source/WebCore/platform/graphics/cairo/PathCairo.cpp
    M Source/WebCore/platform/graphics/cairo/PathCairo.h
    M Source/WebCore/platform/graphics/cg/PathCG.cpp
    M Source/WebCore/platform/graphics/cg/PathCG.h
    M Source/WebCore/platform/graphics/displaylists/DisplayListItem.h
    M Source/WebCore/platform/graphics/displaylists/DisplayListItems.cpp
    M Source/WebCore/platform/graphics/displaylists/DisplayListItems.h
    M Source/WebCore/platform/graphics/displaylists/DisplayListRecorder.cpp
    M Source/WebCore/platform/graphics/displaylists/DisplayListRecorder.h
    M Source/WebCore/platform/graphics/displaylists/DisplayListRecorderImpl.cpp
    M Source/WebCore/platform/graphics/displaylists/DisplayListRecorderImpl.h
    M Source/WebKit/GPUProcess/graphics/PathSegment.serialization.in
    M Source/WebKit/GPUProcess/graphics/RemoteDisplayListRecorder.cpp
    M Source/WebKit/GPUProcess/graphics/RemoteDisplayListRecorder.h
    M Source/WebKit/GPUProcess/graphics/RemoteDisplayListRecorder.messages.in
    M Source/WebKit/Scripts/webkit/messages.py
    M Source/WebKit/Shared/DisplayListArgumentCoders.serialization.in
    M Source/WebKit/WebProcess/GPU/graphics/RemoteDisplayListRecorderProxy.cpp
    M Source/WebKit/WebProcess/GPU/graphics/RemoteDisplayListRecorderProxy.h

  Log Message:
  -----------
  Add a ClosedArc path segment type
https://bugs.webkit.org/show_bug.cgi?id=268236
rdar://120928268

Reviewed by Simon Fraser.

Store paths consisting of a arc() / closePath() pair as a single path
segment, and add a single display list item to represent filling or
stroking such paths.

* Source/WebCore/platform/graphics/Path.cpp:
(WebCore::Path::asSingleArc const):
(WebCore::Path::closeSubpath):
(WebCore::Path::singleClosedArc const):
(WebCore::Path::isClosed const):
* Source/WebCore/platform/graphics/Path.h:
* Source/WebCore/platform/graphics/PathImpl.h:
(WebCore::PathImpl::singleClosedArc const):
* Source/WebCore/platform/graphics/PathSegment.h:
(WebCore::PathSegment::closesSubpath const):
(WebCore::PathSegment::isCloseSubPath const): Deleted.
* Source/WebCore/platform/graphics/PathSegmentData.cpp:
(WebCore::operator<<):
(WebCore::PathClosedArc::calculateEndPoint const):
(WebCore::PathClosedArc::tryGetEndPointWithoutContext const):
(WebCore::PathClosedArc::extendFastBoundingRect const):
(WebCore::PathClosedArc::extendBoundingRect const):
* Source/WebCore/platform/graphics/PathSegmentData.h:
* Source/WebCore/platform/graphics/PathStream.cpp:
(WebCore::PathStream::add):
(WebCore::PathStream::singleClosedArc const):
(WebCore::PathStream::isClosed const):
* Source/WebCore/platform/graphics/PathStream.h:
* Source/WebCore/platform/graphics/cg/PathCG.cpp:
(WebCore::PathCG::add):
(WebCore::addToCGContextPath):
* Source/WebCore/platform/graphics/cg/PathCG.h:
* Source/WebCore/platform/graphics/displaylists/DisplayListItem.h:
* Source/WebCore/platform/graphics/displaylists/DisplayListItems.cpp:
(WebCore::DisplayList::FillClosedArc::apply const):
(WebCore::DisplayList::FillClosedArc::dump const):
(WebCore::DisplayList::StrokeClosedArc::apply const):
(WebCore::DisplayList::StrokeClosedArc::dump const):
* Source/WebCore/platform/graphics/displaylists/DisplayListItems.h:
(WebCore::DisplayList::FillClosedArc::FillClosedArc):
(WebCore::DisplayList::FillClosedArc::closedArc const):
(WebCore::DisplayList::FillClosedArc::path const):
(WebCore::DisplayList::StrokeClosedArc::StrokeClosedArc):
(WebCore::DisplayList::StrokeClosedArc::closedArc const):
(WebCore::DisplayList::StrokeClosedArc::path const):
* Source/WebCore/platform/graphics/displaylists/DisplayListRecorder.cpp:
(WebCore::DisplayList::Recorder::fillPath):
(WebCore::DisplayList::Recorder::strokePath):
* Source/WebCore/platform/graphics/displaylists/DisplayListRecorder.h:
* Source/WebCore/platform/graphics/displaylists/DisplayListRecorderImpl.cpp:
(WebCore::DisplayList::RecorderImpl::recordFillClosedArc):
(WebCore::DisplayList::RecorderImpl::recordStrokeClosedArc):
* Source/WebCore/platform/graphics/displaylists/DisplayListRecorderImpl.h:
* Source/WebKit/GPUProcess/graphics/PathSegment.serialization.in:
* Source/WebKit/GPUProcess/graphics/RemoteDisplayListRecorder.cpp:
(WebKit::RemoteDisplayListRecorder::fillClosedArc):
(WebKit::RemoteDisplayListRecorder::strokeClosedArc):
* Source/WebKit/GPUProcess/graphics/RemoteDisplayListRecorder.h:
* Source/WebKit/GPUProcess/graphics/RemoteDisplayListRecorder.messages.in:
* Source/WebKit/Scripts/webkit/messages.py:
(types_that_cannot_be_forward_declared):
(headers_for_type):
* Source/WebKit/Shared/DisplayListArgumentCoders.serialization.in:
* Source/WebKit/WebProcess/GPU/graphics/RemoteDisplayListRecorderProxy.cpp:
(WebKit::RemoteDisplayListRecorderProxy::recordFillClosedArc):
(WebKit::RemoteDisplayListRecorderProxy::recordStrokeClosedArc):
* Source/WebKit/WebProcess/GPU/graphics/RemoteDisplayListRecorderProxy.h:

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




More information about the webkit-changes mailing list