Skip to content

Commit

Permalink
Fix flipped screen sharing on ARC.
Browse files Browse the repository at this point in the history
This is a follow-up fix of crrev.com/c/4763084.

Because the change changed the source from bottom-left
origin to top-left origin but did not change the
consumer (Android screen sharing API which already
assumed top-left), we had to set flip_output=false.

I guess flipped_source doesn't matter because in
ARC screen capture we always copy the whole rectangle,
but IIUC in the latest code, top/bottom is not flipped,
so I hope setting false here is correct.

BUG=b:299865404
TEST=try screen sharing Discord ARC app.

(cherry picked from commit 7d5c684)

Change-Id: Iae032147201920397d915c859215a197e23db841
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4938259
Reviewed-by: Yuichiro Hanada <yhanada@chromium.org>
Commit-Queue: Kazuhiro Inaba <kinaba@chromium.org>
Auto-Submit: Kazuhiro Inaba <kinaba@chromium.org>
Cr-Original-Commit-Position: refs/heads/main@{#1210042}
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4951010
Commit-Queue: Yuichiro Hanada <yhanada@chromium.org>
Cr-Commit-Position: refs/branch-heads/5993@{#1331}
Cr-Branched-From: 5113507-refs/heads/main@{#1192594}
  • Loading branch information
Kazuhiro Inaba authored and Chromium LUCI CQ committed Oct 17, 2023
1 parent fa6aa76 commit a8ecc9d
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -134,8 +134,8 @@ ArcScreenCaptureSession::Initialize(content::DesktopMediaID desktop_id,
scaler_ = gl_helper_->CreateScaler(
gpu::GLHelper::ScalerQuality::SCALER_QUALITY_GOOD,
gfx::Vector2d(desktop_size.width(), desktop_size.height()),
gfx::Vector2d(size_.width(), size_.height()), /*flipped_source=*/true,
/*flip_output=*/true, /*swizzle=*/false);
gfx::Vector2d(size_.width(), size_.height()), /*flipped_source=*/false,
/*flip_output=*/false, /*swizzle=*/false);

display_root_window_->GetHost()->compositor()->AddAnimationObserver(this);

Expand Down

0 comments on commit a8ecc9d

Please sign in to comment.