зеркало из https://github.com/mozilla/gecko-dev.git
Bug 695763 (Part 1) - Add imgIContainer::IsDecoded. r=joe sr=bz
This commit is contained in:
Родитель
1c1aafd579
Коммит
8252e3fa97
|
@ -57,7 +57,7 @@ native nsSize(nsSize);
|
|||
*
|
||||
* Internally, imgIContainer also manages animation of images.
|
||||
*/
|
||||
[scriptable, builtinclass, uuid(b56906e9-830c-45f4-b572-8c71e7619dad)]
|
||||
[scriptable, builtinclass, uuid(f9029a03-758c-4047-a1f3-4b2e51e47363)]
|
||||
interface imgIContainer : nsISupports
|
||||
{
|
||||
/**
|
||||
|
@ -232,6 +232,14 @@ interface imgIContainer : nsISupports
|
|||
*/
|
||||
[noscript] void startDecoding();
|
||||
|
||||
/*
|
||||
* Returns true if no more decoding can be performed on this image. Images
|
||||
* with errors return true since they cannot be decoded any further. Note that
|
||||
* because decoded images may be discarded, isDecoded() may return false even
|
||||
* if it has returned true in the past.
|
||||
*/
|
||||
[noscript, notxpcom, nostdcall] bool isDecoded();
|
||||
|
||||
/**
|
||||
* Increments the lock count on the image. An image will not be discarded
|
||||
* as long as the lock count is nonzero. Note that it is still possible for
|
||||
|
|
|
@ -231,6 +231,12 @@ ImageWrapper::StartDecoding()
|
|||
return mInnerImage->StartDecoding();
|
||||
}
|
||||
|
||||
bool
|
||||
ImageWrapper::IsDecoded()
|
||||
{
|
||||
return mInnerImage->IsDecoded();
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
ImageWrapper::LockImage()
|
||||
{
|
||||
|
|
|
@ -2319,6 +2319,11 @@ RasterImage::StartDecoding()
|
|||
return RequestDecodeCore(SYNCHRONOUS_NOTIFY_AND_SOME_DECODE);
|
||||
}
|
||||
|
||||
bool
|
||||
RasterImage::IsDecoded()
|
||||
{
|
||||
return mDecoded || mError;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
RasterImage::RequestDecodeCore(RequestDecodeType aDecodeType)
|
||||
|
|
|
@ -762,6 +762,11 @@ VectorImage::StartDecoding()
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
bool
|
||||
VectorImage::IsDecoded()
|
||||
{
|
||||
return mIsFullyLoaded || mError;
|
||||
}
|
||||
|
||||
//******************************************************************************
|
||||
/* void lockImage() */
|
||||
|
|
Загрузка…
Ссылка в новой задаче