GraphicsContext::fillPath() and GraphicsContext::strokePath() currently deep-copy m_data->currentPath before filling/stroking with it. Since m_data->currentPath is cleared at the end of these functions, it's perfectly safe to fill/stroke using m_data->currentPath instead of a copy.
Created attachment 61901 [details] Proposed patch
Comment on attachment 61901 [details] Proposed patch r- due to changed requested on irc.
Created attachment 61956 [details] Proposed patch v2
Comment on attachment 61956 [details] Proposed patch v2 Clearing flags on attachment: 61956 Committed r63706: <http://trac.webkit.org/changeset/63706>
All reviewed patches have been landed. Closing bug.