forked from enlightenment/efl
dont always use backign buffer in fbs < 24bpp
24bpp code... SVN revision: 14140
This commit is contained in:
parent
1f77cd21b7
commit
72de69f1ab
|
@ -432,6 +432,20 @@ evas_common_convert_func_get(DATA8 *dest, int w, int h, int depth, DATA32 rmask,
|
|||
}
|
||||
if (depth == 24)
|
||||
{
|
||||
#ifdef BUILD_CONVERT_24_RGB_888
|
||||
if ((rmask == 0x00ff0000) && (gmask == 0x0000ff00) && (bmask == 0x000000ff))
|
||||
{
|
||||
if (rotation == 0)
|
||||
return evas_common_convert_rgba_to_24bpp_rgb_888;
|
||||
}
|
||||
#endif
|
||||
#ifdef BUILD_CONVERT_24_BGR_888
|
||||
if ((rmask == 0x000000ff) && (gmask == 0x0000ff00) && (bmask == 0x00ff0000))
|
||||
{
|
||||
if (rotation == 0)
|
||||
return evas_common_convert_rgba_to_24bpp_bgr_888;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
printf("depth = %i mode = %i\n", depth, pal_mode);
|
||||
if (depth == 8)
|
||||
|
|
|
@ -1,8 +1,37 @@
|
|||
#include "evas_common.h"
|
||||
|
||||
#ifdef BUILD_CONVERT_24_RGB_888
|
||||
void evas_common_convert_rgba_to_24bpp_rgb_888 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal){}
|
||||
void
|
||||
evas_common_convert_rgba_to_24bpp_rgb_888(DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal)
|
||||
{
|
||||
DATA32 *src_ptr;
|
||||
DATA8 *dst_ptr;
|
||||
int x, y;
|
||||
|
||||
dst_ptr = (DATA8 *)dst;
|
||||
|
||||
for (y = 0; y < h; y++)
|
||||
{
|
||||
for (x = 0; x < w; x++)
|
||||
{
|
||||
dst_ptr[0] = R_VAL(src_ptr);
|
||||
dst_ptr[1] = G_VAL(src_ptr);
|
||||
dst_ptr[2] = B_VAL(src_ptr);
|
||||
src_ptr++;
|
||||
dst_ptr+=3;
|
||||
}
|
||||
src_ptr += src_jump;
|
||||
dst_ptr += (dst_jump * 3);
|
||||
}
|
||||
return;
|
||||
pal = 0;
|
||||
dith_x = 0;
|
||||
dith_y = 0;
|
||||
}
|
||||
#endif
|
||||
#ifdef BUILD_CONVERT_24_BGR_888
|
||||
void evas_common_convert_rgba_to_24bpp_bgr_888 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal){}
|
||||
void
|
||||
evas_common_convert_rgba_to_24bpp_bgr_888(DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -529,7 +529,7 @@ fb_postinit(FB_Mode *mode)
|
|||
}
|
||||
mode->mem_offset = (unsigned)(fb_fix.smem_start) & (~PAGE_MASK);
|
||||
mode->mem = (unsigned char *)mmap(NULL, fb_fix.smem_len + mode->mem_offset,
|
||||
PROT_WRITE, MAP_SHARED, fb, 0);
|
||||
PROT_WRITE | PROT_READ, MAP_SHARED, fb, 0);
|
||||
if ((int)mode->mem == -1)
|
||||
{
|
||||
perror("mmap");
|
||||
|
|
|
@ -118,8 +118,8 @@ evas_fb_outbuf_fb_setup_fb(int w, int h, int rot, Outbuf_Depth depth, int vt_no,
|
|||
return NULL;
|
||||
}
|
||||
}
|
||||
if (buf->priv.fb.fb->fb_var.bits_per_pixel < 24)
|
||||
buf->priv.back_buf = evas_common_image_create(buf->w, buf->h);
|
||||
// if (buf->priv.fb.fb->fb_var.bits_per_pixel < 24)
|
||||
// buf->priv.back_buf = evas_common_image_create(buf->w, buf->h);
|
||||
|
||||
return buf;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue