LithoLayoutContext

class LithoLayoutContext(val treeId: Int, val cache: MeasuredResultCache, rootContext: ComponentContext?, treeState: TreeState?, val layoutVersion: Int, val rootComponentId: Int, val isAccessibilityEnabled: Boolean, val layoutCache: LayoutCache, currentDiffTree: DiffNode?, layoutStateFuture: TreeFuture<*>?) : CalculationContext

Wraps objects which should only be available for the duration of a LayoutState, to access them in other classes such as ComponentContext during layout state calculation. When the layout calculation finishes, the LayoutState reference is nullified. Using a wrapper instead of passing the instances directly helps with clearing out the reference from all objects that hold on to it, without having to keep track of all these objects to clear out the references.

Constructors

Link copied to clipboard
constructor(treeId: Int, cache: MeasuredResultCache, rootContext: ComponentContext?, treeState: TreeState?, layoutVersion: Int, rootComponentId: Int, isAccessibilityEnabled: Boolean, layoutCache: LayoutCache, currentDiffTree: DiffNode?, layoutStateFuture: TreeFuture<*>?)

Properties

Link copied to clipboard
open override val cache: MeasuredResultCache
Link copied to clipboard
Link copied to clipboard
open override val eventHandlers: List<Pair<String, EventHandler<*>>>?
Link copied to clipboard
open override val isAccessibilityEnabled: Boolean
Link copied to clipboard
open override val isFutureReleased: Boolean
Link copied to clipboard
Link copied to clipboard
val layoutCache: LayoutCache
Link copied to clipboard
open override val layoutVersion: Int
Link copied to clipboard
var perfEvent: PerfEvent?
Link copied to clipboard
open override val rootComponentId: Int
Link copied to clipboard
Link copied to clipboard
open override val treeFuture: TreeFuture<*>?
Link copied to clipboard
open override val treeId: Int
Link copied to clipboard
open override val treeState: TreeState

Functions

Link copied to clipboard
open override fun recordEventHandler(globalKey: String, eventHandler: EventHandler<*>)

Records a Spec-generated EventHandler. This EventHandlers are an output of the calculation and will be used by EventHandlersController to rebind existing EventHandlers.

Link copied to clipboard
fun release()
Link copied to clipboard