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

Unified Diff: ui/gfx/platform_font_linux.cc

Issue 1870873003: Remove screen dependency from font_render_params_linux (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
Index: ui/gfx/platform_font_linux.cc
diff --git a/ui/gfx/platform_font_linux.cc b/ui/gfx/platform_font_linux.cc
index 3c58ccb695b3c313a5985c550dc164cc7afb401c..dba65947477f9f4fd96bc975bbfd79b1a4805266 100644
--- a/ui/gfx/platform_font_linux.cc
+++ b/ui/gfx/platform_font_linux.cc
@@ -196,7 +196,6 @@ int PlatformFontLinux::GetFontSize() const {
}
const FontRenderParams& PlatformFontLinux::GetFontRenderParams() {
-#if defined(OS_CHROMEOS)
float current_scale_factor = GetFontRenderParamsDeviceScaleFactor();
if (current_scale_factor != device_scale_factor_) {
FontRenderParamsQuery query;
@@ -207,7 +206,6 @@ const FontRenderParams& PlatformFontLinux::GetFontRenderParams() {
font_render_params_ = gfx::GetFontRenderParams(query, nullptr);
device_scale_factor_ = current_scale_factor;
}
-#endif
return font_render_params_;
}
@@ -237,9 +235,7 @@ void PlatformFontLinux::InitFromDetails(
font_size_pixels_ = font_size_pixels;
style_ = style;
-#if defined(OS_CHROMEOS)
device_scale_factor_ = GetFontRenderParamsDeviceScaleFactor();
-#endif
font_render_params_ = render_params;
}
@@ -249,9 +245,7 @@ void PlatformFontLinux::InitFromPlatformFont(const PlatformFontLinux* other) {
font_family_ = other->font_family_;
font_size_pixels_ = other->font_size_pixels_;
style_ = other->style_;
-#if defined(OS_CHROMEOS)
device_scale_factor_ = other->device_scale_factor_;
-#endif
font_render_params_ = other->font_render_params_;
if (!other->metrics_need_computation_) {

Powered by Google App Engine
This is Rietveld 408576698