Open
Bug 790861
Opened 12 years ago
Updated 2 years ago
SVG creates unnecessary nsDisplayTransform items with the identity transform
Categories
(Core :: SVG, defect)
Core
SVG
Tracking
()
NEW
People
(Reporter: mattwoodrow, Unassigned)
References
(Blocks 1 open bug)
Details
(Keywords: perf)
Attachments
(1 file)
1.56 KB,
patch
|
Details | Diff | Splinter Review |
SVG is frequently creating nsDisplayTransform display items with the identity transform. This seems fairly pointless, and wasteful.
The attached patch fixes it, but doesn't seem like a great way to go.
Making nsSVGSVGElement::HasChildrenOnlyTransform return false when PrependLocalTransformsTo is going to return the identity transform seems better, but it wasn't obvious (to me) how to do this.
Attachment #660695 -
Flags: review?(jwatt)
Comment 1•12 years ago
|
||
(In reply to Matt Woodrow (:mattwoodrow) from comment #0)
> SVG is frequently creating nsDisplayTransform display items with the
> identity transform.
When are you seeing this? It should really be very rare - at least when it comes to the part of the code that you're patching. For SVGSVGElement::HasChildrenOnlyTransform to return true for the identity matrix, we pretty much have to have a viewBox set to the value "0 0 w h" where w and h exactly match the width and height of the viewport, respectively. The arbitrary nature of the dimensions of the viewport make that pretty unlikely.
OS: Mac OS X → All
Hardware: x86 → All
Comment 2•12 years ago
|
||
Fixing bug 828240 would make this pretty much a non-issue for children-only transforms (what you're patching).
Comment 3•12 years ago
|
||
I also think that I did this deliberately...something to do with animations _to_/_through_ the identity transform messing up at the point that they hit identity. I can't quite recall the details now though.
Comment 4•12 years ago
|
||
Comment on attachment 660695 [details] [diff] [review]
Check if the actual transform is the identity
Cancelling review request for now until we have an example of how this can hurt us, or some other argument for making a change like this.
Attachment #660695 -
Flags: review?(jwatt)
Updated•8 years ago
|
Summary: SVG creates unnecessary nsDisplayTransform items. → SVG creates unnecessary nsDisplayTransform items with the identity transform
I think we're creating a transform for every anonymous child now since bug 1458968, even if it's the identity. I guess that's considered necessary though :) so not sure what that means for this bug.
Updated•2 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•