robolectric / robolectric

Android Unit Testing Framework
http://robolectric.org
Other
5.81k stars 1.36k forks source link

HardwareAcceleratedActivityRenderTest and ShadowNativeHardwareRendererTest fails on Mac #9044

Closed hoisie closed 2 weeks ago

hoisie commented 4 weeks ago

On Mac, when red is drawn, the result ends up being blue. This implies Skia may be using BGRA instead of RGBA as the pixmap format (or vice-versa?). I have a fix that involves using BufferedImage to swizzle the bytes, but that adds overhead, and I am trying a simpler fix at the hwui layer.

hoisie commented 4 weeks ago

Note this issue probably first appeared after c0c8e9869dcfeaa08b33d8ff2119e7b92ffd5006 was merged. That commit fixed the alpha transparency issues in HW rendering, but surfaced a new issue in Mac (and potentially Windows?).

utzcoz commented 4 weeks ago

IIRC, tests only failed on macOS, and passed on Windows. So I think it might not affect Windows implementation.

hoisie commented 4 weeks ago

This should be fixed in https://android-review.git.corp.google.com/c/platform/frameworks/base/+/3073190.