Bug 1042052 - Add TextureClient::CreateSimilar and have component alpha buffer be of the same type. r=sotaro
This commit is contained in:
@@ -55,6 +55,21 @@ GrallocTextureClientOGL::~GrallocTextureClientOGL()
|
||||
}
|
||||
}
|
||||
|
||||
TemporaryRef<TextureClient>
|
||||
GrallocTextureClientOGL::CreateSimilar(TextureFlags aFlags,
|
||||
TextureAllocationFlags aAllocFlags) const
|
||||
{
|
||||
RefPtr<TextureClient> tex = new GrallocTextureClientOGL(
|
||||
mAllocator, mFormat, mBackend, mFlags | aFlags
|
||||
);
|
||||
|
||||
if (!tex->AllocateForSurface(mSize, aAllocFlags)) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
return tex;
|
||||
}
|
||||
|
||||
void
|
||||
GrallocTextureClientOGL::InitWith(MaybeMagicGrallocBufferHandle aHandle, gfx::IntSize aSize)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user