Open
Bug 820580
Opened 12 years ago
Updated 2 years ago
Excessive painting w/ animated SVG background
Categories
(Core :: SVG, defect)
Tracking
()
NEW
People
(Reporter: bugs, Unassigned)
References
()
Details
Attachments
(2 files)
Compare: http://m8y.org/tmp/testcase228.xhtml to http://m8y.org/tmp/leaves.svg with nglayout.debug.paint_flashing set to true. background image repaints entire page, continuously. Also, and this is kind of annoying. If I switch to another tab, the CPU usage on the SVG drops off quite a lot. Not low enough IMO, but quite a lot. If I switch to another tab, the CPU usage of the html page remains high.
Comment 1•12 years ago
|
||
Comment 2•12 years ago
|
||
Here's a testcase. Paint-flashing shows that we're continuously painting the full <div>. If you just view the SVG directly, only the animated purple rect is repainted.
Comment 3•12 years ago
|
||
(In reply to nemo from comment #0) > If I switch to another tab, the CPU usage of the html page remains high. May be worth tracking this part ^^ in a separate bug.
Comment 4•12 years ago
|
||
(In reply to Daniel Holbert [:dholbert] from comment #2) > Created attachment 691145 [details] > testcase 1 > > Here's a testcase. Paint-flashing shows that we're continuously painting the > full <div>. This happens because we invalidate the full SVG image every time we change: https://mxr.mozilla.org/mozilla-central/source/image/src/VectorImage.cpp#725 This might be hard to change... We receive notification to invalidate by registering as a nsSVGRenderingObserver, and nsSVGRenderingObservers don't receive bounds information with their notifications -- they just get a "stuff changed, so you better redraw yourself" callback. https://mxr.mozilla.org/mozilla-central/source/layout/svg/nsSVGEffects.h#34 To fix this correctly, I think we'd need to either make nsSVGRenderingObserver significantly more intelligent, or else stop using nsSVGRenderingObserver and use another means of figuring out when/where to invalidate.
Updated•2 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•