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

Unified Diff: ui/gfx/render_text_pango.cc

Issue 387743002: Apply hinting in SkiaTextRenderer::SetFontRenderParams(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: add fallback return 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
« no previous file with comments | « ui/gfx/render_text.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/render_text_pango.cc
diff --git a/ui/gfx/render_text_pango.cc b/ui/gfx/render_text_pango.cc
index 9db3995fcee95a34c2b9b6a6b132c7c9ad8b3df7..f4323018cabcbafc91570e1b52ba277f346848a1 100644
--- a/ui/gfx/render_text_pango.cc
+++ b/ui/gfx/render_text_pango.cc
@@ -381,25 +381,8 @@ void RenderTextPango::DrawVisualText(Canvas* canvas) {
ApplyTextShadows(&renderer);
// TODO(derat): Use font-specific params: http://crbug.com/125235
- const FontRenderParams& render_params = GetDefaultFontRenderParams();
- renderer.SetFontRenderParams(render_params, background_is_transparent());
-
- SkPaint::Hinting skia_hinting = SkPaint::kNormal_Hinting;
- switch (render_params.hinting) {
- case FontRenderParams::HINTING_NONE:
- skia_hinting = SkPaint::kNo_Hinting;
- break;
- case FontRenderParams::HINTING_SLIGHT:
- skia_hinting = SkPaint::kSlight_Hinting;
- break;
- case FontRenderParams::HINTING_MEDIUM:
- skia_hinting = SkPaint::kNormal_Hinting;
- break;
- case FontRenderParams::HINTING_FULL:
- skia_hinting = SkPaint::kFull_Hinting;
- break;
- }
- renderer.SetFontHinting(skia_hinting);
+ renderer.SetFontRenderParams(GetDefaultFontRenderParams(),
+ background_is_transparent());
// Temporarily apply composition underlines and selection colors.
ApplyCompositionAndSelectionStyles();
« no previous file with comments | « ui/gfx/render_text.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698