Bug 42456 - [Qt] Path: Avoid creating a new GraphicsContext in strokeContains() and strokeBoundingRect()
Summary: [Qt] Path: Avoid creating a new GraphicsContext in strokeContains() and strok...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: QtWebKit Unassigned
URL:
Keywords: Performance, Qt, QtTriaged
Depends on:
Blocks: 35784
  Show dependency treegraph
 
Reported: 2010-07-16 08:22 PDT by Andreas Kling
Modified: 2010-07-16 08:59 PDT (History)
1 user (show)

See Also:


Attachments
Proposed patch (2.24 KB, patch)
2010-07-16 08:26 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-16 08:22:49 PDT
From PathQt.cpp:

// FIXME: We should try to use a 'shared Context' instead of creating a new ImageBuffer
// on each call.

We should use the same "scratch context" pattern Skia uses.
Comment 1 Andreas Kling 2010-07-16 08:26:14 PDT
Created attachment 61808 [details]
Proposed patch
Comment 2 Andreas Kling 2010-07-16 08:32:34 PDT
This change yields a 7% speedup on http://www.openrise.com/lab/FlowerPower/
Comment 3 Antonio Gomes 2010-07-16 08:34:24 PDT
Comment on attachment 61808 [details]
Proposed patch

Looks sane. r=me
Comment 4 Andreas Kling 2010-07-16 08:50:16 PDT
Comment on attachment 61808 [details]
Proposed patch

Clearing flags on attachment: 61808

Committed r63552: <http://trac.webkit.org/changeset/63552>
Comment 5 Andreas Kling 2010-07-16 08:50:26 PDT
All reviewed patches have been landed.  Closing bug.
Comment 6 Andreas Kling 2010-07-16 08:59:38 PDT
Marking for cherry-pick into 2.0 since it's a very nice improvement for a very tiny change.