You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Avoid flickering when showing a layer on a painted background for the first time by disabling async image decoding
https://bugs.webkit.org/show_bug.cgi?id=270330
rdar://117533495
Reviewed by Simon Fraser;
If an image is decoded asynchronously for a sizeForDrawing different from the
current one, a flicker may happen.
To avoid this flicker, decode the image synchronously if it has more than one
RenderElement in the page and the last time it was decoded asynchronously.
* LayoutTests/TestExpectations:
* Source/WebCore/loader/cache/CachedImage.h:
* Source/WebCore/platform/graphics/BitmapImage.cpp:
(WebCore::BitmapImage::destroyDecodedData):
(WebCore::BitmapImage::draw):
(WebCore::BitmapImage::lastDecodingOptions const):
(WebCore::BitmapImage::lastDecodingOptionsForTesting const): Deleted.
* Source/WebCore/platform/graphics/BitmapImage.h:
* Source/WebCore/platform/graphics/ImageObserver.h:
(WebCore::ImageObserver::numberOfClients const):
* Source/WebCore/rendering/RenderBoxModelObject.cpp:
(WebCore::RenderBoxModelObject::decodingModeForImageDraw const):
* Source/WebCore/testing/Internals.cpp:
(WebCore::Internals::imageLastDecodingOptions):
Canonical link: https://commits.webkit.org/276513@main
0 commit comments