Bug 1337111 - Part 3. Land groundwork for new blended animation gtests. r=tnikkel

This commit is contained in:
Andrew Osmond
2018-09-17 15:06:29 -04:00
parent 52f6437e76
commit 0066c1d8fb
8 changed files with 80 additions and 23 deletions

View File

@@ -332,6 +332,7 @@ DecoderFactory::CreateDecoderForICOResource(DecoderType aType,
DecoderFactory::CreateAnonymousDecoder(DecoderType aType,
NotNull<SourceBuffer*> aSourceBuffer,
const Maybe<IntSize>& aOutputSize,
DecoderFlags aDecoderFlags,
SurfaceFlags aSurfaceFlags)
{
if (aType == DecoderType::UNKNOWN) {
@@ -350,14 +351,7 @@ DecoderFactory::CreateAnonymousDecoder(DecoderType aType,
// or do any other expensive work that might be wasted.
DecoderFlags decoderFlags = DecoderFlags::IMAGE_IS_TRANSIENT;
// Without an image, the decoder can't store anything in the SurfaceCache, so
// callers will only be able to retrieve the most recent frame via
// Decoder::GetCurrentFrame(). That means that anonymous decoders should
// always be first-frame-only decoders, because nobody ever wants the *last*
// frame.
decoderFlags |= DecoderFlags::FIRST_FRAME_ONLY;
decoder->SetDecoderFlags(decoderFlags);
decoder->SetDecoderFlags(aDecoderFlags | decoderFlags);
decoder->SetSurfaceFlags(aSurfaceFlags);
// Set an output size for downscale-during-decode if requested.