[webkit-changes] [WebKit/WebKit] adec93: GlyphDisplayListCache should follow to traditional...
Yusuke Suzuki
noreply at github.com
Mon May 20 22:54:16 PDT 2024
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: adec93572da688683977e3f27c99757792ec3d5c
https://github.com/WebKit/WebKit/commit/adec93572da688683977e3f27c99757792ec3d5c
Author: Yusuke Suzuki <ysuzuki at apple.com>
Date: 2024-05-20 (Mon, 20 May 2024)
Changed paths:
M LayoutTests/TestExpectations
M Source/WebCore/layout/formattingContexts/inline/display/InlineDisplayBox.h
M Source/WebCore/rendering/GlyphDisplayListCache.cpp
M Source/WebCore/rendering/GlyphDisplayListCache.h
M Source/WebCore/rendering/LegacyInlineBox.h
M Source/WebCore/rendering/TextPainter.cpp
M Source/WebCore/rendering/TextPainter.h
Log Message:
-----------
GlyphDisplayListCache should follow to traditional cache protocol
https://bugs.webkit.org/show_bug.cgi?id=274380
rdar://128376419
Reviewed by Alan Baradlay.
We found that GlyphDisplayListCache is not effective much. So much time is used by Glyph DisplayList creation.
In this patch, we change the cache to 2-tier-based.
1. If layer is frequently painted, then do caching anyway. It is aligned to the current behavior.
2. Still we have a front cache, which has limited size. And stop doing a cache when it reaches to the threshold.
Since cache entries are wiped when LayoutRun gets destroyed, size of Cache is not monotonically increasing.
Rather it stays within small size.
* LayoutTests/TestExpectations: We found that these tests are already broken before this patch (if you change the window size to flush, then it disappears). So listing them.
* Source/WebCore/rendering/GlyphDisplayListCache.cpp:
(WebCore::GlyphDisplayListCache::clear):
(WebCore::GlyphDisplayListCache::getDisplayList):
(WebCore::GlyphDisplayListCache::get):
(WebCore::GlyphDisplayListCache::getIfExists):
(WebCore::GlyphDisplayListCache::remove):
* Source/WebCore/rendering/GlyphDisplayListCache.h:
* Source/WebCore/rendering/TextPainter.cpp:
(WebCore::TextPainter::shouldUseGlyphDisplayList):
* Source/WebCore/rendering/TextPainter.h:
(WebCore::TextPainter::setGlyphDisplayListIfNeeded):
Canonical link: https://commits.webkit.org/279037@main
To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications
More information about the webkit-changes
mailing list