Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(24)

Issue 2441723004: [Android][Client] Updating the calculations used for image overpanning (Closed)

Created:
4 years, 2 months ago by joedow
Modified:
4 years, 1 month ago
Reviewers:
Yuwei, *Lambros
CC:
chromium-reviews, agrieve+watch_chromium.org, chromoting-reviews_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Updating the calculations used for image overpanning This CL simplifies the calculations used for panning the remote desktop image out from under the System UI. It also constrains the cursor to the image coordinates vs. the previous method which did not. The old approach I used was to allow overpanning the remote desktop image by adjusting the boundaries of the image. This worked reasonably well but had one side effect for cursor mode as it meant the cursor arrow could be rendered outside of the actual image dimensions. Functionally this was fine as it was still constrained on the remote system but visually it was not optimal. The new approach is to use accurate boundaries for the cursor and viewport but instead accumulate an offset value (mViewportOffset) when the user tries to 'overpan' the image past its boundaries. The effect is that the cursor is still constrained to the image but we can move the image further in either dimension to ensure they can interact with it. Once the System UI disappears, we run a per-frame animation to reduce the offset and reposition/render the remote image. The effect is that the image slides back into view quickly which is much cleaner than the snapping effect we would have if we allowed Android to reposition the view. BUG=653309 Committed: https://crrev.com/95ccb26c84a537f696b374097f7050d472fba289 Cr-Commit-Position: refs/heads/master@{#427462}

Patch Set 1 #

Patch Set 2 : Pre-CR cleanup #

Total comments: 18

Patch Set 3 : Addressing CR Feedback #

Total comments: 8

Patch Set 4 : Addressing feedback #

Total comments: 8

Patch Set 5 : Addressing feedback and merging with ToT #

Unified diffs Side-by-side diffs Delta from patch set Stats (+221 lines, -151 lines) Patch
M remoting/android/java/src/org/chromium/chromoting/DesktopCanvas.java View 1 2 3 4 10 chunks +221 lines, -151 lines 0 comments Download

Messages

Total messages: 40 (28 generated)
joedow
PTAL!
4 years, 1 month ago (2016-10-24 19:08:20 UTC) #11
Lambros
https://codereview.chromium.org/2441723004/diff/20001/remoting/android/java/src/org/chromium/chromoting/DesktopCanvas.java File remoting/android/java/src/org/chromium/chromoting/DesktopCanvas.java (right): https://codereview.chromium.org/2441723004/diff/20001/remoting/android/java/src/org/chromium/chromoting/DesktopCanvas.java#newcode16 remoting/android/java/src/org/chromium/chromoting/DesktopCanvas.java:16: private static final float EPSILON = 0.0001f; Does this ...
4 years, 1 month ago (2016-10-24 22:20:33 UTC) #14
Lambros
https://codereview.chromium.org/2441723004/diff/20001/remoting/android/java/src/org/chromium/chromoting/DesktopCanvas.java File remoting/android/java/src/org/chromium/chromoting/DesktopCanvas.java (right): https://codereview.chromium.org/2441723004/diff/20001/remoting/android/java/src/org/chromium/chromoting/DesktopCanvas.java#newcode230 remoting/android/java/src/org/chromium/chromoting/DesktopCanvas.java:230: if (mAdjustViewportSizeForSystemUi && !mSystemUiScreenSize.isEmpty()) { You're calling isEmpty() on ...
4 years, 1 month ago (2016-10-24 22:37:28 UTC) #15
joedow
PTAL! https://codereview.chromium.org/2441723004/diff/20001/remoting/android/java/src/org/chromium/chromoting/DesktopCanvas.java File remoting/android/java/src/org/chromium/chromoting/DesktopCanvas.java (right): https://codereview.chromium.org/2441723004/diff/20001/remoting/android/java/src/org/chromium/chromoting/DesktopCanvas.java#newcode16 remoting/android/java/src/org/chromium/chromoting/DesktopCanvas.java:16: private static final float EPSILON = 0.0001f; On ...
4 years, 1 month ago (2016-10-25 02:28:19 UTC) #16
Yuwei
Some drive-by comments... Didn't carefully read how the transformation works so please wait for Lambros' ...
4 years, 1 month ago (2016-10-25 08:25:26 UTC) #21
joedow
PTAL! https://codereview.chromium.org/2441723004/diff/40001/remoting/android/java/src/org/chromium/chromoting/DesktopCanvas.java File remoting/android/java/src/org/chromium/chromoting/DesktopCanvas.java (right): https://codereview.chromium.org/2441723004/diff/40001/remoting/android/java/src/org/chromium/chromoting/DesktopCanvas.java#newcode37 remoting/android/java/src/org/chromium/chromoting/DesktopCanvas.java:37: private PointF mCursorPosition = new PointF(); On 2016/10/25 ...
4 years, 1 month ago (2016-10-25 16:49:50 UTC) #23
Yuwei
LGTM for my comments. Thanks! https://codereview.chromium.org/2441723004/diff/40001/remoting/android/java/src/org/chromium/chromoting/DesktopCanvas.java File remoting/android/java/src/org/chromium/chromoting/DesktopCanvas.java (right): https://codereview.chromium.org/2441723004/diff/40001/remoting/android/java/src/org/chromium/chromoting/DesktopCanvas.java#newcode409 remoting/android/java/src/org/chromium/chromoting/DesktopCanvas.java:409: mViewportOffset.set(mViewportOffset.x * VIEWPORT_OFFSET_REDUCTION_FACTOR, On ...
4 years, 1 month ago (2016-10-25 18:19:59 UTC) #27
Lambros
lgtm https://codereview.chromium.org/2441723004/diff/60001/remoting/android/java/src/org/chromium/chromoting/DesktopCanvas.java File remoting/android/java/src/org/chromium/chromoting/DesktopCanvas.java (right): https://codereview.chromium.org/2441723004/diff/60001/remoting/android/java/src/org/chromium/chromoting/DesktopCanvas.java#newcode237 remoting/android/java/src/org/chromium/chromoting/DesktopCanvas.java:237: * Returns the center position of the viewport ...
4 years, 1 month ago (2016-10-25 19:26:31 UTC) #28
joedow
Thanks! https://codereview.chromium.org/2441723004/diff/60001/remoting/android/java/src/org/chromium/chromoting/DesktopCanvas.java File remoting/android/java/src/org/chromium/chromoting/DesktopCanvas.java (right): https://codereview.chromium.org/2441723004/diff/60001/remoting/android/java/src/org/chromium/chromoting/DesktopCanvas.java#newcode237 remoting/android/java/src/org/chromium/chromoting/DesktopCanvas.java:237: * Returns the center position of the viewport ...
4 years, 1 month ago (2016-10-25 20:12:06 UTC) #31
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2441723004/80001
4 years, 1 month ago (2016-10-25 20:48:11 UTC) #36
commit-bot: I haz the power
Committed patchset #5 (id:80001)
4 years, 1 month ago (2016-10-25 20:54:22 UTC) #38
commit-bot: I haz the power
4 years, 1 month ago (2016-10-25 20:57:17 UTC) #40
Message was sent while issue was closed.
Patchset 5 (id:??) landed as
https://crrev.com/95ccb26c84a537f696b374097f7050d472fba289
Cr-Commit-Position: refs/heads/master@{#427462}

Powered by Google App Engine
This is Rietveld 408576698