[Webkit-unassigned] [Bug 105508] Proposal: Add fillRule to canvas
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Thu Jan 3 15:46:28 PST 2013
https://bugs.webkit.org/show_bug.cgi?id=105508
--- Comment #21 from Eric Seidel <eric at webkit.org> 2013-01-03 15:48:27 PST ---
(From update of attachment 180692)
View in context: https://bugs.webkit.org/attachment.cgi?id=180692&action=review
> Source/WebCore/html/canvas/CanvasRenderingContext2D.cpp:427
> + WindRule rule;
> + if (!parseFillRule(s, rule))
> + return;
> + if (state().m_fillRule == rule)
> + return;
> + realizeSaves();
> + modifiableState().m_fillRule = rule;
> + GraphicsContext* c = drawingContext();
> + if (!c)
> + return;
> + c->setFillRule(rule);
This is the only interesting bit of this whole change. I don't feel up-to-date enough on GraphicsContext to review this part, but otherwise thsi chagne LGTM.
> Source/WebCore/platform/graphics/GraphicsTypes.cpp:111
> + ASSERT(rule >= 0);
> + ASSERT(rule < 2);
> + const char* const names[2] = { "nonzero", "evenodd" };
> + return names[rule];
I might have written this as an if (rule == NonZero) return "nonzero"; return "evenodd", to avoid any possible OOB, but this is also fine.
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list