On Fri, 27 Jan 2017 16:59:42 +0000 Mike Blumenkrantz
<[email protected]> said:

> This commit breaks bgpreview widget support for panoramic wallpapers which
> use panning.

yup. i know. i commented out the func that emits the signal, but the
alternative atm is worse IMHO. the previous memory use and sw engine and
resulting texture uploads etc. were according to perf using 30-40% of cpu time
or even more (on my raspberry pi). yup. nice slow system is wonderfully
bringing out evils where such uploads really hurt. it's doing it in ayland and
x11, and even on desktops. they are just too fast to tell it's happening.

i know. it's still it shouldn't keep uploading every frame as nothing changed,
but it is. this is another issue to track down sepaerately. a sub canvas is
doing this. it's always marked as dirty. this is another issue but it made me
realize that "oooh this means we have a whole canvas per pager screen bg in the
pager and even more whent he pager popup appears and an image that is like
128x80 (40k) even if the images are identical wallpapers, and if it were an
animated wallpaper it'd be texture uploading all the time for sure anyway.", so
this is better than what we had right now as it cures a horrible performance
issue that stands out like a sort thumb on a raspberry pi (literally 30-40% cpu
was a memcpy() and it was just this texture upload - the next function down the
list was 2% cpu after this one).

there is no support at this point to send signals, messages or otherwise high
level data to e_thumb to make this work, so for now - yes. that breaks.

if the edje file was placed there "raw" then you have another issue as i did
first off. re-drawing the pager means you end up having to sample an entire
wallpaper texture and scale it down every time with the gpu. that's a lot of
memory bandwidth. i have been toying with the idea of either having e's
background importer generate image sets with "pre-down-scaled" images in the
edj file or come up with a way to automatically do this at runtime too (mipmaps
or scalecache for gl) or a combination of both. but that's an even bigger lump
of fiddly work.


> On Fri, Jan 27, 2017 at 9:45 AM Carsten Haitzler <[email protected]>
> wrote:
> 
> > raster pushed a commit to branch master.
> >
> >
> > http://git.enlightenment.org/core/enlightenment.git/commit/?id=acf8988c40694c3c8b99f3f113baab73efd22c48
> >
> > commit acf8988c40694c3c8b99f3f113baab73efd22c48
> > Author: Carsten Haitzler (Rasterman) <[email protected]>
> > Date:   Fri Jan 27 23:44:02 2017 +0900
> >
> >     e widget bgpreview - use e thumb to get quality back and speed too
> >
> >     this should keep the perfromance of the prior commit
> >     f80f73a7c9cf663ccb3db9634a72d7fcc294bd90 and now get quality back by
> >     generating thumbnails at higher resolution then scaling down from
> > there.
> >
> >     @fix
> > ---
> >  src/bin/e_widget_bgpreview.c | 45
> > +++++++++++++++++++++++++++-----------------
> >  1 file changed, 28 insertions(+), 17 deletions(-)
> >
> > diff --git a/src/bin/e_widget_bgpreview.c b/src/bin/e_widget_bgpreview.c
> > index f66eb80..89be742 100644
> > --- a/src/bin/e_widget_bgpreview.c
> > +++ b/src/bin/e_widget_bgpreview.c
> > @@ -10,11 +10,12 @@ struct _E_Widget_Data
> >  typedef struct _E_Widget_Desk_Data E_Widget_Desk_Data;
> >  struct _E_Widget_Desk_Data
> >  {
> > -   Evas_Object         *icon, *thumb, *live, *cont;
> > +   Evas_Object         *icon, *live, *cont;
> >     int                  zone, x, y;
> >     Ecore_Event_Handler *bg_upd_hdl;
> >     Ecore_Job           *resize_job;
> >     Eina_Bool            configurable : 1;
> > +   Eina_Bool            thumb : 1;
> >  };
> >
> >  /* local function prototypes */
> > @@ -26,6 +27,7 @@ static void      _e_wid_desk_cb_config(void *data, Evas
> > *evas, Evas_Object *obj,
> >  static void      _e_wid_cb_resize(void *data, Evas *evas, Evas_Object
> > *obj, void *event);
> >  static Eina_Bool _e_wid_cb_bg_update(void *data, int type, void *event);
> >
> > +/*
> >  static void
> >  _bgpreview_viewport_update(Evas_Object *o, const E_Zone *zone, int x, int
> > y)
> >  {
> > @@ -40,6 +42,7 @@ _bgpreview_viewport_update(Evas_Object *o, const E_Zone
> > *zone, int x, int y)
> >     msg->val[4] = zone->desk_y_count;
> >     edje_object_message_send(o, EDJE_MESSAGE_FLOAT_SET, 0, msg);
> >  }
> > +*/
> >
> >  E_API Evas_Object *
> >  e_widget_bgpreview_add(Evas *evas, int nx, int ny)
> > @@ -96,14 +99,16 @@ e_widget_bgpreview_desk_add(Evas *e, E_Zone *zone, int
> > x, int y)
> >
> >     dd->cont = evas_object_table_add(e);
> >
> > +   dd->thumb = EINA_FALSE;
> >     if (eina_str_has_extension(bgfile, ".edj"))
> >       {
> > -        dd->live = e_livethumb_add(e);
> > -        dd->thumb = o = edje_object_add(e_livethumb_evas_get(dd->live));
> > -        edje_object_file_set(o, bgfile, "e/desktop/background");
> > -        _bgpreview_viewport_update(o, zone, x, y);
> > -        e_livethumb_thumb_set(dd->live, o);
> > -        evas_object_show(dd->thumb);
> > +        dd->live = o = e_thumb_icon_add(e);
> > +        e_thumb_icon_size_set(o, zone->w / 8, zone->h / 8);
> > +        e_thumb_icon_file_set(o, bgfile, "e/desktop/background");
> > +        e_icon_fill_inside_set(o, EINA_FALSE);
> > +        e_thumb_icon_begin(o);
> > +//        _bgpreview_viewport_update(o, zone, x, y);
> > +        dd->thumb = EINA_TRUE;
> >       }
> >     else if ((eina_str_has_extension(bgfile, ".gif")) ||
> >              (eina_str_has_extension(bgfile, ".png")) ||
> > @@ -165,6 +170,9 @@ _e_wid_livethumb_resize_job(void *data)
> >
> >     if (dd->thumb)
> >       {
> > +        const char *bgfile;
> > +
> > +        bgfile = e_bg_file_get(dd->zone, dd->x, dd->y);
> >          zone = e_comp_object_util_zone_get(dd->live);
> >          if (!zone) zone = eina_list_data_get(e_comp->zones);
> >          evas_object_geometry_get(dd->cont, NULL, NULL, &w, &h);
> > @@ -183,7 +191,10 @@ _e_wid_livethumb_resize_job(void *data)
> >                    w = (zone->w * h) / zone->h;
> >                 }
> >            }
> > -        e_livethumb_vsize_set(dd->live, w, h);
> > +        e_thumb_icon_size_set(dd->live, w, h);
> > +        e_thumb_icon_file_set(dd->live, bgfile, "e/desktop/background");
> > +        e_icon_fill_inside_set(dd->live, EINA_FALSE);
> > +        e_thumb_icon_rethumb(dd->live);
> >       }
> >     dd->resize_job = NULL;
> >  }
> > @@ -359,19 +370,20 @@ _e_wid_cb_bg_update(void *data, int type, void
> > *event)
> >          zone = e_comp_zone_number_get(dd->zone);
> >          bgfile = e_bg_file_get(dd->zone, dd->x, dd->y);
> >
> > -        if (dd->thumb) evas_object_del(dd->thumb);
> > -        dd->thumb = NULL;
> >          if (dd->live) evas_object_del(dd->live);
> >          dd->live = NULL;
> >
> > +        dd->thumb = EINA_FALSE;
> >          if (eina_str_has_extension(bgfile, ".edj"))
> >            {
> > -             dd->live = e_livethumb_add(e);
> > -             dd->thumb = o =
> > edje_object_add(e_livethumb_evas_get(dd->live));
> > -             edje_object_file_set(o, bgfile, "e/desktop/background");
> > -             _bgpreview_viewport_update(o, zone, dd->x, dd->y);
> > -             e_livethumb_thumb_set(dd->live, o);
> > -             evas_object_show(dd->thumb);
> > +             dd->live = o = e_thumb_icon_add(e);
> > +             e_thumb_icon_size_set(o, zone->w / 8, zone->h / 8);
> > +             e_thumb_icon_file_set(o, bgfile, "e/desktop/background");
> > +             e_icon_fill_inside_set(o, EINA_FALSE);
> > +             e_thumb_icon_begin(o);
> > +//             _bgpreview_viewport_update(o, zone, dd->x, dd->y);
> > +             dd->thumb = EINA_TRUE;
> > +             _e_wid_livethumb_resize_job(dd);
> >            }
> >          else if ((eina_str_has_extension(bgfile, ".gif")) ||
> >                   (eina_str_has_extension(bgfile, ".png")) ||
> > @@ -387,7 +399,6 @@ _e_wid_cb_bg_update(void *data, int type, void *event)
> >            {
> >               dd->live = o = e_video_add(e, bgfile, EINA_TRUE);
> >            }
> > -        _e_wid_livethumb_resize_job(dd);
> >          eina_stringshare_del(bgfile);
> >
> >          evas_object_size_hint_weight_set(dd->live, 1, 1);
> >
> > --
> >
> >
> >
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, SlashDot.org! http://sdm.link/slashdot
> _______________________________________________
> enlightenment-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
> 


-- 
------------- Codito, ergo sum - "I code, therefore I am" --------------
The Rasterman (Carsten Haitzler)    [email protected]


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
enlightenment-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to