Bug 1595994 - P15. Enable fast video copy path in AV1 decoder. r=mattwoodrow

Depends on D91691

Differential Revision: https://phabricator.services.mozilla.com/D91692
This commit is contained in:
Jean-Yves Avenard 2020-10-20 23:28:19 +00:00
Родитель 43549134bb
Коммит babdb5befd
2 изменённых файлов: 4 добавлений и 2 удалений

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

@ -22,7 +22,8 @@ DAV1DDecoder::DAV1DDecoder(const CreateDecoderParams& aParams)
mTaskQueue(
new TaskQueue(GetMediaThreadPool(MediaThreadType::PLATFORM_DECODER),
"Dav1dDecoder")),
mImageContainer(aParams.mImageContainer) {}
mImageContainer(aParams.mImageContainer),
mImageAllocator(aParams.mKnowsCompositor) {}
RefPtr<MediaDataDecoder::InitPromise> DAV1DDecoder::Init() {
Dav1dSettings settings;
@ -275,7 +276,7 @@ already_AddRefed<VideoData> DAV1DDecoder::ConstructImage(
return VideoData::CreateAndCopyData(
mInfo, mImageContainer, offset, timecode, duration, b, keyframe, timecode,
mInfo.ScaledImageRect(aPicture.p.w, aPicture.p.h));
mInfo.ScaledImageRect(aPicture.p.w, aPicture.p.h), mImageAllocator);
}
RefPtr<MediaDataDecoder::DecodePromise> DAV1DDecoder::Drain() {

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

@ -43,6 +43,7 @@ class DAV1DDecoder : public MediaDataDecoder,
const VideoInfo& mInfo;
const RefPtr<TaskQueue> mTaskQueue;
const RefPtr<layers::ImageContainer> mImageContainer;
const RefPtr<layers::KnowsCompositor> mImageAllocator;
// Keep the buffers alive until dav1d
// does not need them any more.