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

Unified Diff: ui/gfx/font_render_params_win.cc

Issue 785763002: Disable subpixel positioning if DirectWrite isn't initialized (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix test 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 | « no previous file | ui/gfx/render_text_unittest.cc » ('j') | ui/gfx/render_text_unittest.cc » ('J')
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 354d1b248b740e13dfa9e7a815af73f47c6abd9b..3b1c247b9b22b1dc761dcd5346c33bbb47797860 100644
--- a/ui/gfx/font_render_params_win.cc
+++ b/ui/gfx/font_render_params_win.cc
@@ -6,6 +6,7 @@
#include "base/memory/scoped_ptr.h"
#include "base/memory/singleton.h"
+#include "ui/gfx/win/direct_write.h"
#include "ui/gfx/win/singleton_hwnd.h"
namespace gfx {
@@ -34,7 +35,7 @@ class CachedFontRenderParams : public gfx::SingletonHwnd::Observer {
BOOL enabled = false;
if (SystemParametersInfo(SPI_GETFONTSMOOTHING, 0, &enabled, 0) && enabled) {
params_->antialiasing = true;
- params_->subpixel_positioning = true;
+ params_->subpixel_positioning = win::IsDirectWriteEnabled();
msw 2014/12/10 23:55:50 Is this correct, or should we simply not round the
ckocagil 2014/12/11 01:07:11 Rounding in RTHB and letting Skia do the rounding
msw 2014/12/11 23:30:12 Optionally: // GDI does not support subpixel posit
ckocagil 2014/12/12 09:52:11 Done.
UINT type = 0;
if (SystemParametersInfo(SPI_GETFONTSMOOTHINGTYPE, 0, &type, 0) &&
« no previous file with comments | « no previous file | ui/gfx/render_text_unittest.cc » ('j') | ui/gfx/render_text_unittest.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698