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

Issue 1460523002: GIF decoding to Index8, unit tests and misusing unit test as benchmark (Closed)

Created:
5 years, 1 month ago by aleksandar.stojiljkovic
Modified:
3 years, 5 months 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
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

GIF decoding to Index8, unit tests and misusing unit test as benchmark The patch needs to go together with Issue 1495693003 : Index8 GPU and CPU raster support, though it is applicable without it too. Design document explaining the change and measurements: https://docs.google.com/document/d/1oWeD8IAqbFhBhu9DjYa3UUXRRbXNypf1S_vnDG7VG2k/edit# GIFImageDecoderTest is extended to verify decoding integrity (checking pixel by pixel and comparing against current N32 decoding). Also benchmark code added to the test that would be removed before submitting. Decoding to Index8 is done almost all the time except in the case it cannot be supported yet: when frames are having offset or transparency with dependency to previous frame and there was also colortable change compared to previous frame. Once such frame gets detected, index8 is abandoned for dependent frames after and they are decoded to N32. Decoding tries to resume back, from N32 to Index8, as soon as possible. Measurements: Ubuntu 14.04 Intel® Core™ i7-5500U CPU @ 2.40GHz × 4 ninja -C out/Release webkit_unit_tests && ./out/Release/webkit_unit_tests \ --release --gtest_filter=GIFImageDecoderTest.* --single-process-tests At the end, prints benchmark results like this: GIFImageDecoderTest.tempBench_decodeN32issue_476531_AqLvXJh_gif_x1 (301251 ms) There is a warmup round and doing random frame decode test with discarding frames in a loop with variable step. x5 means that tests are repeated 5 times. dolph.gif has transparency. Index8issue_476531.gif is taken from the issue, don't know if license allows to have it. 374 opaque frames. large_checkerboard.gif is one frame. animated-gif-withoffsets has 5 frames, animated.gif 2 frames; decoding starts as index8 and on later frames switched to n32. quicksort_gif is with offset(subrect) and alpha. disneypixar-disney-pixar-jTXvL4LjakYI8.gif is having alpha and offset (subrect) N32animated_10color_gif_x5 (67 ms) Index8animated_10color_gif_x5 (47 ms) N32radient_gif_x10 (2 ms) Index8radient_gif_x10 (2 ms) N32animated_gif_with_offsets_gif_x5 (11 ms) Index8animated_gif_with_offsets_gif_x5 (9 ms) N32animated_gif_x10 (3 ms) Index8animated_gif_x10 (3 ms) N32quicksort_gif_x5 (11430 ms) Index8quicksort_gif_x5 (4627 ms) N32large_gif_checkerboard_gif_x5 (961 ms) Index8large_gif_checkerboard_gif_x5 (277 ms) N323dolph_gif_x5 (39 ms) Index83dolph_gif_x5 (21 ms) N32issue_476531_AqLvXJh_gif_x1 (306513 ms) Index8issue_476531_AqLvXJh_gif_x1 (163808 ms) N32disneypixar_disney_pixar_jTXvL4LjakYI8_gif_x1 (933 ms) Index8disneypixar_disney_pixar_jTXvL4LjakYI8_gif_x1 (659 ms) BUG=476531, 138421, 490895

Patch Set 1 #

Patch Set 2 : #

Patch Set 3 : Remove unecessary ImageFrame::colorTable (build proper SkBitmap) #

Patch Set 4 : Browser (blink and skia integration). Support added for frames with ofset/transparency in case ther… #

Patch Set 5 : cleanup. tableChanged was wrong - do proper check. #

Total comments: 73

Patch Set 6 : Skia:onGetColorType related implementation. Fix part of Leon's review comments. #

Total comments: 2

Patch Set 7 : Handle 256 opaque palette. #

Patch Set 8 : Cleanup for review. Design doc ready. #

Patch Set 9 : #

Total comments: 59

Patch Set 10 : Comment #25 processed. #

Total comments: 35
Unified diffs Side-by-side diffs Delta from patch set Stats (+781 lines, -95 lines) Patch
A + third_party/WebKit/LayoutTests/fast/images/resources/3dolph.gif View Binary file 0 comments Download
M third_party/WebKit/Source/platform/graphics/DecodingImageGenerator.cpp View 1 2 3 4 5 6 7 8 9 2 chunks +4 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/platform/graphics/DeferredImageDecoder.cpp View 1 2 3 4 5 6 7 8 9 3 chunks +10 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/platform/graphics/ImageFrameGenerator.h View 1 2 3 4 5 6 7 8 9 3 chunks +6 lines, -1 line 0 comments Download
M third_party/WebKit/Source/platform/graphics/ImageFrameGenerator.cpp View 1 2 3 4 5 6 7 8 9 4 chunks +82 lines, -4 lines 3 comments Download
M third_party/WebKit/Source/platform/image-decoders/ImageDecoder.h View 1 2 3 4 5 6 7 8 9 1 chunk +4 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/platform/image-decoders/ImageDecoderTestHelpers.cpp View 1 2 3 4 5 6 7 8 9 1 chunk +0 lines, -1 line 0 comments Download
M third_party/WebKit/Source/platform/image-decoders/ImageFrame.h View 1 2 3 4 5 6 7 8 9 4 chunks +15 lines, -16 lines 4 comments Download
M third_party/WebKit/Source/platform/image-decoders/ImageFrame.cpp View 1 2 3 4 5 6 7 8 9 3 chunks +56 lines, -3 lines 2 comments Download
M third_party/WebKit/Source/platform/image-decoders/gif/GIFImageDecoder.h View 1 2 3 4 5 6 7 8 9 4 chunks +35 lines, -6 lines 4 comments Download
M third_party/WebKit/Source/platform/image-decoders/gif/GIFImageDecoder.cpp View 1 2 3 4 5 6 7 8 9 6 chunks +283 lines, -35 lines 18 comments Download
M third_party/WebKit/Source/platform/image-decoders/gif/GIFImageDecoderTest.cpp View 1 2 3 4 5 6 7 8 9 26 chunks +261 lines, -11 lines 0 comments Download
M third_party/WebKit/Source/platform/image-decoders/gif/GIFImageReader.h View 1 2 3 4 5 6 7 8 9 4 chunks +6 lines, -0 lines 1 comment Download
M third_party/WebKit/Source/platform/image-decoders/gif/GIFImageReader.cpp View 1 2 3 4 5 6 7 8 9 5 chunks +19 lines, -13 lines 3 comments Download

Messages

Total messages: 37 (13 generated)
aleksandar.stojiljkovic
This is work in progress code - not intended to be submitted yet. As the ...
5 years, 1 month ago (2015-11-17 22:37:30 UTC) #2
aleksandar.stojiljkovic
1) Added support for see through frames and subrect decoding: if there was no colortable ...
5 years, 1 month ago (2015-11-19 21:38:23 UTC) #7
aleksandar.stojiljkovic
Skia implementation (CPU and GPU support) is in Issue 1495693003: Index8 GPU and CPU raster ...
5 years ago (2015-12-03 13:16:42 UTC) #9
scroggo_chromium
https://codereview.chromium.org/1460523002/diff/80001/third_party/WebKit/Source/platform/image-decoders/ImageDecoder.cpp File third_party/WebKit/Source/platform/image-decoders/ImageDecoder.cpp (right): https://codereview.chromium.org/1460523002/diff/80001/third_party/WebKit/Source/platform/image-decoders/ImageDecoder.cpp#newcode138 third_party/WebKit/Source/platform/image-decoders/ImageDecoder.cpp:138: if (frame->status() != ImageFrame::FrameComplete) { It appears that if ...
5 years ago (2015-12-03 21:47:22 UTC) #12
aleksandar.stojiljkovic
I agree that it looks complicated - a lot of the code is left in ...
5 years ago (2015-12-04 00:07:35 UTC) #13
aleksandar.stojiljkovic
Continuing. https://codereview.chromium.org/1460523002/diff/80001/third_party/WebKit/Source/platform/image-decoders/gif/GIFImageDecoder.cpp File third_party/WebKit/Source/platform/image-decoders/gif/GIFImageDecoder.cpp (right): https://codereview.chromium.org/1460523002/diff/80001/third_party/WebKit/Source/platform/image-decoders/gif/GIFImageDecoder.cpp#newcode137 third_party/WebKit/Source/platform/image-decoders/gif/GIFImageDecoder.cpp:137: // Tricky part here - decoding first row ...
5 years ago (2015-12-04 01:27:27 UTC) #14
aleksandar.stojiljkovic
Updated Skia API (crrev.com/1495693003/) to avoid fetching 2-ce but ask for color type - SkImageGenerator::ongetColorType() ...
5 years ago (2015-12-07 19:24:22 UTC) #15
scroggo_chromium
As Mike pointed out, you'll need to make the colorType const (no onGetColorType virtual). Sorry ...
5 years ago (2015-12-08 22:24:51 UTC) #16
Noel Gordon
On 2015/12/08 22:24:51, scroggo_chromium wrote: > Yeah, I think that has to be a judgment ...
5 years ago (2015-12-09 04:24:53 UTC) #17
aleksandar.stojiljkovic
On 2015/12/08 22:24:51, scroggo_chromium wrote: > As Mike pointed out, you'll need to make the ...
5 years ago (2015-12-09 06:51:45 UTC) #18
Noel Gordon
https://codereview.chromium.org/1460523002/diff/100001/third_party/WebKit/Source/platform/graphics/DecodingImageGenerator.h File third_party/WebKit/Source/platform/graphics/DecodingImageGenerator.h (right): https://codereview.chromium.org/1460523002/diff/100001/third_party/WebKit/Source/platform/graphics/DecodingImageGenerator.h#newcode67 third_party/WebKit/Source/platform/graphics/DecodingImageGenerator.h:67: SkColorType onGetColorType() override; Interesting given the recent discussions on ...
5 years ago (2015-12-09 08:42:11 UTC) #19
aleksandar.stojiljkovic
On 2015/12/09 08:42:11, noel gordon wrote: > https://codereview.chromium.org/1460523002/diff/100001/third_party/WebKit/Source/platform/graphics/DecodingImageGenerator.h > File third_party/WebKit/Source/platform/graphics/DecodingImageGenerator.h > (right): > > ...
5 years ago (2015-12-09 09:30:57 UTC) #20
aleksandar.stojiljkovic
On 2015/12/08 22:24:51, scroggo_chromium wrote: > As Mike pointed out, you'll need to make the ...
5 years ago (2015-12-14 13:09:47 UTC) #21
aleksandar.stojiljkovic
Ready for review after cleanup. First draft of design document with performance measurement on the ...
5 years ago (2015-12-22 15:19:55 UTC) #23
aleksandar.stojiljkovic
On 2015/12/22 15:19:55, aleksandar.stojiljkovic wrote: > Ready for review after cleanup. > First draft of ...
5 years ago (2015-12-22 17:50:05 UTC) #24
scroggo_chromium
Thank you for writing the design doc! Comments inline below: https://codereview.chromium.org/1460523002/diff/160001/third_party/WebKit/Source/platform/graphics/ImageFrameGenerator.cpp File third_party/WebKit/Source/platform/graphics/ImageFrameGenerator.cpp (right): https://codereview.chromium.org/1460523002/diff/160001/third_party/WebKit/Source/platform/graphics/ImageFrameGenerator.cpp#newcode499 ...
4 years, 11 months ago (2016-01-06 21:50:41 UTC) #25
aleksandar.stojiljkovic
https://codereview.chromium.org/1460523002/diff/160001/third_party/WebKit/Source/platform/graphics/ImageFrameGenerator.cpp File third_party/WebKit/Source/platform/graphics/ImageFrameGenerator.cpp (right): https://codereview.chromium.org/1460523002/diff/160001/third_party/WebKit/Source/platform/graphics/ImageFrameGenerator.cpp#newcode301 third_party/WebKit/Source/platform/graphics/ImageFrameGenerator.cpp:301: SkBitmap ImageFrameGenerator::tryToResumeDecode(const SkISize& scaledSize, size_t index, SkColorType outputColor) SkColorType ...
4 years, 11 months ago (2016-01-18 13:58:50 UTC) #26
Peter Kasting
I feel like I'm just an observer on this, but since the CL's seen no ...
4 years, 7 months ago (2016-04-29 02:20:01 UTC) #31
scroggo_chromium
I haven't made it through the whole CL again, but I do want to give ...
4 years, 7 months ago (2016-04-29 19:48:16 UTC) #32
Peter Kasting
On 2016/04/29 19:48:16, scroggo_chromium_OOO_paternity wrote: > I haven't made it through the whole CL again, ...
4 years, 4 months ago (2016-08-20 02:40:45 UTC) #33
aleksandar.stojiljkovic
On 2016/08/20 02:40:45, Peter Kasting wrote: > On 2016/04/29 19:48:16, scroggo_chromium_OOO_paternity wrote: > > I ...
4 years, 4 months ago (2016-08-22 17:03:33 UTC) #34
Peter Kasting
On 2016/08/22 17:03:33, aleksandar.stojiljkovic wrote: > If preferred, I could close this and reopen once ...
4 years, 4 months ago (2016-08-22 22:30:41 UTC) #35
aleksandar.stojiljkovic
On 2016/08/22 22:30:41, Peter Kasting wrote: > On 2016/08/22 17:03:33, aleksandar.stojiljkovic wrote: > > If ...
4 years ago (2016-12-19 18:06:17 UTC) #36
scroggo_chromium
3 years, 5 months ago (2017-07-12 20:04:34 UTC) #37
We're removing kIndex_8 (skbug.com/6828), so this is obsolete.

Powered by Google App Engine
This is Rietveld 408576698