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:
saari%netscape.com 2001-04-10 01:44:20 +00:00
Родитель 2cee056cc5
Коммит 63394b651c
4 изменённых файлов: 10 добавлений и 4 удалений

Просмотреть файл

@ -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)