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

Unified Diff: content/ppapi_plugin/ppapi_plugin_main.cc

Issue 2081643002: Set text anti-aliasing settings at PPAPI plugin process on Windows. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2743
Patch Set: Created 4 years, 6 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 | « AUTHORS ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/ppapi_plugin/ppapi_plugin_main.cc
diff --git a/content/ppapi_plugin/ppapi_plugin_main.cc b/content/ppapi_plugin/ppapi_plugin_main.cc
index 3c687333eabf70829ae1e48aadd9e5ad5f333614..7e53b57a83f9363bd48ad3af60bdeb697895b179 100644
--- a/content/ppapi_plugin/ppapi_plugin_main.cc
+++ b/content/ppapi_plugin/ppapi_plugin_main.cc
@@ -32,6 +32,7 @@
#include "third_party/WebKit/public/web/win/WebFontRendering.h"
#include "third_party/skia/include/ports/SkTypeface_win.h"
#include "ui/display/win/dpi.h"
+#include "ui/gfx/font_render_params.h"
#include "ui/gfx/win/direct_write.h"
#endif
@@ -132,6 +133,13 @@ int PpapiPluginMain(const MainFunctionParams& parameters) {
InitializeDWriteFontProxy();
blink::WebFontRendering::setDeviceScaleFactor(display::win::GetDPIScale());
+
+ const gfx::FontRenderParams font_params =
+ gfx::GetFontRenderParams(gfx::FontRenderParamsQuery(), nullptr);
+ blink::WebFontRendering::setAntialiasedTextEnabled(font_params.antialiasing);
+ blink::WebFontRendering::setLCDTextEnabled(
+ font_params.subpixel_rendering !=
+ gfx::FontRenderParams::SUBPIXEL_RENDERING_NONE);
#endif
main_message_loop.Run();
« no previous file with comments | « AUTHORS ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698