Bug 1311644 - Create YCbCr texture client with valid allocator, r=nical

MozReview-Commit-ID: 2qQBBYb7Ist

--HG--
extra : rebase_source : eb284be301b78ffa68bfa3783f06b144c59b85eb
This commit is contained in:
peter chang 2016-11-08 11:40:24 +08:00
Родитель d342ff445e
Коммит 1626104a4c
1 изменённых файлов: 4 добавлений и 5 удалений

Просмотреть файл

@ -1211,9 +1211,8 @@ TextureClient::CreateForYCbCr(KnowsCompositor* aAllocator,
YUVColorSpace aYUVColorSpace,
TextureFlags aTextureFlags)
{
// The only reason we allow aAllocator to be null is for gtests
MOZ_ASSERT(!aAllocator || aAllocator->GetLayersIPCActor()->IPCOpen());
if (aAllocator && !aAllocator->GetLayersIPCActor()->IPCOpen()) {
if (!aAllocator || !aAllocator->GetLayersIPCActor()->IPCOpen()) {
return nullptr;
}
@ -1229,7 +1228,7 @@ TextureClient::CreateForYCbCr(KnowsCompositor* aAllocator,
}
return MakeAndAddRef<TextureClient>(data, aTextureFlags,
aAllocator ? aAllocator->GetTextureForwarder() : nullptr);
aAllocator->GetTextureForwarder());
}
// static
@ -1241,7 +1240,7 @@ TextureClient::CreateForYCbCrWithBufferSize(KnowsCompositor* aAllocator,
{
// also test the validity of aAllocator
MOZ_ASSERT(!aAllocator || aAllocator->GetLayersIPCActor()->IPCOpen());
if (aAllocator && !aAllocator->GetLayersIPCActor()->IPCOpen()) {
if (!aAllocator || !aAllocator->GetLayersIPCActor()->IPCOpen()) {
return nullptr;
}
@ -1253,7 +1252,7 @@ TextureClient::CreateForYCbCrWithBufferSize(KnowsCompositor* aAllocator,
}
return MakeAndAddRef<TextureClient>(data, aTextureFlags,
aAllocator ? aAllocator->GetTextureForwarder() : 0);
aAllocator->GetTextureForwarder());
}
TextureClient::TextureClient(TextureData* aData, TextureFlags aFlags, LayersIPCChannel* aAllocator)