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
[hwrdr.native] Blur RenderEffect seems to always use DECAL edge treatment #8955
Comments
Hi Chris, It looks like, for the current version of native graphics in Robolectric (derived from Android S), blur effect is a GPU-only effect, and does not have a CPU implementation. There is a comment in SKia to this effect, There is good news, however. In Android V, there appears to be an implementation of fTileMode for the CPU. So when Android V is released this should start working, if your screenshots target Android V. This is because starting in Android V, Robolectric will use the native libraries built from that specific platform version. If the fix backports cleanly, we may be able to CP the change from V to RNG's AOSP branch. |
Here is the equivalent issue in the LayoutLib tracker: https://issuetracker.google.com/issues/326101779 |
Great detective work! Thanks for the update. |
Description
I'm trying out the new hardware native renderer in Robolectric, through Roborazzi: chrisbanes/haze#147. You'll notice that the blurred content has a white edge around it.
This is what the same content looks like on device:
The issue seems to be that I use
RenderEffect.createBlurEffect(..., Shader.TileMode.CLAMP)
(here). Robolectric seems to ignore the tile mode provided, and forces theDECAL
mode.For completeness, this is what is displayed on device when I switch to
DECAL
, which is consistent with the screenshot output:Robolectric & Android Version
Robolectric 4.12
Link to a public git repo demonstrating the problem:
chrisbanes/haze#147
The text was updated successfully, but these errors were encountered: