Bug 42513 - [Qt] Don't unnecessarily copy QPainterPath in fillPath() and strokePath()
Summary: [Qt] Don't unnecessarily copy QPainterPath in fillPath() and strokePath()
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Andreas Kling
URL:
Keywords: Performance, Qt, QtTriaged
Depends on:
Blocks:
 
Reported: 2010-07-17 23:13 PDT by Andreas Kling
Modified: 2010-07-19 19:04 PDT (History)
0 users

See Also:


Attachments
Proposed patch (3.87 KB, patch)
2010-07-17 23:15 PDT, Andreas Kling
kenneth: review-
Details | Formatted Diff | Diff
Proposed patch v2 (1.62 KB, patch)
2010-07-19 08:10 PDT, Andreas Kling
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.