[Overlay] Hinge Window-Viewport scale incorrectly applied
This CL fixes an issue where hinge is shifted when a user changes screen setting. For example in Windows, when a user increases "the size of text, apps and other items" in display setting. The hinge is displaced. Cause: Tools::Draw function takes a windows to view port scale. Hinge copied the logic from HighlightQuad. It draws a quad, whose calculation applies the scale. It really shouldn't as the hinge's geometric parameters by px is measured not in the device world. Like the the width and height of the device, they are measured in the windows/chrome client world. Fix: create the quad using a scale of 1. Before image (annotated with the window-viewport scale and emulation scale factor): https://imgur.com/XCLBdRL Hinge is shifted by window-viewport scale:1.5. After image: 1) Same situation as above: https://imgur.com/XUBdYvb 2) manually chosen emulation scale with scrolling and zooming: https: //imgur.com/e2dTaIX Change-Id: Id1237748d2f41ef5aecd8374c4457e3205d6a91d Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2202121Reviewed-by:Yang Guo <yangguo@chromium.org> Reviewed-by:
Brandon Goddard <brgoddar@microsoft.com> Commit-Queue: Songtao Xia <soxia@microsoft.com> Cr-Commit-Position: refs/heads/master@{#774212}
Showing
Please register or sign in to comment