Bug 1293759. Memset RGBX surfaces with basic layers and a skia backend. r=lsalzman

This commit is contained in:
Mason Chang 2016-08-11 07:53:07 -07:00
Родитель 5cb9bd82d8
Коммит 1dba66163c
1 изменённых файлов: 5 добавлений и 0 удалений

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

@ -1104,6 +1104,11 @@ TextureClient::CreateForDrawing(TextureForwarder* aAllocator,
return MakeAndAddRef<TextureClient>(data, aTextureFlags, aAllocator);
}
if (moz2DBackend == BackendType::SKIA && aFormat == SurfaceFormat::B8G8R8X8) {
// Skia doesn't support RGBX, so ensure we clear the buffer for the proper alpha values.
aAllocFlags = TextureAllocationFlags(aAllocFlags | ALLOC_CLEAR_BUFFER);
}
// Can't do any better than a buffer texture client.
return TextureClient::CreateForRawBufferAccess(aAllocator, aFormat, aSize,
moz2DBackend, aTextureFlags, aAllocFlags);