aboutsummaryrefslogtreecommitdiffhomepage
path: root/third_party/gif/SkGifImageReader.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'third_party/gif/SkGifImageReader.cpp')
-rw-r--r--third_party/gif/SkGifImageReader.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/third_party/gif/SkGifImageReader.cpp b/third_party/gif/SkGifImageReader.cpp
index eeaee68c1d..bbf5f9a2f0 100644
--- a/third_party/gif/SkGifImageReader.cpp
+++ b/third_party/gif/SkGifImageReader.cpp
@@ -737,8 +737,10 @@ bool SkGifImageReader::parse(SkGifImageReader::SkGIFParseQuery query)
bool hasTransparentPixel;
if (m_frames.size() == 0) {
// We did not see a Graphics Control Extension, so no transparent
- // pixel was specified.
- hasTransparentPixel = false;
+ // pixel was specified. But if there is no color table, this frame is
+ // still transparent.
+ hasTransparentPixel = !isLocalColormapDefined
+ && m_globalColorMap.numColors() == 0;
} else {
// This means we did see a Graphics Control Extension, which specifies
// the transparent pixel