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

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: rebased; decorations Created 6 years, 9 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') | ui/gfx/render_text.cc » ('J')
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 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_; }
« no previous file with comments | « ui/gfx/gfx.gyp ('k') | ui/gfx/render_text.cc » ('j') | ui/gfx/render_text.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698