Write transparent pixels more often (SkGifCodec)
authorscroggo <scroggo@chromium.org>
Wed, 26 Oct 2016 20:48:03 +0000 (13:48 -0700)
committerCommit bot <commit-bot@chromium.org>
Wed, 26 Oct 2016 20:48:03 +0000 (13:48 -0700)
commit1285f413950910782d5439b5072ccfa14bdf80f7
treef206f8a5097984ba33cf20df74a13009ed31f949
parentd187af90c7a3dc945eb91a7d3ade0311d1d111f0
Write transparent pixels more often (SkGifCodec)

Writing transparent pixels is faster than the alternative, and we can
skip clearing the frame to transparent. We'll still clear if the image
is incomplete.

I ran

  ./out/Release/nanobench --images <images> --samples 100 --sourceType image --simpleCodec -v

over the GIFs we have on our bots, and found an average ~13% speedup.
Raw data is on sheet 2 of
https://docs.google.com/spreadsheets/d/19V-t9BfbFw5eiwBTKA1qOBkZbchjlTC5EIz6HFy-6RI/
(the sheet is named WriteTransparentPixels).
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2436183002

Review-Url: https://codereview.chromium.org/2436183002
src/codec/SkGifCodec.cpp
third_party/gif/SkGifImageReader.cpp
third_party/gif/SkGifImageReader.h