graphics glitch on some devices

90 views
Skip to first unread message

Dave Dyer

unread,
Jun 1, 2016, 8:19:47 PM6/1/16
to CodenameOne Discussions

If you look at the attached image, note that the stacks of chips near the center of the screen have
a darker border around them.  This is a side effect of rendering a stack of chips by repeatedly
compositing a single chip at different positions, and (the problem) is that the transparent background
is not rendering as completely transparent. The repeated compositing is done to offscreen bitmaps,
not directly to paint graphics.

This effect occurs on some devices and not on others from the same binary.  So I assume that this
is probably in the OS or the hardware, and not in your VM.  

If you concur, my question is where to push this complaint to. 
If you think it's your problem, please fix it someday.

I do not see the problem on IOS, or the simulator, or most of my Android devices,
but I do see it on my Kindle fire (5.1.3)

Screenshot_2016-06-01-16-48-08.png

Shai Almog

unread,
Jun 2, 2016, 12:26:23 AM6/2/16
to CodenameOne Discussions
Either way we'll need a test case so we can reproduce that.

Dave Dyer

unread,
Jun 2, 2016, 3:33:55 PM6/2/16
to CodenameOne Discussions

Based on the observation that the same binary behaves differently on kindles,
is there a plausible way it could be your problem?

Shai Almog

unread,
Jun 3, 2016, 12:55:53 AM6/3/16
to CodenameOne Discussions
Sure. I'm not saying it isn't out problem, I'm saying that I have no way to debug theories.

Dave Dyer

unread,
Jun 5, 2016, 5:52:44 PM6/5/16
to CodenameOne Discussions
It was worth the exercise to try to produce an example for you - my attention is now
drawn to the jpeg decoder, suspected of not producing full white when it should have.
Is the jpeg decoder library in your domain?

Dave Dyer

unread,
Jun 5, 2016, 10:39:39 PM6/5/16
to CodenameOne Discussions

https://github.com/codenameone/CodenameOne/issues/1796

My (unusual) image consruction process uses jpg images as masks
which are composited to yield transparent images.   The artifacts at
the start of this thread result from the masks being not quite transparent.

Shai Almog

unread,
Jun 5, 2016, 10:58:03 PM6/5/16
to CodenameOne Discussions
Nope. We use the native jpeg decoding ability and have no control over that.
I wouldn't even trust PNG decoding to be 100% accurate on devices.

Dave Dyer

unread,
Jun 6, 2016, 1:51:25 PM6/6/16
to CodenameOne Discussions

Which brings me back to the original post - it's not your problem, but do
you have any advice how/to whom the bug could be reported.

Shai Almog

unread,
Jun 7, 2016, 12:13:54 AM6/7/16
to CodenameOne Discussions
Since this requires OS changes on devices even if you could report it there will probably be no answer.
We reported issues in Android and they generally just go into the pile never to be heard of again...

When you load an image on the device it is loaded into a native surface object which translates the colors to platform colors, you would usually expect white to stay white and black to stay black but there is no guarantee of that. These are damn hard to track bugs as they go into the native graphics drivers and the vendors usually don't want to touch those issues.

Dave Dyer

unread,
Jun 8, 2016, 6:54:46 PM6/8/16
to CodenameOne Discussions
About what I expected.  I've papered over the problem by treating 254 like 255 when compositing
my images.  I think I'll leave it at that.

Reply all
Reply to author
Forward
0 new messages