On Tue, Nov 24, 2009 at 12:40 PM, Lance Nanek <[email protected]> wrote:

> 16M colors usually refers to 24 bits of colors, which is 888. I did
> notice the screen on the Galaxy looks very beautiful when I saw it
> last week. That could have been some other aspect of the OLED
> technology, however.
>

OLED has significantly better color than an LCD, even if both are running at
the same bit depth.  It's downright striking putting an OLED and LCD screen
next to each other.  The first time I saw an OLED screen was kind of the
same feeling the first time I saw a DVD playing through S-Video, if anyone
remembers that. :)  (The reds!  They glow!)

Anyway, prior to 2.0, the default configuration of the platform was to
allocate non-transparent windows (basically what the vast majority of
activities use) as 16bpp 5-6-5 buffers, since this was the same
configuration as the target hardware (G1, myTouch).  This was not hard-wired
into the platform has some have claimed, this was just how we set it up,
since it best matched the actual depth of the frame buffer.

If the Galaxy has a 24 bit color screen, Samsung may have reconfigured the
platform to use higher depth buffers. Or not.  I don't really have any idea.
 You should be able to fairly easily test this in your app though by drawing
a gradient in a regular activity window without dithering turned on; if you
see significant banding, the window's buffer is 16 bit.

You can also test the actual screen by forcing your window's buffer to 32
bit by setting the format of your activity's window's
WindowManager.LayoutParams.format to something like RGB_888 to force it to
use a higher-bitdepth format, and making sure FLAG_DITHER is cleared:

http://developer.android.com/reference/android/view/WindowManager.LayoutParams.html#format
http://developer.android.com/reference/android/graphics/PixelFormat.html
http://developer.android.com/reference/android/view/WindowManager.LayoutParams.html#FLAG_DITHER

Now if you draw the same gradient, in the window's buffer it will have 24
bit color, and banding will only appear if the screen framebuffer itself is
16 bit.  Though maybe not...  given that compositing is done in hardware, it
is still possible for them to just always dither.

-- 
Dianne Hackborn
Android framework engineer
[email protected]

Note: please don't send private questions to me, as I don't have time to
provide private support, and so won't reply to such e-mails.  All such
questions should be posted on public forums, where I and others can see and
answer them.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to