Bug 1282275 - Return IDecodingTask objects instead of Decoder objects from most DecoderFactory functions. r=dholbert
This commit is contained in:
@@ -10,6 +10,7 @@
|
||||
#include "nsString.h"
|
||||
|
||||
#include "Decoder.h"
|
||||
#include "IDecodingTask.h"
|
||||
#include "nsPNGDecoder.h"
|
||||
#include "nsGIFDecoder2.h"
|
||||
#include "nsJPEGDecoder.h"
|
||||
@@ -104,7 +105,7 @@ DecoderFactory::GetDecoder(DecoderType aType,
|
||||
return decoder.forget();
|
||||
}
|
||||
|
||||
/* static */ already_AddRefed<Decoder>
|
||||
/* static */ already_AddRefed<IDecodingTask>
|
||||
DecoderFactory::CreateDecoder(DecoderType aType,
|
||||
RasterImage* aImage,
|
||||
SourceBuffer* aSourceBuffer,
|
||||
@@ -139,10 +140,11 @@ DecoderFactory::CreateDecoder(DecoderType aType,
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
return decoder.forget();
|
||||
RefPtr<IDecodingTask> task = new DecodingTask(WrapNotNull(decoder));
|
||||
return task.forget();
|
||||
}
|
||||
|
||||
/* static */ already_AddRefed<Decoder>
|
||||
/* static */ already_AddRefed<IDecodingTask>
|
||||
DecoderFactory::CreateAnimationDecoder(DecoderType aType,
|
||||
RasterImage* aImage,
|
||||
SourceBuffer* aSourceBuffer,
|
||||
@@ -171,10 +173,11 @@ DecoderFactory::CreateAnimationDecoder(DecoderType aType,
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
return decoder.forget();
|
||||
RefPtr<IDecodingTask> task = new DecodingTask(WrapNotNull(decoder));
|
||||
return task.forget();
|
||||
}
|
||||
|
||||
/* static */ already_AddRefed<Decoder>
|
||||
/* static */ already_AddRefed<IDecodingTask>
|
||||
DecoderFactory::CreateMetadataDecoder(DecoderType aType,
|
||||
RasterImage* aImage,
|
||||
SourceBuffer* aSourceBuffer,
|
||||
@@ -198,7 +201,8 @@ DecoderFactory::CreateMetadataDecoder(DecoderType aType,
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
return decoder.forget();
|
||||
RefPtr<IDecodingTask> task = new MetadataDecodingTask(WrapNotNull(decoder));
|
||||
return task.forget();
|
||||
}
|
||||
|
||||
/* static */ already_AddRefed<Decoder>
|
||||
|
||||
Reference in New Issue
Block a user