The Developer Preview for Android 11 is now available; test it out and share your feedback.

FrameManager

object FrameManager
kotlin.Any
   ↳ androidx.compose.FrameManager

The frame manager manages the priority frame in the main thread.

Once the FrameManager has started there is always an open frame in the main thread. If a model object is committed in any frame then the frame manager schedules the current frame to commit with the Choreographer and a new frame is open. Any model objects read during composition are recorded in an invalidations map. If they are mutated during a frame the recompose scope that was active during the read is invalidated.

Summary

Public methods

Unit

T
framed(block: () -> T)

T
isolated(block: () -> T)

Unit

T
unframed(block: () -> T)

Inherited extension functions

From androidx.compose
operator T

IMPORTANT: This global operator is TEMPORARY, and should be removed whenever an answer for contextual composers is reached.

Public methods

ensureStarted

fun ensureStarted(): Unit

framed

@TestOnly fun <T> framed(block: () -> T): T

isolated

@TestOnly fun <T> isolated(block: () -> T): T

nextFrame

fun nextFrame(): Unit

unframed

@TestOnly fun <T> unframed(block: () -> T): T