Bug 696517 - Make sure our temporary surface allocation succeeded. r=roc

This commit is contained in:
Matt Woodrow 2011-10-26 16:15:53 +13:00
Родитель dcf9ee4bf1
Коммит 1843dab839
1 изменённых файлов: 8 добавлений и 0 удалений

Просмотреть файл

@ -1868,6 +1868,14 @@ BasicLayerManager::PaintLayer(gfxContext* aTarget,
untransformedSurface =
gfxPlatform::GetPlatform()->CreateOffscreenSurface(gfxIntSize(bounds.width, bounds.height),
gfxASurface::CONTENT_COLOR_ALPHA);
if (!untransformedSurface) {
if (pushedTargetOpaqueRect) {
currentSurface->SetOpaqueRect(gfxRect(0, 0, 0, 0));
}
NS_ASSERTION(needsSaveRestore, "Should always need to restore with 3d transforms!");
aTarget->Restore();
return;
}
untransformedSurface->SetDeviceOffset(gfxPoint(-bounds.x, -bounds.y));
groupTarget = new gfxContext(untransformedSurface);
} else if (needsGroup) {