Skip to content
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

Raborazzi 1.9.0 + Robolectric 4.12-SNAPSHOT #255

Closed
desugar-64 opened this issue Jan 29, 2024 · 7 comments · Fixed by #277
Closed

Raborazzi 1.9.0 + Robolectric 4.12-SNAPSHOT #255

desugar-64 opened this issue Jan 29, 2024 · 7 comments · Fixed by #277

Comments

@desugar-64
Copy link

desugar-64 commented Jan 29, 2024

Understanding Rendering Outputs with Raborazzi and Robolectric

I'm currently working with the following setup:

Raborazzi Version: 1.9.0
Robolectric Version: 4.12-SNAPSHOT
Jetpack Compose Version: 1.6.0

Issue Encountered: When I enable hardware rendering (RNG HW) by setting System.setProperty("robolectric.screenshot.hwrdr.native", "true"), I am encountering an issue where the rendering output results in an empty (black) screenshot. Is this a known limitation, and is the feature not yet supported?

Additional Context:
Methods Used: captureScreenRoboImage() and captureOnRoot().
Primary Concern: I am awaiting hardware rendering capabilities due to a clipping-to-outline issue in Jetpack Compose 1.6.0.

Any insights or suggestions regarding this issue would be greatly appreciated.

@takahirom
Copy link
Owner

We are discussing the RNG HW here. I have the code which can reproduce the issue using Espresso, but we haven't found a solution yet.
robolectric/robolectric#8081 (comment)

@takahirom
Copy link
Owner

takahirom commented Mar 1, 2024

@desugar-64 (CC: @chrisbanes )
I've tested the hardware rendering (RNG HW) with the current snapshot version, and it works great.
#273 (comment)

Could you please confirm if you're utilizing ShadowPackageManager.addActivityIfNotPresent or something in your tests?
robolectric/robolectric#8081 (comment)

@chrisbanes
Copy link

It's working nicely for me! chrisbanes/haze#147

@serhiiyaremychecw
Copy link

Wow, let me check this too.

@serhiiyaremychecw
Copy link

@takahirom
Yay, I can confirm HW rendering is working and my composable functions are no longer clipped to bounds!

@serhiiyaremychecw
Copy link

You can close the issue.

@takahirom
Copy link
Owner

Thank you for your feedback. I've closed this issue and included the information in the FAQ: https://github.com/takahirom/roborazzi?tab=readme-ov-file#q-the-images-taken-from-roborazzi-seem-broken

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants