Bug 1292923 - Don't upload to textures during creation on Intel cards as it frequently crashes. r=dvander

This commit is contained in:
Matt Woodrow
2016-10-06 14:32:55 +02:00
parent f8fe0a5e99
commit f3a870685c
6 changed files with 36 additions and 2 deletions

View File

@@ -1088,7 +1088,8 @@ TextureClient::CreateForDrawing(TextureForwarder* aAllocator,
(!!(aAllocFlags & ALLOC_FOR_OUT_OF_BAND_CONTENT) &&
DeviceManagerDx::Get()->GetContentDevice())) &&
aSize.width <= aMaxTextureSize &&
aSize.height <= aMaxTextureSize)
aSize.height <= aMaxTextureSize &&
!(aAllocFlags & ALLOC_UPDATE_FROM_SURFACE))
{
data = DXGITextureData::Create(aSize, aFormat, aAllocFlags);
}
@@ -1202,8 +1203,9 @@ TextureClient::CreateFromSurface(KnowsCompositor* aAllocator,
// Fall back to using UpdateFromSurface
TextureAllocationFlags allocFlags = TextureAllocationFlags(aAllocFlags | ALLOC_UPDATE_FROM_SURFACE);
RefPtr<TextureClient> client = CreateForDrawing(aAllocator, aSurface->GetFormat(), size,
aSelector, aTextureFlags, aAllocFlags);
aSelector, aTextureFlags, allocFlags);
if (!client) {
return nullptr;
}