зеркало из https://github.com/mozilla/gecko-dev.git
Bug 413324 - "Not all image decoders call 'DecodingComplete', so for these the image is not 'optimized'" (Make the decoders all (except JPEG) use DecodingComplete) [p=alfredkayser@gmail.com (Alfred Kayser) r=stuart a=blocking1.9+]
This commit is contained in:
Родитель
fb3491dcf7
Коммит
d9e8be99e8
|
@ -103,6 +103,8 @@ NS_IMETHODIMP nsBMPDecoder::Init(imgILoad *aLoad)
|
|||
NS_IMETHODIMP nsBMPDecoder::Close()
|
||||
{
|
||||
PR_LOG(gBMPLog, PR_LOG_DEBUG, ("nsBMPDecoder::Close()\n"));
|
||||
|
||||
mImage->DecodingComplete();
|
||||
if (mObserver) {
|
||||
mObserver->OnStopFrame(nsnull, mFrame);
|
||||
mObserver->OnStopContainer(nsnull, mImage);
|
||||
|
@ -116,7 +118,6 @@ NS_IMETHODIMP nsBMPDecoder::Close()
|
|||
|
||||
NS_IMETHODIMP nsBMPDecoder::Flush()
|
||||
{
|
||||
mFrame->SetMutable(PR_FALSE);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
|
|
@ -113,6 +113,8 @@ NS_IMETHODIMP nsICODecoder::Close()
|
|||
if (img)
|
||||
img->ImageUpdated(nsnull, nsImageUpdateFlags_kBitsChanged, &r);
|
||||
|
||||
mImage->DecodingComplete();
|
||||
|
||||
if (mObserver) {
|
||||
mObserver->OnDataAvailable(nsnull, mFrame, &r);
|
||||
mObserver->OnStopFrame(nsnull, mFrame);
|
||||
|
|
|
@ -84,6 +84,8 @@ NS_IMETHODIMP nsIconDecoder::Init(imgILoad *aLoad)
|
|||
|
||||
NS_IMETHODIMP nsIconDecoder::Close()
|
||||
{
|
||||
mImage->DecodingComplete();
|
||||
|
||||
if (mObserver)
|
||||
{
|
||||
mObserver->OnStopFrame(nsnull, mFrame);
|
||||
|
@ -96,7 +98,7 @@ NS_IMETHODIMP nsIconDecoder::Close()
|
|||
|
||||
NS_IMETHODIMP nsIconDecoder::Flush()
|
||||
{
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsIconDecoder::WriteFrom(nsIInputStream *inStr, PRUint32 count, PRUint32 *_retval)
|
||||
|
|
|
@ -100,6 +100,8 @@ NS_IMETHODIMP nsXBMDecoder::Init(imgILoad *aLoad)
|
|||
|
||||
NS_IMETHODIMP nsXBMDecoder::Close()
|
||||
{
|
||||
mImage->DecodingComplete();
|
||||
|
||||
mObserver->OnStopContainer(nsnull, mImage);
|
||||
mObserver->OnStopDecode(nsnull, NS_OK, nsnull);
|
||||
mObserver = nsnull;
|
||||
|
@ -112,7 +114,6 @@ NS_IMETHODIMP nsXBMDecoder::Close()
|
|||
|
||||
NS_IMETHODIMP nsXBMDecoder::Flush()
|
||||
{
|
||||
mFrame->SetMutable(PR_FALSE);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче