Commit d0171856 authored by braveyao's avatar braveyao Committed by Commit Bot

desktopCapture: remove unnecessary memset to DesktopFrame

With a recent change, the webrtc::DesktopFrame is created and
initialized with 0. So it's not necessary to call memset() to the frame
again any more.

Bug: webrtc:9703
Change-Id: Id3b37940ad3a1e989725db578f743670c786e681
Reviewed-on: https://chromium-review.googlesource.com/c/1366785Reviewed-by: default avatarJulien Isorce <julien.isorce@chromium.org>
Commit-Queue: Weiyong Yao <braveyao@chromium.org>
Cr-Commit-Position: refs/heads/master@{#614733}
parent e1809a76
......@@ -364,8 +364,6 @@ void DesktopCaptureDevice::Core::OnCaptureResult(
// last frame.
if (!black_frame_ || !black_frame_->size().equals(output_size)) {
black_frame_.reset(new webrtc::BasicDesktopFrame(output_size));
memset(black_frame_->data(), 0,
black_frame_->stride() * black_frame_->size().height());
}
output_data = black_frame_->data();
} else {
......@@ -396,7 +394,6 @@ void DesktopCaptureDevice::Core::OnCaptureResult(
// letterboxed areas.
if (!output_frame_) {
output_frame_.reset(new webrtc::BasicDesktopFrame(output_size));
memset(output_frame_->data(), 0, output_bytes);
}
DCHECK(output_frame_->size().equals(output_size));
......@@ -418,7 +415,6 @@ void DesktopCaptureDevice::Core::OnCaptureResult(
// crbug.com/437740).
if (!output_frame_) {
output_frame_.reset(new webrtc::BasicDesktopFrame(output_size));
memset(output_frame_->data(), 0, output_bytes);
}
output_frame_->CopyPixelsFrom(
......
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