Closed Bug 1535029 Opened 5 years ago Closed 5 years ago

Use strongly typed units for the size sent over PWebRenderBridge::SetDisplayList

Categories

(Core :: Graphics: WebRender, enhancement, P3)

Other Branch
enhancement

Tracking

()

RESOLVED FIXED
mozilla68
Tracking Status
firefox68 --- fixed

People

(Reporter: kats, Assigned: kats)

References

Details

Attachments

(3 files)

For some reason we're doing a size.ToUnkownSize() when we probably should just leave it as a LayoutDeviceIntSize all the way through.

Doug's document-splitting patches in bug 1441308 change this size to a rect but the underlying problem of using it untyped remains. After his patches land we should fix this.

Marking as dependency so I remember to do this once document-splitting lands.

Depends on: document-splitting
Assignee: nobody → kats

The receiver of this parameter treats it as a layout size, so it doesn't
make sense for the argument to be a LayerSize partway through the call
chain. Also the callers originally get this from a LayoutDevice rect;
so there's even less reason for this to be turned into a LayerSize. The
next patch will propagate this cleanup more.

We use a strongly typed LayoutDevice rect because that's the correct
type for this rect. And we defer the rounding to the parent side for
more precise hit-testing (see next patch).

Depends on D25238

The main change here is removing some rounding so that we can do more
accurate hit-testing in APZ. Instead of rounding both the rect and the
point, we just store both as unrounded values. mRenderRootRects is also
changed to be of a Screen type as that better reflects what it's being
used for, and there is a legitimate justification for converting it from
LayoutDevice.

Depends on D25239

Pushed by kgupta@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/9c1155d2e268
Change the viewport size passed to TransactionBuilder::SetDisplayList to a wr::LayoutSize. r=dthayer
https://hg.mozilla.org/integration/autoland/rev/9e98c0c308ef
Pass the render root rect over as an unrounded LayoutDeviceRect. r=dthayer
https://hg.mozilla.org/integration/autoland/rev/30d3c155c27e
Store the render root rect as a ScreenRect. r=dthayer
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: