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

Unified Diff: ash/display/display_manager.cc

Issue 578553002: Use DSF instead of UI scale if the native DSF is 1.25 and UI Scale is 0.8x (dsf=1.25 equivalent) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove upgrade Created 6 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
« no previous file with comments | « ash/display/display_info.cc ('k') | ash/display/display_manager_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/display/display_manager.cc
diff --git a/ash/display/display_manager.cc b/ash/display/display_manager.cc
index 29eced4cc03ec6eee89c4e70a04ad674edb7a05b..126a3169b87c7f3f4e0305a13e11ca9bdb3beba3 100644
--- a/ash/display/display_manager.cc
+++ b/ash/display/display_manager.cc
@@ -168,10 +168,6 @@ DisplayManager::DisplayManager()
#if defined(OS_CHROMEOS)
change_display_upon_host_resize_ = !base::SysInfo::IsRunningOnChromeOS();
#endif
- DisplayInfo::SetAllowUpgradeToHighDPI(
- ui::ResourceBundle::GetSharedInstance().GetMaxScaleFactor() ==
- ui::SCALE_FACTOR_200P);
-
oshima 2014/09/16 17:11:42 I also want to remove this, as installing 2x asset
Jun Mukai 2014/09/16 18:18:56 Removing this means allow_upgrade_to_high_dpi neve
oshima 2014/09/16 18:47:15 Pixel doesn't rely on this as its dfs is 2x.
gfx::Screen::SetScreenInstance(gfx::SCREEN_TYPE_ALTERNATE,
screen_ash_.get());
gfx::Screen* current_native =
@@ -252,6 +248,7 @@ bool DisplayManager::InitFromCommandLine() {
for (vector<string>::const_iterator iter = parts.begin();
iter != parts.end(); ++iter) {
info_list.push_back(DisplayInfo::CreateFromSpec(*iter));
+ info_list.back().set_native(true);
}
MaybeInitInternalDisplay(info_list[0].id());
if (info_list.size() > 1 &&
@@ -265,6 +262,7 @@ bool DisplayManager::InitFromCommandLine() {
void DisplayManager::InitDefaultDisplay() {
DisplayInfoList info_list;
info_list.push_back(DisplayInfo::CreateFromSpec(std::string()));
+ info_list.back().set_native(true);
MaybeInitInternalDisplay(info_list[0].id());
OnNativeDisplaysChanged(info_list);
}
@@ -276,7 +274,7 @@ void DisplayManager::InitFontParams() {
const DisplayInfo& display_info =
GetDisplayInfo(gfx::Display::InternalDisplayId());
gfx::SetFontRenderParamsDeviceScaleFactor(
- display_info.device_scale_factor());
+ display_info.GetEffectiveDeviceScaleFactor());
#endif // OS_CHROMEOS
}
« no previous file with comments | « ash/display/display_info.cc ('k') | ash/display/display_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698