Commit Graph

151 Commits

Author SHA1 Message Date
Derek Foreman f86e04b14f wayland-shm: Introduce buffer ages
Summary:
We now track each shm buffer's time since last draw so evas can tell
what it needs to re-render.

Reviewers: zmike, devilhorns

Reviewed By: devilhorns

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D2893
2015-07-30 11:45:38 -04:00
Derek Foreman 997e84f14e wayland-shm: Assign buffers in the swap_mode callback
Summary:
This is when we're about to start a new render, so it's the best
time to set up the next buffer to draw to.

Reviewers: zmike, devilhorns

Reviewed By: devilhorns

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D2892
2015-07-30 11:45:32 -04:00
Derek Foreman ebea504cbc wayland-shm: rename _evas_outbuf_swapmode_get() to _evas_outbuf_swap_mode_get()
Summary: Everyone else calls it swap_mode, let's be trendy.

Reviewers: zmike, devilhorns

Reviewed By: devilhorns

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D2891
2015-07-30 11:45:26 -04:00
Derek Foreman cf3434a927 wayland-shm: Remove curr_buff from Shm_Surface
Summary:
We already have *current, but we're not using it properly.  Let's throw
out curr_buff and just use *current.

This temporarily makes swapmode_get do full renders, this will be
fixed in a future commit that adds proper buffer ages.

Reviewers: zmike, devilhorns

Reviewed By: devilhorns

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D2890
2015-07-30 11:45:17 -04:00
Derek Foreman 157ad667b4 wayland-shm: refactor _evas_shm_surface_data_get()
Summary:
Split out the buffer picking stuff because we're going to want to call
it from somewhere else.

Reviewers: zmike, devilhorns

Reviewed By: devilhorns

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D2889
2015-07-30 11:45:05 -04:00
Derek Foreman 525269dc98 wayland-shm: Use MAX_BUFFERS macro instead of magic 4
Reviewers: zmike, devilhorns

Reviewed By: devilhorns

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D2888
2015-07-30 11:44:57 -04:00
Derek Foreman d2f5d240a4 wayland-shm: rename _evas_shm_surface_redraw() to _evas_shm_surface_post()
Summary:
It doesn't redraw anything, it posts a buffer full of data to the
compositor.

Reviewers: zmike, devilhorns

Reviewed By: devilhorns

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D2887
2015-07-30 11:44:49 -04:00
Derek Foreman f59f83810c wayland-shm: remove _evas_shm_surface_swap()
Summary: It no longer does anything useful

Reviewers: zmike, devilhorns

Reviewed By: devilhorns

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D2886
2015-07-30 11:44:39 -04:00
Chris Michael 1c19649acd evas-wayland-shm: Fix issue of surface_swap spamming invalid warning
Summary: Since the surface_swap functionality is changed now, we no
longer need to bother checking if the leaf is busy as we don't use the
leaf itself inside this function anymore.

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-07-28 09:43:16 -04:00
Derek Foreman d68c382105 wayland-shm: Remove "mapped"
Summary:
Looks like the recent changes to swap/redraw have fixed a problem with
damage tracking and we no longer need this.

Damage history seems ok without it now.

@fix

Reviewers: zmike, devilhorns

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D2876
2015-07-28 09:19:12 -04:00
Derek Foreman 0b284d0914 wayland-shm: re-organize some of the swap/redraw logic
Summary:
The way things were, we'd be committing a buffer we hadn't rendered to
yet.

Now redraw() contains all the attach/damage/commit logic, and swap() is
called afterwards to set up a new target buffer for the next render.

@fix

Reviewers: zmike, devilhorns

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D2875
2015-07-28 09:19:07 -04:00
Derek Foreman f2caeff9c2 wayland_shm: Don't store frame_cb
Summary:
We don't need to - all the frame callback does for us is ensure a queue
push.

We should destroy any callback we receive when we receive it.

@fix

Reviewers: zmike, devilhorns

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D2874
2015-07-28 09:18:59 -04:00
Chris Michael 43ddf5b69d evas-wayland-shm: Don't call surface commit until we've setup the frame listener
Summary: This fixes an issue where we may been missing a frame
callback due to the wl_surface_commit being called before the frame
callback listener was setup. Now we will setup the frame callback
listener before doing any wl_surface_commit so that we don't miss
frames.

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-07-27 15:53:02 -04:00
Chris Michael faa99297e0 evas-wayland-shm: Fix T2352 (focused window borders blink)
Summary: This fixes an issue where the wrong swapmode was being
returned to the evas render function. This was causing focused windows
to blink.

NB: Big thanks to Derek for assisting !! :)

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-04-30 11:15:00 -04:00
Chris Michael 7c1da6cdfa evas-wayland-shm: Update software_generic render engine size on output resize
Summary: As we override the software_generic function for
eng_output_resize, so we can handle resize edges, we should also be
updating the software_generic's render engine size here because the
function for software_generic->output_resize never gets called.

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-04-29 14:23:24 -04:00
Chris Michael c4e9d29441 evas-wayland-shm: Minimize race condition when finding free leaf
Summary: This fixes a possible race condition that could happen when
using more than 2 buffers. Instead of searching for a free buffer in
various places, find a free buffer when evas requests the buffer data
and save that free buffer as the 'current buffer'

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-04-29 11:49:49 -04:00
Chris Michael a3969b4d3a evas-wayland-shm: Use size of buffer when caching
Summary: evas_cache and evas_cache2 are expecting the width of the
buffer when caching so just use that directly rather than calculating
bpl.

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-04-29 11:14:38 -04:00
Jean-Philippe ANDRE 3e2b104cab Wayland shm: Fix shadow variable warning 2015-03-25 10:56:09 -07:00
Chris Michael 57bdbf6793 evas-wayland-shm: Fix redrawing issues that were causing 'flashing' in latest engine code.
Summary: As reported by derek & zmike, the previous engine refactor
left some issues where the app would 'flash' during redraws due to
buffer handling. This commit fixes that issue along with flashing
during resize.

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-03-19 16:17:25 -04:00
Chris Michael 3ebe41af18 evas-wayland-shm: Refactor Evas Wayland Shm Engine (Fix T2201)
Summary: This patch set fixes the issue of Evas wayland shm engine
causing crashes when resizing efl apps in the E wayland compositor. It
refactors the evas engine to wait for release events on buffers, and
hooks into frame callbacks so that release events will get triggered
at the appropriate time.

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-03-17 15:49:09 -04:00
Chris Michael 5c753a859b evas-wayland-shm: Remove old wayland_shm engine swapper files
Summary: Part of engine refactor to address resize issue in E wayland
compositor

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-03-17 15:32:29 -04:00
Cedric BAIL 93333ede15 evas: refactor shutdown. 2015-02-23 11:35:29 +01:00
Cedric BAIL 552a38cde5 evas: refactor software engine initialisation. 2015-02-20 15:04:52 +01:00
kabeer khan 48920920a5 evas: fix memory leak in evas_swapper.
Summary: Signed-off-by: kabeer khan <kabeer.khan@samsung.com>

@fix

Reviewers: devilhorns

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D1800

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2014-12-22 12:06:16 +01:00
Jérémy Zurcher 119134751f evas/engines: avoid redefinition of typedef Outbuf
'typedef struct _Outbuf Outbuf' is in software_generic/Evas_Engine_Software_Generic.h
that is always included
2014-09-23 11:16:47 +02:00
Chris Michael aea57d7a8e evas-wayland-shm: Free allocated rectangle after sending damages
We allocate a new eina_rectangle here, but we never free it after
sending damages to the surface.

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-07-29 17:45:24 -04:00
Chris Michael d7b7f19e5e evas-engine-wayland-shm: Check for depth being INHERIT on reconfigure
Software Generic backend can send us OUTBUF_DEPTH_INHERIT during a
reconfigure. If we are inheriting the previous depth, let's check that
so we don't get needless destrouction/recreation of shm buffers.

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-07-09 12:57:17 -04:00
Cedric BAIL e85bcfafa4 evas: fix wayland_shm to report buffer state as expected by software generic backend. 2014-07-07 18:27:32 +02:00
Cedric BAIL 289b3691b0 evas: add more infrastructure to software_generic backend to be ready for GL_X11 migration. 2014-07-04 15:11:22 +02:00
Cedric BAIL 0fdf8fab3a evas: simplify Wayland_SHM backend to use software generic infrastructure. 2014-07-04 15:11:22 +02:00
Tom Hacohen 7f3a44894b Evas canvas eolian: Fix namespace and class name for the evas canvas. 2014-06-30 17:47:06 +01:00
U. Artie Eoff e186f6dbc5 evas/wayland_shm: unlink the REAL temporary file
Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
2014-05-14 16:13:33 -07:00
Chris Michael ad72fa0649 evas-wayland-shm: Fix 'oopsie/typo' in temporary file name template
@bugfix: When creating a temporary file for the buffer's mmaped data,
we need to make sure there is an appending '/' in the name else
mkstemp will fail due to improperly formatted filename.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-05-09 08:30:12 +01:00
Chris Michael 8c86148a7b evas-wayland-shm: Use XDG_RUNTIME_DIR if available for creating mmap'd
buffer file.

@bugfix: When we create the mmap'd file for shm buffer access, try
using the XDG_RUNTIME_DIR first as the place to create the file. If
that does not exist in the environment, Then fallback to using /tmp
directory.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-05-09 08:00:44 +01:00
Chris Michael 44e023c888 bugfix: Fix Wayland Shm engine destination calculation typo
When rotation is 0, we need to advance the destination pointer in the
X direction by a Multiple of Bits-Per-Pixel...not an addition.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-02-26 11:36:27 +00:00
Daniel Juyung Seo 76d8532b54 efl: Unified eina critical manro to CRI.
Being annoyed by different types of eina critical macros - CRI, CRIT,
 CRITICAL -, I concluded to unify them to one. Discussed on IRC and
 finally, CRI was chosen to meet the consistency with other macros -
 ERR, WRN, INF, DBG - in terms of the number of characters.
If there is any missing bits, please let me know.
2013-12-26 12:27:13 +09:00
Rafael Antognolli 5966a730cd evas/wayland_shm: Don't use a global var to store the sent buffer.
When an Ecore_Evas is hidden, it will destroy the buffer swapper. When
it's shown again, it will try to attach a new buffer, that can be same
buffer. If that global var is still pointing to the old buffer, it can
match to it again and avoid sending a new buffer. So, just put this sent
buffer var in the buffer swapper, and it will get set to NULL when the
swapper is destroyed and created again.

This should fix an intermitent problem of ecore_evas_show() not always
working after an ecore_evas_hide() on the wayland_shm engine.
2013-12-02 13:24:56 -02:00
Chris Michael 6d3c50c3b6 On a swapbuf reconfigure, don't check for alpha changing state.
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-09-10 14:37:17 +01:00
Chris Michael f940f11a9b Fix copy/paste issue.
Use proper width & height for the new tilebuffer.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-08-29 09:06:53 +01:00
Chris Michael ce716ff052 Avoid potential memleak on rotation of tilebuf.
Port of 70f443d8a8 to wayland_shm

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-08-29 08:21:36 +01:00
Chris Michael a9853f96f7 Port 1f82fbe14d to wayland shm engine
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-08-29 08:11:16 +01:00
Chris Michael b43421ae5b Fix formatting
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-08-29 08:05:47 +01:00
Chris Michael 43e60f3f83 Check that we have both Rects and Count is > 0 during buffer attach.
NB: When trying to attach a buffer to a surface, there was a corner
case that could fail in that if we just had 'rects' but count was 0,
then the surface would not get damaged (essentially a call to
wl_surface_damage would get passed 0,0 as the size). This fixes that
problem in that if count is <= 0 now, then we'll damage the whole
surface.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-07-25 15:45:55 +01:00
Chris Michael d112487e84 When we destroy the shm_pool, reset the swapper used_size to zero.
Remove FIXME and resize the the shm_pool if it is too small for the
new buffer.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-07-25 09:13:08 +01:00
Chris Michael 3482b91624 No longer necessary to set the surface user_data to be equal to the
buffer.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-07-23 07:15:20 +01:00
Sebastian Dransfeld 51023d2d4f evas: Keep sane name for public header
Evas_Common.h should be used for the public header, and rather rename
evas_common.h internal header to another name.

Sa:
Evas_Common_Header.h -> Evas_Common.h
evas_common.h -> evas_common_private.h

Shouldn't have both Evas_Common.h and evas_common.h because of case
insensitive filesystems.
2013-06-20 12:53:29 +02:00
Chris Michael bfc7e7cfd1 Set the surface user data to be the current buffer.
NB: This is needed because some compositors (Weston) are expecting
wl_surface_get_user_data to return a buffer.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-05-21 10:51:15 +01:00
Rafael Antognolli 78d42bcb62 evas/wayland_shm: Don't free the swapper while still in use.
Wait until all the buffers were released before freeing it.
2013-05-06 15:03:09 -03:00
Carsten Haitzler f8c9a8d167 revert the revert... damn you git!
Revert "Revert "Efl: replace eo_data_get for objects data referencing.""

This reverts commit b64a2994b3.
2013-05-02 16:47:16 +09:00
Carsten Haitzler b64a2994b3 Revert "Efl: replace eo_data_get for objects data referencing."
This reverts commit 654a3f5f94.
2013-05-02 14:17:19 +09:00