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

Unified Diff: src/core/SkGlyph.h

Issue 885903002: Make the glyph array entries inline. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Fix comments remove old code Created 5 years, 10 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 | « no previous file | src/core/SkGlyphCache.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkGlyph.h
diff --git a/src/core/SkGlyph.h b/src/core/SkGlyph.h
index 25aaed77a6e3c459ccdcfba16d85fa6262ad6a3d..48b9815a03c9744d45c2dbe11e6559b491a682cd 100644
--- a/src/core/SkGlyph.h
+++ b/src/core/SkGlyph.h
@@ -53,6 +53,10 @@ class SkGlyph {
this->initCommon(glyph.fID);
}
+ void initGlyphFromCombinedID(uint32_t combined_id) {
+ this->initCommon(combined_id);
+ }
+
/**
* Compute the rowbytes for the specified width and mask-format.
*/
@@ -106,7 +110,6 @@ class SkGlyph {
*/
void zeroMetrics();
-
void toMask(SkMask* mask) const;
private:
@@ -120,8 +123,9 @@ class SkGlyph {
fMaskFormat = MASK_FORMAT_UNKNOWN;
fForceBW = 0;
}
+
static unsigned ID2Code(uint32_t id) {
- return (id & kCodeMask);
+ return id & kCodeMask;
}
static unsigned ID2SubX(uint32_t id) {
@@ -142,6 +146,7 @@ class SkGlyph {
}
static uint32_t MakeID(unsigned code) {
+ SkASSERT(code <= kCodeMask);
return code;
}
@@ -150,8 +155,8 @@ class SkGlyph {
x = FixedToSub(x);
y = FixedToSub(y);
return (x << (kSubShift + kSubShiftX)) |
- (y << (kSubShift + kSubShiftY)) |
- code;
+ (y << (kSubShift + kSubShiftY)) |
+ code;
}
// FIXME - This is needed because the Android frame work directly
« no previous file with comments | « no previous file | src/core/SkGlyphCache.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698