Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: f9cf548a81c4039848780f314705cc5f63898980
https://github.com/WebKit/WebKit/commit/f9cf548a81c4039848780f314705cc5f63898980
Author: Etienne Segonzac <[email protected]>
Date: 2025-04-27 (Sun, 27 Apr 2025)
Changed paths:
M Source/WebCore/page/InteractionRegion.cpp
M Source/WebCore/page/InteractionRegion.h
M Source/WebCore/page/MemoryRelease.cpp
Log Message:
-----------
[InteractionRegions] Cache the results of createRasterShape to improve
performance
https://bugs.webkit.org/show_bug.cgi?id=292066
<rdar://133094903>
Reviewed by Simon Fraser.
Introduce a singleton cache to limit the amount of
`LayoutShape::createRasterShape` calls.
* Source/WebCore/page/InteractionRegion.h:
* Source/WebCore/page/InteractionRegion.cpp:
(WebCore::InteractionRegionPathCache::singleton):
(WebCore::InteractionRegionPathCache::get):
(WebCore::InteractionRegionPathCache::add):
(WebCore::InteractionRegionPathCache::clear):
(WebCore::InteractionRegion::clearCache):
Add the new Cache class, backed by a WeakHashMap.
Key the entries on the Image and its FloatSize.
(WebCore::interactionRegionForRenderedRegion):
Check the cache before calling `createRasterShape`.
* Source/WebCore/page/MemoryRelease.cpp:
(WebCore::releaseNoncriticalMemory):
Clear the InteractionRegion cache as part of the non
critical memory release.
Canonical link: https://commits.webkit.org/294163@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes