summaryrefslogtreecommitdiff
path: root/src/lib/edje/edje_calc.c
diff options
context:
space:
mode:
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>2017-11-11 12:10:32 +0900
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2017-11-11 12:10:32 +0900
commit75daddc83999403c74cab7b1ed1f8fc3405fd025 (patch)
tree4e13c65381abbbec7ab7f3c412d6e874075bbeda /src/lib/edje/edje_calc.c
parentb5333edd3ffe8c0379170a0e9d08ee05af439e2c (diff)
Revert "Edje: use textblock by default"
This reverts commit ef3d2120bfa58f9247a441602bd30f13cc7f225a. This breaks E. pager ono my right screen looks like: http://devs.enlightenment.org/~raster/shot-2017-11-11_12-13-14.png on my left screen shellf keeps swapping between 2 dizes wobbling back and forth every frame eating cpu and making it "blurry"... note - theme is the flat one in devs/raster/theme/flat2 branch. so this change certainly breaks something...
Diffstat (limited to 'src/lib/edje/edje_calc.c')
-rw-r--r--src/lib/edje/edje_calc.c34
1 files changed, 17 insertions, 17 deletions
diff --git a/src/lib/edje/edje_calc.c b/src/lib/edje/edje_calc.c
index be7d9e49b0..1442cb8f14 100644
--- a/src/lib/edje/edje_calc.c
+++ b/src/lib/edje/edje_calc.c
@@ -2401,7 +2401,7 @@ _edje_part_recalc_single_filter(Edje *ed,
2401 Eina_List *li1, *li2; 2401 Eina_List *li1, *li2;
2402 2402
2403 /* handle TEXT, IMAGE, PROXY, SNAPSHOT part types here */ 2403 /* handle TEXT, IMAGE, PROXY, SNAPSHOT part types here */
2404 if (PART_IS_TEXT(ed, ep)) 2404 if (ep->part->type == EDJE_PART_TYPE_TEXT)
2405 { 2405 {
2406 Edje_Part_Description_Text *chosen_edt = (Edje_Part_Description_Text *) chosen_desc; 2406 Edje_Part_Description_Text *chosen_edt = (Edje_Part_Description_Text *) chosen_desc;
2407 Edje_Part_Description_Text *edt = (Edje_Part_Description_Text *) desc; 2407 Edje_Part_Description_Text *edt = (Edje_Part_Description_Text *) desc;
@@ -2521,10 +2521,6 @@ _edje_part_recalc_single_filter(Edje *ed,
2521 } 2521 }
2522 } 2522 }
2523 efl_gfx_filter_program_set(obj, code, filter->name); 2523 efl_gfx_filter_program_set(obj, code, filter->name);
2524 if (PART_IS_TEXT(ed, ep))
2525 {
2526 efl_text_gfx_filter_set(obj, filter->name);
2527 }
2528 if (prev_sources != filter_sources) 2524 if (prev_sources != filter_sources)
2529 { 2525 {
2530 /* remove sources that are not there anymore 2526 /* remove sources that are not there anymore
@@ -2832,9 +2828,11 @@ _edje_part_recalc_single(Edje *ed,
2832 } 2828 }
2833 2829
2834 /* if we have text that wants to make the min size the text size... */ 2830 /* if we have text that wants to make the min size the text size... */
2835 if (PART_IS_TEXT(ed, ep)) 2831 if (ep->part->type == EDJE_PART_TYPE_TEXTBLOCK)
2832 _edje_part_recalc_single_textblock(sc, ed, ep, (Edje_Part_Description_Text *)chosen_desc, params, &minw, &minh, &maxw, &maxh);
2833 else if (ep->part->type == EDJE_PART_TYPE_TEXT)
2836 { 2834 {
2837 _edje_part_recalc_single_textblock(sc, ed, ep, (Edje_Part_Description_Text *)chosen_desc, params, &minw, &minh, &maxw, &maxh); 2835 _edje_part_recalc_single_text(sc, ed, ep, (Edje_Part_Description_Text*) desc, (Edje_Part_Description_Text*) chosen_desc, params, &minw, &minh, &maxw, &maxh);
2838 _edje_part_recalc_single_filter(ed, ep, desc, chosen_desc, pos); 2836 _edje_part_recalc_single_filter(ed, ep, desc, chosen_desc, pos);
2839 } 2837 }
2840 2838
@@ -4387,6 +4385,11 @@ _edje_part_recalc(Edje *ed, Edje_Real_Part *ep, int flags, Edje_Calc_Params *sta
4387 break; 4385 break;
4388 4386
4389 case EDJE_PART_TYPE_TEXT: 4387 case EDJE_PART_TYPE_TEXT:
4388 _edje_calc_params_need_type_text(p3);
4389 p3->type.text->size = INTP(p1->type.text->size, p2->type.text->size, pos);
4390 EINA_FALLTHROUGH;
4391
4392 /* no break as we share code with the TEXTBLOCK type here. */
4390 case EDJE_PART_TYPE_TEXTBLOCK: 4393 case EDJE_PART_TYPE_TEXTBLOCK:
4391 _edje_calc_params_need_type_text(p3); 4394 _edje_calc_params_need_type_text(p3);
4392 p3->type.text->color2.r = INTP(p1->type.text->color2.r, p2->type.text->color2.r, pos2); 4395 p3->type.text->color2.r = INTP(p1->type.text->color2.r, p2->type.text->color2.r, pos2);
@@ -4598,8 +4601,6 @@ _edje_part_recalc(Edje *ed, Edje_Real_Part *ep, int flags, Edje_Calc_Params *sta
4598 EINA_FALLTHROUGH; 4601 EINA_FALLTHROUGH;
4599 case EDJE_PART_TYPE_RECTANGLE: 4602 case EDJE_PART_TYPE_RECTANGLE:
4600 EINA_FALLTHROUGH; 4603 EINA_FALLTHROUGH;
4601 case EDJE_PART_TYPE_TEXT:
4602 EINA_FALLTHROUGH;
4603 case EDJE_PART_TYPE_TEXTBLOCK: 4604 case EDJE_PART_TYPE_TEXTBLOCK:
4604 EINA_FALLTHROUGH; 4605 EINA_FALLTHROUGH;
4605 case EDJE_PART_TYPE_BOX: 4606 case EDJE_PART_TYPE_BOX:
@@ -4609,18 +4610,11 @@ _edje_part_recalc(Edje *ed, Edje_Real_Part *ep, int flags, Edje_Calc_Params *sta
4609 case EDJE_PART_TYPE_SNAPSHOT: 4610 case EDJE_PART_TYPE_SNAPSHOT:
4610 EINA_FALLTHROUGH; 4611 EINA_FALLTHROUGH;
4611 case EDJE_PART_TYPE_VECTOR: 4612 case EDJE_PART_TYPE_VECTOR:
4612 if (ep->part->type == EDJE_PART_TYPE_TEXT)
4613 {
4614 evas_object_color_set(ep->object, 255, 255, 255, 255);
4615 }
4616 else
4617 {
4618 evas_object_color_set(ep->object, 4613 evas_object_color_set(ep->object,
4619 (pf->color.r * pf->color.a) / 255, 4614 (pf->color.r * pf->color.a) / 255,
4620 (pf->color.g * pf->color.a) / 255, 4615 (pf->color.g * pf->color.a) / 255,
4621 (pf->color.b * pf->color.a) / 255, 4616 (pf->color.b * pf->color.a) / 255,
4622 pf->color.a); 4617 pf->color.a);
4623 }
4624 4618
4625#ifdef HAVE_EPHYSICS 4619#ifdef HAVE_EPHYSICS
4626/* body attributes should be updated for invisible objects */ 4620/* body attributes should be updated for invisible objects */
@@ -4708,6 +4702,10 @@ _edje_part_recalc(Edje *ed, Edje_Real_Part *ep, int flags, Edje_Calc_Params *sta
4708 } 4702 }
4709 break; 4703 break;
4710 4704
4705 case EDJE_PART_TYPE_TEXT:
4706 /* This is correctly handle in _edje_text_recalc_apply at the moment. */
4707 break;
4708
4711 case EDJE_PART_TYPE_GRADIENT: 4709 case EDJE_PART_TYPE_GRADIENT:
4712 /* FIXME: definitivly remove this code when we switch to new format. */ 4710 /* FIXME: definitivly remove this code when we switch to new format. */
4713 abort(); 4711 abort();
@@ -4912,6 +4910,9 @@ _edje_part_recalc(Edje *ed, Edje_Real_Part *ep, int flags, Edje_Calc_Params *sta
4912 /* Some object need special recalc. */ 4910 /* Some object need special recalc. */
4913 switch (ep->part->type) 4911 switch (ep->part->type)
4914 { 4912 {
4913 case EDJE_PART_TYPE_TEXT:
4914 _edje_text_recalc_apply(ed, ep, pf, (Edje_Part_Description_Text*) chosen_desc, EINA_FALSE);
4915 break;
4915 4916
4916 case EDJE_PART_TYPE_PROXY: 4917 case EDJE_PART_TYPE_PROXY:
4917 _edje_proxy_recalc_apply(ed, ep, pf, (Edje_Part_Description_Proxy *)chosen_desc, pos); 4918 _edje_proxy_recalc_apply(ed, ep, pf, (Edje_Part_Description_Proxy *)chosen_desc, pos);
@@ -4929,7 +4930,6 @@ _edje_part_recalc(Edje *ed, Edje_Real_Part *ep, int flags, Edje_Calc_Params *sta
4929 _edje_table_recalc_apply(ed, ep, pf, (Edje_Part_Description_Table *)chosen_desc); 4930 _edje_table_recalc_apply(ed, ep, pf, (Edje_Part_Description_Table *)chosen_desc);
4930 break; 4931 break;
4931 4932
4932 case EDJE_PART_TYPE_TEXT:
4933 case EDJE_PART_TYPE_TEXTBLOCK: 4933 case EDJE_PART_TYPE_TEXTBLOCK:
4934 _edje_textblock_recalc_apply(ed, ep, pf, (Edje_Part_Description_Text *)chosen_desc); 4934 _edje_textblock_recalc_apply(ed, ep, pf, (Edje_Part_Description_Text *)chosen_desc);
4935 break; 4935 break;