Bug 1315554 - Part 1. Enforce the parent decoder size (ICO) for child decoders (BMP, PNG). r=tnikkel
This commit is contained in:
@@ -236,6 +236,7 @@ DecoderFactory::CreateMetadataDecoder(DecoderType aType,
|
||||
DecoderFactory::CreateDecoderForICOResource(DecoderType aType,
|
||||
NotNull<SourceBuffer*> aSourceBuffer,
|
||||
NotNull<nsICODecoder*> aICODecoder,
|
||||
const Maybe<IntSize>& aExpectedSize,
|
||||
const Maybe<uint32_t>& aDataOffset
|
||||
/* = Nothing() */)
|
||||
{
|
||||
@@ -264,6 +265,9 @@ DecoderFactory::CreateDecoderForICOResource(DecoderType aType,
|
||||
decoder->SetMetadataDecode(aICODecoder->IsMetadataDecode());
|
||||
decoder->SetIterator(aSourceBuffer->Iterator());
|
||||
decoder->SetOutputSize(aICODecoder->OutputSize());
|
||||
if (aExpectedSize) {
|
||||
decoder->SetExpectedSize(*aExpectedSize);
|
||||
}
|
||||
decoder->SetDecoderFlags(aICODecoder->GetDecoderFlags());
|
||||
decoder->SetSurfaceFlags(aICODecoder->GetSurfaceFlags());
|
||||
decoder->SetFinalizeFrames(false);
|
||||
|
||||
Reference in New Issue
Block a user