| Index: ui/gfx/render_text.h
|
| diff --git a/ui/gfx/render_text.h b/ui/gfx/render_text.h
|
| index 93054b4487a76c1e16eeaebccb655b747aedcd49..dde179432afd292bc1eba1fa00b32f534505a7bd 100644
|
| --- a/ui/gfx/render_text.h
|
| +++ b/ui/gfx/render_text.h
|
| @@ -79,6 +79,8 @@ class SkiaTextRenderer {
|
| void DrawUnderline(int x, int y, int width);
|
| void DrawStrike(int x, int y, int width) const;
|
|
|
| + SkPaint paint() const { return paint_; }
|
| +
|
| private:
|
| // Helper class to draw a diagonal line with multiple pieces of different
|
| // lengths and colors; to support text selection appearances.
|
| @@ -94,6 +96,7 @@ class SkiaTextRenderer {
|
| typedef std::pair<int, SkColor> Piece;
|
|
|
| Canvas* canvas_;
|
| + SkMatrix matrix_;
|
| const Point start_;
|
| SkPaint paint_;
|
| int total_length_;
|
| @@ -176,6 +179,10 @@ struct Line {
|
| int baseline;
|
| };
|
|
|
| +// Creates an SkTypeface from a font |family| name and a |gfx::Font::FontStyle|.
|
| +skia::RefPtr<SkTypeface> CreateSkiaTypeface(const std::string& family,
|
| + int style);
|
| +
|
| } // namespace internal
|
|
|
| // RenderText represents an abstract model of styled text and its corresponding
|
| @@ -186,7 +193,7 @@ class GFX_EXPORT RenderText {
|
| public:
|
| virtual ~RenderText();
|
|
|
| - // Creates a platform-specific RenderText instance.
|
| + // Creates a platform-specific or cross-platform RenderText instance.
|
| static RenderText* CreateInstance();
|
|
|
| const base::string16& text() const { return text_; }
|
| @@ -572,6 +579,9 @@ class GFX_EXPORT RenderText {
|
| FRIEND_TEST_ALL_PREFIXES(RenderTextTest, Multiline_SufficientWidth);
|
| FRIEND_TEST_ALL_PREFIXES(RenderTextTest, Multiline_Newline);
|
|
|
| + // Creates a platform-specific RenderText instance.
|
| + static RenderText* CreateNativeInstance();
|
| +
|
| // Set the cursor to |position|, with the caret trailing the previous
|
| // grapheme, or if there is no previous grapheme, leading the cursor position.
|
| // If |select| is false, the selection start is moved to the same position.
|
|
|