Bug 1296828 (Part 3) - Update SurfaceCache API to rely on ImageKeys and SurfaceKeys stored on ISurfaceProviders. r=dholbert
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user