Commit b847d053 authored by Hirokazu Honda's avatar Hirokazu Honda Committed by Commit Bot

media/gpu/test/VFWriter: Check if VideoFrameMapper is created

Bug: 1020776
Test: VD test on atlas --output_frames
Change-Id: I3ab7dc8342fd55cfa18d5125d0a8065ad4fa94bc
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1910983
Commit-Queue: Hirokazu Honda <hiroh@chromium.org>
Reviewed-by: default avatarDavid Staessens <dstaessens@chromium.org>
Cr-Commit-Position: refs/heads/master@{#714796}
parent e87da1b7
......@@ -150,13 +150,12 @@ void VideoFrameFileWriter::WriteVideoFramePNG(
scoped_refptr<const VideoFrame> video_frame,
const base::FilePath& filename) {
DCHECK_CALLED_ON_VALID_SEQUENCE(writer_thread_sequence_checker_);
DCHECK(video_frame_mapper_);
auto mapped_frame = video_frame;
#if defined(OS_CHROMEOS)
if (video_frame->storage_type() == VideoFrame::STORAGE_DMABUFS ||
video_frame->storage_type() == VideoFrame::STORAGE_GPU_MEMORY_BUFFER) {
DCHECK(video_frame_mapper_);
CHECK(video_frame_mapper_);
mapped_frame = video_frame_mapper_->Map(std::move(video_frame));
}
......@@ -196,13 +195,12 @@ void VideoFrameFileWriter::WriteVideoFrameYUV(
scoped_refptr<const VideoFrame> video_frame,
const base::FilePath& filename) {
DCHECK_CALLED_ON_VALID_SEQUENCE(writer_thread_sequence_checker_);
DCHECK(video_frame_mapper_);
auto mapped_frame = video_frame;
#if defined(OS_CHROMEOS)
if (video_frame->storage_type() == VideoFrame::STORAGE_DMABUFS ||
video_frame->storage_type() == VideoFrame::STORAGE_GPU_MEMORY_BUFFER) {
DCHECK(video_frame_mapper_);
CHECK(video_frame_mapper_);
mapped_frame = video_frame_mapper_->Map(std::move(video_frame));
}
#endif
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment