Bug 1123080 - Use cairo's image backend as canvas fallback on windows. r=Bas

This commit is contained in:
Nicolas Silva 2015-03-12 19:40:06 +01:00
Родитель fbd1e7e370
Коммит 0863d3f6fa
2 изменённых файлов: 8 добавлений и 2 удалений

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

@ -1522,8 +1522,9 @@ bool
DrawTargetCairo::InitAlreadyReferenced(cairo_surface_t* aSurface, const IntSize& aSize, SurfaceFormat* aFormat)
{
if (cairo_surface_status(aSurface)) {
gfxCriticalError() << "Attempt to create DrawTarget for invalid surface. "
<< aSize << " Cairo Status: " << cairo_surface_status(aSurface);
gfxCriticalError(CriticalLog::DefaultOptions(Factory::ReasonableSurfaceSize(aSize)))
<< "Attempt to create DrawTarget for invalid surface. "
<< aSize << " Cairo Status: " << cairo_surface_status(aSurface);
cairo_surface_destroy(aSurface);
return false;
}

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

@ -1181,7 +1181,12 @@ gfxPlatform::CreateOffscreenCanvasDrawTarget(const IntSize& aSize, SurfaceFormat
return target.forget();
}
#ifdef XP_WIN
// On Windows, the fallback backend (Cairo) should use its image backend.
return Factory::CreateDrawTarget(mFallbackCanvasBackend, aSize, aFormat);
#else
return CreateDrawTargetForBackend(mFallbackCanvasBackend, aSize, aFormat);
#endif
}
TemporaryRef<DrawTarget>