Commit e93f436d authored by Julien Isorce's avatar Julien Isorce Committed by Commit Bot

Remove unnecessary memset to webrtc::BasicDesktopFrame

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

See https://webrtc-review.googlesource.com/c/src/+/97184/

Bug: webrtc:9703
Change-Id: Ic0f6d3f57bb2404825d8b72709509c1d7ba7a931
Reviewed-on: https://chromium-review.googlesource.com/c/1447021Reviewed-by: default avatarWeiyong Yao <braveyao@chromium.org>
Commit-Queue: Julien Isorce <julien.isorce@chromium.org>
Cr-Commit-Position: refs/heads/master@{#627992}
parent f9877aee
...@@ -68,7 +68,6 @@ class FakeScreenCapturer : public webrtc::DesktopCapturer { ...@@ -68,7 +68,6 @@ class FakeScreenCapturer : public webrtc::DesktopCapturer {
DCHECK(callback_); DCHECK(callback_);
std::unique_ptr<webrtc::DesktopFrame> frame( std::unique_ptr<webrtc::DesktopFrame> frame(
new webrtc::BasicDesktopFrame(webrtc::DesktopSize(10, 10))); new webrtc::BasicDesktopFrame(webrtc::DesktopSize(10, 10)));
memset(frame->data(), 0, frame->stride() * frame->size().height());
callback_->OnCaptureResult(webrtc::DesktopCapturer::Result::SUCCESS, callback_->OnCaptureResult(webrtc::DesktopCapturer::Result::SUCCESS,
std::move(frame)); std::move(frame));
} }
......
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