Bug 1200595 - Consolidate the TextureClient's destruction logic. r=mattwoodrow

* * *
Bug 1200595 - Rebase fixes
This commit is contained in:
Nicolas Silva
2015-11-20 14:25:03 +01:00
parent 5aa757715e
commit 51da7ff08c
22 changed files with 273 additions and 375 deletions

View File

@@ -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,