зеркало из https://github.com/mozilla/pjs.git
changes to image container creation to facilitate different container types. Needed for ART support, and cleaner GIF and JPEG support. r=pavlov, sr=hyatt
This commit is contained in:
Родитель
2cee056cc5
Коммит
63394b651c
|
@ -69,7 +69,10 @@ NS_IMETHODIMP nsGIFDecoder2::Init(imgIRequest *aRequest)
|
|||
mImageRequest = aRequest;
|
||||
mObserver = do_QueryInterface(aRequest); // we're holding 2 strong refs to the request.
|
||||
|
||||
aRequest->GetImage(getter_AddRefs(mImageContainer));
|
||||
mImageContainer = do_CreateInstance("@mozilla.org/image/container;1");
|
||||
aRequest->SetImage(mImageContainer);
|
||||
|
||||
mImageContainer->StartAnimation();
|
||||
|
||||
/* do gif init stuff */
|
||||
/* Always decode to 24 bit pixdepth */
|
||||
|
|
|
@ -122,7 +122,8 @@ NS_IMETHODIMP nsJPEGDecoder::Init(imgIRequest *aRequest)
|
|||
mRequest = aRequest;
|
||||
mObserver = do_QueryInterface(mRequest);
|
||||
|
||||
aRequest->GetImage(getter_AddRefs(mImage));
|
||||
mImage = do_CreateInstance("@mozilla.org/image/container;1");
|
||||
aRequest->SetImage(mImage);
|
||||
|
||||
/* We set up the normal JPEG error routines, then override error_exit. */
|
||||
mInfo.err = jpeg_std_error(&mErr.pub);
|
||||
|
|
|
@ -76,7 +76,8 @@ NS_IMETHODIMP nsPNGDecoder::Init(imgIRequest *aRequest)
|
|||
mRequest = aRequest;
|
||||
mObserver = do_QueryInterface(aRequest); // we're holding 2 strong refs to the request.
|
||||
|
||||
aRequest->GetImage(getter_AddRefs(mImage));
|
||||
mImage = do_CreateInstance("@mozilla.org/image/container;1");
|
||||
aRequest->SetImage(mImage);
|
||||
|
||||
/* do png init stuff */
|
||||
|
||||
|
|
|
@ -62,7 +62,8 @@ NS_IMETHODIMP nsPPMDecoder::Init(imgIRequest *aRequest)
|
|||
|
||||
mObserver = do_QueryInterface(aRequest); // we're holding 2 strong refs to the request.
|
||||
|
||||
aRequest->GetImage(getter_AddRefs(mImage));
|
||||
mImage = do_CreateInstance("@mozilla.org/image/container;1");
|
||||
aRequest->SetImage(mImage);
|
||||
|
||||
mFrame = do_CreateInstance("@mozilla.org/gfx/image/frame;2");
|
||||
if (!mFrame)
|
||||
|
|
Загрузка…
Ссылка в новой задаче