diff options
author | mtklein <mtklein@google.com> | 2015-02-09 07:52:51 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-02-09 07:52:51 -0800 |
commit | 5a2a5e729c081aa8ddfaab3311b7730622689abf (patch) | |
tree | 6cc42e82369771ab96f4b1571e3a501f266cacad /src/core/SkGlyph.h | |
parent | 41d4f09356567ead0216e1a7e4110bd58822b81f (diff) |
Revert of Make the glyph array entries inline. (patchset #11 id:190001 of https://codereview.chromium.org/885903002/)
Reason for revert:
Still broken.
Original issue's description:
> Make the glyph array entries inline.
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/4c08f16b252a55e438a61f26e5581394ed177da1
>
> Committed: https://skia.googlesource.com/skia/+/b4c29ac173e6f8844327338687248b98bc94132d
TBR=reed@google.com,herb@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:
Review URL: https://codereview.chromium.org/911513003
Diffstat (limited to 'src/core/SkGlyph.h')
-rw-r--r-- | src/core/SkGlyph.h | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/src/core/SkGlyph.h b/src/core/SkGlyph.h index 4f9c5bf4cc..9abefa84c7 100644 --- a/src/core/SkGlyph.h +++ b/src/core/SkGlyph.h @@ -104,10 +104,8 @@ struct SkGlyph { kSubShiftY = 0 }; - // The code is increased by one in MakeID. Adjust back. This allows the zero - // id to be the invalid id. static unsigned ID2Code(uint32_t id) { - return (id & kCodeMask) - 1; + return id & kCodeMask; } static unsigned ID2SubX(uint32_t id) { @@ -127,21 +125,17 @@ struct SkGlyph { return sub << (16 - kSubBits); } - // This and the MakeID below must not return an id of zero. Zero is used as - // the invalid id. static uint32_t MakeID(unsigned code) { - SkASSERT(code + 1 <= kCodeMask); - return code + 1; + return code; } - // See comment for MakeID above. static uint32_t MakeID(unsigned code, SkFixed x, SkFixed y) { - SkASSERT(code + 1 <= kCodeMask); + SkASSERT(code <= kCodeMask); x = FixedToSub(x); y = FixedToSub(y); return (x << (kSubShift + kSubShiftX)) | (y << (kSubShift + kSubShiftY)) | - (code + 1); + code; } void toMask(SkMask* mask) const; |