Closed
Bug 541188
Opened 15 years ago
Closed 15 years ago
nsSVGForeignObjectFrame::PaintSVG doesn't pass aDirtyRect through
Categories
(Core :: SVG, defect, P3)
Core
SVG
Tracking
()
RESOLVED
FIXED
mozilla1.9.3a1
People
(Reporter: dbaron, Assigned: dbaron)
References
()
Details
(Keywords: perf)
Attachments
(2 files, 2 obsolete files)
3.62 KB,
application/xhtml+xml
|
Details | |
2.83 KB,
patch
|
jwatt
:
review+
roc
:
superreview+
|
Details | Diff | Splinter Review |
I was investigating why fixing bug 418063 didn't make much of an improvement on the performance problems in:
http://dbaron.org/mozilla/invert-colors#http://tests.themasta.com/tinderboxpushlog/?tree=MozillaTry
I think I've found the next (maybe even last, I hope) problem, which is that nsSVGForeignObjectFrame::PaintSVG doesn't pass a transformed version of aDirtyRect through to the call to nsLayoutUtils::PaintFrame; it just tells PaintFrame that everything is dirty.
Assignee | ||
Comment 1•15 years ago
|
||
This patch seems to work; it makes things involving repainting in foreignObject feel *much* faster.
I found this code (and the GetFrameForPoint code) somewhat confusing, but I think I understand it now. However, now that I understand it, I'm not quite sure how to make it simpler, though I think it should be.
I've tested that the repainting from selection and link hovering works in http://starkravingfinkle.org/blog/wp-content/uploads/2007/07/foreignobject-transform.svg (including when zoomed), and in a similar testcase that has a viewbox. I should probably have some automated tests for those combinations, though...
Assignee | ||
Comment 2•15 years ago
|
||
(In reply to comment #0)
> I was investigating why fixing bug 418063 didn't make much of an improvement on
> the performance problems in:
> http://dbaron.org/mozilla/invert-colors#http://tests.themasta.com/tinderboxpushlog/?tree=MozillaTry
That's no longer a testcase for this, since I reworked it to avoid using foreignObject (it uses 'filter' on HTML elements instead).
Assignee | ||
Comment 3•15 years ago
|
||
Assignee | ||
Comment 4•15 years ago
|
||
When I pushed to try, I got this failure on Mac only:
REFTEST TEST-UNEXPECTED-FAIL | file:///builds/slave/sendchange-macosx-unittest/mozilla/layout/reftests/svg/moz-only/foreignObject-zoom-01.svg |
... seems like it could be a real problem. (Not sure if it's this bug or bug 418063's patch.)
Comment 5•15 years ago
|
||
testcases for this patch are in bug 426980 bug 428379 and bug 484677
It may be possible to turn the first two into reftests using roc's zoomed reftest feature. If the first two bugs still work then it's pretty certain that bug 484677 still will.
Assignee | ||
Comment 6•15 years ago
|
||
This is the reftest failure from try server; I confirmed it is due to this patch, and it's happened twice. It's Mac-only.
The problem is a very slight color difference down the right edge of the viewport.
I expect I need a call to ToOutsidePixels somewhere.
Assignee | ||
Comment 7•15 years ago
|
||
The cause of the reftest failure was that I was inadvertently using the default conversion (truncate) of floats to nscoord rather than using NSToCoordFloor/Ceil as appropriate.
Attachment #422861 -
Attachment is obsolete: true
Attachment #423118 -
Attachment is obsolete: true
Attachment #423720 -
Flags: superreview?(roc)
Attachment #423720 -
Flags: review?(jwatt)
Assignee | ||
Comment 8•15 years ago
|
||
Also, I wonder if we should really be intersecting the dirty rect with the kid's rect (which is what we used to pass as the dirty rect); maybe we shouldn't. I should write some tests...
Attachment #423720 -
Flags: superreview?(roc) → superreview+
Assignee | ||
Comment 9•15 years ago
|
||
(In reply to comment #8)
> Also, I wonder if we should really be intersecting the dirty rect with the
> kid's rect (which is what we used to pass as the dirty rect); maybe we
> shouldn't. I should write some tests...
It seems like we're always clipping the overflow, so it doesn't matter.
![]() |
||
Updated•15 years ago
|
Attachment #423720 -
Flags: review?(jwatt) → review+
Assignee | ||
Comment 10•15 years ago
|
||
Status: NEW → RESOLVED
Closed: 15 years ago
Priority: -- → P3
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.9.3a1
You need to log in
before you can comment on or make changes to this bug.
Description
•