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

Unified Diff: ui/gfx/render_text.h

Issue 152473008: More or less implement RenderTextHarfBuzz (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: actual android fix Created 6 years, 7 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/gfx.gyp ('k') | ui/gfx/render_text.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/render_text.h
diff --git a/ui/gfx/render_text.h b/ui/gfx/render_text.h
index 52564fb25731bf92cbb6e94e8d4c35087cca3427..759e6272a9c6b3119ffe1bc1f52357f5358bc5af 100644
--- a/ui/gfx/render_text.h
+++ b/ui/gfx/render_text.h
@@ -94,6 +94,7 @@ class SkiaTextRenderer {
typedef std::pair<int, SkColor> Piece;
Canvas* canvas_;
+ SkMatrix matrix_;
const Point start_;
SkPaint paint_;
int total_length_;
@@ -176,6 +177,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 +191,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_; }
@@ -569,6 +574,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.
« no previous file with comments | « ui/gfx/gfx.gyp ('k') | ui/gfx/render_text.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698