Bug 846132 - (Part 2) Update CopyFrame callers to use GetFrame. r=jdm
This commit is contained in:
@@ -748,11 +748,16 @@ nsWindowsShellService::SetShouldCheckDefaultBrowser(bool aShouldCheck)
|
||||
static nsresult
|
||||
WriteBitmap(nsIFile* aFile, imgIContainer* aImage)
|
||||
{
|
||||
nsRefPtr<gfxImageSurface> image;
|
||||
nsresult rv = aImage->CopyFrame(imgIContainer::FRAME_FIRST,
|
||||
imgIContainer::FLAG_SYNC_DECODE,
|
||||
getter_AddRefs(image));
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
nsresult rv;
|
||||
|
||||
nsRefPtr<gfxASurface> surface;
|
||||
aImage->GetFrame(imgIContainer::FRAME_FIRST,
|
||||
imgIContainer::FLAG_SYNC_DECODE,
|
||||
getter_AddRefs(surface));
|
||||
NS_ENSURE_TRUE(surface, NS_ERROR_FAILURE);
|
||||
|
||||
nsRefPtr<gfxImageSurface> image(surface->GetAsReadableARGB32ImageSurface());
|
||||
NS_ENSURE_TRUE(image, NS_ERROR_FAILURE);
|
||||
|
||||
int32_t width = image->Width();
|
||||
int32_t height = image->Height();
|
||||
|
||||
Reference in New Issue
Block a user