Bug 982395 - Remove ImageContainer::DeprecatedLockCurrentAsSurface. r=mattwoodrow

This commit is contained in:
Jonathan Watt 2014-03-11 23:50:59 +00:00
parent 5f69aa4f0e
commit f5d2ed6e9e
2 changed files with 0 additions and 62 deletions

View File

@ -281,57 +281,6 @@ ImageContainer::LockCurrentImage()
return retval.forget();
}
already_AddRefed<gfxASurface>
ImageContainer::DeprecatedLockCurrentAsSurface(gfx::IntSize *aSize, Image** aCurrentImage)
{
ReentrantMonitorAutoEnter mon(mReentrantMonitor);
if (mRemoteData) {
NS_ASSERTION(mRemoteDataMutex, "Should have remote data mutex when having remote data!");
mRemoteDataMutex->Lock();
EnsureActiveImage();
if (aCurrentImage) {
NS_IF_ADDREF(mActiveImage);
*aCurrentImage = mActiveImage.get();
}
if (!mActiveImage) {
return nullptr;
}
if (mActiveImage->GetFormat() == ImageFormat::REMOTE_IMAGE_BITMAP) {
nsRefPtr<gfxImageSurface> newSurf =
new gfxImageSurface(mRemoteData->mBitmap.mData,
ThebesIntSize(mRemoteData->mSize),
mRemoteData->mBitmap.mStride,
mRemoteData->mFormat == RemoteImageData::BGRX32 ?
gfxImageFormat::ARGB32 :
gfxImageFormat::RGB24);
*aSize = newSurf->GetSize().ToIntSize();
return newSurf.forget();
}
*aSize = mActiveImage->GetSize();
return mActiveImage->DeprecatedGetAsSurface();
}
if (aCurrentImage) {
NS_IF_ADDREF(mActiveImage);
*aCurrentImage = mActiveImage.get();
}
if (!mActiveImage) {
return nullptr;
}
*aSize = mActiveImage->GetSize();
return mActiveImage->DeprecatedGetAsSurface();
}
TemporaryRef<gfx::SourceSurface>
ImageContainer::LockCurrentAsSourceSurface(gfx::IntSize *aSize, Image** aCurrentImage)
{

View File

@ -522,17 +522,6 @@ public:
*/
already_AddRefed<gfxASurface> DeprecatedGetCurrentAsSurface(gfx::IntSize* aSizeResult);
/**
* This is similar to GetCurrentAsSurface, however this does not make a copy
* of the image data and requires the user to call UnlockCurrentImage when
* done with the image data. Once UnlockCurrentImage has been called the
* surface returned by this function is no longer valid! This works for any
* type of image. Optionally a pointer can be passed to receive the current
* image.
*/
already_AddRefed<gfxASurface> DeprecatedLockCurrentAsSurface(gfx::IntSize* aSizeResult,
Image** aCurrentImage = nullptr);
/**
* Same as GetCurrentAsSurface but for Moz2D
*/