Index: ui/gfx/render_text.h |
diff --git a/ui/gfx/render_text.h b/ui/gfx/render_text.h |
index 93054b4487a76c1e16eeaebccb655b747aedcd49..92d77065192fa9d116226e8ee592a0999e0ad595 100644 |
--- a/ui/gfx/render_text.h |
+++ b/ui/gfx/render_text.h |
@@ -11,6 +11,7 @@ |
#include <utility> |
#include <vector> |
+#include "base/command_line.h" |
#include "base/gtest_prod_util.h" |
#include "base/i18n/rtl.h" |
#include "base/memory/scoped_ptr.h" |
@@ -42,6 +43,7 @@ namespace gfx { |
class Canvas; |
class Font; |
class RenderTextTest; |
+class RenderTextHarfBuzz; // REMOVE |
msw
2014/04/29 06:24:45
Move this to where it's needed, if anywhere.
ckocagil
2014/05/01 22:02:01
Done.
|
namespace internal { |
@@ -79,6 +81,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 +98,7 @@ class SkiaTextRenderer { |
typedef std::pair<int, SkColor> Piece; |
Canvas* canvas_; |
+ SkMatrix matrix_; |
const Point start_; |
SkPaint paint_; |
int total_length_; |
@@ -176,6 +181,9 @@ struct Line { |
int baseline; |
}; |
+skia::RefPtr<SkTypeface> CreateSkiaTypeface(const std::string& family, |
+ int style); |
msw
2014/04/29 06:24:45
nit: document that this is a gfx::Font::FontStyle
ckocagil
2014/05/01 22:02:01
Done.
|
+ |
} // namespace internal |
// RenderText represents an abstract model of styled text and its corresponding |
@@ -186,7 +194,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_; } |
@@ -429,6 +437,9 @@ class GFX_EXPORT RenderText { |
protected: |
RenderText(); |
+ // Creates a platform-specific RenderText instance. |
+ static RenderText* CreateNativeInstance(); |
msw
2014/04/29 06:24:45
Make this private.
ckocagil
2014/05/01 22:02:01
Done.
|
+ |
const BreakList<SkColor>& colors() const { return colors_; } |
const std::vector<BreakList<bool> >& styles() const { return styles_; } |