From a10d9177432020f99ba97ba749cec0d38b7a7069 Mon Sep 17 00:00:00 2001 From: Nicolas Silva Date: Wed, 6 Aug 2014 14:40:07 +0200 Subject: [PATCH] Bug 1047765 - Pass the proper allocation flags in TextureClient::CreateSimilar. r=Bas --- gfx/layers/TextureDIB.cpp | 4 ++-- gfx/layers/d3d11/TextureD3D11.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/gfx/layers/TextureDIB.cpp b/gfx/layers/TextureDIB.cpp index d202aa3ae3cc..80d3420f1882 100644 --- a/gfx/layers/TextureDIB.cpp +++ b/gfx/layers/TextureDIB.cpp @@ -27,11 +27,11 @@ DIBTextureClient::~DIBTextureClient() TemporaryRef DIBTextureClient::CreateSimilar(TextureFlags aFlags, - TextureAllocationFlags aAllocFlags) const + TextureAllocationFlags aAllocFlags) const { RefPtr tex = new DIBTextureClient(mFormat, mFlags | aFlags); - if (!tex->AllocateForSurface(mSize, ALLOC_DEFAULT)) { + if (!tex->AllocateForSurface(mSize, aAllocFlags)) { return nullptr; } diff --git a/gfx/layers/d3d11/TextureD3D11.cpp b/gfx/layers/d3d11/TextureD3D11.cpp index e9db4be136cd..a34891c7310d 100644 --- a/gfx/layers/d3d11/TextureD3D11.cpp +++ b/gfx/layers/d3d11/TextureD3D11.cpp @@ -192,7 +192,7 @@ TextureClientD3D11::CreateSimilar(TextureFlags aFlags, { RefPtr tex = new TextureClientD3D11(mFormat, mFlags | aFlags); - if (!tex->AllocateForSurface(mSize, ALLOC_DEFAULT)) { + if (!tex->AllocateForSurface(mSize, aAllocFlags)) { return nullptr; }