Status Update
Comments
ra...@google.com <ra...@google.com>
sc...@google.com <sc...@google.com> #2
Nolan, is this possibly related to tm-qpr-dev
, so it's possible these devices don't have the fix.
jm...@gmail.com <jm...@gmail.com> #3
sc...@google.com <sc...@google.com> #4
Curious if this is still happening? As mentioned in
Also curious if you have access to an Android 14 device. Those would have the fix as well.
jm...@gmail.com <jm...@gmail.com> #5
Yes, the issue is still occurring on my device. (Samsung Galaxy S21 FE Android 13 One UI V5.1) AFAIK, I have the latest updates installed.
Unfortunately, I don't have access to a A14 device.
Description
In Android 13 devices this piece of code gives incorrect result (I`ve attached the demo code):
In Android 12 and below the result is correct and the output is the corresponding triangles (specified by "vertices" array) with their corresponding color (specified by "color" array). The color is interpolated across vertices.
The same code fails in some Android 13 devices. Every tested devices were Samsung S series, I was not able to test on Android 13 non-Samsung devices. The code works correctly on Android 13 emulators.
The fail consists in that the drawVertices operation multiplies the colors given in the colors array by the ARGB set in the Paint object passed as last parameter. In order to get the correct result in these Android 13 devices, I need to set a white color in the Paint object (before drawing) as:
This is clearly wrong since the documentation states something different:
"If there is no texs array, but there is a color array, then each color is interpolated across its corresponding triangle in a gradient. If both texs and colors arrays are present, then they behave as before, but the resulting color at each pixels is the result of multiplying the colors from the shader and the color-gradient together."
According to the doc, if texs array is not present, the triangle colors should be the ones passed in the color array.
Bugreport:https://drive.google.com/file/d/1MVXylePcn96WmmN0ZjfdI5xBWo-MysI3/view?usp=sharing