| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "ui/gfx/render_text_win.h" | 5 #include "ui/gfx/render_text_win.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "base/i18n/break_iterator.h" | 9 #include "base/i18n/break_iterator.h" |
| 10 #include "base/i18n/char_iterator.h" | 10 #include "base/i18n/char_iterator.h" |
| (...skipping 737 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 748 | 748 |
| 749 std::vector<SkPoint> pos; | 749 std::vector<SkPoint> pos; |
| 750 | 750 |
| 751 internal::SkiaTextRenderer renderer(canvas); | 751 internal::SkiaTextRenderer renderer(canvas); |
| 752 ApplyFadeEffects(&renderer); | 752 ApplyFadeEffects(&renderer); |
| 753 ApplyTextShadows(&renderer); | 753 ApplyTextShadows(&renderer); |
| 754 | 754 |
| 755 renderer.SetFontRenderParams( | 755 renderer.SetFontRenderParams( |
| 756 font_list().GetPrimaryFont().GetFontRenderParams(), | 756 font_list().GetPrimaryFont().GetFontRenderParams(), |
| 757 background_is_transparent()); | 757 background_is_transparent()); |
| 758 renderer.CorrectPaintFlags(background_is_transparent()); |
| 758 | 759 |
| 759 ApplyCompositionAndSelectionStyles(); | 760 ApplyCompositionAndSelectionStyles(); |
| 760 | 761 |
| 761 for (size_t i = 0; i < lines().size(); ++i) { | 762 for (size_t i = 0; i < lines().size(); ++i) { |
| 762 const internal::Line& line = lines()[i]; | 763 const internal::Line& line = lines()[i]; |
| 763 const Vector2d line_offset = GetLineOffset(i); | 764 const Vector2d line_offset = GetLineOffset(i); |
| 764 | 765 |
| 765 // Skip painting empty lines or lines outside the display rect area. | 766 // Skip painting empty lines or lines outside the display rect area. |
| 766 if (!display_rect().Intersects(Rect(PointAtOffsetFromOrigin(line_offset), | 767 if (!display_rect().Intersects(Rect(PointAtOffsetFromOrigin(line_offset), |
| 767 ToCeiledSize(line.size)))) | 768 ToCeiledSize(line.size)))) |
| (...skipping 456 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1224 size_t position = LayoutIndexToTextIndex(run->range.end()); | 1225 size_t position = LayoutIndexToTextIndex(run->range.end()); |
| 1225 position = IndexOfAdjacentGrapheme(position, CURSOR_BACKWARD); | 1226 position = IndexOfAdjacentGrapheme(position, CURSOR_BACKWARD); |
| 1226 return SelectionModel(position, CURSOR_FORWARD); | 1227 return SelectionModel(position, CURSOR_FORWARD); |
| 1227 } | 1228 } |
| 1228 | 1229 |
| 1229 RenderText* RenderText::CreateNativeInstance() { | 1230 RenderText* RenderText::CreateNativeInstance() { |
| 1230 return new RenderTextWin; | 1231 return new RenderTextWin; |
| 1231 } | 1232 } |
| 1232 | 1233 |
| 1233 } // namespace gfx | 1234 } // namespace gfx |
| OLD | NEW |