Commit 345f0d03 authored by Hirokazu Honda's avatar Hirokazu Honda Committed by Commit Bot

media/gpu/test: Use SCANOUT_VEA_READ_CAMERA_AND_CPU_READ_WRITE to create a...

media/gpu/test: Use SCANOUT_VEA_READ_CAMERA_AND_CPU_READ_WRITE to create a native graphic buffer in CloneVideoFrame()

CloneVideoFrame() creates a native graphic buffer. The buffer is a destination
in copy of yuv frame file in the test. The use case is image_processor_test and
video_encode_accelerator_unittest because ImageProcessor and
VideoEncodeAccelerator takes a video frame as input.

The buffer is created with GPU_READ_CPU_READ_WRITE. It is because there was no
proper gfx::BufferUsage for an encoder input. This CL changes the buffer usage
to SCANOUT_VEA_READ_CAMERA_AND_CPU_READ_WRITE. The usage is introduced
specifically for an encoder input.

Bug: 1001413
Test: video_encode_accelerator_unittest on kevin and eve
Change-Id: I5e20de356c915335aa0ea9cc9e0d9a302d890346
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1810445Reviewed-by: default avatarAlexandre Courbot <acourbot@chromium.org>
Commit-Queue: Hirokazu Honda <hiroh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#697527}
parent 1a2ac646
...@@ -213,7 +213,8 @@ scoped_refptr<VideoFrame> CloneVideoFrame( ...@@ -213,7 +213,8 @@ scoped_refptr<VideoFrame> CloneVideoFrame(
dst_frame = CreatePlatformVideoFrame( dst_frame = CreatePlatformVideoFrame(
dst_layout.format(), dst_layout.coded_size(), dst_layout.format(), dst_layout.coded_size(),
src_frame->visible_rect(), src_frame->visible_rect().size(), src_frame->visible_rect(), src_frame->visible_rect().size(),
src_frame->timestamp(), gfx::BufferUsage::GPU_READ_CPU_READ_WRITE); src_frame->timestamp(),
gfx::BufferUsage::SCANOUT_VEA_READ_CAMERA_AND_CPU_READ_WRITE);
break; break;
#endif // BUILDFLAG(USE_CHROMEOS_MEDIA_ACCELERATION) #endif // BUILDFLAG(USE_CHROMEOS_MEDIA_ACCELERATION)
case VideoFrame::STORAGE_OWNED_MEMORY: case VideoFrame::STORAGE_OWNED_MEMORY:
......
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