Bug 1304353 - part 1 - Set up the DrawOptions appropriately when painting canvas text for FILL, not only for STROKE. r=bas

This commit is contained in:
Jonathan Kew 2016-09-23 13:38:06 +01:00
Родитель 9083c57cbe
Коммит cbbe3d0e74
1 изменённых файлов: 5 добавлений и 5 удалений

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

@ -4009,11 +4009,12 @@ struct MOZ_STACK_CLASS CanvasBidiProcessor : public nsBidiPresUtils::BidiProcess
}
}
if (style == Style::STROKE) {
const ContextState& state = *mState;
drawOpts.mAlpha = state.globalAlpha;
drawOpts.mCompositionOp = mCtx->UsedOperation();
params.drawOpts = &drawOpts;
if (style == Style::STROKE) {
strokeOpts.mLineWidth = state.lineWidth;
strokeOpts.mLineJoin = state.lineJoin;
strokeOpts.mLineCap = state.lineCap;
@ -4025,7 +4026,6 @@ struct MOZ_STACK_CLASS CanvasBidiProcessor : public nsBidiPresUtils::BidiProcess
params.drawMode = DrawMode::GLYPH_STROKE;
params.strokeOpts = &strokeOpts;
params.drawOpts = &drawOpts;
}
mTextRun->Draw(gfxTextRun::Range(mTextRun.get()), point, params);