Chromium Code Reviews
DescriptionUpdating 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
Review-Url: https://codereview.chromium.org/2441723004
Cr-Commit-Position: refs/heads/master@{#427462}
(cherry picked from commit 95ccb26c84a537f696b374097f7050d472fba289)
Committed: https://chromium.googlesource.com/chromium/src/+/ab6933c26cf444f61413983fb56b8700166af6a8
Patch Set 1 #
Messages
Total messages: 2 (1 generated)
|
|||||||||||||||||||