Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2104)

Unified Diff: ash/display/display_info.h

Issue 230683003: Allow upgrading to 2x DSF for lower UI scale when 2x resoruces are available. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | ash/display/display_info.cc » ('j') | ash/display/display_info.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/display/display_info.h
diff --git a/ash/display/display_info.h b/ash/display/display_info.h
index 51f570a12a45b17ca1ee3e877b7aab282c2067da..e3958a24cf5fee7541e29453cb4a0b4178702cf7 100644
--- a/ash/display/display_info.h
+++ b/ash/display/display_info.h
@@ -81,6 +81,11 @@ class ASH_EXPORT DisplayInfo {
DisplayInfo(int64 id, const std::string& name, bool has_overscan);
~DisplayInfo();
+ // When this is set to true, Chrome switches High DPI when lower UI scale
+ // (<1.0f) is specificed on 1x device to make UI sharp, e.g, upgrade 0.6
Jun Mukai 2014/04/09 18:16:40 typo: specified?
oshima 2014/04/10 14:22:22 Done.
+ // scale on 1x DSF to 1.2 scale on 2x DSF.
+ static void SetAllowUpgradeToHighDPI(bool enable);
+
int64 id() const { return id_; }
// The name of the display.
@@ -123,9 +128,15 @@ class ASH_EXPORT DisplayInfo {
float configured_ui_scale() const { return configured_ui_scale_; }
void set_configured_ui_scale(float scale) { configured_ui_scale_ = scale; }
- // Returns the ui scale used for the device scale factor. This
- // return 1.0f if the ui scale and dsf are both set to 2.0.
+ // Returns the ui scale and device scale factor actually used to create
+ // display that chrome sees. This can be different from one obtained
+ // from dispaly or one specified by a user in following situation.
+ // 1) DSF is 2.0f and UI scale is 2.0f. (Returns 1.0f and 1.0f respectiely)
+ // 2) Lower UI scale (< 1.0) is specified on 1.0f DSF
+ // when 2x resources is available. (Returns 2.0f + 1.2f for 1.0DSF + 0.6
+ // ui scale) so that chrome can use 2x resoruces.
float GetEffectiveUIScale() const;
+ float GetEffectiveDeviceScaleFactor() const;
Jun Mukai 2014/04/09 18:16:40 a bit confused because the order of declaration of
oshima 2014/04/10 14:22:22 Fixed the comment.
// Copy the display info except for fields that can be modified by a
// user (|rotation_| and |configured_ui_scale_|). |rotation_| and
« no previous file with comments | « no previous file | ash/display/display_info.cc » ('j') | ash/display/display_info.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698