[webkit-changes] [WebKit/WebKit] 6ee1cc: Merge GraphicsContextState::m_dropShadow with ::m_...
Kiet Ho
noreply at github.com
Thu Aug 3 10:43:55 PDT 2023
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 6ee1cc81447684fde576e18b46ca2735dacd3db3
https://github.com/WebKit/WebKit/commit/6ee1cc81447684fde576e18b46ca2735dacd3db3
Author: Kiet Ho <tho22 at apple.com>
Date: 2023-08-03 (Thu, 03 Aug 2023)
Changed paths:
M Source/WebCore/html/canvas/CanvasRenderingContext2DBase.cpp
M Source/WebCore/platform/DictationCaretAnimator.cpp
M Source/WebCore/platform/graphics/DrawGlyphsRecorder.h
M Source/WebCore/platform/graphics/GraphicsContext.cpp
M Source/WebCore/platform/graphics/GraphicsContext.h
M Source/WebCore/platform/graphics/GraphicsContextState.cpp
M Source/WebCore/platform/graphics/GraphicsContextState.h
M Source/WebCore/platform/graphics/GraphicsStyle.cpp
M Source/WebCore/platform/graphics/GraphicsStyle.h
M Source/WebCore/platform/graphics/GraphicsTypes.cpp
M Source/WebCore/platform/graphics/GraphicsTypes.h
M Source/WebCore/platform/graphics/ShadowBlur.cpp
M Source/WebCore/platform/graphics/ShadowBlur.h
M Source/WebCore/platform/graphics/cairo/CairoOperations.cpp
M Source/WebCore/platform/graphics/cairo/CairoOperations.h
M Source/WebCore/platform/graphics/cairo/FontCairo.cpp
M Source/WebCore/platform/graphics/cairo/GraphicsContextCairo.cpp
M Source/WebCore/platform/graphics/cg/GraphicsContextCG.cpp
M Source/WebCore/platform/graphics/cg/GraphicsContextCG.h
M Source/WebCore/platform/graphics/coretext/DrawGlyphsRecorderCoreText.cpp
M Source/WebCore/platform/graphics/coretext/FontCascadeCoreText.cpp
M Source/WebCore/platform/graphics/filters/FEDropShadow.cpp
M Source/WebCore/platform/graphics/nicosia/cairo/NicosiaCairoOperationRecorder.cpp
M Source/WebCore/rendering/TextDecorationPainter.cpp
M Source/WebKit/Shared/WebCoreArgumentCoders.serialization.in
M Source/WebKit/WebProcess/WebPage/FindController.cpp
M Source/WebKit/WebProcess/WebPage/WebFoundTextRangeController.cpp
Log Message:
-----------
Merge GraphicsContextState::m_dropShadow with ::m_style
https://bugs.webkit.org/show_bug.cgi?id=258630
rdar://111461930
Reviewed by Simon Fraser.
This reduced the size of GraphicsContextState from 360 bytes to 328 (~8.8% reduction).
* Source/WebCore/html/canvas/CanvasRenderingContext2DBase.cpp:
(WebCore::CanvasRenderingContext2DBase::applyShadow):
(WebCore::CanvasRenderingContext2DBase::drawTextUnchecked):
* Source/WebCore/platform/DictationCaretAnimator.cpp:
(WebCore::DictationCaretAnimator::fillCaretTail const):
(WebCore::DictationCaretAnimator::paint const):
* Source/WebCore/platform/graphics/DrawGlyphsRecorder.h:
* Source/WebCore/platform/graphics/GraphicsContext.cpp:
(WebCore::GraphicsContext::clearShadow): Only clear shadows if the style within the state is a drop shadow style.
(WebCore::GraphicsContext::hasVisibleShadow const):
(WebCore::GraphicsContext::hasBlurredShadow const):
(WebCore::GraphicsContext::hasShadow const):
* Source/WebCore/platform/graphics/GraphicsContext.h:
(WebCore::GraphicsContext::dropShadow const):
(WebCore::GraphicsContext::setDropShadow):
(WebCore::GraphicsContext::shadowOffset const): Deleted.
(WebCore::GraphicsContext::shadowBlur const): Deleted.
(WebCore::GraphicsContext::shadowColor const): Deleted.
(WebCore::GraphicsContext::clearShadow): Deleted.
(WebCore::GraphicsContext::hasVisibleShadow const): Deleted.
(WebCore::GraphicsContext::hasBlurredShadow const): Deleted.
(WebCore::GraphicsContext::hasShadow const): Deleted.
* Source/WebCore/platform/graphics/GraphicsContextState.cpp:
(WebCore::GraphicsContextState::dropShadow const):
(WebCore::GraphicsContextState::mergeLastChanges):
(WebCore::GraphicsContextState::mergeAllChanges):
(WebCore::stateChangeName):
(WebCore::GraphicsContextState::dump const):
* Source/WebCore/platform/graphics/GraphicsContextState.h:
(WebCore::GraphicsContextState::encode const):
(WebCore::GraphicsContextState::decode):
(WebCore::GraphicsContextState::dropShadow const): Deleted.
(WebCore::GraphicsContextState::setDropShadow): Deleted.
* Source/WebCore/platform/graphics/GraphicsStyle.cpp:
(WebCore::operator<<):
* Source/WebCore/platform/graphics/GraphicsStyle.h:
(WebCore::GraphicsDropShadow::isVisible const):
(WebCore::GraphicsDropShadow::isBlurred const):
(WebCore::GraphicsDropShadow::hasOutsets const):
(WebCore::GraphicsDropShadow::decode):
* Source/WebCore/platform/graphics/GraphicsTypes.cpp:
* Source/WebCore/platform/graphics/GraphicsTypes.h:
(WebCore::DropShadow::isVisible const): Deleted.
(WebCore::DropShadow::isBlurred const): Deleted.
(WebCore::DropShadow::hasOutsets const): Deleted.
* Source/WebCore/platform/graphics/ShadowBlur.cpp:
(WebCore::ShadowBlur::ShadowBlur):
* Source/WebCore/platform/graphics/ShadowBlur.h:
* Source/WebCore/platform/graphics/cairo/CairoOperations.cpp:
(WebCore::Cairo::drawGlyphsShadow):
(WebCore::Cairo::ShadowState::ShadowState):
(WebCore::Cairo::drawGlyphs):
* Source/WebCore/platform/graphics/cairo/CairoOperations.h:
* Source/WebCore/platform/graphics/cairo/FontCairo.cpp:
(WebCore::FontCascade::drawGlyphs):
* Source/WebCore/platform/graphics/cairo/GraphicsContextCairo.cpp:
(WebCore::GraphicsContextCairo::didUpdateState):
* Source/WebCore/platform/graphics/cg/GraphicsContextCG.cpp:
(WebCore::GraphicsContextCG::fillRect):
(WebCore::GraphicsContextCG::fillRoundedRectImpl):
(WebCore::GraphicsContextCG::fillRectWithRoundedHole):
(WebCore::GraphicsContextCG::setCGShadow): Set shadow using CGStyle API if available.
(WebCore::GraphicsContextCG::clearCGShadow): Clear shadow using CGStyle API if available.
(WebCore::GraphicsContextCG::setCGStyle):
(WebCore::GraphicsContextCG::didUpdateState):
(WebCore::setCGStyle): Deleted.
* Source/WebCore/platform/graphics/cg/GraphicsContextCG.h:
* Source/WebCore/platform/graphics/coretext/DrawGlyphsRecorderCoreText.cpp:
(WebCore::DrawGlyphsRecorder::populateInternalContext):
(WebCore::DrawGlyphsRecorder::updateShadow):
* Source/WebCore/platform/graphics/coretext/FontCascadeCoreText.cpp:
(WebCore::FontCascade::drawGlyphs):
* Source/WebCore/platform/graphics/filters/FEDropShadow.cpp:
(WebCore::FEDropShadow::createGraphicsStyle const):
* Source/WebCore/platform/graphics/nicosia/cairo/NicosiaCairoOperationRecorder.cpp:
(Nicosia::CairoOperationRecorder::drawGlyphs):
* Source/WebCore/rendering/TextDecorationPainter.cpp:
(WebCore::TextDecorationPainter::paintBackgroundDecorations):
* Source/WebKit/Shared/WebCoreArgumentCoders.serialization.in:
* Source/WebKit/WebProcess/WebPage/FindController.cpp:
(WebKit::FindController::drawRect):
* Source/WebKit/WebProcess/WebPage/WebFoundTextRangeController.cpp:
(WebKit::WebFoundTextRangeController::drawRect):
Canonical link: https://commits.webkit.org/266544@main
More information about the webkit-changes
mailing list