Bug 48211 - [Qt] ImageBuffer::platformTransformColorSpace is unnecessarily slow
Summary: [Qt] ImageBuffer::platformTransformColorSpace is unnecessarily slow
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
Keywords: Performance, Qt, QtTriaged
Depends on:
Reported: 2010-10-24 13:41 PDT by Andreas Kling
Modified: 2010-10-24 17:58 PDT (History)
3 users (show)

See Also:

Proposed patch (2.06 KB, patch)
2010-10-24 13:55 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-10-24 13:41:57 PDT
This function iterates over a QImage getting and setting every pixel with pixel() and setPixel().
This is ridiculously slow since it does bounds checking and detach() for every pixel. We should grab the bits() and do direct access.
Comment 1 Andreas Kling 2010-10-24 13:55:08 PDT
Created attachment 71697 [details]
Proposed patch
Comment 2 Kenneth Rohde Christiansen 2010-10-24 13:59:12 PDT
Comment on attachment 71697 [details]
Proposed patch

Looks fine. Where did you run into this issue?
Comment 3 Andreas Kling 2010-10-24 14:01:59 PDT
(In reply to comment #2)
> (From update of attachment 71697 [details])
> Looks fine. Where did you run into this issue?

The SVG folks were discussing http://svg-wow.org/filterEffects/chiseled.svg so I gave it a spin in QtTestBrowser. I should have included that in the bug description, sorry.

Thanks for reviewing! <3
Comment 4 Andreas Kling 2010-10-24 14:08:27 PDT
Comment on attachment 71697 [details]
Proposed patch

Clearing flags on attachment: 71697

Committed r70424: <http://trac.webkit.org/changeset/70424>
Comment 5 Andreas Kling 2010-10-24 14:08:36 PDT
All reviewed patches have been landed.  Closing bug.
Comment 6 WebKit Review Bot 2010-10-24 17:58:58 PDT
http://trac.webkit.org/changeset/70424 might have broken Leopard Intel Debug (Tests)
The following tests are not passing: