Closed Bug 1409856 Opened 2 years ago Closed 2 years ago
Clean up coordinate system units in WR-related code
59 bytes, text/x-review-board-request
Now that we've ditched layers-full WR, pretty much everything should be in LayoutDevice coordinate space. We should clean up the APIs and helpers to ensure this.
Redid those pushes on autoland tip since central is pretty stale Builds: https://treeherder.mozilla.org/#/jobs?repo=try&revision=b81cf368e63a30c9564fabb2f0591e227de47aa8 Tests: https://treeherder.mozilla.org/#/jobs?repo=try&revision=534c87ac8f2c6d4f9eed36ebbb02185ee5b79edb
Is there any background I could read on this?
I wrote a blog post a while back that might help: https://staktrace.com/spout/entry.php?id=800 Also, comments in layout/base/Units.h
Right so according to that post, LayoutDevice != Layer, but a bunch of the diff you're testing is just replacing one with the other? How does that work?
Mostly because we did it wrong before :) Pretty much all of the values we are computing are actually in LayoutDevice space because we compute them from various layout properties, we just mislabeled them. Back when we had layers-full code we actually had things in layers space and so we made the APIs like StackingContextHelper::ToRelativeLayoutRect and wr::ToLayoutPoint take both. But then it looks like a bunch of layers conversions got cargo culted around into layout code which should have just kept things in LD coords. This undoes the mislabeling.
Ah perfect, that's exactly what I was hoping to hear! I imagine we never noticed anything since the difference is (still?) only visible on mobile.
(In reply to Alexis Beingessner [:Gankro] from comment #7) > I imagine we never noticed anything since the difference is (still?) only > visible on mobile. Yeah. And in most cases we are actually providing the right values. There's just a couple of places in the APZ code where we might not be, and so I left those as having some ToUnknown()/FromUnknown() stuff.
Comment on attachment 8919945 [details] Bug 1409856 - Update all the WebRender code to use LayoutDevice units instead of Layer units. https://reviewboard.mozilla.org/r/190892/#review196092
Attachment #8919945 - Flags: review?(jmuizelaar) → review+
Pushed by firstname.lastname@example.org: https://hg.mozilla.org/integration/autoland/rev/6600dc827ccf Update all the WebRender code to use LayoutDevice units instead of Layer units. r=jrmuizel
Priority: P3 → P1
Whiteboard: [gfx-noted][wr-mvp][triage] → [wr-mvp] [gfx-noted]
You need to log in before you can comment on or make changes to this bug.