diff options
author | Matt Sarett <msarett@google.com> | 2016-11-03 14:52:28 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2016-11-03 19:25:39 +0000 |
commit | 4ef986db65027f53999174279252092ba9b03c9e (patch) | |
tree | 03b86da82b058053fe0ea99fd85f343815a96205 /third_party/gif/SkGifImageReader.h | |
parent | f0348c2413c5c72820a42749879d41c6dd4ab16c (diff) |
Write transparent pixels more often in SkGifImageReader
This stems from a behavior difference between Skia and Chrome.
In Skia, we want to write transparent pixels as often as possible.
(It's faster than checking if we should skip each pixel.)
In Chrome, they avoid writing transparent pixels unless
absolutely necessary.
We were cautious about changing behavior when this first landed,
but this is easier to think about in a smaller change (right now).
(1) We can always write transparent pixels when we are writing
an independent frame.
(2) There is no need for the progressiveDisplay() check. We
only ever use progressive display methods on the first
frame - and the first frame is always independent.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4379
Change-Id: I82048a08e2003aac216f483c7db8df997b687149
Reviewed-on: https://skia-review.googlesource.com/4379
Commit-Queue: Matt Sarett <msarett@google.com>
Reviewed-by: Leon Scroggins <scroggo@google.com>
Diffstat (limited to 'third_party/gif/SkGifImageReader.h')
-rw-r--r-- | third_party/gif/SkGifImageReader.h | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/third_party/gif/SkGifImageReader.h b/third_party/gif/SkGifImageReader.h index 2b1b2d9423..67868ae4d7 100644 --- a/third_party/gif/SkGifImageReader.h +++ b/third_party/gif/SkGifImageReader.h @@ -103,7 +103,6 @@ public: , ipass(0) , irow(0) , rowsRemaining(0) - , alwaysWriteTransparentPixels(false) , rowIter(0) , m_client(client) , m_frameContext(frameContext) @@ -127,10 +126,6 @@ private: int ipass; // Interlace pass; Ranges 1-4 if interlaced. size_t irow; // Current output row, starting at zero. size_t rowsRemaining; // Rows remaining to be output. - // This depends on the GIFFrameContext. If the frame is not - // interlaced and it is independent, it is always safe to - // write transparent pixels. - bool alwaysWriteTransparentPixels; unsigned short prefix[SK_MAX_DICTIONARY_ENTRIES]; unsigned char suffix[SK_MAX_DICTIONARY_ENTRIES]; |