зеркало из https://github.com/mozilla/pjs.git
Bug 418871 - Remove unused parts from imgIContainer.idl. r=joe, sr=vlad
This commit is contained in:
Родитель
67524ad185
Коммит
97b62b9cd5
|
@ -413,7 +413,7 @@ void nsGIFDecoder2::EndImageFrame()
|
|||
mImageFrame->SetTimeout(mGIFStruct.delay_time);
|
||||
if (mGIFStruct.images_decoded)
|
||||
mImageContainer->AppendFrame(mImageFrame);
|
||||
mImageContainer->EndFrameDecode(mGIFStruct.images_decoded, mGIFStruct.delay_time);
|
||||
mImageContainer->EndFrameDecode(mGIFStruct.images_decoded);
|
||||
mGIFStruct.images_decoded++;
|
||||
|
||||
if (mObserver)
|
||||
|
|
|
@ -479,22 +479,19 @@ nsresult nsJPEGDecoder::ProcessData(const char *data, PRUint32 count, PRUint32 *
|
|||
|
||||
mImage->GetFrameAt(0, getter_AddRefs(mFrame));
|
||||
|
||||
PRBool createNewFrame = PR_TRUE;
|
||||
|
||||
if (mFrame) {
|
||||
PRInt32 width, height;
|
||||
mFrame->GetWidth(&width);
|
||||
mFrame->GetHeight(&height);
|
||||
|
||||
if ((width == (PRInt32)mInfo.image_width) &&
|
||||
(height == (PRInt32)mInfo.image_height)) {
|
||||
createNewFrame = PR_FALSE;
|
||||
} else {
|
||||
mImage->Clear();
|
||||
if ((width != (PRInt32)mInfo.image_width) ||
|
||||
(height != (PRInt32)mInfo.image_height)) {
|
||||
// Can't reuse frame, create a new one with correct size
|
||||
mFrame = nsnull;
|
||||
}
|
||||
}
|
||||
|
||||
if (createNewFrame) {
|
||||
if (!mFrame) {
|
||||
mFrame = do_CreateInstance("@mozilla.org/gfx/image/frame;2");
|
||||
if (!mFrame) {
|
||||
mState = JPEG_ERROR;
|
||||
|
|
|
@ -196,7 +196,7 @@ void nsPNGDecoder::EndImageFrame()
|
|||
mObserver->OnDataAvailable(nsnull, mFrame, &r);
|
||||
}
|
||||
|
||||
mImage->EndFrameDecode(numFrames, timeout);
|
||||
mImage->EndFrameDecode(numFrames);
|
||||
if (mObserver)
|
||||
mObserver->OnStopFrame(nsnull, mFrame);
|
||||
}
|
||||
|
|
|
@ -49,10 +49,10 @@ interface imgIContainerObserver;
|
|||
* gfxIImageContainer interface
|
||||
*
|
||||
* @author Stuart Parmenter <pavlov@netscape.com>
|
||||
* @version 0.1
|
||||
* @version 0.2
|
||||
* @see "gfx2"
|
||||
*/
|
||||
[scriptable, uuid(186e80e1-476c-47f0-b340-424e6b7b6c9c)]
|
||||
[scriptable, uuid(a4e9df32-f5d7-479f-9082-70e1fead23d5)]
|
||||
interface imgIContainer : nsISupports
|
||||
{
|
||||
/**
|
||||
|
@ -134,16 +134,12 @@ interface imgIContainer : nsISupports
|
|||
*/
|
||||
void appendFrame(in gfxIImageFrame item);
|
||||
|
||||
void removeFrame(in gfxIImageFrame item);
|
||||
|
||||
/* notification when the current frame is done decoding */
|
||||
void endFrameDecode(in unsigned long framenumber, in unsigned long timeout);
|
||||
void endFrameDecode(in unsigned long framenumber);
|
||||
|
||||
/* notification that the entire image has been decoded */
|
||||
void decodingComplete();
|
||||
|
||||
void clear();
|
||||
|
||||
void startAnimation();
|
||||
|
||||
void stopAnimation();
|
||||
|
|
|
@ -275,16 +275,8 @@ NS_IMETHODIMP imgContainer::AppendFrame(gfxIImageFrame *item)
|
|||
}
|
||||
|
||||
//******************************************************************************
|
||||
/* void removeFrame (in gfxIImageFrame item); */
|
||||
NS_IMETHODIMP imgContainer::RemoveFrame(gfxIImageFrame *item)
|
||||
{
|
||||
/* Remember to decrement mNumFrames if you implement this */
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
//******************************************************************************
|
||||
/* void endFrameDecode (in unsigned long framenumber, in unsigned long timeout); */
|
||||
NS_IMETHODIMP imgContainer::EndFrameDecode(PRUint32 aFrameNum, PRUint32 aTimeout)
|
||||
/* void endFrameDecode (in unsigned long framenumber); */
|
||||
NS_IMETHODIMP imgContainer::EndFrameDecode(PRUint32 aFrameNum)
|
||||
{
|
||||
// Assume there's another frame.
|
||||
// currentDecodingFrameIndex is 0 based, aFrameNum is 1 based
|
||||
|
@ -307,13 +299,6 @@ NS_IMETHODIMP imgContainer::DecodingComplete(void)
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
//******************************************************************************
|
||||
/* void clear (); */
|
||||
NS_IMETHODIMP imgContainer::Clear()
|
||||
{
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
//******************************************************************************
|
||||
/* attribute unsigned short animationMode; */
|
||||
NS_IMETHODIMP imgContainer::GetAnimationMode(PRUint16 *aAnimationMode)
|
||||
|
|
Загрузка…
Ссылка в новой задаче