Bug 1296828 (Part 3) - Update SurfaceCache API to rely on ImageKeys and SurfaceKeys stored on ISurfaceProviders. r=dholbert

This commit is contained in:
Seth Fowler
2016-08-19 20:26:59 -07:00
parent dbc467745f
commit 264b7e19c3
7 changed files with 38 additions and 73 deletions

View File

@@ -150,9 +150,7 @@ DecoderFactory::CreateDecoder(DecoderType aType,
// Attempt to insert the surface provider into the surface cache right away so
// we won't trigger any more decoders with the same parameters.
InsertOutcome outcome =
SurfaceCache::Insert(provider, ImageKey(aImage.get()), surfaceKey);
if (outcome != InsertOutcome::SUCCESS) {
if (SurfaceCache::Insert(provider) != InsertOutcome::SUCCESS) {
return nullptr;
}
@@ -202,9 +200,7 @@ DecoderFactory::CreateAnimationDecoder(DecoderType aType,
// Attempt to insert the surface provider into the surface cache right away so
// we won't trigger any more decoders with the same parameters.
InsertOutcome outcome =
SurfaceCache::Insert(provider, ImageKey(aImage.get()), surfaceKey);
if (outcome != InsertOutcome::SUCCESS) {
if (SurfaceCache::Insert(provider) != InsertOutcome::SUCCESS) {
return nullptr;
}