Bug 42513

Summary: [Qt] Don't unnecessarily copy QPainterPath in fillPath() and strokePath()
Product: WebKit Reporter: Andreas Kling <kling>
Component: WebCore Misc.Assignee: Andreas Kling <kling>
Status: RESOLVED FIXED    
Severity: Normal Keywords: Performance, Qt, QtTriaged
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Attachments:
Description Flags
Proposed patch
kenneth: review-
Proposed patch v2 none

Description Andreas Kling 2010-07-17 23:13:36 PDT
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.
Comment 1 Andreas Kling 2010-07-17 23:15:18 PDT
Created attachment 61901 [details]
Proposed patch
Comment 2 Kenneth Rohde Christiansen 2010-07-19 05:53:21 PDT
Comment on attachment 61901 [details]
Proposed patch

r- due to changed requested on irc.
Comment 3 Andreas Kling 2010-07-19 08:10:32 PDT
Created attachment 61956 [details]
Proposed patch v2
Comment 4 Andreas Kling 2010-07-19 19:04:02 PDT
Comment on attachment 61956 [details]
Proposed patch v2

Clearing flags on attachment: 61956

Committed r63706: <http://trac.webkit.org/changeset/63706>
Comment 5 Andreas Kling 2010-07-19 19:04:12 PDT
All reviewed patches have been landed.  Closing bug.