summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@osg.samsung.com>2017-06-27 13:58:36 -0400
committerMike Blumenkrantz <zmike@osg.samsung.com>2017-07-07 15:21:44 -0400
commit3938932d3941bdac6212d5a65808963251242684 (patch)
tree50f8a336bf03f8583dd5cf60f9b9ee655ba7a1e8
parenta014aa36d8944e76c7533127a088a1a4c1310c2d (diff)
downloadefl-3938932d3941bdac6212d5a65808963251242684.tar.gz
evas buffer: reformat
so many tabs
-rw-r--r--src/modules/evas/engines/buffer/evas_engine.c43
-rw-r--r--src/modules/evas/engines/buffer/evas_outbuf.c561
2 files changed, 304 insertions, 300 deletions
diff --git a/src/modules/evas/engines/buffer/evas_engine.c b/src/modules/evas/engines/buffer/evas_engine.c
index 0ad83cfd78..bd6543bc74 100644
--- a/src/modules/evas/engines/buffer/evas_engine.c
+++ b/src/modules/evas/engines/buffer/evas_engine.c
@@ -15,34 +15,33 @@ int _evas_engine_buffer_log_dom = -1;
static Evas_Func func, pfunc;
-
/* engine struct data */
typedef Render_Engine_Software_Generic Render_Engine;
/* prototypes we will use here */
-static void *_output_setup(int w, int h, void *dest_buffer, int dest_buffer_row_bytes, int depth_type, int use_color_key, int alpha_threshold, int color_key_r, int color_key_g, int color_key_b, void *(*new_update_region) (int x, int y, int w, int h, int *row_bytes), void (*free_update_region) (int x, int y, int w, int h, void *data), void *(*switch_buffer) (void *data, void *dest_buffer), void *switch_data);
+static void *_output_setup(int w, int h, void *dest_buffer, int dest_buffer_row_bytes, int depth_type, int use_color_key, int alpha_threshold, int color_key_r, int color_key_g, int color_key_b, void *(*new_update_region)(int x, int y, int w, int h, int *row_bytes), void (*free_update_region)(int x, int y, int w, int h, void *data), void *(*switch_buffer)(void *data, void *dest_buffer), void *switch_data);
static void *eng_info(Evas *eo_e EINA_UNUSED);
-static void eng_info_free(Evas *eo_e EINA_UNUSED, void *info);
-static void eng_output_free(void *engine EINA_UNUSED, void *data);
+static void eng_info_free(Evas *eo_e EINA_UNUSED, void *info);
+static void eng_output_free(void *engine EINA_UNUSED, void *data);
/* internal engine routines */
static void *
_output_setup(int w,
- int h,
- void *dest_buffer,
- int dest_buffer_row_bytes,
- int depth_type,
- int use_color_key,
- int alpha_threshold,
- int color_key_r,
- int color_key_g,
- int color_key_b,
- void *(*new_update_region) (int x, int y, int w, int h, int *row_bytes),
- void (*free_update_region) (int x, int y, int w, int h, void *data),
- void *(*switch_buffer) (void *data, void *dest_buffer),
+ int h,
+ void *dest_buffer,
+ int dest_buffer_row_bytes,
+ int depth_type,
+ int use_color_key,
+ int alpha_threshold,
+ int color_key_r,
+ int color_key_g,
+ int color_key_b,
+ void *(*new_update_region)(int x, int y, int w, int h, int *row_bytes),
+ void (*free_update_region)(int x, int y, int w, int h, void *data),
+ void *(*switch_buffer)(void *data, void *dest_buffer),
void *switch_data
- )
+ )
{
Outbuf *ob;
Render_Engine *re;
@@ -55,7 +54,7 @@ _output_setup(int w,
evas_buffer_outbuf_buf_init();
dep = OUTBUF_DEPTH_BGR_24BPP_888_888;
- if (depth_type == EVAS_ENGINE_BUFFER_DEPTH_ARGB32)
+ if (depth_type == EVAS_ENGINE_BUFFER_DEPTH_ARGB32)
dep = OUTBUF_DEPTH_ARGB_32BPP_8888_8888;
else if (depth_type == EVAS_ENGINE_BUFFER_DEPTH_RGB32)
dep = OUTBUF_DEPTH_RGB_32BPP_888_8888;
@@ -100,7 +99,7 @@ _output_setup(int w,
goto on_error;
return re;
- on_error:
+on_error:
if (ob) evas_buffer_outbuf_buf_free(ob);
free(re);
return NULL;
@@ -179,7 +178,7 @@ module_open(Evas_Module *em)
if (!_evas_module_engine_inherit(&pfunc, "software_generic")) return 0;
_evas_engine_buffer_log_dom = eina_log_domain_register
- ("evas-buffer", EINA_COLOR_BLUE);
+ ("evas-buffer", EINA_COLOR_BLUE);
if (_evas_engine_buffer_log_dom < 0)
{
EINA_LOG_ERR("Can not create a module log domain.");
@@ -216,8 +215,8 @@ static Evas_Module_Api evas_modapi =
"buffer",
"none",
{
- module_open,
- module_close
+ module_open,
+ module_close
}
};
diff --git a/src/modules/evas/engines/buffer/evas_outbuf.c b/src/modules/evas/engines/buffer/evas_outbuf.c
index 02303167d9..71b92f203b 100644
--- a/src/modules/evas/engines/buffer/evas_outbuf.c
+++ b/src/modules/evas/engines/buffer/evas_outbuf.c
@@ -31,10 +31,10 @@ evas_buffer_outbuf_buf_free(Outbuf *buf)
void
evas_buffer_outbuf_buf_update_fb(Outbuf *buf, int w, int h, Outbuf_Depth depth, void *dest, int dest_row_bytes, int use_color_key, DATA32 color_key, int alpha_level,
- void * (*new_update_region) (int x, int y, int w, int h, int *row_bytes),
- void (*free_update_region) (int x, int y, int w, int h, void *data),
- void * (*switch_buffer) (void *data, void *dest_buffer),
- void *switch_data)
+ void * (*new_update_region)(int x, int y, int w, int h, int *row_bytes),
+ void (*free_update_region)(int x, int y, int w, int h, void *data),
+ void * (*switch_buffer)(void *data, void *dest_buffer),
+ void *switch_data)
{
buf->w = w;
buf->h = h;
@@ -56,43 +56,43 @@ evas_buffer_outbuf_buf_update_fb(Outbuf *buf, int w, int h, Outbuf_Depth depth,
if ((buf->depth == OUTBUF_DEPTH_ARGB_32BPP_8888_8888) &&
(buf->dest) && (buf->dest_row_bytes == (buf->w * sizeof(DATA32))))
{
- memset(buf->dest, 0, h * buf->dest_row_bytes);
+ memset(buf->dest, 0, h * buf->dest_row_bytes);
#ifdef EVAS_CSERVE2
if (evas_cserve2_use_get())
- buf->priv.back_buf = (RGBA_Image *) evas_cache2_image_data(evas_common_image_cache2_get(),
- w, h,
- buf->dest,
- 1, EVAS_COLORSPACE_ARGB8888);
+ buf->priv.back_buf = (RGBA_Image *)evas_cache2_image_data(evas_common_image_cache2_get(),
+ w, h,
+ buf->dest,
+ 1, EVAS_COLORSPACE_ARGB8888);
else
#endif
- buf->priv.back_buf = (RGBA_Image *) evas_cache_image_data(evas_common_image_cache_get(),
- w, h,
- buf->dest,
- 1, EVAS_COLORSPACE_ARGB8888);
+ buf->priv.back_buf = (RGBA_Image *)evas_cache_image_data(evas_common_image_cache_get(),
+ w, h,
+ buf->dest,
+ 1, EVAS_COLORSPACE_ARGB8888);
}
else if ((buf->depth == OUTBUF_DEPTH_RGB_32BPP_888_8888) &&
- (buf->dest) && (buf->dest_row_bytes == (buf->w * sizeof(DATA32))))
+ (buf->dest) && (buf->dest_row_bytes == (buf->w * sizeof(DATA32))))
{
#ifdef EVAS_CSERVE2
if (evas_cserve2_use_get())
- buf->priv.back_buf = (RGBA_Image *) evas_cache2_image_data(evas_common_image_cache2_get(),
- w, h,
- buf->dest,
- 0, EVAS_COLORSPACE_ARGB8888);
+ buf->priv.back_buf = (RGBA_Image *)evas_cache2_image_data(evas_common_image_cache2_get(),
+ w, h,
+ buf->dest,
+ 0, EVAS_COLORSPACE_ARGB8888);
else
#endif
- buf->priv.back_buf = (RGBA_Image *) evas_cache_image_data(evas_common_image_cache_get(),
- w, h,
- buf->dest,
- 0, EVAS_COLORSPACE_ARGB8888);
+ buf->priv.back_buf = (RGBA_Image *)evas_cache_image_data(evas_common_image_cache_get(),
+ w, h,
+ buf->dest,
+ 0, EVAS_COLORSPACE_ARGB8888);
}
}
Outbuf *
evas_buffer_outbuf_buf_setup_fb(int w, int h, Outbuf_Depth depth, void *dest, int dest_row_bytes, int use_color_key, DATA32 color_key, int alpha_level,
- void * (*new_update_region) (int x, int y, int w, int h, int *row_bytes),
- void (*free_update_region) (int x, int y, int w, int h, void *data),
- void * (*switch_buffer) (void *data, void *dest_buffer),
+ void * (*new_update_region)(int x, int y, int w, int h, int *row_bytes),
+ void (*free_update_region)(int x, int y, int w, int h, void *data),
+ void * (*switch_buffer)(void *data, void *dest_buffer),
void *switch_data)
{
Outbuf *buf;
@@ -124,32 +124,32 @@ evas_buffer_outbuf_buf_new_region_for_update(Outbuf *buf, int x, int y, int w, i
if (buf->priv.back_buf)
{
- *cx = x; *cy = y; *cw = w; *ch = h;
- return buf->priv.back_buf;
+ *cx = x; *cy = y; *cw = w; *ch = h;
+ return buf->priv.back_buf;
}
else
{
- *cx = 0; *cy = 0; *cw = w; *ch = h;
+ *cx = 0; *cy = 0; *cw = w; *ch = h;
#ifdef EVAS_CSERVE2
if (evas_cserve2_use_get())
im = (RGBA_Image *)evas_cache2_image_empty(evas_common_image_cache2_get());
else
#endif
- im = (RGBA_Image *) evas_cache_image_empty(evas_common_image_cache_get());
+ im = (RGBA_Image *)evas_cache_image_empty(evas_common_image_cache_get());
if (im)
{
- if (((buf->depth == OUTBUF_DEPTH_ARGB_32BPP_8888_8888)) ||
- ((buf->depth == OUTBUF_DEPTH_BGRA_32BPP_8888_8888)))
- {
- im->cache_entry.flags.alpha = 1;
+ if (((buf->depth == OUTBUF_DEPTH_ARGB_32BPP_8888_8888)) ||
+ ((buf->depth == OUTBUF_DEPTH_BGRA_32BPP_8888_8888)))
+ {
+ im->cache_entry.flags.alpha = 1;
}
#ifdef EVAS_CSERVE2
- if (evas_cserve2_use_get())
- evas_cache2_image_size_set(&im->cache_entry, w, h);
- else
+ if (evas_cserve2_use_get())
+ evas_cache2_image_size_set(&im->cache_entry, w, h);
+ else
#endif
- im = (RGBA_Image *) evas_cache_image_size_set(&im->cache_entry, w, h);
+ im = (RGBA_Image *)evas_cache_image_size_set(&im->cache_entry, w, h);
}
}
return im;
@@ -165,7 +165,7 @@ evas_buffer_outbuf_buf_free_region_for_update(Outbuf *buf, RGBA_Image *update)
evas_cache2_image_close(&update->cache_entry);
else
#endif
- evas_cache_image_drop(&update->cache_entry);
+ evas_cache_image_drop(&update->cache_entry);
}
}
@@ -181,7 +181,7 @@ evas_buffer_outbuf_buf_switch_buffer(Outbuf *buf, Tilebuf_Rect *surface_damage E
if (evas_cserve2_use_get())
{
evas_cache2_image_close(&buf->priv.back_buf->cache_entry);
- buf->priv.back_buf = (RGBA_Image *) evas_cache2_image_data(evas_common_image_cache2_get(),
+ buf->priv.back_buf = (RGBA_Image *)evas_cache2_image_data(evas_common_image_cache2_get(),
buf->w, buf->h,
buf->dest,
buf->depth == OUTBUF_DEPTH_ARGB_32BPP_8888_8888 ? 1 : 0,
@@ -189,14 +189,14 @@ evas_buffer_outbuf_buf_switch_buffer(Outbuf *buf, Tilebuf_Rect *surface_damage E
}
else
#endif
- {
- evas_cache_image_drop(&buf->priv.back_buf->cache_entry);
- buf->priv.back_buf = (RGBA_Image *) evas_cache_image_data(evas_common_image_cache_get(),
- buf->w, buf->h,
- buf->dest,
- buf->depth == OUTBUF_DEPTH_ARGB_32BPP_8888_8888 ? 1 : 0,
- EVAS_COLORSPACE_ARGB8888);
- }
+ {
+ evas_cache_image_drop(&buf->priv.back_buf->cache_entry);
+ buf->priv.back_buf = (RGBA_Image *)evas_cache_image_data(evas_common_image_cache_get(),
+ buf->w, buf->h,
+ buf->dest,
+ buf->depth == OUTBUF_DEPTH_ARGB_32BPP_8888_8888 ? 1 : 0,
+ EVAS_COLORSPACE_ARGB8888);
+ }
}
}
}
@@ -208,249 +208,253 @@ evas_buffer_outbuf_buf_push_updated_region(Outbuf *buf, RGBA_Image *update, int
switch (buf->depth)
{
case OUTBUF_DEPTH_RGB_24BPP_888_888:
- /* copy & pack into 24bpp - if colorkey is enabled... etc. */
- {
- DATA8 thresh;
- int xx, yy;
- int row_bytes;
- DATA8 *dest;
- DATA32 colorkey;
- DATA32 *src;
- DATA8 *dst;
-
- colorkey = buf->color_key;
- thresh = buf->alpha_level;
- row_bytes = buf->dest_row_bytes;
- dest = (DATA8 *)(buf->dest) + (y * row_bytes) + (x * 3);
- if (buf->func.new_update_region)
- {
- dest = buf->func.new_update_region(x, y, w, h, &row_bytes);
- }
- if (!dest) break;
- if (buf->use_color_key)
- {
- for (yy = 0; yy < h; yy++)
- {
- dst = dest + (yy * row_bytes);
- src = update->image.data + (yy * update->cache_entry.w);
- for (xx = 0; xx < w; xx++)
- {
- if (A_VAL(src) > thresh)
- {
- *dst++ = R_VAL(src);
- *dst++ = G_VAL(src);
- *dst++ = B_VAL(src);
- }
- else
- {
- *dst++ = R_VAL(&colorkey);
- *dst++ = G_VAL(&colorkey);
- *dst++ = B_VAL(&colorkey);
- }
- src++;
- }
- }
- }
- else
- {
- for (yy = 0; yy < h; yy++)
- {
- dst = dest + (yy * row_bytes);
- src = update->image.data + (yy * update->cache_entry.w);
- for (xx = 0; xx < w; xx++)
- {
- *dst++ = R_VAL(src);
- *dst++ = G_VAL(src);
- *dst++ = B_VAL(src);
- src++;
- }
- }
- }
- if (buf->func.free_update_region)
- {
- buf->func.free_update_region(x, y, w, h, dest);
- }
- }
- break;
+ /* copy & pack into 24bpp - if colorkey is enabled... etc. */
+ {
+ DATA8 thresh;
+ int xx, yy;
+ int row_bytes;
+ DATA8 *dest;
+ DATA32 colorkey;
+ DATA32 *src;
+ DATA8 *dst;
+
+ colorkey = buf->color_key;
+ thresh = buf->alpha_level;
+ row_bytes = buf->dest_row_bytes;
+ dest = (DATA8 *)(buf->dest) + (y * row_bytes) + (x * 3);
+ if (buf->func.new_update_region)
+ {
+ dest = buf->func.new_update_region(x, y, w, h, &row_bytes);
+ }
+ if (!dest) break;
+ if (buf->use_color_key)
+ {
+ for (yy = 0; yy < h; yy++)
+ {
+ dst = dest + (yy * row_bytes);
+ src = update->image.data + (yy * update->cache_entry.w);
+ for (xx = 0; xx < w; xx++)
+ {
+ if (A_VAL(src) > thresh)
+ {
+ *dst++ = R_VAL(src);
+ *dst++ = G_VAL(src);
+ *dst++ = B_VAL(src);
+ }
+ else
+ {
+ *dst++ = R_VAL(&colorkey);
+ *dst++ = G_VAL(&colorkey);
+ *dst++ = B_VAL(&colorkey);
+ }
+ src++;
+ }
+ }
+ }
+ else
+ {
+ for (yy = 0; yy < h; yy++)
+ {
+ dst = dest + (yy * row_bytes);
+ src = update->image.data + (yy * update->cache_entry.w);
+ for (xx = 0; xx < w; xx++)
+ {
+ *dst++ = R_VAL(src);
+ *dst++ = G_VAL(src);
+ *dst++ = B_VAL(src);
+ src++;
+ }
+ }
+ }
+ if (buf->func.free_update_region)
+ {
+ buf->func.free_update_region(x, y, w, h, dest);
+ }
+ }
+ break;
+
case OUTBUF_DEPTH_BGR_24BPP_888_888:
- /* copy & pack into 24bpp - if colorkey is enabled... etc. */
- {
- DATA8 thresh;
- int xx, yy;
- int row_bytes;
- DATA8 *dest;
- DATA32 colorkey;
- DATA32 *src;
- DATA8 *dst;
-
- colorkey = buf->color_key;
- thresh = buf->alpha_level;
- row_bytes = buf->dest_row_bytes;
- dest = (DATA8 *)(buf->dest) + (y * row_bytes) + (x * 3);
- if (buf->func.new_update_region)
- {
- dest = buf->func.new_update_region(x, y, w, h, &row_bytes);
- }
- if (!dest) break;
- if (buf->use_color_key)
- {
- for (yy = 0; yy < h; yy++)
- {
- dst = dest + (yy * row_bytes);
- src = update->image.data + (yy * update->cache_entry.w);
- for (xx = 0; xx < w; xx++)
- {
- if (A_VAL(src) > thresh)
- {
- *dst++ = B_VAL(src);
- *dst++ = G_VAL(src);
- *dst++ = R_VAL(src);
- }
- else
- {
- *dst++ = B_VAL(&colorkey);
- *dst++ = G_VAL(&colorkey);
- *dst++ = R_VAL(&colorkey);
- }
- src++;
- }
- }
- }
- else
- {
- for (yy = 0; yy < h; yy++)
- {
- dst = dest + (yy * row_bytes);
- src = update->image.data + (yy * update->cache_entry.w);
- for (xx = 0; xx < w; xx++)
- {
- *dst++ = B_VAL(src);
- *dst++ = G_VAL(src);
- *dst++ = R_VAL(src);
- src++;
- }
- }
- }
- if (buf->func.free_update_region)
- {
- buf->func.free_update_region(x, y, w, h, dest);
- }
- }
- break;
+ /* copy & pack into 24bpp - if colorkey is enabled... etc. */
+ {
+ DATA8 thresh;
+ int xx, yy;
+ int row_bytes;
+ DATA8 *dest;
+ DATA32 colorkey;
+ DATA32 *src;
+ DATA8 *dst;
+
+ colorkey = buf->color_key;
+ thresh = buf->alpha_level;
+ row_bytes = buf->dest_row_bytes;
+ dest = (DATA8 *)(buf->dest) + (y * row_bytes) + (x * 3);
+ if (buf->func.new_update_region)
+ {
+ dest = buf->func.new_update_region(x, y, w, h, &row_bytes);
+ }
+ if (!dest) break;
+ if (buf->use_color_key)
+ {
+ for (yy = 0; yy < h; yy++)
+ {
+ dst = dest + (yy * row_bytes);
+ src = update->image.data + (yy * update->cache_entry.w);
+ for (xx = 0; xx < w; xx++)
+ {
+ if (A_VAL(src) > thresh)
+ {
+ *dst++ = B_VAL(src);
+ *dst++ = G_VAL(src);
+ *dst++ = R_VAL(src);
+ }
+ else
+ {
+ *dst++ = B_VAL(&colorkey);
+ *dst++ = G_VAL(&colorkey);
+ *dst++ = R_VAL(&colorkey);
+ }
+ src++;
+ }
+ }
+ }
+ else
+ {
+ for (yy = 0; yy < h; yy++)
+ {
+ dst = dest + (yy * row_bytes);
+ src = update->image.data + (yy * update->cache_entry.w);
+ for (xx = 0; xx < w; xx++)
+ {
+ *dst++ = B_VAL(src);
+ *dst++ = G_VAL(src);
+ *dst++ = R_VAL(src);
+ src++;
+ }
+ }
+ }
+ if (buf->func.free_update_region)
+ {
+ buf->func.free_update_region(x, y, w, h, dest);
+ }
+ }
+ break;
+
case OUTBUF_DEPTH_RGB_32BPP_888_8888:
case OUTBUF_DEPTH_ARGB_32BPP_8888_8888:
- {
- DATA32 *dest, *src, *dst;
- int yy, row_bytes;
-
- row_bytes = buf->dest_row_bytes;
- dest = (DATA32 *)((DATA8 *)(buf->dest) + (y * row_bytes) + (x * 4));
- if (buf->func.new_update_region)
- {
- dest = buf->func.new_update_region(x, y, w, h, &row_bytes);
- }
- /* no need src == dest */
- if (!buf->priv.back_buf)
- {
- Gfx_Func_Copy func;
-
- func = evas_common_draw_func_copy_get(w, 0);
- if (func)
- {
- for (yy = 0; yy < h; yy++)
- {
- src = update->image.data + (yy * update->cache_entry.w);
- dst = (DATA32 *)((DATA8 *)(buf->dest) + ((y + yy) * row_bytes));
- func(src, dst, w);
- }
-
- }
- }
- if (buf->func.free_update_region)
- {
- buf->func.free_update_region(x, y, w, h, dest);
- }
- }
- break;
+ {
+ DATA32 *dest, *src, *dst;
+ int yy, row_bytes;
+
+ row_bytes = buf->dest_row_bytes;
+ dest = (DATA32 *)((DATA8 *)(buf->dest) + (y * row_bytes) + (x * 4));
+ if (buf->func.new_update_region)
+ {
+ dest = buf->func.new_update_region(x, y, w, h, &row_bytes);
+ }
+ /* no need src == dest */
+ if (!buf->priv.back_buf)
+ {
+ Gfx_Func_Copy func;
+
+ func = evas_common_draw_func_copy_get(w, 0);
+ if (func)
+ {
+ for (yy = 0; yy < h; yy++)
+ {
+ src = update->image.data + (yy * update->cache_entry.w);
+ dst = (DATA32 *)((DATA8 *)(buf->dest) + ((y + yy) * row_bytes));
+ func(src, dst, w);
+ }
+ }
+ }
+ if (buf->func.free_update_region)
+ {
+ buf->func.free_update_region(x, y, w, h, dest);
+ }
+ }
+ break;
+
case OUTBUF_DEPTH_BGR_32BPP_888_8888:
- {
- DATA32 *src, *dst;
- DATA8 *dest;
- int xx, yy, row_bytes;
-
- row_bytes = buf->dest_row_bytes;
- dest = (DATA8 *)(buf->dest) + (y * row_bytes) + (x * 4);
- if (buf->func.new_update_region)
- {
- dest = buf->func.new_update_region(x, y, w, h, &row_bytes);
- }
- for (yy = 0; yy < h; yy++)
- {
- dst = (DATA32 *)(dest + (yy * row_bytes));
- src = update->image.data + (yy * update->cache_entry.w);
- for (xx = 0; xx < w; xx++)
- {
- A_VAL(dst) = B_VAL(src);
- R_VAL(dst) = G_VAL(src);
- G_VAL(dst) = R_VAL(src);
- dst++;
- src++;
- }
- }
- if (buf->func.free_update_region)
- {
- buf->func.free_update_region(x, y, w, h, dest);
- }
- }
- break;
+ {
+ DATA32 *src, *dst;
+ DATA8 *dest;
+ int xx, yy, row_bytes;
+
+ row_bytes = buf->dest_row_bytes;
+ dest = (DATA8 *)(buf->dest) + (y * row_bytes) + (x * 4);
+ if (buf->func.new_update_region)
+ {
+ dest = buf->func.new_update_region(x, y, w, h, &row_bytes);
+ }
+ for (yy = 0; yy < h; yy++)
+ {
+ dst = (DATA32 *)(dest + (yy * row_bytes));
+ src = update->image.data + (yy * update->cache_entry.w);
+ for (xx = 0; xx < w; xx++)
+ {
+ A_VAL(dst) = B_VAL(src);
+ R_VAL(dst) = G_VAL(src);
+ G_VAL(dst) = R_VAL(src);
+ dst++;
+ src++;
+ }
+ }
+ if (buf->func.free_update_region)
+ {
+ buf->func.free_update_region(x, y, w, h, dest);
+ }
+ }
+ break;
+
case OUTBUF_DEPTH_BGRA_32BPP_8888_8888:
- {
- DATA32 *src, *dst;
- DATA8 *dest;
- int xx, yy, row_bytes;
-
- row_bytes = buf->dest_row_bytes;
- dest = (DATA8 *)(buf->dest) + (y * row_bytes) + (x * 4);
- if (buf->func.new_update_region)
- {
- dest = buf->func.new_update_region(x, y, w, h, &row_bytes);
- }
- for (yy = 0; yy < h; yy++)
- {
- dst = (DATA32 *)(dest + (yy * row_bytes));
- src = update->image.data + (yy * update->cache_entry.w);
- for (xx = 0; xx < w; xx++)
- {
- A_VAL(dst) = B_VAL(src);
- R_VAL(dst) = G_VAL(src);
- G_VAL(dst) = R_VAL(src);
- dst++;
- src++;
- }
- }
- if (buf->func.free_update_region)
- {
- buf->func.free_update_region(x, y, w, h, dest);
- }
- }
- break;
+ {
+ DATA32 *src, *dst;
+ DATA8 *dest;
+ int xx, yy, row_bytes;
+
+ row_bytes = buf->dest_row_bytes;
+ dest = (DATA8 *)(buf->dest) + (y * row_bytes) + (x * 4);
+ if (buf->func.new_update_region)
+ {
+ dest = buf->func.new_update_region(x, y, w, h, &row_bytes);
+ }
+ for (yy = 0; yy < h; yy++)
+ {
+ dst = (DATA32 *)(dest + (yy * row_bytes));
+ src = update->image.data + (yy * update->cache_entry.w);
+ for (xx = 0; xx < w; xx++)
+ {
+ A_VAL(dst) = B_VAL(src);
+ R_VAL(dst) = G_VAL(src);
+ G_VAL(dst) = R_VAL(src);
+ dst++;
+ src++;
+ }
+ }
+ if (buf->func.free_update_region)
+ {
+ buf->func.free_update_region(x, y, w, h, dest);
+ }
+ }
+ break;
+
default:
- break;
+ break;
}
}
void
evas_buffer_outbuf_reconfigure(Outbuf *ob, int w, int h, int rot EINA_UNUSED, Outbuf_Depth depth)
{
- void *dest;
- int dest_row_bytes;
- int alpha_level;
- DATA32 color_key;
- char use_color_key;
- void * (*new_update_region) (int x, int y, int w, int h, int *row_bytes);
- void (*free_update_region) (int x, int y, int w, int h, void *data);
- void * (*switch_buffer) (void *switch_data, void *dest);
- void *switch_data;
+ void *dest;
+ int dest_row_bytes;
+ int alpha_level;
+ DATA32 color_key;
+ char use_color_key;
+ void * (*new_update_region)(int x, int y, int w, int h, int *row_bytes);
+ void (*free_update_region)(int x, int y, int w, int h, void *data);
+ void * (*switch_buffer)(void *switch_data, void *dest);
+ void *switch_data;
if (depth == OUTBUF_DEPTH_INHERIT) depth = ob->depth;
dest = ob->dest;
@@ -490,3 +494,4 @@ evas_buffer_outbuf_buf_rot_get(Outbuf *buf EINA_UNUSED)
{
return 0;
}
+