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

Unified Diff: webrtc/common_video/video_frame_buffer.cc

Issue 2029273004: New static method I420Buffer::SetToBlack. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Add missing SetToBlack call. Created 4 years, 6 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 | « webrtc/common_video/include/video_frame_buffer.h ('k') | webrtc/media/base/fakevideorenderer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/common_video/video_frame_buffer.cc
diff --git a/webrtc/common_video/video_frame_buffer.cc b/webrtc/common_video/video_frame_buffer.cc
index 34213e4656ce766f5cb6f2fdc24e566c02cf152e..27aea3efc595f5a3df62114880f9a4f2432f8afd 100644
--- a/webrtc/common_video/video_frame_buffer.cc
+++ b/webrtc/common_video/video_frame_buffer.cc
@@ -200,6 +200,14 @@ rtc::scoped_refptr<I420Buffer> I420Buffer::Copy(
return copy;
}
+void I420Buffer::SetToBlack() {
+ RTC_CHECK(libyuv::I420Rect(MutableDataY(), StrideY(),
+ MutableDataU(), StrideU(),
+ MutableDataV(), StrideV(),
+ 0, 0, width(), height(),
+ 0, 128, 128) == 0);
+}
+
NativeHandleBuffer::NativeHandleBuffer(void* native_handle,
int width,
int height)
« no previous file with comments | « webrtc/common_video/include/video_frame_buffer.h ('k') | webrtc/media/base/fakevideorenderer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698