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; }