diff options
author | Leon Scroggins III <scroggo@google.com> | 2016-10-27 11:16:11 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2016-10-27 15:39:26 +0000 |
commit | a049ac46d497f8495e9a2e1617f53e059c15fb80 (patch) | |
tree | 39f5680dff5e97cea9ee013e86978666941a6f21 /src/codec/SkGifCodec.cpp | |
parent | 686bb21f3ed19218a85e94798fe50e240e3fac08 (diff) |
Revert "Always use a color table with 256 colors"
This reverts commit 0057ac11fccc82bc5b0c1bb0aefe838cc04efd13.
This was a speculative fix. Now that a proper fix has been introduced
(crrev.com/2450943002) we shouldn't need this one.
BUG=skia:5883
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4033
Change-Id: Ie7aae4fd18dac21b240085c3b5c4f3d46511cd75
Reviewed-on: https://skia-review.googlesource.com/4033
Commit-Queue: Leon Scroggins <scroggo@google.com>
Reviewed-by: Matt Sarett <msarett@google.com>
Diffstat (limited to 'src/codec/SkGifCodec.cpp')
-rw-r--r-- | src/codec/SkGifCodec.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/codec/SkGifCodec.cpp b/src/codec/SkGifCodec.cpp index cb36cbf464..3c57f2d709 100644 --- a/src/codec/SkGifCodec.cpp +++ b/src/codec/SkGifCodec.cpp @@ -37,7 +37,6 @@ #include "SkGifCodec.h" #include "SkStream.h" #include "SkSwizzler.h" -#include "SkUtils.h" #include <algorithm> @@ -144,10 +143,9 @@ void SkGifCodec::initializeColorTable(const SkImageInfo& dstInfo, size_t frameIn fCurrColorTable = fReader->getColorTable(dstInfo.colorType(), frameIndex); fCurrColorTableIsReal = fCurrColorTable; if (!fCurrColorTable) { - // This is possible for an empty frame. Create a dummy with all transparent. - SkPMColor colors[SK_MAX_COLORS]; - sk_memset32(colors, SK_ColorTRANSPARENT, SK_MAX_COLORS); - fCurrColorTable.reset(new SkColorTable(colors, 256)); + // This is possible for an empty frame. Create a dummy with one value (transparent). + SkPMColor color = SK_ColorTRANSPARENT; + fCurrColorTable.reset(new SkColorTable(&color, 1)); } if (inputColorCount) { |