Skip to content

Commit

Permalink
Bug 1766646 - Vendor libwebrtc from f8775cf269
Browse files Browse the repository at this point in the history
Upstream commit: https://webrtc.googlesource.com/src/+/f8775cf269ee1495a357ac4e4f03ebe9f47e1651
    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 <[email protected]>
    Commit-Queue: Jeroen Dhollander <[email protected]>
    Cr-Commit-Position: refs/heads/main@{#36597}
  • Loading branch information
mfromanmoz authored and cgsheeh committed Aug 30, 2022
1 parent 5fe17b1 commit cd9dcf8
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 2 deletions.
3 changes: 3 additions & 0 deletions third_party/libwebrtc/README.moz-ff-commit
Original file line number Diff line number Diff line change
Expand Up @@ -13329,3 +13329,6 @@ ed21d96e13
# MOZ_LIBWEBRTC_SRC=/home/mfroman/git-checkouts/trial-webrtc-builds/moz-libwebrtc-checkout/src MOZ_LIBWEBRTC_COMMIT=mjfdev bash dom/media/webrtc/third_party_build/fast-forward-libwebrtc.sh
# base of lastest vendoring
edbaf57bd4
# MOZ_LIBWEBRTC_SRC=/home/mfroman/git-checkouts/trial-webrtc-builds/moz-libwebrtc-checkout/src MOZ_LIBWEBRTC_COMMIT=mjfdev bash dom/media/webrtc/third_party_build/fast-forward-libwebrtc.sh
# base of lastest vendoring
f8775cf269
2 changes: 2 additions & 0 deletions third_party/libwebrtc/README.mozilla
Original file line number Diff line number Diff line change
Expand Up @@ -8898,3 +8898,5 @@ libwebrtc updated from /home/mfroman/git-checkouts/trial-webrtc-builds/moz-libwe
libwebrtc updated from /home/mfroman/git-checkouts/trial-webrtc-builds/moz-libwebrtc-checkout/src commit mjfdev on 2022-07-13T18:58:11.746777.
# python3 vendor-libwebrtc.py --from-local /home/mfroman/git-checkouts/trial-webrtc-builds/moz-libwebrtc-checkout/src --commit mjfdev libwebrtc
libwebrtc updated from /home/mfroman/git-checkouts/trial-webrtc-builds/moz-libwebrtc-checkout/src commit mjfdev on 2022-07-13T18:58:53.750894.
# python3 vendor-libwebrtc.py --from-local /home/mfroman/git-checkouts/trial-webrtc-builds/moz-libwebrtc-checkout/src --commit mjfdev libwebrtc
libwebrtc updated from /home/mfroman/git-checkouts/trial-webrtc-builds/moz-libwebrtc-checkout/src commit mjfdev on 2022-07-13T18:59:33.589540.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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())
Expand Down

0 comments on commit cd9dcf8

Please sign in to comment.