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

Unified Diff: ui/gfx/font_render_params_win.cc

Issue 738363002: Enable subpixel positioning for UI (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: std::round to std::floor(+0.5) Created 6 years 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 | « content/browser/browser_main_runner.cc ('k') | ui/gfx/render_text.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/font_render_params_win.cc
diff --git a/ui/gfx/font_render_params_win.cc b/ui/gfx/font_render_params_win.cc
index 70b19d2c292c1e6057b474121b44a51e989aa051..354d1b248b740e13dfa9e7a815af73f47c6abd9b 100644
--- a/ui/gfx/font_render_params_win.cc
+++ b/ui/gfx/font_render_params_win.cc
@@ -19,7 +19,7 @@ class CachedFontRenderParams : public gfx::SingletonHwnd::Observer {
return Singleton<CachedFontRenderParams>::get();
}
- const FontRenderParams& GetParams(bool for_web_contents) {
+ const FontRenderParams& GetParams() {
if (params_)
return *params_;
@@ -34,8 +34,7 @@ class CachedFontRenderParams : public gfx::SingletonHwnd::Observer {
BOOL enabled = false;
if (SystemParametersInfo(SPI_GETFONTSMOOTHING, 0, &enabled, 0) && enabled) {
params_->antialiasing = true;
- // Subpixel positioning is not yet implemented for UI. crbug.com/389649
- params_->subpixel_positioning = for_web_contents;
+ params_->subpixel_positioning = true;
UINT type = 0;
if (SystemParametersInfo(SPI_GETFONTSMOOTHINGTYPE, 0, &type, 0) &&
@@ -78,8 +77,7 @@ FontRenderParams GetFontRenderParams(const FontRenderParamsQuery& query,
if (family_out)
NOTIMPLEMENTED();
// Customized font rendering settings are not supported, only defaults.
- return CachedFontRenderParams::GetInstance()->GetParams(
- query.for_web_contents);
+ return CachedFontRenderParams::GetInstance()->GetParams();
}
} // namespace gfx
« no previous file with comments | « content/browser/browser_main_runner.cc ('k') | ui/gfx/render_text.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698