diff options
author | Herb Derby <herb@google.com> | 2018-03-14 11:53:40 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2018-03-14 18:03:11 +0000 |
commit | efbf00c8191e480c04bf5f5d431c34701d444850 (patch) | |
tree | 4519cde6810b199b0d0a9339f938e6136a509879 /src/core/SkGlyph.h | |
parent | 85fcfc59b02f25db1710978cfd95aadeeb6727e9 (diff) |
Add accessor and less for raw glyph ID and WS
Accessor is for debugging and Android.
Less is for ordered containers.
Change-Id: Ic4b7e0e9e32506f8594db961c274f93c5b5d1cee
Reviewed-on: https://skia-review.googlesource.com/114369
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Herb Derby <herb@google.com>
Diffstat (limited to 'src/core/SkGlyph.h')
-rw-r--r-- | src/core/SkGlyph.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/core/SkGlyph.h b/src/core/SkGlyph.h index 44d141d34d..211039e520 100644 --- a/src/core/SkGlyph.h +++ b/src/core/SkGlyph.h @@ -62,11 +62,18 @@ struct SkPackedID { bool operator!=(const SkPackedID& that) const { return !(*this == that); } + bool operator<(SkPackedID that) const { + return this->fID < that.fID; + } uint32_t code() const { return fID & kCodeMask; } + uint32_t getPackedID() const { + return fID; + } + SkFixed getSubXFixed() const { return SubToFixed(ID2SubX(fID)); } @@ -157,7 +164,7 @@ public: void initWithGlyphID(SkPackedGlyphID glyph_id); - size_t allocImage(SkArenaAlloc* alloc) ; + size_t allocImage(SkArenaAlloc* alloc); size_t rowBytes() const; size_t rowBytesUsingFormat(SkMask::Format format) const; |