-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"IllegalArgumentException: Software rendering doesn't support drawRenderNode" caused by Modifier.animateItem() in compose 1.7.0-alpha06 #290
Comments
Sorry, I wasn't using the recordRoborazziDebug task, so I'm able to reproduce the issue. Additionally, I managed to fix the issue using the hardware rendering option. Deciding whether we can utilize it is also challenging for me though. |
@alexjlockwood @RunWith(AndroidJUnit4::class)
@GraphicsMode(GraphicsMode.Mode.NATIVE)
class ExampleUnitTest {
@get:Rule
val composeTestRule = createAndroidComposeRule<ComponentActivity>()
@Test
fun lazyColumnTest() {
composeTestRule.setContent {
LazyColumn {
item {
Text(
modifier = Modifier.animateItem(),
text = "Text",
)
}
}
}
val bitmap = Bitmap.createBitmap(100, 100, Bitmap.Config.ARGB_8888)
PixelCopy.request(
composeTestRule.activity.window, bitmap, PixelCopy.OnPixelCopyFinishedListener {
}, Handler(Looper.getMainLooper())
)
}
} The issue likely originates not from Roborazzi but from Robolectric, as Robolectric may need to incorporate the |
hey @takahirom setting |
@ArcaNO93 |
hey |
we basically have two implementations for our skeleton render effect does not work with sdk < 35, but this is most likely related to |
Thanks. Do you mean it works if you use SDK 35? |
i havent checked drawLayer() in sdk 35 |
I have a sample project (which you can download here in RoborazziSample.zip) that runs the following test:
When I run this test, I get an exception:
My sample project uses the following versions:
1.7.0-alpha06
1.11.0
4.12.1
The issue seems to be related to
Modifier.animateItem()
in Compose1.7.0-alpha06
, as this test works fine if I downgrade to Compose1.7.0-alpha05
and replace the modifier with the olderModifier.animateItemPlacement()
. (If you are unfamiliar with these APIs, basically they allow for automatic fade in/out/reordering animations in a compose list).I am uncertain of the details causing this exception, but I do notice that in the latest Compose changelog there is mention of changes to
GraphicsLayer
and I noticed that there's also mention ofGraphicsLayer
in the PR that introduced this newModifier.animateLayer()
API.Full stack trace:
The text was updated successfully, but these errors were encountered: