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

Unified Diff: ash/display/display_info.cc

Issue 1289043002: Hookup device dpi for ChromeOS (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: use 96 for black listed displays Created 5 years, 3 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
Index: ash/display/display_info.cc
diff --git a/ash/display/display_info.cc b/ash/display/display_info.cc
index 45b047fa1e6acda1a60c2438e2bfa82ca5c39fb0..2d182715db87b1f60ab7a8f786f585dbd5d0179e 100644
--- a/ash/display/display_info.cc
+++ b/ash/display/display_info.cc
@@ -29,6 +29,7 @@ const int64 kSynthesizedDisplayIdStart = 2200000000LL;
int64 synthesized_display_id = kSynthesizedDisplayIdStart;
+const float kDpi96 = 96.0;
bool use_125_dsf_for_ui_scaling = true;
// Check the content of |spec| and fill |bounds| and |device_scale_factor|.
@@ -237,29 +238,27 @@ DisplayInfo::DisplayInfo()
has_overscan_(false),
touch_support_(gfx::Display::TOUCH_SUPPORT_UNKNOWN),
device_scale_factor_(1.0f),
+ device_dpi_(kDpi96),
overscan_insets_in_dip_(0, 0, 0, 0),
configured_ui_scale_(1.0f),
native_(false),
is_aspect_preserving_scaling_(false),
clear_overscan_insets_(false),
- color_profile_(ui::COLOR_PROFILE_STANDARD) {
-}
+ color_profile_(ui::COLOR_PROFILE_STANDARD) {}
-DisplayInfo::DisplayInfo(int64 id,
- const std::string& name,
- bool has_overscan)
+DisplayInfo::DisplayInfo(int64 id, const std::string& name, bool has_overscan)
: id_(id),
name_(name),
has_overscan_(has_overscan),
touch_support_(gfx::Display::TOUCH_SUPPORT_UNKNOWN),
device_scale_factor_(1.0f),
+ device_dpi_(kDpi96),
overscan_insets_in_dip_(0, 0, 0, 0),
configured_ui_scale_(1.0f),
native_(false),
is_aspect_preserving_scaling_(false),
clear_overscan_insets_(false),
- color_profile_(ui::COLOR_PROFILE_STANDARD) {
-}
+ color_profile_(ui::COLOR_PROFILE_STANDARD) {}
DisplayInfo::~DisplayInfo() {
}
@@ -291,6 +290,7 @@ void DisplayInfo::Copy(const DisplayInfo& native_info) {
device_scale_factor_ = native_info.device_scale_factor_;
DCHECK(!native_info.bounds_in_native_.IsEmpty());
bounds_in_native_ = native_info.bounds_in_native_;
+ device_dpi_ = native_info.device_dpi_;
size_in_pixel_ = native_info.size_in_pixel_;
is_aspect_preserving_scaling_ = native_info.is_aspect_preserving_scaling_;
display_modes_ = native_info.display_modes_;

Powered by Google App Engine
This is Rietveld 408576698