You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Affected Device(s) [e.g. Samsung Galaxy s10 with Android 9.0]
Cloudy redraw is triggered every time and layout change occurs. Eg on code below I anime box which has no relation to blured box. Hoever cloudy is redrawing multiple times per each animation. On pre android12 device it causes significant frame skipps
Column {
Box(Modifier.size(300.dp)) {
val graphicsLayer = rememberGraphicsLayer()
Box(
Modifier
.fillMaxSize()
.cloudy(
80,
graphicsLayer = graphicsLayer,
onStateChanged = { Timber.e("cloudy ${it.javaClass.simpleName}") })
.background(Color.Blue)
)
}
Box(Modifier.size(300.dp)) {
var satarget by remember { mutableStateOf(false) }
val sa by animateFloatAsState(if (satarget) 1f else 0f)
Box(
Modifier
.height(300.dp * sa)
.fillMaxWidth()
.background(Color.Red)
)
LaunchedEffect(Unit) {
while (true) {
delay(400)
satarget = !satarget
}
}
}
}
The text was updated successfully, but these errors were encountered:
frakc
changed the title
Bugs during animations
Cloudy causes lags during animations
Oct 1, 2024
It's a CPU-based blur that's executed in a blocking manner. The blur recalculates whenever the layout updates. I'm not sure if it updates multiple times per frame, but even if it only updates once per frame, it's still a slow CPU-based blurring process.
To make it work fast, it needs to be hardware accelerated.
Please complete the following information:
Cloudy redraw is triggered every time and layout change occurs. Eg on code below I anime box which has no relation to blured box. Hoever cloudy is redrawing multiple times per each animation. On pre android12 device it causes significant frame skipps
The text was updated successfully, but these errors were encountered: