[webkit-changes] [WebKit/WebKit] ff0ba2: Shadows paint at the wrong scale in replayed CGDis...
Tim Horton
noreply at github.com
Wed Oct 12 10:47:27 PDT 2022
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: ff0ba2bfd3e434a922fcac79a8fa8207cd57c7f0
https://github.com/WebKit/WebKit/commit/ff0ba2bfd3e434a922fcac79a8fa8207cd57c7f0
Author: Tim Horton <timothy_horton at apple.com>
Date: 2022-10-12 (Wed, 12 Oct 2022)
Changed paths:
M Source/WebCore/platform/graphics/cg/GraphicsContextCG.cpp
M Source/WebCore/platform/graphics/cg/GraphicsContextCG.h
M Source/WebKit/Shared/RemoteLayerTree/CGDisplayListImageBufferBackend.mm
Log Message:
-----------
Shadows paint at the wrong scale in replayed CGDisplayLists
https://bugs.webkit.org/show_bug.cgi?id=246369
rdar://96967173
Reviewed by Simon Fraser.
* Source/WebCore/platform/graphics/cg/GraphicsContextCG.cpp:
(WebCore::GraphicsContextCG::fillRect):
(WebCore::GraphicsContextCG::fillRoundedRectImpl):
(WebCore::GraphicsContextCG::fillRectWithRoundedHole):
(WebCore::GraphicsContextCG::setCGShadow):
(WebCore::GraphicsContextCG::clearCGShadow):
(WebCore::GraphicsContextCG::didUpdateState):
(WebCore::setCGShadow): Deleted.
Make setCGShadow virtual so that GraphicsContextCGDisplayList can adjust its behavior.
Drive-by factor out clearCGShadow so all the CGContext-touching code is all in one place.
* Source/WebCore/platform/graphics/cg/GraphicsContextCG.h:
* Source/WebKit/Shared/RemoteLayerTree/CGDisplayListImageBufferBackend.mm:
(WebKit::GraphicsContextCGDisplayList::GraphicsContextCGDisplayList):
Work around a confusion re: the base CTM with CGDisplayList image buffers
by mapping the shadow parameters out through the hidden immutable base transform.
We don't actually use the transform here, instead just faking it with the scale
and flip, because we have no mechanism for mapping a size with negative values
through an AffineTransform.
Canonical link: https://commits.webkit.org/255442@main
More information about the webkit-changes
mailing list