[webkit-changes] [WebKit/WebKit] 42d626: ImageQualityController thrashes a timer
Simon Fraser
noreply at github.com
Thu Jul 11 13:17:56 PDT 2024
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 42d62602b5645e08527e41e02f7752c3c73aa373
https://github.com/WebKit/WebKit/commit/42d62602b5645e08527e41e02f7752c3c73aa373
Author: Simon Fraser <simon.fraser at apple.com>
Date: 2024-07-11 (Thu, 11 Jul 2024)
Changed paths:
M Source/WebCore/rendering/ImageQualityController.cpp
M Source/WebCore/rendering/ImageQualityController.h
Log Message:
-----------
ImageQualityController thrashes a timer
https://bugs.webkit.org/show_bug.cgi?id=276347
rdar://131352675
Reviewed by Tim Horton.
For content with lots of images, `ImageQualityController::chooseInterpolationQuality()` is called each time
an image paints and potentially restarts a timer. Use a DeferrableOneShotTimer instead, which is designed
for this kind of use case.
Also do some other minor optimizations; only call `context.getCTM().isIdentityOrTranslationOrFlipped()` if we need to,
and only set a new value in the hash tables if the size changed.
* Source/WebCore/rendering/ImageQualityController.cpp:
(WebCore::ImageQualityController::ImageQualityController):
(WebCore::ImageQualityController::restartTimer):
* Source/WebCore/rendering/ImageQualityController.h:
Canonical link: https://commits.webkit.org/280872@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