[Webkit-unassigned] [Bug 226221] Img rendering skips multiple frames resulting white flash
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Wed May 26 11:00:06 PDT 2021
https://bugs.webkit.org/show_bug.cgi?id=226221
--- Comment #2 from Said Abou-Hallawa <sabouhallawa at apple.com> ---
(In reply to Roland Soos from comment #1)
> I tried to use image.decode() API, event with
> image.decode().then(function(){
> requestAnimationFrame(function(){
> hideLastImage();
> showNextImage();
> });
> });
>
> But it produced the same behavior as the original code.
Why do you need to call hideLastImage() before calling showNextImage()? Hiding the image might be the cause of this flickering. I think something like this should work:
var image = new Image;
image.src = "images/imageslider-background.jpg";
image.decode().then(() => {
document.querySelector("imageslider").src = image.src;
});
Also your test case has the following markup for the <img> elements:
<img src="images/imageslider-background2.jpg" alt="" title="" loading="lazy" class="skip-lazy" data-skip-lazy="1">
Is there a reason for adding the loading="lazy"?
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20210526/7396dd2e/attachment-0001.htm>
More information about the webkit-unassigned
mailing list