[webkit-changes] [WebKit/WebKit] 238ec6: Avoid flickering when showing a layer on a painted...
Said Abou-Hallawa
noreply at github.com
Thu Mar 21 18:35:10 PDT 2024
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 238ec677929193ee5fa48b504a09fdce55633145
https://github.com/WebKit/WebKit/commit/238ec677929193ee5fa48b504a09fdce55633145
Author: Said Abou-Hallawa <said at apple.com>
Date: 2024-03-21 (Thu, 21 Mar 2024)
Changed paths:
M LayoutTests/TestExpectations
M Source/WebCore/loader/cache/CachedImage.h
M Source/WebCore/platform/graphics/BitmapImage.cpp
M Source/WebCore/platform/graphics/BitmapImage.h
M Source/WebCore/platform/graphics/ImageObserver.h
M Source/WebCore/rendering/RenderBoxModelObject.cpp
M Source/WebCore/testing/Internals.cpp
Log Message:
-----------
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
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