Fix r466 which was causing Chromium valgrind failures.

See the added comment for details.

TBR=reed (since it's a build fix)

git-svn-id: http://skia.googlecode.com/svn/trunk@469 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
agl@chromium.org 2010-01-04 23:56:43 +00:00
Родитель 474a12c497
Коммит 13c8558e37
3 изменённых файлов: 8 добавлений и 4 удалений

Просмотреть файл

@ -154,6 +154,7 @@ public:
// up with the SkPaint::Hinting enum.
kHintingBit1_Flag = 0x10,
kHintingBit2_Flag = 0x20,
kEmbeddedBitmapText_Flag = 0x40,
};
private:
enum {
@ -166,10 +167,13 @@ public:
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;

Просмотреть файл

@ -1223,7 +1223,8 @@ void SkScalerContext::MakeRec(const SkPaint& paint,
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,

Просмотреть файл

@ -376,9 +376,8 @@ SkScalerContext_FreeType::SkScalerContext_FreeType(const SkDescriptor* desc)
break;
}
if (!fRec.fUseEmbeddedBitmapText) {
if (fRec.fFlags & SkScalerContext::kEmbeddedBitmapText_Flag == 0)
loadFlags |= FT_LOAD_NO_BITMAP;
}
fLoadGlyphFlags = loadFlags;
}