Fix Views bug causing layers to get stuck at 100% DPI pixel boundaries
This patch fixes logic for snapping layers to physical pixel boundaries, when pixel canvas is not enabled, by allowing the subpixel offset to be dynamically computed. Previously, layers could get stuck at 100% DPI pixel boundaries (making some UI blurry on platforms where fractional scale factors are used, e.g. Windows), as once an explicit value was set, the offset would no longer be dynamically computed. This patch - Updates SnapLayerToPixelBoundary to stop View from setting explicit subpixel offsets for non-pixel-canvas platforms so that they may be auto computed. - Updates view_unittest. Bug: 992730 Change-Id: I8e8c87107f13157e92f125bcfb281226ebc6c422 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1761301Reviewed-by:Malay Keshav <malaykeshav@chromium.org> Reviewed-by:
Scott Violet <sky@chromium.org> Commit-Queue: Brian Liu Xu <brx@microsoft.com> Auto-Submit: Brian Liu Xu <brx@microsoft.com> Cr-Commit-Position: refs/heads/master@{#689171}
Showing
Please register or sign in to comment