Bug 1200595 - Consolidate the TextureClient's destruction logic. r=mattwoodrow
* * * Bug 1200595 - Rebase fixes
This commit is contained in:
@@ -346,23 +346,16 @@ GrallocTextureData::CreateForDrawing(gfx::IntSize aSize, gfx::SurfaceFormat aFor
|
||||
return data;
|
||||
}
|
||||
|
||||
already_AddRefed<TextureClient>
|
||||
CreateGrallocTextureClientForDrawing(gfx::IntSize aSize, gfx::SurfaceFormat aFormat,
|
||||
gfx::BackendType aMoz2dBackend,
|
||||
TextureFlags aFlags,
|
||||
ISurfaceAllocator* aAllocator)
|
||||
TextureFlags
|
||||
GrallocTextureData::GetTextureFlags() const
|
||||
{
|
||||
TextureData* data = GrallocTextureData::CreateForDrawing(aSize, aFormat, aMoz2dBackend,
|
||||
aAllocator);
|
||||
if (!data) {
|
||||
return nullptr;
|
||||
if (IsGrallocRBSwapped(mFormat)) {
|
||||
return TextureFlags::RB_SWAPPED;
|
||||
}
|
||||
if (IsGrallocRBSwapped(aFormat)) {
|
||||
aFlags |= TextureFlags::RB_SWAPPED;
|
||||
}
|
||||
return MakeAndAddRef<TextureClient>(data, aFlags, aAllocator);
|
||||
return TextureFlags::NO_FLAGS;
|
||||
}
|
||||
|
||||
|
||||
// static
|
||||
GrallocTextureData*
|
||||
GrallocTextureData::CreateForYCbCr(gfx::IntSize aYSize, gfx::IntSize aCbCrSize,
|
||||
|
||||
Reference in New Issue
Block a user