forked from enlightenment/efl
evas: fast path for map with same color on all corner.
This commit is contained in:
parent
5ca64106a2
commit
c9c77a4004
|
@ -1,3 +1,7 @@
|
||||||
|
2013-06-19 Cedric Bail
|
||||||
|
|
||||||
|
* Evas: optimized path for when map use the same color for all corner.
|
||||||
|
|
||||||
2013-06-18 Cedric Bail
|
2013-06-18 Cedric Bail
|
||||||
|
|
||||||
* Evas: Use Eo array of callbacks to reduce edje memory foot print of Evas_Object_Box and Evas_Object_Table.
|
* Evas: Use Eo array of callbacks to reduce edje memory foot print of Evas_Object_Box and Evas_Object_Table.
|
||||||
|
|
1
NEWS
1
NEWS
|
@ -190,6 +190,7 @@ Improvements:
|
||||||
* Partial rendering support in evas for several gl drivers.
|
* Partial rendering support in evas for several gl drivers.
|
||||||
* edje: use eo array of callbacks to reduce callbacks memory footprint.
|
* edje: use eo array of callbacks to reduce callbacks memory footprint.
|
||||||
* evas: use eo array of callbacks to reduce callbacks memory footprint of Evas_Object_Box and Evas_Object_Table.
|
* evas: use eo array of callbacks to reduce callbacks memory footprint of Evas_Object_Box and Evas_Object_Table.
|
||||||
|
* evas: optimized path for when map use the same color for all corner.
|
||||||
|
|
||||||
Fixes:
|
Fixes:
|
||||||
* Fix a memory leak in ecore_con_dns when using ecore_con_server_connect
|
* Fix a memory leak in ecore_con_dns when using ecore_con_server_connect
|
||||||
|
|
|
@ -1474,16 +1474,20 @@ _draw_thread_map_draw(void *data)
|
||||||
(m->pts[2 + offset].v == (int)(im->cache_entry.h << FP)) &&
|
(m->pts[2 + offset].v == (int)(im->cache_entry.h << FP)) &&
|
||||||
(m->pts[3 + offset].u == 0) &&
|
(m->pts[3 + offset].u == 0) &&
|
||||||
(m->pts[3 + offset].v == (int)(im->cache_entry.h << FP)) &&
|
(m->pts[3 + offset].v == (int)(im->cache_entry.h << FP)) &&
|
||||||
(m->pts[0 + offset].col == 0xffffffff) &&
|
(m->pts[0].col == m->pts[1].col) &&
|
||||||
(m->pts[1 + offset].col == 0xffffffff) &&
|
(m->pts[1].col == m->pts[2].col) &&
|
||||||
(m->pts[2 + offset].col == 0xffffffff) &&
|
(m->pts[2].col == m->pts[3].col))
|
||||||
(m->pts[3 + offset].col == 0xffffffff))
|
|
||||||
{
|
{
|
||||||
|
DATA32 col;
|
||||||
|
|
||||||
dx = m->pts[0 + offset].x >> FP;
|
dx = m->pts[0 + offset].x >> FP;
|
||||||
dy = m->pts[0 + offset].y >> FP;
|
dy = m->pts[0 + offset].y >> FP;
|
||||||
dw = (m->pts[2 + offset].x >> FP) - dx;
|
dw = (m->pts[2 + offset].x >> FP) - dx;
|
||||||
dh = (m->pts[2 + offset].y >> FP) - dy;
|
dh = (m->pts[2 + offset].y >> FP) - dy;
|
||||||
|
|
||||||
|
col = map->image_ctx.col.col;
|
||||||
|
map->image_ctx.col.col = MUL4_SYM(col, m->pts[0].col);
|
||||||
|
|
||||||
if (map->smooth)
|
if (map->smooth)
|
||||||
evas_common_scale_rgba_in_to_out_clip_cb
|
evas_common_scale_rgba_in_to_out_clip_cb
|
||||||
(im, map->surface, &map->image_ctx,
|
(im, map->surface, &map->image_ctx,
|
||||||
|
@ -1494,6 +1498,8 @@ _draw_thread_map_draw(void *data)
|
||||||
(im, map->surface, &map->image_ctx,
|
(im, map->surface, &map->image_ctx,
|
||||||
0, 0, im->cache_entry.w, im->cache_entry.h,
|
0, 0, im->cache_entry.w, im->cache_entry.h,
|
||||||
dx, dy, dw, dh, _map_image_sample_draw);
|
dx, dy, dw, dh, _map_image_sample_draw);
|
||||||
|
|
||||||
|
map->image_ctx.col.col = col;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -1587,13 +1593,18 @@ evas_software_image_map_draw(void *data, void *context, RGBA_Image *surface, RGB
|
||||||
(m->pts[2 + offset].v == (int)(im->cache_entry.h << FP)) &&
|
(m->pts[2 + offset].v == (int)(im->cache_entry.h << FP)) &&
|
||||||
(m->pts[3 + offset].u == 0) &&
|
(m->pts[3 + offset].u == 0) &&
|
||||||
(m->pts[3 + offset].v == (int)(im->cache_entry.h << FP)) &&
|
(m->pts[3 + offset].v == (int)(im->cache_entry.h << FP)) &&
|
||||||
(m->pts[0 + offset].col == 0xffffffff) &&
|
(m->pts[0 + offset].col == m->pts[1 + offset].col) &&
|
||||||
(m->pts[1 + offset].col == 0xffffffff) &&
|
(m->pts[1 + offset].col == m->pts[2 + offset].col) &&
|
||||||
(m->pts[2 + offset].col == 0xffffffff) &&
|
(m->pts[2 + offset].col == m->pts[3 + offset].col))
|
||||||
(m->pts[3 + offset].col == 0xffffffff))
|
|
||||||
{
|
{
|
||||||
|
DATA32 col;
|
||||||
|
int a, r, g, b;
|
||||||
int dx, dy, dw, dh;
|
int dx, dy, dw, dh;
|
||||||
|
|
||||||
|
eng_context_color_get(data, context, &r, &g, &b, &a);
|
||||||
|
col = MUL4_256(a, r, g, b, m->pts[0 + offset].col);
|
||||||
|
eng_context_color_set(data, context, R_VAL(col), G_VAL(col), B_VAL(col), A_VAL(col));
|
||||||
|
|
||||||
dx = m->pts[0 + offset].x >> FP;
|
dx = m->pts[0 + offset].x >> FP;
|
||||||
dy = m->pts[0 + offset].y >> FP;
|
dy = m->pts[0 + offset].y >> FP;
|
||||||
dw = (m->pts[2 + offset].x >> FP) - dx;
|
dw = (m->pts[2 + offset].x >> FP) - dx;
|
||||||
|
@ -1603,6 +1614,8 @@ evas_software_image_map_draw(void *data, void *context, RGBA_Image *surface, RGB
|
||||||
0, 0, im->cache_entry.w, im->cache_entry.h,
|
0, 0, im->cache_entry.w, im->cache_entry.h,
|
||||||
dx, dy, dw, dh, smooth,
|
dx, dy, dw, dh, smooth,
|
||||||
EINA_FALSE);
|
EINA_FALSE);
|
||||||
|
|
||||||
|
eng_context_color_set(data, context, r, g, b, a);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue