зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1606288: Fall back to using shmem for video. r=jya
Fallback to using shmem to pass video frame if allocating GPU-backed memory fails. Differential Revision: https://phabricator.services.mozilla.com/D64266 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
d5b34cc887
Коммит
5c59d7b978
|
@ -342,17 +342,25 @@ MediaResult RemoteVideoDecoderParent::ProcessDecodedData(
|
|||
mKnowsCompositor);
|
||||
}
|
||||
|
||||
if (texture && !texture->IsAddedToCompositableClient()) {
|
||||
texture->InitIPDLActor(mKnowsCompositor);
|
||||
texture->SetAddedToCompositableClient();
|
||||
}
|
||||
if (texture) {
|
||||
if (!texture->IsAddedToCompositableClient()) {
|
||||
texture->InitIPDLActor(mKnowsCompositor);
|
||||
texture->SetAddedToCompositableClient();
|
||||
}
|
||||
sd = mParent->StoreImage(video->mImage, texture);
|
||||
size = texture->GetSize();
|
||||
}
|
||||
} else {
|
||||
PlanarYCbCrImage* image =
|
||||
static_cast<PlanarYCbCrImage*>(video->mImage.get());
|
||||
}
|
||||
|
||||
// If failed to create a GPU accelerated surface descriptor, fall back to
|
||||
// copying frames via shmem.
|
||||
if (!IsSurfaceDescriptorValid(sd)) {
|
||||
PlanarYCbCrImage* image = video->mImage->AsPlanarYCbCrImage();
|
||||
if (!image) {
|
||||
return MediaResult(NS_ERROR_UNEXPECTED,
|
||||
"Expected Planar YCbCr image in "
|
||||
"RemoteVideoDecoderParent::ProcessDecodedData");
|
||||
}
|
||||
|
||||
SurfaceDescriptorBuffer sdBuffer;
|
||||
ShmemBuffer buffer = AllocateBuffer(image->GetDataSize());
|
||||
|
|
Загрузка…
Ссылка в новой задаче