class InputOwnershipEvaluator

Defined at line 42 of file ../../src/ui/scenic/lib/view_tree/input_ownership_evaluator.h

Evaluates ViewTree snapshots to determine whether a registered client view

covers full screen as the sole active input view. Dynamically asserts and

clears orthogonal input ownership signals on the shared `ownership_event`:

- Assert ZX_USER_SIGNAL_3 (`kInputClientOwned`) and clear ZX_USER_SIGNAL_4

(`kInputPlatformOwned`) when single-view fullscreen criteria are met.

- Assert ZX_USER_SIGNAL_4 and clear ZX_USER_SIGNAL_3 when conditions are not met.

- ZX_USER_SIGNAL_0..2 (`kDisplayUnowned`, `kDisplayPlatformOwned`) are never modified.

Threading Model:

All member functions must be called from the same thread (main/Scenic dispatcher thread).

Direct-Client Model:

Follows the singleton direct-client replacement contract: registering a new client ViewRef

replaces the prior one and re-evaluates against the new view. If the registered view is

in the tree as a fullscreen sole leaf without competing views or overlays, direct input ownership

is granted (asserting ZX_USER_SIGNAL_3). Ownership goes to the platform unless the new view

is in the tree as a fullscreen sole leaf, and when the registered view disconnects.

View Hierarchy Scope:

All overlays revoking `kInputClientOwned` must have `ViewRef`s in `snapshot.view_tree`.

Anonymous views and ancestor-level transform content (such as mouse cursor nodes attached

directly to ancestor transforms) without independent `ViewRef` entries are intentionally

excluded from overlay evaluation. Intermediate ancestors must cover or exceed root bounds to

ensure the client view is not clipped on screen.

Public Methods

void RegisterViewRef (zx_koid_t koid)

Registers a view ref koid requesting direct input ownership.

Replaces any previously registered view ref.

Triggers evaluation if a snapshot is already present.

Defined at line 38 of file ../../src/ui/scenic/lib/view_tree/input_ownership_evaluator.cc

void SetOwnershipEvent (const zx::event & ownership_event)

Sets or updates the display ownership event handle.

Duplicates the event handle to maintain ownership.

Triggers evaluation if a snapshot is already present.

Defined at line 22 of file ../../src/ui/scenic/lib/view_tree/input_ownership_evaluator.cc

void InputOwnershipEvaluator ()

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

void ~InputOwnershipEvaluator ()

Defined at line 45 of file ../../src/ui/scenic/lib/view_tree/input_ownership_evaluator.h

bool OnNewViewTreeSnapshot (std::shared_ptr<const Snapshot> snapshot)

Updates the latest snapshot and re-evaluates input ownership.

Returns true if single-view fullscreen criteria were met.

Defined at line 48 of file ../../src/ui/scenic/lib/view_tree/input_ownership_evaluator.cc

bool OnNewViewTreeSnapshot (const Snapshot & snapshot)

Convenience overload accepting a const reference for callers and unit tests.

Defined at line 62 of file ../../src/ui/scenic/lib/view_tree/input_ownership_evaluator.h

std::optional<zx_koid_t> registered_view_for_test ()

Defined at line 66 of file ../../src/ui/scenic/lib/view_tree/input_ownership_evaluator.h