Commit acc992b5 authored by Gary Kacmarcik's avatar Gary Kacmarcik Committed by Commit Bot

[Chromoting] Only check for fulldesktop support on the Mac

The Mac doesn't always support full desktop capture (e.g., it is
not support unless the DPIs of all displays match). This check
is not necessary on other platforms.

Change-Id: I444732f153b706bb1615b8c3cd1798b15cc66540
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2096095
Commit-Queue: Gary Kacmarcik <garykac@chromium.org>
Auto-Submit: Gary Kacmarcik <garykac@chromium.org>
Reviewed-by: default avatarJamie Walch <jamiewalch@chromium.org>
Cr-Commit-Position: refs/heads/master@{#748890}
parent d425b35d
...@@ -697,6 +697,12 @@ void ClientSession::OnDesktopDisplayChanged( ...@@ -697,6 +697,12 @@ void ClientSession::OnDesktopDisplayChanged(
// display configuration supports capturing the entire desktop. // display configuration supports capturing the entire desktop.
LOG(INFO) << " Webrtc desktop size " << default_webrtc_desktop_size_; LOG(INFO) << " Webrtc desktop size " << default_webrtc_desktop_size_;
if (show_display_id_ == webrtc::kInvalidScreenId) { if (show_display_id_ == webrtc::kInvalidScreenId) {
#if defined(OS_MACOSX)
// On MacOS, there are situations where webrtc cannot capture the entire
// desktop (e.g, when there are displays with different DPIs). We detect
// this situation by comparing the full desktop size (calculated above
// from the displays) and the size of the initial webrtc capture (which
// defaults to the full desktop if supported).
if (size.width() == default_webrtc_desktop_size_.WidthAsDips() && if (size.width() == default_webrtc_desktop_size_.WidthAsDips() &&
size.height() == default_webrtc_desktop_size_.HeightAsDips()) { size.height() == default_webrtc_desktop_size_.HeightAsDips()) {
LOG(INFO) << " Full desktop capture supported."; LOG(INFO) << " Full desktop capture supported.";
...@@ -706,6 +712,10 @@ void ClientSession::OnDesktopDisplayChanged( ...@@ -706,6 +712,10 @@ void ClientSession::OnDesktopDisplayChanged(
<< " This configuration does not support full desktop capture."; << " This configuration does not support full desktop capture.";
can_capture_full_desktop_ = false; can_capture_full_desktop_ = false;
} }
#else
// Windows/Linux can capture full desktop if multiple displays.
can_capture_full_desktop_ = true;
#endif // defined(OS_MACOSX)
} }
// Generate and send VideoLayout message. // Generate and send VideoLayout message.
......
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