mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-11-08 12:19:05 +02:00
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:
parent
d342ff445e
commit
1626104a4c
1 changed files with 4 additions and 5 deletions
|
|
@ -1211,9 +1211,8 @@ TextureClient::CreateForYCbCr(KnowsCompositor* aAllocator,
|
||||||
YUVColorSpace aYUVColorSpace,
|
YUVColorSpace aYUVColorSpace,
|
||||||
TextureFlags aTextureFlags)
|
TextureFlags aTextureFlags)
|
||||||
{
|
{
|
||||||
// The only reason we allow aAllocator to be null is for gtests
|
|
||||||
MOZ_ASSERT(!aAllocator || aAllocator->GetLayersIPCActor()->IPCOpen());
|
MOZ_ASSERT(!aAllocator || aAllocator->GetLayersIPCActor()->IPCOpen());
|
||||||
if (aAllocator && !aAllocator->GetLayersIPCActor()->IPCOpen()) {
|
if (!aAllocator || !aAllocator->GetLayersIPCActor()->IPCOpen()) {
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1229,7 +1228,7 @@ TextureClient::CreateForYCbCr(KnowsCompositor* aAllocator,
|
||||||
}
|
}
|
||||||
|
|
||||||
return MakeAndAddRef<TextureClient>(data, aTextureFlags,
|
return MakeAndAddRef<TextureClient>(data, aTextureFlags,
|
||||||
aAllocator ? aAllocator->GetTextureForwarder() : nullptr);
|
aAllocator->GetTextureForwarder());
|
||||||
}
|
}
|
||||||
|
|
||||||
// static
|
// static
|
||||||
|
|
@ -1241,7 +1240,7 @@ TextureClient::CreateForYCbCrWithBufferSize(KnowsCompositor* aAllocator,
|
||||||
{
|
{
|
||||||
// also test the validity of aAllocator
|
// also test the validity of aAllocator
|
||||||
MOZ_ASSERT(!aAllocator || aAllocator->GetLayersIPCActor()->IPCOpen());
|
MOZ_ASSERT(!aAllocator || aAllocator->GetLayersIPCActor()->IPCOpen());
|
||||||
if (aAllocator && !aAllocator->GetLayersIPCActor()->IPCOpen()) {
|
if (!aAllocator || !aAllocator->GetLayersIPCActor()->IPCOpen()) {
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1253,7 +1252,7 @@ TextureClient::CreateForYCbCrWithBufferSize(KnowsCompositor* aAllocator,
|
||||||
}
|
}
|
||||||
|
|
||||||
return MakeAndAddRef<TextureClient>(data, aTextureFlags,
|
return MakeAndAddRef<TextureClient>(data, aTextureFlags,
|
||||||
aAllocator ? aAllocator->GetTextureForwarder() : 0);
|
aAllocator->GetTextureForwarder());
|
||||||
}
|
}
|
||||||
|
|
||||||
TextureClient::TextureClient(TextureData* aData, TextureFlags aFlags, LayersIPCChannel* aAllocator)
|
TextureClient::TextureClient(TextureData* aData, TextureFlags aFlags, LayersIPCChannel* aAllocator)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue