Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1469)

Unified Diff: media/video/gpu_memory_buffer_video_frame_pool_unittest.cc

Issue 2648633005: cros: Support YUYV format for GPU memory buffer video frames
Patch Set: Enable YUYV GPU memory buffer video frames Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « media/video/gpu_memory_buffer_video_frame_pool.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/video/gpu_memory_buffer_video_frame_pool_unittest.cc
diff --git a/media/video/gpu_memory_buffer_video_frame_pool_unittest.cc b/media/video/gpu_memory_buffer_video_frame_pool_unittest.cc
index c403dc6c6c056b635793553a796a9a3697110158..361bf186ad370bc6163c525410bf4eb36687f8f8 100644
--- a/media/video/gpu_memory_buffer_video_frame_pool_unittest.cc
+++ b/media/video/gpu_memory_buffer_video_frame_pool_unittest.cc
@@ -232,6 +232,22 @@ TEST_F(GpuMemoryBufferVideoFramePoolTest, CreateOneHardwareUYUVFrame) {
media::VideoFrameMetadata::READ_LOCK_FENCES_ENABLED));
}
+TEST_F(GpuMemoryBufferVideoFramePoolTest, CreateOneHardwareYUYVFrame) {
+ scoped_refptr<VideoFrame> software_frame = CreateTestYUVVideoFrame(10);
+ scoped_refptr<VideoFrame> frame;
+ mock_gpu_factories_->SetVideoFrameOutputFormat(
+ media::GpuVideoAcceleratorFactories::OutputFormat::YUYV);
+ gpu_memory_buffer_pool_->MaybeCreateHardwareFrame(
+ software_frame, base::Bind(MaybeCreateHardwareFrameCallback, &frame));
+
+ RunUntilIdle();
+
+ EXPECT_NE(software_frame.get(), frame.get());
+ EXPECT_EQ(1u, gles2_->gen_textures);
+ EXPECT_TRUE(frame->metadata()->IsTrue(
+ media::VideoFrameMetadata::READ_LOCK_FENCES_ENABLED));
+}
+
TEST_F(GpuMemoryBufferVideoFramePoolTest, CreateOneHardwareNV12Frame) {
scoped_refptr<VideoFrame> software_frame = CreateTestYUVVideoFrame(10);
scoped_refptr<VideoFrame> frame;
« no previous file with comments | « media/video/gpu_memory_buffer_video_frame_pool.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698