Closed Bug 1382682 Opened 3 years ago Closed 3 years ago

Collect scroll metadata for APZ in layers-free webrender

Categories

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

Other Branch
enhancement

Tracking

()

RESOLVED FIXED
mozilla56
Tracking Status
firefox56 --- fixed

People

(Reporter: kats, Assigned: kats)

References

Details

(Whiteboard: [gfx-noted])

Attachments

(4 files)

In layers-free webrender we don't have a layer tree to walk. Instead we need to pick out the scroll metadata from walking the display list. It's not entirely clear to me what sort of structure we'll want to use to ship over the metadata to the compositor (whether to re-use the WebRenderScrollData from webrender layers or some variation of it) but in the name of incremental progress I'd like to at least collect the metadata.
Comment on attachment 8888366 [details]
Bug 1382682 - Move ViewIDForASR into nsLayoutUtils for reuse.

https://reviewboard.mozilla.org/r/159314/#review164912
Attachment #8888366 - Flags: review?(mstange) → review+
Comment on attachment 8888367 [details]
Bug 1382682 - Update a param to be a const-ptr.

https://reviewboard.mozilla.org/r/159316/#review164914
Attachment #8888367 - Flags: review?(mstange) → review+
Comment on attachment 8888368 [details]
Bug 1382682 - Collect scroll metadata from the display list in layers-free webrender.

https://reviewboard.mozilla.org/r/159318/#review164916
Attachment #8888368 - Flags: review?(mstange) → review+
Comment on attachment 8888369 [details]
Bug 1382682 - Collect scroll metadata for scrollinfo layers as well.

https://reviewboard.mozilla.org/r/159320/#review164918
Attachment #8888369 - Flags: review?(mstange) → review+
Comment on attachment 8888368 [details]
Bug 1382682 - Collect scroll metadata from the display list in layers-free webrender.

https://reviewboard.mozilla.org/r/159318/#review164922

::: gfx/layers/wr/WebRenderLayerManager.cpp:256
(Diff revision 1)
> +          // information into the WR display list directly.
> +          Maybe<ScrollMetadata> metadata = asr->mScrollableFrame->ComputeScrollMetadata(
> +              nullptr, item->ReferenceFrame(),
> +              ContainerLayerParameters(), nullptr);
> +          MOZ_ASSERT(metadata);
> +          mScrollMetadata[id] = metadata.ref();

Maybe change this to
mScrollMetadata[id] = *metadata;
for consistency with the next patch
Comment on attachment 8888368 [details]
Bug 1382682 - Collect scroll metadata from the display list in layers-free webrender.

https://reviewboard.mozilla.org/r/159318/#review164922

> Maybe change this to
> mScrollMetadata[id] = *metadata;
> for consistency with the next patch

Fixed, thanks
Pushed by kgupta@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/a2bfff6c59b1
Move ViewIDForASR into nsLayoutUtils for reuse. r=mstange
https://hg.mozilla.org/integration/autoland/rev/7b1329006eda
Update a param to be a const-ptr. r=mstange
https://hg.mozilla.org/integration/autoland/rev/975390c67975
Collect scroll metadata from the display list in layers-free webrender. r=mstange
https://hg.mozilla.org/integration/autoland/rev/8949e22b8033
Collect scroll metadata for scrollinfo layers as well. r=mstange
You need to log in before you can comment on or make changes to this bug.