diff options
author | oshima@chromium.org <oshima@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-09-23 23:19:15 +0000 |
---|---|---|
committer | oshima@chromium.org <oshima@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-09-23 23:19:15 +0000 |
commit | a60fc623767a05d5bdc28806bcad2cd2ec6b68c6 (patch) | |
tree | 6afee5839acc56d6d8817696498d0f5f590e8fc4 /ash/display/display_info.h | |
parent | ec860d3e0cbeb59420b3e52634443e37db53249b (diff) | |
download | chromium_src-a60fc623767a05d5bdc28806bcad2cd2ec6b68c6.zip chromium_src-a60fc623767a05d5bdc28806bcad2cd2ec6b68c6.tar.gz chromium_src-a60fc623767a05d5bdc28806bcad2cd2ec6b68c6.tar.bz2 |
Rename DisplayInfo::bounds_in_pixel -> bounds_in_native
because "pixel" is virtual and no longer correspond to
physical pixel.
Update comments.
BUG=273142
R=derat@chromium.org
TBR=mukai@chromium.org
Review URL: https://codereview.chromium.org/23757064
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@224831 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ash/display/display_info.h')
-rw-r--r-- | ash/display/display_info.h | 33 |
1 files changed, 22 insertions, 11 deletions
diff --git a/ash/display/display_info.h b/ash/display/display_info.h index 57f250d..e81ad17 100644 --- a/ash/display/display_info.h +++ b/ash/display/display_info.h @@ -93,10 +93,10 @@ class ASH_EXPORT DisplayInfo { float device_scale_factor() const { return device_scale_factor_; } void set_device_scale_factor(float scale) { device_scale_factor_ = scale; } - // The bounds_in_pixel for the display. The size of this can be different from - // the |size_in_pixel| in case of overscan insets. - const gfx::Rect bounds_in_pixel() const { - return bounds_in_pixel_; + // The native bounds for the display. The size of this can be different from + // the |size_in_pixel| when overscan insets are set and/or |ui_scale_| is set. + const gfx::Rect bounds_in_native() const { + return bounds_in_native_; } // The size for the display in pixels. @@ -115,11 +115,11 @@ class ASH_EXPORT DisplayInfo { // when the |another_info| isn't native one. void Copy(const DisplayInfo& another_info); - // Update the |bounds_in_pixel_| and |size_in_pixel_| using - // given |bounds_in_pixel|. - void SetBounds(const gfx::Rect& bounds_in_pixel); + // Update the |bounds_in_native_| and |size_in_pixel_| using + // given |bounds_in_native|. + void SetBounds(const gfx::Rect& bounds_in_native); - // Update the |bounds_in_pixel| according to the current overscan + // Update the |bounds_in_native| according to the current overscan // and rotation settings. void UpdateDisplaySize(); @@ -150,14 +150,25 @@ class ASH_EXPORT DisplayInfo { std::string name_; bool has_overscan_; gfx::Display::Rotation rotation_; + + // This specifies the device's pixel density. (For example, a + // display whose DPI is higher than the threshold is considered to have + // device_scale_factor = 2.0 on Chrome OS). This is used by the + // grapics layer to choose and draw appropriate images and scale + // layers properly. float device_scale_factor_; - gfx::Rect bounds_in_pixel_; + gfx::Rect bounds_in_native_; + // The size of the display in use. The size can be different from the size - // of |bounds_in_pixel_| if the display has overscan insets and/or rotation. + // of |bounds_in_native_| if the display has overscan insets and/or rotation. gfx::Size size_in_pixel_; gfx::Insets overscan_insets_in_dip_; - // UI scale of the display. + // The pixel scale of the display. This is used to simply expand (or + // shrink) the desktop over the native display resolution (useful in + // HighDPI display). Note that this should not be confused with the + // device scale factor, which specifies the pixel density of the + // display. float ui_scale_; // True if this comes from native platform (DisplayChangeObserver). |