b=390202, trunk topcrash gfxFont::Draw, r=stuart,a=damon

This commit is contained in:
vladimir%pobox.com 2007-07-31 20:34:43 +00:00
Родитель 8051912fcf
Коммит 80d6a3239f
1 изменённых файлов: 4 добавлений и 6 удалений

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

@ -166,11 +166,7 @@ gfxFont::gfxFont(const nsAString &aName, const gfxFontStyle *aFontStyle) :
* A helper function in case we need to do any rounding or other
* processing here.
*/
static double
ToDeviceUnits(double aAppUnits, double aDevUnitsPerAppUnit)
{
return aAppUnits*aDevUnitsPerAppUnit;
}
#define ToDeviceUnits(aAppUnits, aDevUnitsPerAppUnit) (double(aAppUnits)*double(aDevUnitsPerAppUnit))
struct GlyphBuffer {
#define GLYPH_BUFFER_SIZE (2048/sizeof(cairo_glyph_t))
@ -260,10 +256,12 @@ gfxFont::Draw(gfxTextRun *aTextRun, PRUint32 aStart, PRUint32 aEnd,
glyph->x -= ToDeviceUnits(advance, devUnitsPerAppUnit);
}
x += direction*advance;
glyphs.Flush(cr, aDrawToPath);
if (details->mIsLastGlyph)
break;
++details;
glyphs.Flush(cr, aDrawToPath);
}
} else if (glyphData->IsMissing()) {
const gfxTextRun::DetailedGlyph *details = aTextRun->GetDetailedGlyphs(i);