Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 68c8327aafed1a89dc525d0f5ce351ff400d9f64
https://github.com/WebKit/WebKit/commit/68c8327aafed1a89dc525d0f5ce351ff400d9f64
Author: Kimmo Kinnunen <[email protected]>
Date: 2026-09-22 (Tue, 22 Sep 2026)
Changed paths:
M Source/WebCore/platform/graphics/GraphicsContext.h
M Source/WebCore/platform/graphics/GraphicsContextState.h
M Source/WebCore/platform/graphics/coretext/FontCascadeCoreText.cpp
Log Message:
-----------
Avoid mixing GraphicsContext state setting and CG draws in
FontCascade::drawGlyphs
https://bugs.webkit.org/show_bug.cgi?id=323872
rdar://187112779
Reviewed by Vitor Roriz.
Code would do:
RetainPtr cgcontext = context.platformContext();
context.setSomething();
CT*Draw(cgcontext, ..);
This is not good, as it forces the assumption that setSomething()
directly modifies the same platform context obtained previously.
Reorganize the function to obtain the platform context and then change
the state only through consistent CG functions.
Add GraphicsContext::didInvalidatePlatformState() to inform that
the platform context needs to refresh the dirty properties.
* Source/WebCore/platform/graphics/GraphicsContext.h:
(WebCore::GraphicsContext::didInvalidatePlatformState):
(WebCore::GraphicsContext::updatePlatformContextState):
* Source/WebCore/platform/graphics/GraphicsContextState.h:
(WebCore::GraphicsContextState::markChanged):
* Source/WebCore/platform/graphics/coretext/FontCascadeCoreText.cpp:
(WebCore::FontCascade::drawGlyphs):
(WebCore::setCGFontRenderingMode): Deleted.
Canonical link: https://commits.webkit.org/321587@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications