forked from enlightenment/efl
Evas: Remove dead code (cached surfaces)
While cached surfaces is a topic we're discussing recently, this code is dead right now, and we will have to redesign the buffer caching better to handle proxies, maps, smart objects, etc...
This commit is contained in:
parent
0a5b28eba8
commit
6e96d75c76
|
@ -30,7 +30,7 @@ static const Evas_Object_Protected_State default_state = {
|
|||
NULL, { 0, 0, 0, 0 },
|
||||
{ { 0, 0, 0, 0, 0, 0, 0, 0, EINA_FALSE, EINA_FALSE } },
|
||||
{ 255, 255, 255, 255 },
|
||||
1.0, 0, EVAS_RENDER_BLEND, EINA_FALSE, EINA_FALSE, EINA_FALSE, EINA_FALSE, EINA_FALSE, EINA_FALSE, EINA_FALSE
|
||||
1.0, 0, EVAS_RENDER_BLEND, EINA_FALSE, EINA_FALSE, EINA_FALSE, EINA_FALSE, EINA_FALSE
|
||||
};
|
||||
static const Evas_Object_Filter_Data default_filter = {
|
||||
NULL, NULL, NULL, NULL, NULL, NULL, { { "default", 0.0 }, { "default", 0.0 }, 0.0 }, EINA_FALSE, EINA_FALSE, EINA_TRUE
|
||||
|
|
|
@ -1419,78 +1419,6 @@ evas_object_smart_render_pre(Evas_Object *eo_obj,
|
|||
void *type_private_data EINA_UNUSED)
|
||||
{
|
||||
if (obj->pre_render_done) return;
|
||||
if (!obj->child_has_map && !obj->cur->cached_surface)
|
||||
{
|
||||
#if 0
|
||||
// REDO to handle smart move
|
||||
Evas_Smart_Data *o;
|
||||
|
||||
fprintf(stderr, "");
|
||||
o = type_private_data;
|
||||
if (/* o->member_count > 1 && */
|
||||
o->cur.bounding_box.w == o->prev.bounding_box.w &&
|
||||
obj->cur->bounding_box.h == obj->prev->bounding_box.h &&
|
||||
(obj->cur->bounding_box.x != obj->prev->bounding_box.x ||
|
||||
obj->cur->bounding_box.y != obj->prev->bounding_box.y))
|
||||
{
|
||||
Eina_Bool cache_map = EINA_FALSE;
|
||||
|
||||
/* Check parent speed */
|
||||
/* - same speed => do not map this object */
|
||||
/* - different speed => map this object */
|
||||
/* - if parent is mapped then map this object */
|
||||
|
||||
if (!obj->smart.parent || obj->smart.parent->child_has_map)
|
||||
{
|
||||
cache_map = EINA_TRUE;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (_evas_render_has_map(obj->smart.parent))
|
||||
{
|
||||
cache_map = EINA_TRUE;
|
||||
}
|
||||
else
|
||||
{
|
||||
int speed_x, speed_y;
|
||||
int speed_px, speed_py;
|
||||
|
||||
speed_x = obj->cur->geometry.x - obj->prev->geometry.x;
|
||||
speed_y = obj->cur->geometry.y - obj->prev->geometry.y;
|
||||
|
||||
speed_px = obj->smart.parent->cur.geometry.x - obj->smart.parent->prev.geometry.x;
|
||||
speed_py = obj->smart.parent->cur.geometry.y - obj->smart.parent->prev.geometry.y;
|
||||
|
||||
/* speed_x = obj->cur->bounding_box.x - obj->prev->bounding_box.x; */
|
||||
/* speed_y = obj->cur->bounding_box.y - obj->prev->bounding_box.y; */
|
||||
|
||||
/* speed_px = obj->smart.parent->cur.bounding_box.x - obj->smart.parent->prev.bounding_box.x; */
|
||||
/* speed_py = obj->smart.parent->cur.bounding_box.y - obj->smart.parent->prev.bounding_box.y; */
|
||||
|
||||
fprintf(stderr, "speed: '%s',%p (%i, %i) vs '%s',%p (%i, %i)\n",
|
||||
evas_object_type_get(eo_obj), obj, speed_x, speed_y,
|
||||
evas_object_type_get(obj->smart.parent), obj->smart.parent, speed_px, speed_py);
|
||||
|
||||
if (speed_x != speed_px || speed_y != speed_py)
|
||||
cache_map = EINA_TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
if (cache_map)
|
||||
fprintf(stderr, "Wouhou, I can detect moving smart object (%s, %p [%i, %i, %i, %i] < %s, %p [%i, %i, %i, %i])\n",
|
||||
evas_object_type_get(eo_obj), obj,
|
||||
obj->cur->bounding_box.x - obj->prev->bounding_box.x,
|
||||
obj->cur->bounding_box.y - obj->prev->bounding_box.y,
|
||||
obj->cur->bounding_box.w, obj->cur->bounding_box.h,
|
||||
evas_object_type_get(obj->smart.parent), obj->smart.parent,
|
||||
obj->smart.parent->cur.bounding_box.x - obj->smart.parent->prev.bounding_box.x,
|
||||
obj->smart.parent->cur.bounding_box.y - obj->smart.parent->prev.bounding_box.y,
|
||||
obj->smart.parent->cur.bounding_box.w, obj->smart.parent->cur.bounding_box.h);
|
||||
|
||||
obj->cur->cached_surface = cache_map;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
if (obj->changed_map || obj->changed_src_visible)
|
||||
evas_object_render_pre_prev_cur_add(&obj->layer->evas->clip_changes,
|
||||
|
|
|
@ -1632,14 +1632,6 @@ evas_render_mapped(Evas_Public_Data *evas, Evas_Object *eo_obj,
|
|||
}
|
||||
else // not "has map"
|
||||
{
|
||||
#if 0
|
||||
if (0 && obj->cur->cached_surface)
|
||||
fprintf(stderr, "We should cache '%s' [%i, %i, %i, %i]\n",
|
||||
evas_object_type_get(eo_obj),
|
||||
obj->cur->bounding_box.x, obj->cur->bounding_box.x,
|
||||
obj->cur->bounding_box.w, obj->cur->bounding_box.h);
|
||||
#endif
|
||||
|
||||
if (mapped)
|
||||
{
|
||||
RD(level, " child of mapped obj\n");
|
||||
|
|
|
@ -1012,9 +1012,6 @@ struct _Evas_Object_Protected_State
|
|||
Eina_Bool have_clipees : 1;
|
||||
Eina_Bool anti_alias : 1;
|
||||
Eina_Bool valid_bounding_box : 1;
|
||||
|
||||
Eina_Bool cached_surface : 1;
|
||||
Eina_Bool parent_cached_surface : 1;
|
||||
Eina_Bool snapshot : 1;
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue