[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [E-devel] Evas (evas_fb_test) crashing on 8bps framebuffers

	Rene writes:

> Hi,
> most framebuffer drivers (nvidia, radeon, ...) default to 8bps and
> all non-x86 machines such as PPC ones run this per default. However
> Evas (evas_fb_test) crashes on 8bps because no convert function is
> matched and crashes in
> evas_fb_outbuf_fb_get_height (buf=0x0) at evas_outbuf.c:365
> because the buffer is nil - which is returned by:
> evas_fb_outbuf_fb_setup_fb(w, h, rot, OUTBUF_DEPTH_INHERIT, vt,
> dev, refresh);
> which in turn calls:
> evas_common_convert_func_get (dest=0x0, w=1024, h=768, depth=8,
> rmask=255, gmask=255, bmask=255,
>    pal_mode=PAL_MODE_NONE, rotation=0) at evas_convert_main.c:15
> Maybe someone with more evas internals in mind can help fixing
> this up properly?

	There's currently no convert-func in evas for converting
argb32 to an unpaletted 8-bit buffer, so it's returning a null
output buf.. The test shouldn't crash though, it should check if
an evas has been setup properly, etc.

	Code needs to be added to select the proper palette depending
on the rgb component sizes, and pass this to the convert_func_get.
Right now evas has some convert functions for depth 8, it just needs
to be told the 'palette mode' so it knows the size of the r,g,b
components of the destination (it should maybe use the fb bit-length
of each r,g,b component for this?).. But it isn't doing this, it's
just passing "pal_mode=PAL_MODE_NONE" no matter what the depth.