forked from enlightenment/efl
thanks capn' igloo - trying to repro your enna cpu usage case, but
can't. its a matter of simply some element re-rendering that is hidden - rendering into a mapped buffer. i disable the animation in the layout (layout2) and no cpu usage. that's my bet. SVN revision: 56204
This commit is contained in:
parent
a3f6b0b67b
commit
329ab2ac38
|
@ -168,6 +168,147 @@ collections {
|
|||
}
|
||||
}
|
||||
}
|
||||
group { name: "layout2";
|
||||
images {
|
||||
image: "over.png" COMP;
|
||||
image: "under.png" COMP;
|
||||
image: "sky.jpg" LOSSY 80;
|
||||
image: "clo.png" LOSSY 60;
|
||||
}
|
||||
parts {
|
||||
part { name: "clip";
|
||||
type: RECT;
|
||||
description { state: "default" 0.0;
|
||||
}
|
||||
}
|
||||
part { name: "sky";
|
||||
mouse_events: 0;
|
||||
clip_to: "clip";
|
||||
description { state: "default" 0.0;
|
||||
aspect: 2.6225 2.6225;
|
||||
aspect_preference: NONE;
|
||||
image.normal: "sky.jpg";
|
||||
}
|
||||
description { state: "drift" 0.0;
|
||||
inherit: "default" 0.0;
|
||||
fill {
|
||||
origin {
|
||||
relative: 1.0 0.0;
|
||||
offset: 0 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
part { name: "under";
|
||||
mouse_events: 0;
|
||||
clip_to: "clip";
|
||||
description { state: "default" 0.0;
|
||||
align: 0.5 0.0;
|
||||
aspect: 1.486068111 1.486068111;
|
||||
aspect_preference: HORIZONTAL;
|
||||
image.normal: "under.png";
|
||||
}
|
||||
}
|
||||
part { name: "text";
|
||||
type: TEXT;
|
||||
clip_to: "clip";
|
||||
description { state: "default" 0.0;
|
||||
color: 255 255 0 255;
|
||||
rel1 {
|
||||
relative: 0.3 0.02;
|
||||
}
|
||||
rel2 {
|
||||
relative: 0.6 0.12;
|
||||
}
|
||||
align: 0.5 0.5;
|
||||
text {
|
||||
font: "Sans:style=Bold";
|
||||
size: 14;
|
||||
min: 1 1;
|
||||
text: "some edje text here";
|
||||
}
|
||||
}
|
||||
}
|
||||
part { name: "element1";
|
||||
type: SWALLOW;
|
||||
clip_to: "clip";
|
||||
description { state: "default" 0.0;
|
||||
rel1 {
|
||||
relative: 0.2 0.2;
|
||||
}
|
||||
rel2 {
|
||||
relative: 0.4 0.3;
|
||||
}
|
||||
}
|
||||
}
|
||||
part { name: "element2";
|
||||
type: SWALLOW;
|
||||
clip_to: "clip";
|
||||
description { state: "default" 0.0;
|
||||
rel1 {
|
||||
relative: 0.6 0.3;
|
||||
}
|
||||
rel2 {
|
||||
relative: 0.9 0.5;
|
||||
}
|
||||
}
|
||||
}
|
||||
part { name: "element3";
|
||||
type: SWALLOW;
|
||||
clip_to: "clip";
|
||||
description { state: "default" 0.0;
|
||||
rel1 {
|
||||
relative: 0.1 0.7;
|
||||
}
|
||||
rel2 {
|
||||
relative: 0.9 0.9;
|
||||
}
|
||||
}
|
||||
}
|
||||
part { name: "over";
|
||||
mouse_events: 0;
|
||||
clip_to: "clip";
|
||||
description { state: "default" 0.0;
|
||||
align: 0.0 1.0;
|
||||
aspect: 2.238095238 2.238095238;
|
||||
max: 329 147;
|
||||
aspect_preference: HORIZONTAL;
|
||||
image.normal: "over.png";
|
||||
}
|
||||
}
|
||||
part { name: "clo";
|
||||
mouse_events: 0;
|
||||
clip_to: "clip";
|
||||
description { state: "default" 0.0;
|
||||
fill {
|
||||
smooth: 0;
|
||||
origin {
|
||||
relative: 0.0 0.0;
|
||||
offset: 0 0;
|
||||
}
|
||||
size {
|
||||
relative: 1.84722 1.0;
|
||||
offset: 0 0;
|
||||
}
|
||||
}
|
||||
image.normal: "clo.png";
|
||||
}
|
||||
description { state: "drift" 0.0;
|
||||
inherit: "default" 0.0;
|
||||
fill {
|
||||
origin {
|
||||
relative: 1.84722 0.0;
|
||||
offset: 0 0;
|
||||
}
|
||||
size {
|
||||
relative: 1.84722 1.0;
|
||||
offset: 0 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
group { name: "launcher_page";
|
||||
parts {
|
||||
part { name: "slot.0.0"; type: SWALLOW;
|
||||
|
@ -528,5 +669,30 @@ collections {
|
|||
}
|
||||
}
|
||||
}
|
||||
group {
|
||||
name: "test/layout";
|
||||
images {
|
||||
image: "sky.jpg" LOSSY 80;
|
||||
}
|
||||
parts {
|
||||
part {
|
||||
name: "bg";
|
||||
description {
|
||||
state: "default" 0.0;
|
||||
color: 255 255 255 100;
|
||||
image.normal: "sky.jpg";
|
||||
}
|
||||
}
|
||||
part {
|
||||
name: "swallow";
|
||||
type: SWALLOW;
|
||||
description {
|
||||
state: "default" 0.0;
|
||||
rel1.offset: 8 8;
|
||||
rel2.offset: -7 -7;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@ typedef struct _Pginfo Pginfo;
|
|||
|
||||
struct _Pginfo
|
||||
{
|
||||
Evas_Object *win, *pager, *pg1, *pg2, *pg3;
|
||||
Evas_Object *win, *pager, *pg1, *pg2, *pg3, *pg4;
|
||||
};
|
||||
|
||||
static void
|
||||
|
@ -26,11 +26,20 @@ my_pager_2(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
|
|||
|
||||
static void
|
||||
my_pager_3(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
|
||||
{
|
||||
Pginfo *info = data;
|
||||
elm_pager_content_promote(info->pager, info->pg4);
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
my_pager_4(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
|
||||
{
|
||||
Pginfo *info = data;
|
||||
elm_pager_content_promote(info->pager, info->pg1);
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
my_pager_pop(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
|
||||
{
|
||||
|
@ -104,7 +113,6 @@ test_pager(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info
|
|||
elm_box_pack_end(bx, lb);
|
||||
evas_object_show(lb);
|
||||
|
||||
|
||||
unsigned int i = 0;
|
||||
Evas_Object *rdg = NULL, *rd;
|
||||
for (i = 0; i < (sizeof(styles) / sizeof(struct style_tuple)); i++)
|
||||
|
@ -191,6 +199,44 @@ test_pager(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info
|
|||
elm_pager_content_push(pg, bx);
|
||||
info.pg3 = bx;
|
||||
|
||||
Evas_Object *ly, *ly2;
|
||||
char buf[4096];
|
||||
|
||||
ly = elm_layout_add(win);
|
||||
snprintf(buf, sizeof(buf), "%s/objects/test.edj", PACKAGE_DATA_DIR);
|
||||
elm_layout_file_set(ly, buf, "test/layout");
|
||||
evas_object_size_hint_weight_set(ly, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
||||
evas_object_show(ly);
|
||||
|
||||
ly2 = elm_layout_add(win);
|
||||
snprintf(buf, sizeof(buf), "%s/objects/test.edj", PACKAGE_DATA_DIR);
|
||||
elm_layout_file_set(ly2, buf, "layout2");
|
||||
evas_object_size_hint_weight_set(ly2, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
||||
//elm_win_resize_object_add(win, ly2);
|
||||
evas_object_show(ly2);
|
||||
|
||||
|
||||
|
||||
|
||||
bt = elm_button_add(win);
|
||||
elm_button_label_set(bt, "Flip to 1");
|
||||
evas_object_smart_callback_add(bt, "clicked", my_pager_4, &info);
|
||||
elm_layout_content_set(ly2, "element1", bt);
|
||||
evas_object_show(bt);
|
||||
|
||||
bt = elm_button_add(win);
|
||||
elm_button_label_set(bt, "Popme");
|
||||
evas_object_smart_callback_add(bt, "clicked", my_pager_pop, &info);
|
||||
evas_object_show(bt);
|
||||
elm_layout_content_set(ly2, "element2", bt);
|
||||
|
||||
elm_layout_content_set(ly, "swallow", ly2);
|
||||
evas_object_show(ly);
|
||||
|
||||
elm_pager_content_push(pg, ly);
|
||||
info.pg4 = ly2;
|
||||
|
||||
|
||||
evas_object_show(win);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue