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

Issue 1527433002: Deferred GIF image decodes should report decode failures (Closed)

Created:
5 years ago by Noel Gordon
Modified:
5 years ago
CC:
chromium-reviews, pdr+graphicswatchlist_chromium.org, drott+blinkwatch_chromium.org, Rik, blink-reviews-platform-graphics_chromium.org, dshwang, jbroman, Justin Novosad, danakj, krit, f(malita), blink-reviews, vmpstr+blinkwatch_chromium.org, Stephen Chennney, rwlbuis, Stephen White, scroggo_chromium
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Deferred GIF image decodes should report decode failures For fast/images/size-failure.html fails due to slimming paint, attempt to help resolve that issue. The image in the test is a single-frame GIF which fails to decode due to corrupt LZW data but the decoding failure is not recorded in the deferred image decode system, causing continual re-decode requests while this image is painted. All these extra decode requests fail. When the GIF decoder landed in deferred, it no longer recorded decode failures for GIF, and that was a regression in behavior compared to the main-thread GIF decoder [1]. DecodingImageGenerator.cpp: include the frame index in the API used for decoding (used for ImageFrameGenerator trace). ImageFrameGenerator.cpp: removed m_decodeCount (was always set to 0, never updated, and only used for trace). Change the name of the decode failure member (AndEmpty suffix adds nothing) to |m_decodeFailed|. Use it to record decoding failures, even for multi-frame images like GIF to deny further requests to decode the image (and undo the GIF behavioral regression [1]). Add a new API to retrieve the decoding failure state. No mutex is used when reading the state (not needed). The comments, "This method is called to populate a discardable memory owned by Skia" are removed. The deferred decoder writes to the memory it is told to write to; it is not discardable in all cases, other parts of the code even say that. GIF does not currently decode to discardable memory, for example. DeferredImageDecoder.cpp: detect decoding failures when frames are requested and early-return on all decoding paths. ImageFrameGeneratorTest.cpp: update the tests (the frame index is the first argument of m_generator->decodeAndScale now). [1] https://codereview.chromium.org/19838002 BUG=501543 Committed: https://crrev.com/edb61309dc83fb68645fbf712a885c5ad5d977b1 Cr-Commit-Position: refs/heads/master@{#366329}

Patch Set 1 : #

Total comments: 2

Patch Set 2 : Patch for landing #

Unified diffs Side-by-side diffs Delta from patch set Stats (+74 lines, -76 lines) Patch
M third_party/WebKit/Source/platform/graphics/DecodingImageGenerator.cpp View 2 chunks +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/platform/graphics/DeferredImageDecoder.cpp View 1 1 chunk +6 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/platform/graphics/ImageFrameGenerator.h View 1 3 chunks +14 lines, -17 lines 0 comments Download
M third_party/WebKit/Source/platform/graphics/ImageFrameGenerator.cpp View 1 10 chunks +38 lines, -41 lines 0 comments Download
M third_party/WebKit/Source/platform/graphics/ImageFrameGeneratorTest.cpp View 8 chunks +14 lines, -14 lines 0 comments Download

Messages

Total messages: 32 (22 generated)
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1527433002/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1527433002/20001
5 years ago (2015-12-14 04:48:16 UTC) #7
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
5 years ago (2015-12-14 05:52:56 UTC) #9
Noel Gordon
PTAL.
5 years ago (2015-12-16 01:14:49 UTC) #14
scroggo_chromium
lgtm https://codereview.chromium.org/1527433002/diff/20001/third_party/WebKit/Source/platform/graphics/ImageFrameGenerator.cpp File third_party/WebKit/Source/platform/graphics/ImageFrameGenerator.cpp (right): https://codereview.chromium.org/1527433002/diff/20001/third_party/WebKit/Source/platform/graphics/ImageFrameGenerator.cpp#newcode202 third_party/WebKit/Source/platform/graphics/ImageFrameGenerator.cpp:202: // by Skia. If not, make a copy. ...
5 years ago (2015-12-18 18:12:06 UTC) #16
Noel Gordon
https://codereview.chromium.org/1527433002/diff/20001/third_party/WebKit/Source/platform/graphics/ImageFrameGenerator.cpp File third_party/WebKit/Source/platform/graphics/ImageFrameGenerator.cpp (right): https://codereview.chromium.org/1527433002/diff/20001/third_party/WebKit/Source/platform/graphics/ImageFrameGenerator.cpp#newcode202 third_party/WebKit/Source/platform/graphics/ImageFrameGenerator.cpp:202: // by Skia. If not, make a copy. On ...
5 years ago (2015-12-21 03:23:23 UTC) #17
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1527433002/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1527433002/40001
5 years ago (2015-12-21 03:23:39 UTC) #19
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
5 years ago (2015-12-21 05:05:50 UTC) #25
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1527433002/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1527433002/40001
5 years ago (2015-12-21 05:08:48 UTC) #28
commit-bot: I haz the power
Committed patchset #2 (id:40001)
5 years ago (2015-12-21 05:13:02 UTC) #30
commit-bot: I haz the power
5 years ago (2015-12-21 05:13:52 UTC) #32
Message was sent while issue was closed.
Patchset 2 (id:??) landed as
https://crrev.com/edb61309dc83fb68645fbf712a885c5ad5d977b1
Cr-Commit-Position: refs/heads/master@{#366329}

Powered by Google App Engine
This is Rietveld 408576698