mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 982395 - Remove ImageContainer::DeprecatedLockCurrentAsSurface. r=mattwoodrow
This commit is contained in:
parent
5f69aa4f0e
commit
f5d2ed6e9e
@ -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)
|
||||
{
|
||||
|
@ -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
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user