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

Unified Diff: webrtc/common_video/i420_video_frame_unittest.cc

Issue 1822283002: New method I420Buffer::Copy. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Address compare nit. Created 4 years, 9 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 | « no previous file | webrtc/common_video/include/video_frame_buffer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/common_video/i420_video_frame_unittest.cc
diff --git a/webrtc/common_video/i420_video_frame_unittest.cc b/webrtc/common_video/i420_video_frame_unittest.cc
index 8273136dce4048827871410a8c9e14168896706b..9b2bdd762dca60f6e1c8ebca1124a24ca1245f31 100644
--- a/webrtc/common_video/i420_video_frame_unittest.cc
+++ b/webrtc/common_video/i420_video_frame_unittest.cc
@@ -254,4 +254,14 @@ TEST(TestVideoFrame, TextureInitialValues) {
EXPECT_EQ(20, frame.render_time_ms());
}
+TEST(TestI420FrameBuffer, Copy) {
+ rtc::scoped_refptr<I420Buffer> buf1(
+ new rtc::RefCountedObject<I420Buffer>(20, 10));
+ memset(buf1->MutableData(kYPlane), 1, 200);
+ memset(buf1->MutableData(kUPlane), 2, 50);
+ memset(buf1->MutableData(kVPlane), 3, 50);
+ rtc::scoped_refptr<I420Buffer> buf2 = I420Buffer::Copy(buf1);
+ EXPECT_TRUE(test::FrameBufsEqual(buf1, buf2));
+}
+
} // namespace webrtc
« no previous file with comments | « no previous file | webrtc/common_video/include/video_frame_buffer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698