// up with the SkPaint::Hinting enum.
kHintingBit1_Flag = 0x10,
kHintingBit2_Flag = 0x20,
+ kEmbeddedBitmapText_Flag = 0x40,
};
private:
enum {
SkScalar fPost2x2[2][2];
SkScalar fFrameWidth, fMiterLimit;
bool fSubpixelPositioning;
- bool fUseEmbeddedBitmapText;
uint8_t fMaskFormat;
uint8_t fStrokeJoin;
uint8_t fFlags;
+ // Warning: when adding members note that the size of this structure
+ // must be a multiple of 4. SkDescriptor requires that its arguments be
+ // multiples of four and this structure is put in an SkDescriptor in
+ // SkPaint::MakeRec.
void getMatrixFrom2x2(SkMatrix*) const;
void getLocalMatrix(SkMatrix*) const;
rec->fMaskFormat = SkToU8(computeMaskFormat(paint));
rec->fFlags = SkToU8(flags);
rec->setHinting(computeHinting(paint));
- rec->fUseEmbeddedBitmapText = paint.isEmbeddedBitmapText();
+ if (paint.isEmbeddedBitmapText())
+ rec->fFlags |= SkScalerContext::kEmbeddedBitmapText_Flag;
/* Allow the fonthost to modify our rec before we use it as a key into the
cache. This way if we're asking for something that they will ignore,
break;
}
- if (!fRec.fUseEmbeddedBitmapText) {
+ if (fRec.fFlags & SkScalerContext::kEmbeddedBitmapText_Flag == 0)
loadFlags |= FT_LOAD_NO_BITMAP;
- }
fLoadGlyphFlags = loadFlags;
}