Bug 908006 - use gfxImageSurface for A8 mask layers. r=nical

This commit is contained in:
Matt Woodrow 2013-08-23 16:43:17 +12:00
parent e6c2e5fdab
commit 92359bcf96

View File

@ -120,6 +120,10 @@ already_AddRefed<gfxASurface>
LayerManager::CreateOptimalSurface(const gfxIntSize &aSize,
gfxASurface::gfxImageFormat aFormat)
{
if (aFormat == gfxASurface::ImageFormatA8) {
nsRefPtr<gfxASurface> surf = new gfxImageSurface(aSize, aFormat);
return surf.forget();
}
return gfxPlatform::GetPlatform()->
CreateOffscreenSurface(aSize, gfxASurface::ContentFromFormat(aFormat));
}