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

Unified Diff: media/base/video_frame_unittest.cc

Issue 1154153003: Relanding 1143663007: VideoFrame: Separate Pixel Format from Storage Type. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added NV12 support in CrOS Created 5 years, 7 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/base/video_frame.cc ('k') | media/blink/skcanvas_video_renderer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/base/video_frame_unittest.cc
diff --git a/media/base/video_frame_unittest.cc b/media/base/video_frame_unittest.cc
index 213d41e51c1e96c98098d496832df12ed39c30d8..6e6766858c62a5912ce1f496edfb8fc4166f4f85 100644
--- a/media/base/video_frame_unittest.cc
+++ b/media/base/video_frame_unittest.cc
@@ -76,8 +76,7 @@ void ExpectFrameColor(media::VideoFrame* yv12_frame, uint32 expect_rgb_color) {
uint32* rgb_row_data = reinterpret_cast<uint32*>(
rgb_data + (bytes_per_row * row));
for (int col = 0; col < yv12_frame->coded_size().width(); ++col) {
- SCOPED_TRACE(
- base::StringPrintf("Checking (%d, %d)", row, col));
+ SCOPED_TRACE(base::StringPrintf("Checking (%d, %d)", row, col));
EXPECT_EQ(expect_rgb_color, rgb_row_data[col]);
}
}
@@ -261,7 +260,8 @@ TEST(VideoFrame, TextureNoLongerNeededCallbackIsCalled) {
base::TimeDelta(), // timestamp
false, // allow_overlay
true); // has_alpha
- EXPECT_EQ(VideoFrame::TEXTURE_RGBA, frame->texture_format());
+ EXPECT_EQ(VideoFrame::STORAGE_TEXTURE, frame->storage_type());
+ EXPECT_EQ(VideoFrame::ARGB, frame->format());
}
// Nobody set a sync point to |frame|, so |frame| set |called_sync_point| to 0
// as default value.
@@ -310,9 +310,10 @@ TEST(VideoFrame,
base::TimeDelta(), // timestamp
false); // allow_overlay
- EXPECT_EQ(VideoFrame::TEXTURE_YUV_420, frame->texture_format());
- EXPECT_EQ(3u, VideoFrame::NumTextures(frame->texture_format()));
- for (size_t i = 0; i < VideoFrame::NumTextures(frame->texture_format());
+ EXPECT_EQ(VideoFrame::STORAGE_TEXTURE, frame->storage_type());
+ EXPECT_EQ(VideoFrame::I420, frame->format());
+ EXPECT_EQ(3u, VideoFrame::NumPlanes(frame->format()));
+ for (size_t i = 0; i < VideoFrame::NumPlanes(frame->format());
++i) {
const gpu::MailboxHolder& mailbox_holder = frame->mailbox_holder(i);
EXPECT_EQ(mailbox[i].name[0], mailbox_holder.mailbox.name[0]);
« no previous file with comments | « media/base/video_frame.cc ('k') | media/blink/skcanvas_video_renderer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698