зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1209780. Use the DrawResult return value of imgIContainer::Draw in the cocoa code. r=seth
This commit is contained in:
Родитель
615d679373
Коммит
756d4d4332
|
@ -492,10 +492,15 @@ nsresult nsCocoaUtils::CreateNSImageFromImageContainer(imgIContainer *aImage, ui
|
||||||
return NS_ERROR_FAILURE;
|
return NS_ERROR_FAILURE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
mozilla::image::DrawResult res =
|
||||||
aImage->Draw(context, scaledSize, ImageRegion::Create(scaledSize),
|
aImage->Draw(context, scaledSize, ImageRegion::Create(scaledSize),
|
||||||
aWhichFrame, Filter::POINT, Nothing(),
|
aWhichFrame, Filter::POINT, Nothing(),
|
||||||
imgIContainer::FLAG_SYNC_DECODE);
|
imgIContainer::FLAG_SYNC_DECODE);
|
||||||
|
|
||||||
|
if (res != mozilla::image::DrawResult::SUCCESS) {
|
||||||
|
return NS_ERROR_FAILURE;
|
||||||
|
}
|
||||||
|
|
||||||
surface = drawTarget->Snapshot();
|
surface = drawTarget->Snapshot();
|
||||||
} else {
|
} else {
|
||||||
surface = aImage->GetFrame(aWhichFrame, imgIContainer::FLAG_SYNC_DECODE);
|
surface = aImage->GetFrame(aWhichFrame, imgIContainer::FLAG_SYNC_DECODE);
|
||||||
|
|
Загрузка…
Ссылка в новой задаче