diff options
author | Herb Derby <herb@google.com> | 2018-07-17 16:10:30 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2018-07-17 22:16:41 +0000 |
commit | 4b3a5152a3cdb25d1f19fd3a04b3248f4462e05e (patch) | |
tree | 38fb823b6cc5e249aa468ff0ce697f5c7dfa45e4 /src/core/SkGlyphRun.h | |
parent | 0f5cfab7cb7673d0ed5d6300ac94bc8374fc4e6e (diff) |
MakeAsDrawText for SkTextBlob
Change-Id: I04ebca6b318e0654cc1e598aa323cfb9a21e5a5e
Reviewed-on: https://skia-review.googlesource.com/141960
Reviewed-by: Mike Reed <reed@google.com>
Reviewed-by: Cary Clark <caryclark@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Herb Derby <herb@google.com>
Diffstat (limited to 'src/core/SkGlyphRun.h')
-rw-r--r-- | src/core/SkGlyphRun.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/core/SkGlyphRun.h b/src/core/SkGlyphRun.h index c220a26424..001c3c4548 100644 --- a/src/core/SkGlyphRun.h +++ b/src/core/SkGlyphRun.h @@ -37,6 +37,7 @@ public: T* data() const { return fPtr; } size_t size() const { return fSize; } bool empty() const { return fSize == 0; } + size_t size_bytes() const { return fSize * sizeof(T); } private: T* fPtr; @@ -59,8 +60,9 @@ public: void temporaryShuntToDrawPosText(SkBaseDevice* device, SkPoint origin); using TemporaryShuntCallback = std::function<void(size_t, const char*, const SkScalar*)>; void temporaryShuntToCallback(TemporaryShuntCallback callback); + void filloutGlyphsAndPositions(SkGlyphID* glyphIDs, SkPoint* positions); - size_t runSize() const { return fUniqueGlyphIDIndices.size(); } + size_t runSize() const { return fTemporaryShuntGlyphIDs.size(); } SkSpan<const SkPoint> positions() const { return fPositions; } const SkPaint& paint() const { return fRunPaint; } |