зеркало из https://github.com/mozilla/pjs.git
b=390202, trunk topcrash gfxFont::Draw, r=stuart,a=damon
This commit is contained in:
Родитель
8051912fcf
Коммит
80d6a3239f
|
@ -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);
|
||||
|
|
Загрузка…
Ссылка в новой задаче