Figure out what value we want to use for bounds checking active SVG
Categories
(Core :: Graphics: WebRender, defect)
Tracking
()
People
(Reporter: longsonr, Assigned: longsonr)
References
Details
Attachments
(1 obsolete file)
If we have a 100px x 100px rect
aBounds.width=6000, aBounds.height=6000 aSc.GetInheritedScale().xScale = 1, aSc.GetInheritedScale().xScale = 1, width and height = 6000 i.e. > largeish.
So aBounds is in app units but it seems that largeish may be in pixels?
So the line
const float largeish = 512;
Should probably have been
const float largeish = 512 * AppUnitsPerCSSPixel();
As we currently make all SVG > 8.5333px active.
Do we
a) change largeish to const float largeish = 512 * AppUnitsPerCSSPixel();
b) change largeish to const float largeish = 8.5 * AppUnitsPerCSSPixel();
And should we at the same time change the calculation so that it checks width x height i.e. change largeish to largeishArea. That way something narrow and tall or vice versa would be active.
Assignee | ||
Updated•2 years ago
|
Assignee | ||
Comment 1•2 years ago
|
||
Updated•2 years ago
|
Assignee | ||
Comment 2•2 years ago
|
||
Oh and how do we deal with the performance fallout if we choose a)? It will regress google-slides in browsertime and likely others.
Updated•2 years ago
|
Comment 3•2 years ago
|
||
The thin case is partially handled by bug 1780191 (I need to write a test for that so it can land).
So the 512 figure originally comes from bug 1761770, which moved us from making all svg geom/image items active that wanted to be active, to giving us a lower bound to those we make active. In that context an 8 px lower bound does not seem unreasonable. There isn't much discussion in the bug about the rationale. I'd like to hear from nical on how he choose this figure and his thoughts on tweaking it. (He's on parental leave right now, but this doesn't seem urgent since this just came from looking at the code, not from an example where we perform badly.)
Updated•2 years ago
|
Assignee | ||
Updated•2 years ago
|
Comment 4•2 years ago
|
||
Should probably have been
const float largeish = 512 * AppUnitsPerCSSPixel();
Absolutely, that was an oversight.
I'd like to hear from nical on how he choose this figure and his thoughts on tweaking it.
Tweaking is definitely encouraged. 512px felt small enough that causing extra layerization would likely do more harm than good, but there wasn't much methodology in picking the threshold, other than testing on a few websites (google slides in particular).
Description
•