Bug 1291045 (Part 3) - Handle interactions with the SurfaceCache in DecodingTask. r=dholbert,edwin

This commit is contained in:
Seth Fowler
2016-08-04 18:59:10 -07:00
parent 35e9d64ec9
commit 2c64c4a4f9
5 changed files with 110 additions and 28 deletions

View File

@@ -118,8 +118,10 @@ DecoderFactory::CreateDecoder(DecoderType aType,
return nullptr;
}
// Create an anonymous decoder. Interaction with the SurfaceCache and the
// owning RasterImage will be mediated by DecodingTask.
RefPtr<Decoder> decoder =
GetDecoder(aType, aImage, bool(aDecoderFlags & DecoderFlags::IS_REDECODE));
GetDecoder(aType, nullptr, bool(aDecoderFlags & DecoderFlags::IS_REDECODE));
MOZ_ASSERT(decoder, "Should have a decoder now");
// Initialize the decoder.
@@ -144,7 +146,7 @@ DecoderFactory::CreateDecoder(DecoderType aType,
return nullptr;
}
RefPtr<IDecodingTask> task = new DecodingTask(WrapNotNull(decoder));
RefPtr<IDecodingTask> task = new DecodingTask(aImage, WrapNotNull(decoder));
return task.forget();
}