On Thu, 15 Dec 2016 09:58:04 +0900 Carsten Haitzler (The Rasterman) <ras...@rasterman.com> said:
> On Tue, 13 Dec 2016 11:54:32 -0800 Derek Foreman <der...@osg.samsung.com> > said: > > just a note. i know the original code was wrong and used unix time... unix > time is gettimeofday and thus can go forward and back (eg ntp changes) and > also thus its a huge number rather than ecore_time_get(). still it'll wrap at > about 49.7 days... > > why not just keep a global serial # and ++ it each time? at least it'll wrap > only after 4 billion or so pixmap frees (that's going to be an exceedingly > long time i would guess vs using ms)? isn't this just meant to be some unique > serial number not a timestamp? technically this also means multiple pixmap > frees in a row there will get the same serial... and fyi i have a local pending commit (among others) for this too.. > > derekf pushed a commit to branch master. > > > > http://git.enlightenment.org/core/enlightenment.git/commit/?id=0493abf457331fc604e2aa64eb51448fada09913 > > > > commit 0493abf457331fc604e2aa64eb51448fada09913 > > Author: Derek Foreman <der...@osg.samsung.com> > > Date: Tue Dec 13 13:53:18 2016 -0600 > > > > Fix wayland frame callback times > > > > ecore_time_unix_get() * 1000 is too big to fit in a uint32, so take the > > time we instantiate the wayland pixmap hash and use that as a base. > > --- > > src/bin/e_pixmap.c | 10 ++++++++-- > > 1 file changed, 8 insertions(+), 2 deletions(-) > > > > diff --git a/src/bin/e_pixmap.c b/src/bin/e_pixmap.c > > index f46a994..8e072a0 100644 > > --- a/src/bin/e_pixmap.c > > +++ b/src/bin/e_pixmap.c > > @@ -64,6 +64,8 @@ struct _E_Pixmap > > > > #ifdef HAVE_WAYLAND > > > > +double wayland_time_base; > > + > > static void > > _e_pixmap_cb_deferred_buffer_destroy(struct wl_listener *listener, void > > *data EINA_UNUSED) { > > @@ -342,7 +344,10 @@ e_pixmap_new(E_Pixmap_Type type, ...) > > } > > } > > else > > - pixmaps[type] = eina_hash_int64_new > > ((Eina_Free_Cb)_e_pixmap_free); > > + { > > + pixmaps[type] = eina_hash_int64_new > > ((Eina_Free_Cb)_e_pixmap_free); > > + wayland_time_base = ecore_time_unix_get(); > > + } > > cp = _e_pixmap_new(type); > > cp->win = id; > > eina_hash_add(pixmaps[type], &id, cp); > > @@ -798,7 +803,8 @@ e_pixmap_image_clear(E_Pixmap *cp, Eina_Bool cache) > > cd->frames = NULL; > > EINA_LIST_FREE(free_list, cb) > > { > > - wl_callback_send_done(cb, ecore_time_unix_get() * 1000); > > + double t = ecore_time_unix_get() - wayland_time_base; > > + wl_callback_send_done(cb, t * 1000); > > wl_resource_destroy(cb); > > } > > } > > > > -- > > > > > > > -- > ------------- Codito, ergo sum - "I code, therefore I am" -------------- > The Rasterman (Carsten Haitzler) ras...@rasterman.com > > > ------------------------------------------------------------------------------ > 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 > enlightenment-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/enlightenment-devel > -- ------------- Codito, ergo sum - "I code, therefore I am" -------------- The Rasterman (Carsten Haitzler) ras...@rasterman.com ------------------------------------------------------------------------------ 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 enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel