Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -228,8 +228,16 @@ class ImageComposeScene @ExperimentalComposeUiApi constructor(
set(value) { scene.size = value.toIntSize() }

/**
* Returns true if there are pending recompositions, renders or dispatched tasks.
* Returns whether there are pending recompositions, renders, or dispatched tasks.
* Can be called from any thread.
*
* Note that changes to snapshot state don't immediately trigger an invalidation.
* To guarantee that there are no changes expected in the scene use
* ```
* !Snapshot.current.hasPendingChanges()
* && !Snapshot.isApplyObserverNotificationPending
* && !scene.hasInvalidations()
* ```
*/
fun hasInvalidations() = scene.hasInvalidations()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -159,8 +159,16 @@ sealed interface ComposeScene : AutoCloseable {
fun invalidatePositionOnScreen()

/**
* Returns true if there are pending recompositions, renders or dispatched tasks.
* Returns whether there are pending recompositions, renders, or dispatched tasks.
* Can be called from any thread.
*
* Note that changes to snapshot state don't immediately trigger an invalidation.
* To guarantee that there are no changes expected in the scene use
* ```
* !Snapshot.current.hasPendingChanges()
* && !Snapshot.isApplyObserverNotificationPending
* && !scene.hasInvalidations()
* ```
*/
fun hasInvalidations(): Boolean

Expand Down