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

Unified Diff: ui/gfx/render_text.cc

Issue 385463002: Support FontRenderParams on Win; fix RenderTextHarfBuzz. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Revise SkiaTextRenderer::SetFontRenderParams; sync and cleanup. Created 6 years, 5 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
Index: ui/gfx/render_text.cc
diff --git a/ui/gfx/render_text.cc b/ui/gfx/render_text.cc
index 4e7281c11695d4b7b70beb85b36e04227f425936..bf4c9a9b7ff0aa68780338a9a11c81efc453bdf6 100644
--- a/ui/gfx/render_text.cc
+++ b/ui/gfx/render_text.cc
@@ -198,12 +198,12 @@ void SkiaTextRenderer::SetDrawLooper(SkDrawLooper* draw_looper) {
paint_.setLooper(draw_looper);
}
-void SkiaTextRenderer::SetFontSmoothingSettings(bool antialiasing,
- bool subpixel_rendering,
- bool subpixel_positioning) {
- paint_.setAntiAlias(antialiasing);
- paint_.setLCDRenderText(subpixel_rendering);
- paint_.setSubpixelText(subpixel_positioning);
+void SkiaTextRenderer::SetFontRenderParams(const FontRenderParams& params,
+ bool background_is_transparent) {
+ paint_.setAntiAlias(params.antialiasing);
+ paint_.setLCDRenderText(!background_is_transparent &&
+ params.subpixel_rendering != FontRenderParams::SUBPIXEL_RENDERING_NONE);
+ paint_.setSubpixelText(params.subpixel_positioning);
}
void SkiaTextRenderer::SetFontHinting(SkPaint::Hinting hinting) {

Powered by Google App Engine
This is Rietveld 408576698