Bug 1966238 - Cherry-pick upstream libwebrtc commit d2534b3914 r=pehrsons,webrtc-reviewers

Upstream commit: https://webrtc.googlesource.com/src/+/d2534b3914f1b3c6a1aa3683e111fd76b8ff4893
       In SCK backend move dpi to and set may_contain_cursor in frame callback

       Bug: webrtc:367915807
       Change-Id: Id29b979ab7909d21eb92bc926f9decdae3345381
       Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/365084
       Reviewed-by: Johannes Kron <kron@webrtc.org>
       Reviewed-by: Alexander Cooper <alcooper@chromium.org>
       Commit-Queue: Andreas Pehrson <apehrson@mozilla.com>
       Cr-Commit-Position: refs/heads/main@{#44204}

Differential Revision: https://phabricator.services.mozilla.com/D249152
This commit is contained in:
Michael Froman
2025-05-16 17:25:49 +00:00
committed by mfroman@mozilla.com
parent 56bd018669
commit a6ce46b220
2 changed files with 4 additions and 1 deletions

View File

@@ -171,7 +171,6 @@ void ScreenCapturerSck::CaptureFrame() {
MutexLock lock(&latest_frame_lock_);
if (latest_frame_) {
frame = latest_frame_->Share();
frame->set_dpi(DesktopVector(latest_frame_dpi_, latest_frame_dpi_));
if (frame_is_dirty_) {
frame->mutable_updated_region()->AddRect(
DesktopRect::MakeSize(frame->size()));
@@ -357,6 +356,9 @@ void ScreenCapturerSck::OnNewIOSurface(IOSurfaceRef io_surface,
if (dirty) {
MutexLock lock(&latest_frame_lock_);
frame->set_dpi(DesktopVector(latest_frame_dpi_, latest_frame_dpi_));
frame->set_may_contain_cursor(capture_options_.prefer_cursor_embedded());
frame_is_dirty_ = true;
std::swap(latest_frame_, frame);
}

View File

@@ -0,0 +1 @@
We cherry-picked this in bug 1966238