From 0627cb3920d958f954edff1c263abbfd6a747c5e Mon Sep 17 00:00:00 2001 From: Salman Malik Date: Fri, 18 Mar 2022 16:31:58 +0000 Subject: [PATCH] shared_screencast_stream: Set rectangle on the frame The diff capturer wrapper doesn't work if the frame doesn't have any rectangle and a static image is observed while chromoting. This change adds a rectangle to the frame object, as done by other capturers, and this in turn ensures that the wrapper that calulcates diffs from one frame to the next can do its job. Bug: chromium:1291247 Change-Id: I5bf1981f34b3a88ad4d82a081fed1ce210f71ed0 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/251205 Reviewed-by: Alexander Cooper Commit-Queue: Salman Malik Cr-Commit-Position: refs/heads/main@{#36263} --- .../desktop_capture/linux/wayland/shared_screencast_stream.cc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/modules/desktop_capture/linux/wayland/shared_screencast_stream.cc b/modules/desktop_capture/linux/wayland/shared_screencast_stream.cc index 9e81df4ca8..720234fba8 100644 --- a/modules/desktop_capture/linux/wayland/shared_screencast_stream.cc +++ b/modules/desktop_capture/linux/wayland/shared_screencast_stream.cc @@ -819,6 +819,9 @@ void SharedScreenCastStreamPrivate::ProcessBuffer(pw_buffer* buffer) { tmp_src += queue_.current_frame()->stride(); } } + + queue_.current_frame()->mutable_updated_region()->SetRect( + DesktopRect::MakeSize(queue_.current_frame()->size())); } void SharedScreenCastStreamPrivate::ConvertRGBxToBGRx(uint8_t* frame,