diff options
author | wolfbeast <mcwerewolf@gmail.com> | 2018-11-21 14:22:29 +0100 |
---|---|---|
committer | wolfbeast <mcwerewolf@gmail.com> | 2018-11-21 14:22:29 +0100 |
commit | 25f4c75d68629a26cbb5433975027cd691a18dd7 (patch) | |
tree | b91d7275cb8d80b7465425e614c823c06dfca100 /image | |
parent | a51993521f26a0175c6b474f6cad30eb8f8a0f86 (diff) | |
download | UXP-25f4c75d68629a26cbb5433975027cd691a18dd7.tar UXP-25f4c75d68629a26cbb5433975027cd691a18dd7.tar.gz UXP-25f4c75d68629a26cbb5433975027cd691a18dd7.tar.lz UXP-25f4c75d68629a26cbb5433975027cd691a18dd7.tar.xz UXP-25f4c75d68629a26cbb5433975027cd691a18dd7.zip |
Fix blank pixel color for truncated GIFs
Diffstat (limited to 'image')
-rw-r--r-- | image/decoders/nsGIFDecoder2.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/image/decoders/nsGIFDecoder2.cpp b/image/decoders/nsGIFDecoder2.cpp index efa145144..6f2be1fa1 100644 --- a/image/decoders/nsGIFDecoder2.cpp +++ b/image/decoders/nsGIFDecoder2.cpp @@ -212,10 +212,16 @@ nsGIFDecoder2::BeginImageFrame(const IntRect& aFrameRect, } else { // This is an animation frame (and not the first). To minimize the memory // usage of animations, the image data is stored in paletted form. + // + // We should never use paletted surfaces with a draw target directly, so + // the only practical difference between B8G8R8A8 and B8G8R8X8 is the + // cleared pixel value if we get truncated. We want 0 in that case to + // ensure it is an acceptable value for the color map as was the case + // historically. MOZ_ASSERT(Size() == OutputSize()); pipe = SurfacePipeFactory::CreatePalettedSurfacePipe(this, Size(), aFrameRect, - format, + SurfaceFormat::B8G8R8A8, aDepth, Some(animParams), pipeFlags); } |