New issue
Advanced search Search tips

Issue 845634 link

Starred by 4 users

Issue metadata

Status: Fixed
Owner:
Closed: May 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 1
Type: Bug



Sign in to add a comment

Improve logic to list zoom levels for displays

Project Member Reported by malaykeshav@chromium.org, May 22 2018

Issue description

Right now the zoom levels that we present to the users have a lot of values that are never used, and also a lot of values that the users demand. We should improve the list of zoom levels we provide to the users.


Proposal: We use different logic based on whether the display has device scale factor set or not.
1) Displays with device scale factors assigned to them, will now have
   zoom values ranging from the inverse of device scale factor to
   device scale factor. If there are still slider ticks avaiable we use
   them to add zoom levels beyond the device scale factor.
   Doing this allows the user to go to the native resolution of the
   display and on the other hand it also allows them to zoom in if
   required. We no longer allow the user to go to a zoom below the native
   resolution of the display as this is a very unlikely scenario and
   introduces artifacts. This also gives finer control to the user in
   setting the zoom level.
   How this effects a pixelbook for example?
   On pixelbook we used to have a zoom range of 50% to 175%. Due to the 
   wide range, the consecutive values were too far apart and users wanted 
   zoom values that were mostly in the range of 70% to 100%.
   With the new change, the range will go from 50% to 130%. 

2) Displays with no device scale factors assigned to them will use the 
   old logic. However, Instead of going from 50% to 200%, we no only go
   1 or 2 ticks below 100%. We also reduce the range of zoom levels.
   For example, 1080p displays had a zoom range from 55% to 175%, which
   now is 85% to 205%. This gives user more options of usable zoom
   levels.
 
Cc: afakhry@chromium.org
New Zoom values for external displays: (Native & Best is 1.f)
1280 - {0.90, 1.00, 1.10, 1.20, 1.30, 1.40, 1.50, 1.60, 1.70},
1366 - {0.90, 1.00, 1.10, 1.20, 1.30, 1.40, 1.50, 1.60, 1.70},
1440 - {0.90, 1.00, 1.10, 1.20, 1.30, 1.40, 1.50, 1.60, 1.70},
1600 - {0.85, 1.00, 1.15, 1.30, 1.45, 1.60, 1.75, 1.90, 2.05},
1920 - {0.85, 1.00, 1.15, 1.30, 1.45, 1.60, 1.75, 1.90, 2.05},
2160 - {0.85, 1.00, 1.15, 1.30, 1.45, 1.60, 1.75, 1.90, 2.05},
2400 - {0.85, 1.00, 1.15, 1.30, 1.45, 1.60, 1.75, 1.90, 2.05},
2560 - {0.85, 1.00, 1.15, 1.30, 1.45, 1.60, 1.75, 1.90, 2.05},
2880 - {0.85, 1.00, 1.15, 1.30, 1.45, 1.60, 1.75, 1.90, 2.05},
3200 - {0.85, 1.00, 1.15, 1.30, 1.45, 1.60, 1.75, 1.90, 2.05},
3840 - {1.00, 1.20, 1.40, 1.60, 1.80, 2.00, 2.20, 2.40, 2.60},
4096 - {1.00, 1.25, 1.50, 1.75, 2.00, 2.25, 2.50, 2.75, 3.00},
5120 - {1.00, 1.25, 1.50, 1.75, 2.00, 2.25, 2.50, 2.75, 3.00},
7680 - {1.00, 1.25, 1.50, 1.75, 2.00, 2.25, 2.50, 2.75, 3.00},
8192 - {1.00, 1.25, 1.50, 1.75, 2.00, 2.25, 2.50, 2.75, 3.00}

Zoom values for internal displays with dsf: (Native is 1/dsf, Best is 1.f)
1.25f - {1/dsf, 0.85, 0.90, 0.95, 1.00, 1.05, 1.10, 1.15, 1.20},
1.60f - {1/dsf, 0.65, 0.70, 0.75, 0.80, 0.85, 0.90, 0.95, 1.00},
2.00f - {1/dsf, 0.60, 0.70, 0.80, 0.90, 1.00, 1.10, 1.20, 1.30},
2.25f - {1/dsf, 0.50, 0.60, 0.70, 0.80, 0.90, 1.00, 1.10, 1.20};
Description: Show this description
Project Member

Comment 4 by bugdroid1@chromium.org, May 30 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/28cc23ebe91b03db258534ccb7d6dd555605cfb6

commit 28cc23ebe91b03db258534ccb7d6dd555605cfb6
Author: Malay Keshav <malaykeshav@chromium.org>
Date: Wed May 30 23:09:14 2018

Improve list of display zoom values

This patch changes the logic the list of zoom values are computed for a
given display. The new logic has 2 scenarios for listing the zoom values
for a given display.

1) Displays with device scale factors assigned to them, will now have
   zoom values ranging from the inverse of device scale factor to
   device scale factor. If there are still slider ticks avaiable we use
   them to add zoom levels beyond the device scale factor.
   Doing this allows the user to go to the native resolution of the
   display and on the other hand it also allows them to zoom in if
   required. We no longer allow the user to go to a zoom below the native
   resolution of the display as this is a very unlikely scenario and
   introduces artifacts. This also gives finer control to the user in
   setting the zoom level.
   How this effects a pixelbook for example?
   On pixelbook we used to have a zoom range of 50% to 175%. Due to the
   wide range, the consecutive values were too far apart and users wanted
   zoom values that were mostly in the range of 70% to 100%.
   With the new change, the range will go from 50% to 130%.

2) Displays with no device scale factors assigned to them will use a
   static list of initialized zoom values.

Bug:  845634 
Change-Id: I69a761856dab4e5b37b85420f6f6dfebdb2dead5
Component: Display zoom, display util
Reviewed-on: https://chromium-review.googlesource.com/1069561
Commit-Queue: Malay Keshav <malaykeshav@chromium.org>
Reviewed-by: Ahmed Fakhry <afakhry@chromium.org>
Cr-Commit-Position: refs/heads/master@{#563050}
[modify] https://crrev.com/28cc23ebe91b03db258534ccb7d6dd555605cfb6/ash/display/cros_display_config_unittest.cc
[modify] https://crrev.com/28cc23ebe91b03db258534ccb7d6dd555605cfb6/ui/display/manager/display_util.cc
[modify] https://crrev.com/28cc23ebe91b03db258534ccb7d6dd555605cfb6/ui/display/manager/display_util.h
[modify] https://crrev.com/28cc23ebe91b03db258534ccb7d6dd555605cfb6/ui/display/manager/display_utils_unittest.cc

Labels: Merge-Request-68
Status: Fixed (was: Started)
Project Member

Comment 6 by sheriffbot@chromium.org, May 31 2018

Labels: -Merge-Request-68 Hotlist-Merge-Approved Merge-Approved-68
Your change meets the bar and is auto-approved for M68. Please go ahead and merge the CL to branch 3440 manually. Please contact milestone owner if you have questions.
Owners: cmasso@(Android), kariahda@(iOS), bhthompson@(ChromeOS), abdulsyed@(Desktop)

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Project Member

Comment 7 by bugdroid1@chromium.org, Jun 1 2018

Labels: -merge-approved-68 merge-merged-3440
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/152762cc2be06ae32579df3e7cfdd9977e0e1415

commit 152762cc2be06ae32579df3e7cfdd9977e0e1415
Author: Malay Keshav <malaykeshav@chromium.org>
Date: Fri Jun 01 00:22:56 2018

(merge) Improve list of display zoom values

This patch changes the logic the list of zoom values are computed for a
given display. The new logic has 2 scenarios for listing the zoom values
for a given display.

1) Displays with device scale factors assigned to them, will now have
   zoom values ranging from the inverse of device scale factor to
   device scale factor. If there are still slider ticks avaiable we use
   them to add zoom levels beyond the device scale factor.
   Doing this allows the user to go to the native resolution of the
   display and on the other hand it also allows them to zoom in if
   required. We no longer allow the user to go to a zoom below the native
   resolution of the display as this is a very unlikely scenario and
   introduces artifacts. This also gives finer control to the user in
   setting the zoom level.
   How this effects a pixelbook for example?
   On pixelbook we used to have a zoom range of 50% to 175%. Due to the
   wide range, the consecutive values were too far apart and users wanted
   zoom values that were mostly in the range of 70% to 100%.
   With the new change, the range will go from 50% to 130%.

2) Displays with no device scale factors assigned to them will use a
   static list of initialized zoom values.

Bug:  845634 
Change-Id: I69a761856dab4e5b37b85420f6f6dfebdb2dead5
Component: Display zoom, display util
Reviewed-on: https://chromium-review.googlesource.com/1069561
Commit-Queue: Malay Keshav <malaykeshav@chromium.org>
Reviewed-by: Ahmed Fakhry <afakhry@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#563050}(cherry picked from commit 28cc23ebe91b03db258534ccb7d6dd555605cfb6)
Reviewed-on: https://chromium-review.googlesource.com/1081688
Reviewed-by: Malay Keshav <malaykeshav@chromium.org>
Cr-Commit-Position: refs/branch-heads/3440@{#77}
Cr-Branched-From: 010ddcfda246975d194964ccf20038ebbdec6084-refs/heads/master@{#561733}
[modify] https://crrev.com/152762cc2be06ae32579df3e7cfdd9977e0e1415/ash/display/cros_display_config_unittest.cc
[modify] https://crrev.com/152762cc2be06ae32579df3e7cfdd9977e0e1415/ui/display/manager/display_util.cc
[modify] https://crrev.com/152762cc2be06ae32579df3e7cfdd9977e0e1415/ui/display/manager/display_util.h
[modify] https://crrev.com/152762cc2be06ae32579df3e7cfdd9977e0e1415/ui/display/manager/display_utils_unittest.cc

Sign in to add a comment