зеркало из 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,9 +492,14 @@ nsresult nsCocoaUtils::CreateNSImageFromImageContainer(imgIContainer *aImage, ui
|
||||||
return NS_ERROR_FAILURE;
|
return NS_ERROR_FAILURE;
|
||||||
}
|
}
|
||||||
|
|
||||||
aImage->Draw(context, scaledSize, ImageRegion::Create(scaledSize),
|
mozilla::image::DrawResult res =
|
||||||
aWhichFrame, Filter::POINT, Nothing(),
|
aImage->Draw(context, scaledSize, ImageRegion::Create(scaledSize),
|
||||||
imgIContainer::FLAG_SYNC_DECODE);
|
aWhichFrame, Filter::POINT, Nothing(),
|
||||||
|
imgIContainer::FLAG_SYNC_DECODE);
|
||||||
|
|
||||||
|
if (res != mozilla::image::DrawResult::SUCCESS) {
|
||||||
|
return NS_ERROR_FAILURE;
|
||||||
|
}
|
||||||
|
|
||||||
surface = drawTarget->Snapshot();
|
surface = drawTarget->Snapshot();
|
||||||
} else {
|
} else {
|
||||||
|
|
Загрузка…
Ссылка в новой задаче