Closed Bug 1716695 Opened 1 month ago Closed 1 month ago

Add epsilon test for ScaleOffset keys in spatial node comparer

Categories

(Core :: Graphics: WebRender, task)

task

Tracking

()

RESOLVED FIXED
91 Branch
Tracking Status
firefox90 --- fixed
firefox91 --- fixed

People

(Reporter: gw, Assigned: gw)

References

Details

Attachments

(1 file)

No description provided.

The values in ScaleOffset keys for the spatial node comparer can
often have very small differences that are causing invalidations but
are not going to affect the rendered content in any noticeable way.

This is probably mostly due to inaccuracies in the way we calculate
the results in get_relative_transform. Instead of using the fast
form parent.inverse().accumulate(child), we could instead traverse
the tree from the parent, accumulating the local transforms. This
would be slightly less efficient but could probably be cached.

There may also be other sources of floating point inaccuracy that
is introduced in the calculations, so for now we will ignore any changes
which have a scale/translation change of < 0.001.

Assignee: nobody → gwatson
Status: NEW → ASSIGNED
Pushed by gwatson@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/bd4f35a7fca4
Add epsilon test for ScaleOffset keys in spatial node comparer r=gfx-reviewers,nical

I can confirm that this fixes the problem that I was seeing.

Comment on attachment 9227319 [details]
Bug 1716695 - Add epsilon test for ScaleOffset keys in spatial node comparer

Beta/Release Uplift Approval Request

  • User impact if declined: Reduced performance when scrolling, especially when zoomed in, especially for swgl users.
  • Is this code covered by automated tests?: No
  • Has the fix been verified in Nightly?: No
  • Needs manual test from QE?: No
  • If yes, steps to reproduce:
  • List of other uplifts needed: None
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): It's a small change that basically just makes our invalidation a little bit less aggressive when encountering small floating point differences.

It's possible that this could uncover existing invalidation bugs, but is not very likely to cause any of it's own.

  • String changes made/needed:
Attachment #9227319 - Flags: approval-mozilla-beta?
Status: ASSIGNED → RESOLVED
Closed: 1 month ago
Resolution: --- → FIXED
Target Milestone: --- → 91 Branch

Comment on attachment 9227319 [details]
Bug 1716695 - Add epsilon test for ScaleOffset keys in spatial node comparer

approved for 90.0b10

Attachment #9227319 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
You need to log in before you can comment on or make changes to this bug.