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

Unified Diff: ash/display/display_manager.cc

Issue 485873002: Enable subpixel positioning for internal display with dsf larger than 1.0 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: addressed Created 6 years, 4 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_manager.h ('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 6d64f36f3cb52edc65deb311155e45b273cf9991..f3b7a20a2dc0fb45660ec5a2b253d278a966fad6 100644
--- a/ash/display/display_manager.cc
+++ b/ash/display/display_manager.cc
@@ -29,6 +29,7 @@
#include "ui/base/resource/resource_bundle.h"
#include "ui/gfx/display.h"
#include "ui/gfx/display_observer.h"
+#include "ui/gfx/font_render_params.h"
#include "ui/gfx/rect.h"
#include "ui/gfx/screen.h"
#include "ui/gfx/size_conversions.h"
@@ -183,6 +184,10 @@ DisplayManager::DisplayManager()
}
DisplayManager::~DisplayManager() {
+#if defined(OS_CHROMEOS)
+ // Reset the font params.
+ gfx::SetFontRenderParamsDeviceScaleFactor(1.0f);
+#endif
}
// static
@@ -262,6 +267,17 @@ void DisplayManager::InitDefaultDisplay() {
OnNativeDisplaysChanged(info_list);
}
+void DisplayManager::InitFontParams() {
+#if defined(OS_CHROMEOS)
+ if (!HasInternalDisplay())
+ return;
+ const DisplayInfo& display_info =
+ GetDisplayInfo(gfx::Display::InternalDisplayId());
+ gfx::SetFontRenderParamsDeviceScaleFactor(
+ display_info.device_scale_factor());
+#endif // OS_CHROMEOS
+}
+
// static
void DisplayManager::UpdateDisplayBoundsForLayoutById(
const DisplayLayout& layout,
« no previous file with comments | « ash/display/display_manager.h ('k') | ash/display/display_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698