Bug 46045 - Gradient: Fast-path for the ideal case in sortStopsIfNecessary()
Summary: Gradient: Fast-path for the ideal case in sortStopsIfNecessary()
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: Nobody
URL:
Keywords: Performance
Depends on:
Blocks:
 
Reported: 2010-09-18 17:43 PDT by Andreas Kling
Modified: 2010-09-18 17:52 PDT (History)
1 user (show)

See Also:


Attachments
Proposed patch (1.48 KB, patch)
2010-09-18 17:45 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-09-18 17:43:09 PDT
If the gradient has 2 stops and is already ordered, there's no need to call std::stable_sort.

This yields a 0.3% speedup on Parcycle <http://www.mrspeaker.net/dev/parcycle/>

Note: Only relevant for Qt and CG.
Comment 1 Andreas Kling 2010-09-18 17:45:04 PDT
Created attachment 68020 [details]
Proposed patch
Comment 2 Oliver Hunt 2010-09-18 17:48:35 PDT
Comment on attachment 68020 [details]
Proposed patch

r=me
Comment 3 Andreas Kling 2010-09-18 17:52:09 PDT
Comment on attachment 68020 [details]
Proposed patch

Clearing flags on attachment: 68020

Committed r67804: <http://trac.webkit.org/changeset/67804>
Comment 4 Andreas Kling 2010-09-18 17:52:19 PDT
All reviewed patches have been landed.  Closing bug.