summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJean-Philippe Andre <jp.andre@samsung.com>2015-11-02 16:03:48 +0900
committerJean-Philippe Andre <jp.andre@samsung.com>2015-11-02 16:22:19 +0900
commit6e96d75c7654fa43a20ffe681d6e02cb9c5b32bc (patch)
tree22e0e1c5f9b94aa5c4decc63f5df5450f2bd51ab
parent0a5b28eba8454a965c8c77a75513b549620457ef (diff)
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...
-rw-r--r--src/lib/evas/canvas/evas_object_main.c2
-rw-r--r--src/lib/evas/canvas/evas_object_smart.c72
-rw-r--r--src/lib/evas/canvas/evas_render.c8
-rw-r--r--src/lib/evas/include/evas_private.h3
4 files changed, 1 insertions, 84 deletions
diff --git a/src/lib/evas/canvas/evas_object_main.c b/src/lib/evas/canvas/evas_object_main.c
index 7ff20b89da..3517bcd79c 100644
--- a/src/lib/evas/canvas/evas_object_main.c
+++ b/src/lib/evas/canvas/evas_object_main.c
@@ -30,7 +30,7 @@ static const Evas_Object_Protected_State default_state = {
30 NULL, { 0, 0, 0, 0 }, 30 NULL, { 0, 0, 0, 0 },
31 { { 0, 0, 0, 0, 0, 0, 0, 0, EINA_FALSE, EINA_FALSE } }, 31 { { 0, 0, 0, 0, 0, 0, 0, 0, EINA_FALSE, EINA_FALSE } },
32 { 255, 255, 255, 255 }, 32 { 255, 255, 255, 255 },
33 1.0, 0, EVAS_RENDER_BLEND, EINA_FALSE, EINA_FALSE, EINA_FALSE, EINA_FALSE, EINA_FALSE, EINA_FALSE, EINA_FALSE 33 1.0, 0, EVAS_RENDER_BLEND, EINA_FALSE, EINA_FALSE, EINA_FALSE, EINA_FALSE, EINA_FALSE
34}; 34};
35static const Evas_Object_Filter_Data default_filter = { 35static const Evas_Object_Filter_Data default_filter = {
36 NULL, NULL, NULL, NULL, NULL, NULL, { { "default", 0.0 }, { "default", 0.0 }, 0.0 }, EINA_FALSE, EINA_FALSE, EINA_TRUE 36 NULL, NULL, NULL, NULL, NULL, NULL, { { "default", 0.0 }, { "default", 0.0 }, 0.0 }, EINA_FALSE, EINA_FALSE, EINA_TRUE
diff --git a/src/lib/evas/canvas/evas_object_smart.c b/src/lib/evas/canvas/evas_object_smart.c
index 1529f75f1b..451c073b14 100644
--- a/src/lib/evas/canvas/evas_object_smart.c
+++ b/src/lib/evas/canvas/evas_object_smart.c
@@ -1419,78 +1419,6 @@ evas_object_smart_render_pre(Evas_Object *eo_obj,
1419 void *type_private_data EINA_UNUSED) 1419 void *type_private_data EINA_UNUSED)
1420{ 1420{
1421 if (obj->pre_render_done) return; 1421 if (obj->pre_render_done) return;
1422 if (!obj->child_has_map && !obj->cur->cached_surface)
1423 {
1424#if 0
1425 // REDO to handle smart move
1426 Evas_Smart_Data *o;
1427
1428 fprintf(stderr, "");
1429 o = type_private_data;
1430 if (/* o->member_count > 1 && */
1431 o->cur.bounding_box.w == o->prev.bounding_box.w &&
1432 obj->cur->bounding_box.h == obj->prev->bounding_box.h &&
1433 (obj->cur->bounding_box.x != obj->prev->bounding_box.x ||
1434 obj->cur->bounding_box.y != obj->prev->bounding_box.y))
1435 {
1436 Eina_Bool cache_map = EINA_FALSE;
1437
1438 /* Check parent speed */
1439 /* - same speed => do not map this object */
1440 /* - different speed => map this object */
1441 /* - if parent is mapped then map this object */
1442
1443 if (!obj->smart.parent || obj->smart.parent->child_has_map)
1444 {
1445 cache_map = EINA_TRUE;
1446 }
1447 else
1448 {
1449 if (_evas_render_has_map(obj->smart.parent))
1450 {
1451 cache_map = EINA_TRUE;
1452 }
1453 else
1454 {
1455 int speed_x, speed_y;
1456 int speed_px, speed_py;
1457
1458 speed_x = obj->cur->geometry.x - obj->prev->geometry.x;
1459 speed_y = obj->cur->geometry.y - obj->prev->geometry.y;
1460
1461 speed_px = obj->smart.parent->cur.geometry.x - obj->smart.parent->prev.geometry.x;
1462 speed_py = obj->smart.parent->cur.geometry.y - obj->smart.parent->prev.geometry.y;
1463
1464 /* speed_x = obj->cur->bounding_box.x - obj->prev->bounding_box.x; */
1465 /* speed_y = obj->cur->bounding_box.y - obj->prev->bounding_box.y; */
1466
1467 /* speed_px = obj->smart.parent->cur.bounding_box.x - obj->smart.parent->prev.bounding_box.x; */
1468 /* speed_py = obj->smart.parent->cur.bounding_box.y - obj->smart.parent->prev.bounding_box.y; */
1469
1470 fprintf(stderr, "speed: '%s',%p (%i, %i) vs '%s',%p (%i, %i)\n",
1471 evas_object_type_get(eo_obj), obj, speed_x, speed_y,
1472 evas_object_type_get(obj->smart.parent), obj->smart.parent, speed_px, speed_py);
1473
1474 if (speed_x != speed_px || speed_y != speed_py)
1475 cache_map = EINA_TRUE;
1476 }
1477 }
1478
1479 if (cache_map)
1480 fprintf(stderr, "Wouhou, I can detect moving smart object (%s, %p [%i, %i, %i, %i] < %s, %p [%i, %i, %i, %i])\n",
1481 evas_object_type_get(eo_obj), obj,
1482 obj->cur->bounding_box.x - obj->prev->bounding_box.x,
1483 obj->cur->bounding_box.y - obj->prev->bounding_box.y,
1484 obj->cur->bounding_box.w, obj->cur->bounding_box.h,
1485 evas_object_type_get(obj->smart.parent), obj->smart.parent,
1486 obj->smart.parent->cur.bounding_box.x - obj->smart.parent->prev.bounding_box.x,
1487 obj->smart.parent->cur.bounding_box.y - obj->smart.parent->prev.bounding_box.y,
1488 obj->smart.parent->cur.bounding_box.w, obj->smart.parent->cur.bounding_box.h);
1489
1490 obj->cur->cached_surface = cache_map;
1491 }
1492#endif
1493 }
1494 1422
1495 if (obj->changed_map || obj->changed_src_visible) 1423 if (obj->changed_map || obj->changed_src_visible)
1496 evas_object_render_pre_prev_cur_add(&obj->layer->evas->clip_changes, 1424 evas_object_render_pre_prev_cur_add(&obj->layer->evas->clip_changes,
diff --git a/src/lib/evas/canvas/evas_render.c b/src/lib/evas/canvas/evas_render.c
index 9347189336..bdac680ac7 100644
--- a/src/lib/evas/canvas/evas_render.c
+++ b/src/lib/evas/canvas/evas_render.c
@@ -1632,14 +1632,6 @@ evas_render_mapped(Evas_Public_Data *evas, Evas_Object *eo_obj,
1632 } 1632 }
1633 else // not "has map" 1633 else // not "has map"
1634 { 1634 {
1635#if 0
1636 if (0 && obj->cur->cached_surface)
1637 fprintf(stderr, "We should cache '%s' [%i, %i, %i, %i]\n",
1638 evas_object_type_get(eo_obj),
1639 obj->cur->bounding_box.x, obj->cur->bounding_box.x,
1640 obj->cur->bounding_box.w, obj->cur->bounding_box.h);
1641#endif
1642
1643 if (mapped) 1635 if (mapped)
1644 { 1636 {
1645 RD(level, " child of mapped obj\n"); 1637 RD(level, " child of mapped obj\n");
diff --git a/src/lib/evas/include/evas_private.h b/src/lib/evas/include/evas_private.h
index 91e7b339cd..f01c931db5 100644
--- a/src/lib/evas/include/evas_private.h
+++ b/src/lib/evas/include/evas_private.h
@@ -1012,9 +1012,6 @@ struct _Evas_Object_Protected_State
1012 Eina_Bool have_clipees : 1; 1012 Eina_Bool have_clipees : 1;
1013 Eina_Bool anti_alias : 1; 1013 Eina_Bool anti_alias : 1;
1014 Eina_Bool valid_bounding_box : 1; 1014 Eina_Bool valid_bounding_box : 1;
1015
1016 Eina_Bool cached_surface : 1;
1017 Eina_Bool parent_cached_surface : 1;
1018 Eina_Bool snapshot : 1; 1015 Eina_Bool snapshot : 1;
1019}; 1016};
1020 1017