class ViewTreeSnapshotter

Defined at line 20 of file ../../src/ui/scenic/lib/view_tree/view_tree_snapshotter.h

Class for building and handing out snapshots of a ViewTree out of subtrees.

All calls to ViewTreeSnapshotter must be made on the same thread.

Public Methods

void ~ViewTreeSnapshotter ()

Defined at line 44 of file ../../src/ui/scenic/lib/view_tree/view_tree_snapshotter.h

void ViewTreeSnapshotter (std::vector<SubtreeSnapshotGenerator> subtrees, std::vector<Subscriber> subscribers)

Each element in |subtrees| will be called once for every call to UpdateSnapshot(). Each

closure may generate any number of SubtreeSnapshots with any connectivity, but the very first

received SubtreeSnapshots from the first SubtreeSnapshotGenerator *must* be the root of the

full ViewTree and the combined set of all SubtreeSnapshots from all |subtrees| *must*

constitute a fully connected ViewTree.

Each element in |subtrees| must be safe to call repeatedly on this thread for

the lifetime of ViewTreeSnapshotter.

The |on_new_view_tree| closure of each subscriber in |subscribers| will be called at the

end of every UpdateSnapshot() call with the new snapshot, on their individual dispatcher.

All subscriber callbacks must be safe to queue on their dispatchers for the lifetime of

ViewTreeSnapshotter.

Defined at line 117 of file ../../src/ui/scenic/lib/view_tree/view_tree_snapshotter.cc

void UpdateSnapshot ()

Calls each SubtreeSnapshotGenerator() in |subtree_generators_| in turn, combines the results

into a snapshot and hands out the snapshot to each subscriber in |subscriber_callbacks_|.

Defined at line 130 of file ../../src/ui/scenic/lib/view_tree/view_tree_snapshotter.cc

Records