Bug 42456

Summary: [Qt] Path: Avoid creating a new GraphicsContext in strokeContains() and strokeBoundingRect()
Product: WebKit Reporter: Andreas Kling <kling>
Component: Layout and RenderingAssignee: QtWebKit Unassigned <webkit-qt-unassigned>
Severity: Normal CC: hausmann
Priority: P2 Keywords: Performance, Qt, QtTriaged
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Bug Depends on:    
Bug Blocks: 35784    
Description Flags
Proposed patch none

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.