class SnapshotHolder
Defined at line 24 of file ../../src/ui/scenic/lib/view_tree/snapshot_holder.h
Holds a view tree snapshot and allows checking out a single reference at a time
to ensure consistency within a call stack.
Architectural note: this is an ideal extension point to allow input subsystems to access
versioned view tree snapshots. For example, an action which continues across multiple input
events, such as a mouse-down-drag-up action, could process each event against a consistent
snapshot, not whichever happens to be the latest. No current use case requires this, so it
seemed appropriate to write this note.
Public Methods
void SnapshotHolder ()
Defined at line 14 of file ../../src/ui/scenic/lib/view_tree/snapshot_holder.cc
Ref GetSnapshot ()
Gets a reference to the current snapshot.
Must be called on the input thread.
Defined at line 16 of file ../../src/ui/scenic/lib/view_tree/snapshot_holder.cc
void SetSnapshot (std::shared_ptr<const Snapshot> ptr)
Sets a new snapshot.
Must be called on the main thread.
Defined at line 29 of file ../../src/ui/scenic/lib/view_tree/snapshot_holder.cc
void ~SnapshotHolder ()
Defined at line 47 of file ../../src/ui/scenic/lib/view_tree/snapshot_holder.h
Records
Friends
class Ref