Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 2f4a53dcf74f1f2e621ebc736c81902a827f3886
https://github.com/WebKit/WebKit/commit/2f4a53dcf74f1f2e621ebc736c81902a827f3886
Author: Kimmo Kinnunen <[email protected]>
Date: 2025-05-07 (Wed, 07 May 2025)
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/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/skia/PathSkia.cpp
M Source/WebCore/platform/graphics/skia/PathSkia.h
M Tools/TestWebKitAPI/Tests/WebCore/PathTests.cpp
Log Message:
-----------
Drawing paths spends time in Path::isEmpty()
https://bugs.webkit.org/show_bug.cgi?id=292659
rdar://150840520
Reviewed by Simon Fraser.
Inline Path::isEmpty().
In order to make the inline simple, make sure only empty state is the
case when the Path is represented by the std::monostate. Ensure that
PathImpls are never empty.
Return a shared singleton platform path for empty Path instances.
* Source/WebCore/platform/graphics/Path.cpp:
(WebCore::Path::definitelyEqual const):
(WebCore::Path::ensurePlatformPathImpl):
(WebCore::Path::ensureImpl):
(WebCore::Path::ensureImplForTesting):
(WebCore::Path::platformPath const):
(WebCore::Path::isEmpty const): Deleted.
* Source/WebCore/platform/graphics/Path.h:
(WebCore::Path::isEmpty const):
* Source/WebCore/platform/graphics/PathImpl.h:
* Source/WebCore/platform/graphics/PathStream.cpp:
(WebCore::PathStream::lastIfMoveTo const):
(WebCore::PathStream::isClosed const):
* Source/WebCore/platform/graphics/PathStream.h:
* Source/WebCore/platform/graphics/cairo/PathCairo.cpp:
(WebCore::PathCairo::emptyPlatformPath):
(WebCore::PathCairo::add):
(WebCore::PathCairo::addPath):
(WebCore::PathCairo::contains const):
(WebCore::PathCairo::strokeContains const):
(WebCore::PathCairo::strokeBoundingRect const):
(WebCore::PathCairo::isEmpty const): Deleted.
* Source/WebCore/platform/graphics/cairo/PathCairo.h:
* Source/WebCore/platform/graphics/cg/PathCG.cpp:
(WebCore::PathCG::emptyPlatformPath):
(WebCore::PathCG::contains const):
(WebCore::PathCG::strokeContains const):
(WebCore::PathCG::strokeBoundingRect const):
(WebCore::PathCG::isEmpty const): Deleted.
* Source/WebCore/platform/graphics/cg/PathCG.h:
* Source/WebCore/platform/graphics/skia/PathSkia.cpp:
(WebCore::PathSkia::emptyPlatformPath):
(WebCore::PathSkia::contains const):
(WebCore::PathSkia::strokeContains const):
(WebCore::PathSkia::strokeBoundingRect const):
(WebCore::PathSkia::isEmpty const): Deleted.
* Source/WebCore/platform/graphics/skia/PathSkia.h:
* Tools/TestWebKitAPI/Tests/WebCore/PathTests.cpp:
(TestWebKitAPI::TEST(Path, IsEmpty)):
Canonical link: https://commits.webkit.org/294631@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes