Chromium Code Reviews| Index: ui/gfx/font_render_params_linux.cc |
| diff --git a/ui/gfx/font_render_params_linux.cc b/ui/gfx/font_render_params_linux.cc |
| index 5e30f4dd947acf73a05e435d2dfe8420bdfd0aeb..e997f6c1bb3f092e7a62879efe32c34393584ecb 100644 |
| --- a/ui/gfx/font_render_params_linux.cc |
| +++ b/ui/gfx/font_render_params_linux.cc |
| @@ -6,6 +6,7 @@ |
| #include "base/command_line.h" |
| #include "base/logging.h" |
| +#include "ui/gfx/display.h" |
| #include "ui/gfx/switches.h" |
| #if defined(TOOLKIT_GTK) |
| @@ -23,10 +24,15 @@ namespace gfx { |
| namespace { |
| bool SubpixelPositioningRequested(bool renderer) { |
| - return CommandLine::ForCurrentProcess()->HasSwitch( |
| - renderer ? |
| - switches::kEnableWebkitTextSubpixelPositioning : |
| - switches::kEnableBrowserTextSubpixelPositioning); |
| + if (renderer) { |
| + return CommandLine::ForCurrentProcess()->HasSwitch( |
| + switches::kEnableWebkitTextSubpixelPositioning) || |
| + (Display::HasForceDeviceScaleFactor() && |
| + Display::GetForcedDeviceScaleFactor() != 1.0); |
| + } else { |
|
oshima
2014/04/09 20:11:46
optional nit: you can omit else.
Daniel Erat
2014/04/09 20:14:41
Done.
|
| + return CommandLine::ForCurrentProcess()->HasSwitch( |
| + switches::kEnableBrowserTextSubpixelPositioning); |
| + } |
| } |
| // Initializes |params| with the system's default settings. |renderer| is true |