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

Unified Diff: ui/gfx/font_render_params_linux_unittest.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 | « ui/gfx/font_render_params_linux.cc ('k') | ui/gfx/switches.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/font_render_params_linux_unittest.cc
diff --git a/ui/gfx/font_render_params_linux_unittest.cc b/ui/gfx/font_render_params_linux_unittest.cc
index f89c3967067535c521260ccac86a03eff8b8a5dc..46c82b44f6c9d9c8cfdbaed02b37d6f65dc64b9f 100644
--- a/ui/gfx/font_render_params_linux_unittest.cc
+++ b/ui/gfx/font_render_params_linux_unittest.cc
@@ -273,6 +273,28 @@ TEST_F(FontRenderParamsTest, ForceFullHintingWhenAntialiasingIsDisabled) {
EXPECT_FALSE(params.subpixel_positioning);
}
+#if defined(OS_CHROMEOS)
+TEST_F(FontRenderParamsTest, ForceSubpixelPositioning) {
+ {
+ FontRenderParams params =
+ GetFontRenderParams(FontRenderParamsQuery(false), NULL);
+ EXPECT_TRUE(params.antialiasing);
+ EXPECT_FALSE(params.subpixel_positioning);
+ SetFontRenderParamsDeviceScaleFactor(1.0f);
+ }
+ ClearFontRenderParamsCacheForTest();
+ SetFontRenderParamsDeviceScaleFactor(1.25f);
+ // Subpixel positioning should be forced.
+ {
+ FontRenderParams params =
+ GetFontRenderParams(FontRenderParamsQuery(false), NULL);
+ EXPECT_TRUE(params.antialiasing);
+ EXPECT_TRUE(params.subpixel_positioning);
+ SetFontRenderParamsDeviceScaleFactor(1.0f);
+ }
+}
+#endif
+
TEST_F(FontRenderParamsTest, OnlySetConfiguredValues) {
// Configure the LinuxFontDelegate (which queries GtkSettings on desktop
// Linux) to request subpixel rendering.
« no previous file with comments | « ui/gfx/font_render_params_linux.cc ('k') | ui/gfx/switches.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698