Bug 1170390 - Make gfxPlatform::CreateOffscreenSurface use explicit format rather than guess. r=jrmuizel

This commit is contained in:
Lee Salzman
2015-07-06 21:21:47 -04:00
parent 8111a97a80
commit 8b67d01989
13 changed files with 35 additions and 41 deletions

View File

@@ -118,8 +118,8 @@ TextureClientX11::AllocateForSurface(IntSize aSize, TextureAllocationFlags aText
gfxDebug() << "Asking for X11 surface of invalid size " << aSize.width << "x" << aSize.height;
return false;
}
gfxContentType contentType = ContentForFormat(mFormat);
nsRefPtr<gfxASurface> surface = gfxPlatform::GetPlatform()->CreateOffscreenSurface(aSize, contentType);
gfxImageFormat imageFormat = SurfaceFormatToImageFormat(mFormat);
nsRefPtr<gfxASurface> surface = gfxPlatform::GetPlatform()->CreateOffscreenSurface(aSize, imageFormat);
if (!surface || surface->GetType() != gfxSurfaceType::Xlib) {
NS_ERROR("creating Xlib surface failed!");
return false;