diff --git a/modules/desktop_capture/desktop_frame.cc b/modules/desktop_capture/desktop_frame.cc index 2758ffa59e..eaee0aa26d 100644 --- a/modules/desktop_capture/desktop_frame.cc +++ b/modules/desktop_capture/desktop_frame.cc @@ -69,8 +69,13 @@ DesktopRect DesktopFrame::rect() const { float DesktopFrame::scale_factor() const { float scale = 1.0f; + +#if defined(WEBRTC_MAC) + // 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()) scale = dpi().x() / kStandardDPI; +#endif return scale; } diff --git a/modules/desktop_capture/desktop_frame.h b/modules/desktop_capture/desktop_frame.h index 5c595a58e1..ef5ed7226f 100644 --- a/modules/desktop_capture/desktop_frame.h +++ b/modules/desktop_capture/desktop_frame.h @@ -22,7 +22,7 @@ namespace webrtc { -const int kStandardDPI = 96; +const float kStandardDPI = 96.0f; // DesktopFrame represents a video frame captured from the screen. class RTC_EXPORT DesktopFrame {