Chromium Code Reviews| Index: ui/gfx/render_text_win.cc |
| diff --git a/ui/gfx/render_text_win.cc b/ui/gfx/render_text_win.cc |
| index e76e6db39e8a55af31a8b1a0a1e0ad349bd86953..1d2265d961b43d06d463e1a8842122d09b64672e 100644 |
| --- a/ui/gfx/render_text_win.cc |
| +++ b/ui/gfx/render_text_win.cc |
| @@ -802,7 +802,7 @@ void RenderTextWin::DrawVisualText(Canvas* canvas) { |
| pos.back().set(SkIntToScalar(text_offset.x() + segment_x), |
| SkIntToScalar(text_offset.y())); |
| - renderer.SetTextSize(run->font.GetFontSize()); |
| + renderer.SetTextSize(SkIntToScalar(run->font.GetFontSize())); |
| renderer.SetFontFamilyWithStyle(run->font.GetFontName(), run->font_style); |
| for (BreakList<SkColor>::const_iterator it = |
| @@ -828,10 +828,10 @@ void RenderTextWin::DrawVisualText(Canvas* canvas) { |
| renderer.SetForegroundColor(it->second); |
| renderer.DrawPosText(&start_pos, &run->glyphs[colored_glyphs.start()], |
| colored_glyphs.length()); |
| - renderer.DrawDecorations(start_pos.x(), text_offset.y(), |
| - SkScalarCeilToInt(end_pos.x() - start_pos.x()), |
| - run->underline, run->strike, |
| - run->diagonal_strike); |
| + renderer.DrawDecorations( |
| + SkScalarFloorToInt(start_pos.x()), text_offset.y(), |
|
msw
2014/10/17 22:13:23
Like my other DrawDecorations suggestion, perhaps
Peter Kasting
2014/10/21 01:20:46
Done.
|
| + SkScalarCeilToInt(end_pos.x() - start_pos.x()), run->underline, |
| + run->strike, run->diagonal_strike); |
| } |
| preceding_segment_widths += segment_width; |
| @@ -1103,8 +1103,8 @@ void RenderTextWin::LayoutTextRun(internal::TextRun* run) { |
| for (int i = 0; i < run->glyph_count; ++i) |
| run->glyphs[i] = IsWhitespace(run_text[i]) ? space_glyph : missing_glyph; |
| for (size_t i = 0; i < run_length; ++i) { |
| - run->logical_clusters[i] = run->script_analysis.fRTL ? |
| - run_length - 1 - i : i; |
| + run->logical_clusters[i] = |
| + static_cast<WORD>(run->script_analysis.fRTL ? run_length - 1 - i : i); |
| } |
| // TODO(msw): Don't use SCRIPT_UNDEFINED. Apparently Uniscribe can |