Bug 66854 - [Qt] Path::boundingRect() is unnecessarily slow.
Summary: [Qt] Path::boundingRect() is unnecessarily slow.
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Andreas Kling
URL:
Keywords: Qt, QtTriaged
Depends on: 66945
Blocks:
  Show dependency treegraph
 
Reported: 2011-08-24 06:43 PDT by Andreas Kling
Modified: 2011-08-26 06:36 PDT (History)
4 users (show)

See Also:


Attachments
Proposed patch (3.59 KB, patch)
2011-08-24 06:43 PDT, Andreas Kling
no flags Details | Formatted Diff | Diff
Proposed patch (2.64 KB, patch)
2011-08-25 03:47 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 2011-08-24 06:43:13 PDT
This will allow us to remove the Qt-specific optimization in CanvasRenderingContext2D::stroke().
Comment 1 Andreas Kling 2011-08-24 06:43:51 PDT
Created attachment 104989 [details]
Proposed patch
Comment 2 Andreas Kling 2011-08-24 07:28:52 PDT
Comment on attachment 104989 [details]
Proposed patch

Clearing r? while discussing this with some random Belgian person.
Comment 3 Andreas Kling 2011-08-25 03:43:09 PDT
Looking at other ports, and clients of Path::boundingRect(), it turns out that it's not necessary to return a 100% accurate bounding rectangle, since it's only used for dirty region computation and short-circuiting the SVG path-based elements' hit testing.

Changing the scope of the bug to always use QPainterPath::controlPointRect() in Qt's Path::boundingRect() since this is significantly faster and matches the current behavior of (at least) Skia's Path.
Comment 4 Andreas Kling 2011-08-25 03:47:40 PDT
Created attachment 105159 [details]
Proposed patch
Comment 5 Benjamin Poulain 2011-08-25 03:49:23 PDT
Comment on attachment 105159 [details]
Proposed patch

Great
Comment 6 WebKit Review Bot 2011-08-25 04:48:17 PDT
Comment on attachment 105159 [details]
Proposed patch

Clearing flags on attachment: 105159

Committed r93774: <http://trac.webkit.org/changeset/93774>
Comment 7 WebKit Review Bot 2011-08-25 04:48:23 PDT
All reviewed patches have been landed.  Closing bug.
Comment 8 Csaba Osztrogonác 2011-08-25 09:02:30 PDT
Reopen, because it was rolled out by https://trac.webkit.org/changeset/93790

This patch broke zillion tests on the Qt bot. You guys should have run 
layout tests before landing. Please fix the bug before re-landing.
Comment 9 Antonio Gomes 2011-08-25 09:40:46 PDT
(In reply to comment #8)
> Reopen, because it was rolled out by https://trac.webkit.org/changeset/93790
> 
> This patch broke zillion tests on the Qt bot. You guys should have run 
> layout tests before landing. Please fix the bug before re-landing.

zillion != 26 :)
Comment 10 Csaba Osztrogonác 2011-08-25 09:42:13 PDT
(In reply to comment #9)
> zillion != 26 :)

You're right, but 26 !=0, and all test must pass.
Comment 11 Andreas Kling 2011-08-25 10:39:34 PDT
(In reply to comment #10)
> (In reply to comment #9)
> > zillion != 26 :)
> 
> You're right, but 26 !=0, and all test must pass.

Like I said on IRC, those failures are actually progressions and should just be updated. I couldn't do it at the time because I didn't have a checkout. I'll roll it back in along with a rebaseline. Thanks for playing another round of the mindless rollout game :)
Comment 12 Csaba Osztrogonác 2011-08-25 10:44:20 PDT
I don't know anything about your patch... I tried to ping you on #qtwebkit, but you didn't answer. I had to do it, because red bot can't catch new regressions ... That's why we need always green bots. That's why developers have to run layout tests before landing and not leave the tree red for hours ...
Comment 13 Andreas Kling 2011-08-26 06:36:14 PDT
Committed r93873: <http://trac.webkit.org/changeset/93873>