[Webkit-unassigned] [Bug 151979] Make paintTextWithShadows a member function (TextPainter).
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Mon Dec 7 18:55:56 PST 2015
https://bugs.webkit.org/show_bug.cgi?id=151979
zalan <zalan at apple.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED
Assignee|webkit-unassigned at lists.web |zalan at apple.com
|kit.org |
Attachment #266840| |review?
Flags| |
--- Comment #1 from zalan <zalan at apple.com> ---
Created attachment 266840
--> https://bugs.webkit.org/attachment.cgi?id=266840&action=review
Patch
Simplified version:
void TextPainter::paintTextWithShadows(const ShadowData* shadow, const FontCascade& font, const TextRun& textRun, const AtomicString& emphasisMark,
int emphasisMarkOffset, int startOffset, int endOffset, const FloatPoint& textOrigin, bool stroked)
{
if (!shadow) {
drawTextOrEmphasisMarks(font, textRun, emphasisMark, emphasisMarkOffset, textOrigin, startOffset, endOffset);
return;
}
Color fillColor = m_context.fillColor();
bool opaque = !fillColor.hasAlpha();
bool lastShadowIterationShouldDrawText = !stroked && opaque;
if (!opaque)
m_context.setFillColor(Color::black);
while (shadow) {
ShadowApplier shadowApplier(m_context, shadow, m_boxRect, lastShadowIterationShouldDrawText, opaque, m_textBoxIsHorizontal ? Horizontal : Vertical);
if (!shadowApplier.nothingToDraw())
drawTextOrEmphasisMarks(font, textRun, emphasisMark, emphasisMarkOffset, textOrigin + shadowApplier.extraOffset(), startOffset, endOffset);
shadow = shadow->next();
}
if (!lastShadowIterationShouldDrawText) {
if (!opaque)
m_context.setFillColor(fillColor);
drawTextOrEmphasisMarks(font, textRun, emphasisMark, emphasisMarkOffset, textOrigin, startOffset, endOffset);
}
}
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-unassigned/attachments/20151208/69f07bac/attachment.html>
More information about the webkit-unassigned
mailing list