[webkit-changes] [WebKit/WebKit] efab4b: GraphicsContextCG is instantiated redundantly to r...
Kimmo Kinnunen
noreply at github.com
Wed Oct 4 03:25:54 PDT 2023
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: efab4b9bc302ea934c09eed6f7fff30a5dfddff5
https://github.com/WebKit/WebKit/commit/efab4b9bc302ea934c09eed6f7fff30a5dfddff5
Author: Kimmo Kinnunen <kkinnunen at apple.com>
Date: 2023-10-04 (Wed, 04 Oct 2023)
Changed paths:
M Source/WebCore/PlatformMac.cmake
M Source/WebCore/WebCore.xcodeproj/project.pbxproj
M Source/WebCore/platform/graphics/GraphicsContext.h
A Source/WebCore/platform/graphics/cg/CGUtilities.h
M Source/WebCore/platform/graphics/cg/GraphicsContextCG.cpp
M Source/WebCore/platform/graphics/cg/GraphicsContextCG.h
M Source/WebCore/platform/graphics/cg/PatternCG.cpp
M Source/WebCore/platform/ios/wak/WAKView.mm
Log Message:
-----------
GraphicsContextCG is instantiated redundantly to round rects
https://bugs.webkit.org/show_bug.cgi?id=262364
rdar://116233471
Reviewed by Tim Horton.
GraphicsContext construction does non-trivial work to ensure the context
state is constent. It shouldn't be called just to round rects.
Extract the rect rounding code to a freestanding function in
CGUtilities.h
Unduplicate interpolation quality enum conversion code to the file, too.
* Source/WebCore/PlatformMac.cmake:
* Source/WebCore/WebCore.xcodeproj/project.pbxproj:
* Source/WebCore/platform/graphics/GraphicsContext.h:
* Source/WebCore/platform/graphics/cg/GraphicsContextCG.cpp:
(WebCore::drawPatternCallback):
(WebCore::GraphicsContextCG::roundToDevicePixels const):
(WebCore::cgInterpolationQuality): Deleted.
(WebCore::GraphicsContextCG::scaleForRoundingToDevicePixels const): Deleted.
* Source/WebCore/platform/graphics/cg/GraphicsContextCG.h:
* Source/WebCore/platform/graphics/cg/PatternCG.cpp:
(WebCore::patternCallback):
* Source/WebCore/platform/ios/wak/WAKView.mm:
(+[WAKView _setInterpolationQuality:]):
(toCGInterpolationQuality): Deleted.
Canonical link: https://commits.webkit.org/268841@main
More information about the webkit-changes
mailing list