Bug 1200595 - DIB TextureData implementation. r=Bas

This commit is contained in:
Nicolas Silva
2015-11-20 14:24:58 +01:00
parent f4a6dd5aad
commit 48ad872a01
3 changed files with 209 additions and 241 deletions

View File

@@ -593,10 +593,9 @@ TextureClient::CreateForDrawing(CompositableForwarder* aAllocator,
aAllocator->IsSameProcess() &&
moz2DBackend == gfx::BackendType::CAIRO &&
NS_IsMainThread()) {
if (aAllocator->IsSameProcess()) {
texture = new TextureClientMemoryDIB(aAllocator, aFormat, aTextureFlags);
} else {
texture = new TextureClientShmemDIB(aAllocator, aFormat, aTextureFlags);
TextureData* data = DIBTextureData::Create(aSize, aFormat, aAllocator);
if (data) {
return MakeAndAddRef<ClientTexture>(data, aTextureFlags, aAllocator);
}
}
#endif