зеркало из https://github.com/mozilla/gecko-dev.git
Bug 894957 - Don't attempt to draw transparent text. r=roc
This commit is contained in:
Родитель
cddb8f5c57
Коммит
e340ea4b96
|
@ -5748,10 +5748,18 @@ gfxTextRun::Draw(gfxContext *aContext, gfxPoint aPt, gfxFont::DrawMode aDrawMode
|
|||
"GLYPH_PATH cannot be used with GLYPH_FILL, GLYPH_STROKE or GLYPH_STROKE_UNDERNEATH");
|
||||
NS_ASSERTION(aDrawMode == gfxFont::GLYPH_PATH || !aCallbacks, "callback must not be specified unless using GLYPH_PATH");
|
||||
|
||||
bool skipDrawing = mSkipDrawing;
|
||||
if (aDrawMode == gfxFont::GLYPH_FILL) {
|
||||
gfxRGBA currentColor;
|
||||
if (aContext->GetDeviceColor(currentColor) && currentColor.a == 0) {
|
||||
skipDrawing = true;
|
||||
}
|
||||
}
|
||||
|
||||
gfxFloat direction = GetDirection();
|
||||
|
||||
if (mSkipDrawing) {
|
||||
// We're waiting for a user font to finish downloading;
|
||||
if (skipDrawing) {
|
||||
// We don't need to draw anything;
|
||||
// but if the caller wants advance width, we need to compute it here
|
||||
if (aAdvanceWidth) {
|
||||
gfxTextRun::Metrics metrics = MeasureText(aStart, aLength,
|
||||
|
|
Загрузка…
Ссылка в новой задаче