Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(291)

Issue 2262493003: Prevent synchronous layout while painting the last frame of a gif (Closed)

Created:
4 years, 4 months ago by pdr.
Modified:
4 years, 4 months ago
Reviewers:
chrishtr
CC:
ajuma+watch_chromium.org, darktears, blink-reviews, blink-reviews-animation_chromium.org, blink-reviews-platform-graphics_chromium.org, Rik, chromium-reviews, danakj+watch_chromium.org, dshwang, drott+blinkwatch_chromium.org, krit, Eric Willigers, f(malita), jbroman, Justin Novosad, pdr+graphicswatchlist_chromium.org, rjwright, rwlbuis, Stephen Chennney, shans
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Prevent 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 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+76 lines, -27 lines) Patch
M third_party/WebKit/LayoutTests/SlowTests View 1 chunk +2 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/paint/images/animated-gif-last-frame-crash.html View 1 1 chunk +23 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/paint/images/resources/three_frame_100ms.gif View Binary file 0 comments Download
M third_party/WebKit/Source/platform/graphics/BitmapImage.h View 1 2 2 chunks +12 lines, -6 lines 0 comments Download
M third_party/WebKit/Source/platform/graphics/BitmapImage.cpp View 1 2 3 4 3 chunks +39 lines, -21 lines 0 comments Download

Messages

Total messages: 29 (21 generated)
pdr.
4 years, 4 months ago (2016-08-19 03:11:40 UTC) #10
pdr.
https://codereview.chromium.org/2262493003/diff/40001/third_party/WebKit/Source/platform/graphics/BitmapImage.cpp File third_party/WebKit/Source/platform/graphics/BitmapImage.cpp (right): https://codereview.chromium.org/2262493003/diff/40001/third_party/WebKit/Source/platform/graphics/BitmapImage.cpp#newcode625 third_party/WebKit/Source/platform/graphics/BitmapImage.cpp:625: if (advancement != SkipFramesToCatchUp && advancedAnimation) For ease of ...
4 years, 4 months ago (2016-08-22 18:27:08 UTC) #13
chrishtr
https://codereview.chromium.org/2262493003/diff/40001/third_party/WebKit/Source/platform/graphics/BitmapImage.cpp File third_party/WebKit/Source/platform/graphics/BitmapImage.cpp (right): https://codereview.chromium.org/2262493003/diff/40001/third_party/WebKit/Source/platform/graphics/BitmapImage.cpp#newcode627 third_party/WebKit/Source/platform/graphics/BitmapImage.cpp:627: Put lines 528-529 down here?
4 years, 4 months ago (2016-08-22 22:55:51 UTC) #14
pdr.
On 2016/08/22 at 22:55:51, chrishtr wrote: > https://codereview.chromium.org/2262493003/diff/40001/third_party/WebKit/Source/platform/graphics/BitmapImage.cpp > File third_party/WebKit/Source/platform/graphics/BitmapImage.cpp (right): > > https://codereview.chromium.org/2262493003/diff/40001/third_party/WebKit/Source/platform/graphics/BitmapImage.cpp#newcode627 ...
4 years, 4 months ago (2016-08-23 17:48:32 UTC) #23
chrishtr
lgtm
4 years, 4 months ago (2016-08-23 18:01:23 UTC) #25
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2262493003/80001
4 years, 4 months ago (2016-08-23 18:02:38 UTC) #26
commit-bot: I haz the power
Committed patchset #5 (id:80001)
4 years, 4 months ago (2016-08-23 18:08:05 UTC) #27
commit-bot: I haz the power
4 years, 4 months ago (2016-08-23 18:09:46 UTC) #29
Message was sent while issue was closed.
Patchset 5 (id:??) landed as
https://crrev.com/80ec545afbc7a952f201d6146612dffd4014fa18
Cr-Commit-Position: refs/heads/master@{#413784}

Powered by Google App Engine
This is Rietveld 408576698