Fix drawing of local mouse in CRD on ChromeOS
ChromeOS will use DPI (see crrev.com/c/3322917), but the DesktopAndCursorComposer assumed pixels were used. Test: Manually ensured it works Bug: b/208370410 Change-Id: I5fee50d408fd204273946009e6653d4e60d1e458 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/259502 Reviewed-by: Alexander Cooper <alcooper@chromium.org> Commit-Queue: Jeroen Dhollander <jeroendh@google.com> Cr-Commit-Position: refs/heads/main@{#36597}
This commit is contained in:
parent
edbaf57bd4
commit
f8775cf269
@ -218,7 +218,7 @@ void DesktopAndCursorComposer::OnCaptureResult(
|
||||
!desktop_capturer_->IsOccluded(cursor_position_)) {
|
||||
DesktopVector relative_position =
|
||||
cursor_position_.subtract(frame->top_left());
|
||||
#if defined(WEBRTC_MAC)
|
||||
#if defined(WEBRTC_MAC) || defined(CHROMEOS)
|
||||
// On OSX, the logical(DIP) and physical coordinates are used mixingly.
|
||||
// For example, the captured cursor has its size in physical pixels(2x)
|
||||
// and location in logical(DIP) pixels on Retina monitor. This will cause
|
||||
|
||||
@ -112,7 +112,7 @@ DesktopRect DesktopFrame::rect() const {
|
||||
float DesktopFrame::scale_factor() const {
|
||||
float scale = 1.0f;
|
||||
|
||||
#if defined(WEBRTC_MAC)
|
||||
#if defined(WEBRTC_MAC) || defined(CHROMEOS)
|
||||
// At least on Windows the logical and physical pixel are the same
|
||||
// See http://crbug.com/948362.
|
||||
if (!dpi().is_zero() && dpi().x() == dpi().y())
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user