Chromium Code Reviews
DescriptionPrevent synchronous layout while painting the last frame of a gif
This patch is a followup to [1] and removes another synchronous layout
in the animated gif painting code.
If an animated gif is behind, BitmapImage::startAnimation will advance
the animation until it catches up. This process is called "skipping
frames" and it should not cause a synchronous layout because it will
occur during paint. This patch fixes a bug when skipping frames hit
the last frame of a non-looping gif. Before this patch, we would
synchronously notify observers when the last frame was hit which would
end up causing a layout. With this patch, we now defer the
last-frame-needs-paint notification until paint is done.
An enum has been added for the skippingFrames mode which may make it
easier to understand.
[1] https://crrev.com/45eef1a2a0f721e6782c4c92b28de3835f94ec46
BUG=623798
Committed: https://crrev.com/80ec545afbc7a952f201d6146612dffd4014fa18
Cr-Commit-Position: refs/heads/master@{#413784}
Patch Set 1 #Patch Set 2 : Ensure test crashes without patch and passes with patch #Patch Set 3 : Add enum for SkippingFramesToCatchUp #
Total comments: 2
Patch Set 4 : Move around where the timer is started when skipping to the last frame #Patch Set 5 : Refactor #
Messages
Total messages: 29 (21 generated)
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||