[webkit-changes] [WebKit/WebKit] f88290: StyleGradientImages never cache their image
Sam Weinig
noreply at github.com
Sat Jan 18 14:04:07 PST 2025
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: f88290ea41bc0d62dcb4a581dfbcd787d4664796
https://github.com/WebKit/WebKit/commit/f88290ea41bc0d62dcb4a581dfbcd787d4664796
Author: Sam Weinig <sam at webkit.org>
Date: 2025-01-18 (Sat, 18 Jan 2025)
Changed paths:
M Source/WebCore/rendering/style/StyleGradientImage.cpp
M Source/WebCore/style/values/color/StyleColor.h
M Source/WebCore/style/values/images/StyleGradient.cpp
M Source/WebCore/style/values/images/StyleGradient.h
M Tools/TestWebKitAPI/CMakeLists.txt
M Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj
A Tools/TestWebKitAPI/Tests/WebCore/StyleGradient.cpp
Log Message:
-----------
StyleGradientImages never cache their image
https://bugs.webkit.org/show_bug.cgi?id=286186
Reviewed by Simon Fraser.
StyleGradientImage backing store caching has been broken since 287234 at main.
The fact we were never caching was also masking an issue where we would fail
to draw anything if a cacheable StyleGradientImage was being used as the
input to another StyleImage, such as StyleFilterImage.
* Source/WebCore/style/values/images/StyleGradient.cpp:
- Fix check for cacheability by updating `none_of` -> `all_of`.
- Remove unnecessary check for containing the client. Since the
gradient is cacheable and cannot change we don't care about
the client here like we do for StyleCanvasImage where client
must be notified on changes. Removing this check allows
gradients used by other StyleImages (like StyleFilterImage)
to be successfully cached.
* Source/WebCore/style/values/color/StyleColor.h:
- Export some functions to make unit test work.
* Tools/TestWebKitAPI/CMakeLists.txt:
* Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* Tools/TestWebKitAPI/Tests/WebCore/StyleGradient.cpp: Added.
- Add unit tests for both cacheable and uncacheable states.
Canonical link: https://commits.webkit.org/289123@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