aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/text/GrTextUtils.h
diff options
context:
space:
mode:
authorGravatar Jim Van Verth <jvanverth@google.com>2018-02-15 14:05:24 -0500
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2018-02-16 18:07:36 +0000
commitc401bb9c14332aa6c4c19d7f299f1512bf07c6a2 (patch)
treea14f993a69161df69b3b40699e9c497873979ff0 /src/gpu/text/GrTextUtils.h
parentcbf66a22130a1fd13285bb65d3a0d7ee6b4e8ab3 (diff)
Add full scaling for color emoji.
Bug: skia:7562 Change-Id: If6788a5004fe060b42a4e437f9b8c18459623225 Reviewed-on: https://skia-review.googlesource.com/106821 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Jim Van Verth <jvanverth@google.com>
Diffstat (limited to 'src/gpu/text/GrTextUtils.h')
-rw-r--r--src/gpu/text/GrTextUtils.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/gpu/text/GrTextUtils.h b/src/gpu/text/GrTextUtils.h
index 58318e8fe3..5fe38fe773 100644
--- a/src/gpu/text/GrTextUtils.h
+++ b/src/gpu/text/GrTextUtils.h
@@ -13,6 +13,7 @@
#include "SkColorFilter.h"
#include "SkPaint.h"
#include "SkScalar.h"
+#include "SkTextToPathIter.h"
#include "SkTLazy.h"
class GrAtlasGlyphCache;
@@ -127,6 +128,25 @@ public:
static uint32_t FilterTextFlags(const SkSurfaceProps& surfaceProps, const SkPaint& paint);
static bool ShouldDisableLCD(const SkPaint& paint);
+
+ class PathTextIter : SkTextBaseIter {
+ public:
+ PathTextIter(const char text[], size_t length, const SkPaint& paint,
+ bool applyStrokeAndPathEffects)
+ : SkTextBaseIter(text, length, paint, applyStrokeAndPathEffects) {
+ }
+
+ const SkPaint& getPaint() const { return fPaint; }
+ SkScalar getPathScale() const { return fScale; }
+ const char* getText() const { return fText; }
+
+ /**
+ * Returns false when all of the text has been consumed
+ * Will set skGlyph if the maskformat is ARGB, and path otherwise. The other will be null.
+ * If the glyph is zero-width, both will be null.
+ */
+ bool next(const SkGlyph** skGlyph, const SkPath** path, SkScalar* xpos);
+ };
};
#endif