Bug 915940. Only report memory allocated from gfxWindowsSurfaces if it is actually allocated. r=jrmuizel

This commit is contained in:
Nicholas Cameron 2013-09-25 14:14:39 +12:00
Родитель 4127d9fdaa
Коммит 7a289d7142
1 изменённых файлов: 4 добавлений и 4 удалений

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

@ -60,12 +60,12 @@ gfxWindowsSurface::gfxWindowsSurface(const gfxIntSize& realSize, gfxImageFormat
Init(surf);
RecordMemoryUsed(size.width * size.height * 4 + sizeof(gfxWindowsSurface));
if (CairoStatus() == 0)
if (CairoStatus() == CAIRO_STATUS_SUCCESS) {
mDC = cairo_win32_surface_get_dc(CairoSurface());
else
RecordMemoryUsed(size.width * size.height * 4 + sizeof(gfxWindowsSurface));
} else {
mDC = nullptr;
}
}
gfxWindowsSurface::gfxWindowsSurface(HDC dc, const gfxIntSize& realSize, gfxImageFormat imageFormat) :