path: root/src/modules/evas/engines/wayland_shm/evas_shm.c (follow)
AgeCommit message (Collapse)Author
2017-11-08wayland_shm: Remove old shm codeDerek Foreman
The new shm code should be equally capable - minus one surface resize optimization that probably didn't buy us much performance at the cost of memory.
2017-10-12wayland_shm: Make some function staticDerek Foreman
Only used in this file.
2017-10-12wayland_shm: Kill stale commentDerek Foreman
This comment doesn't make sense now, as all the frame callback stuff is in ecore_wl2.
2017-10-12wayland_shm: Remove hidden from surface posting callsDerek Foreman
Now that we tick based on frame callbacks it should be impossible to post an update while hidden.
2017-10-12evas_shm: Remove wl_dmabuf and wl_shm from engine infoDerek Foreman
All queries for these are now on the ecore_wl2_display
2017-10-12wayland_shm: Remove surface_set functionDerek Foreman
Now that we use the display's shm and dmabuf pointers we don't need to update them.
2017-10-12evas_shm: query wl_shm from ecore_wl2_displayDerek Foreman
Stop using the internally stored copy, always query from active display. This fixes session recovery.
2017-10-12wayland_shm: Pass Surface instead of Shm_SurfaceDerek Foreman
Surface has some variables we'll need later.
2017-09-02wayland_shm - clean out ptrs after free - seeing invalid mem/ptr accessCarsten Haitzler (Rasterman)
enlightenment internal windows insta segv e on rpi. after much hunting it seems a fallback is happening and bunk ptrs are being used. this at least will make the problems more reliable with null ptrs.
2017-08-30walyand_shm: Remove unused variableDerek Foreman
Nothing in here actually cares about the wl_display anymore.
2017-08-18wayland_shm: Use ecore_wl2_window_buffer_attachDerek Foreman
No longer calling wl_surface_attach directly.
2017-08-18wayland_shm: Don't attach null buffers from surface_postDerek Foreman
This is protected against elsewhere.
2017-08-18wayland: Switch to ecore_wl2_window_commit()Derek Foreman
Use ecore_wl2_window_commit() instead of directly calling wl_surface_commit
2017-08-18wayland_shm: Remove direct access to wl_surfaceDerek Foreman
Querying it through Ecore_Wl2_Window now
2017-08-18wayland: Put Ecore_Wl2_Win instead of wl_surface into the enginesDerek Foreman
We'll need to track some state in a common way, so attaching it to the window seems like a good idea.
2017-07-21wayland: stop creating 1x1 surfaces on initMike Blumenkrantz
fix T5226 #IGot99TicketsBut1x1AintOne
2017-02-10vpath usage - simplify to bare minimum to make gustavo happyCarsten Haitzler (Rasterman)
since these are only local path resolves, the do and wait are technically not needed. also remove any other tmp strings and use the vpath string resolving feature to avoid printfs/strjoins/cats etc. etc. as well. also remember to remove old name string from evas shm code - it worked for me. i guess i was lucky and it happened to be NULL thus free was fine.
2017-02-09Revert "vpath usage - simplify to bare minimum to make gustavo happy"Derek Foreman
This reverts commit 2037474dc0fd2b360452f2a15abcbe533b57ca37. This causes the wayland_shm engine to seg fault immediately at startup when attempting to create shm buffers. Please make sure when committing changes to the wayland_shm engine to test on intel, exynos, and at least one platform without dmabuf capabilities - or using the EVAS_WAYLAND_SHM_DISABLE_DMABUF env var to disable dmabuf on intel or exynos. Anyone without the time or hardware to fully test changes to wayland_shm can submit a patch to phabricator and assign it to me so I can fully test it before landing.
2017-02-09vpath usage - simplify to bare minimum to make gustavo happyCarsten Haitzler (Rasterman)
since these are only local path resolves, the do and wait are technically not needed. also remove any other tmp strings and use the vpath string resolving feature to avoid printfs/strjoins/cats etc. etc. as well.
2017-02-09evas wayland shm engine - use vpath for getting xdg runtime dirCarsten Haitzler (Rasterman)
this should make the wayland shm engine safe to use from setuid processes. it shouldnt depend on getenv of specific file paths if setuid. vpatrh takes care of this in one central place
2017-01-06evas-wayland-shm: Fix formattingChris Michael
NB: No functional changes, just reformatting so that this insane one-liner wraps to 80... Signed-off-by: Chris Michael <>
2017-01-05wayland_shm: Add a way to update the stored wayland objectsDerek Foreman
On session recovery the engine needs to be given new copies of the surface, dmabuf, and shm objects to run in the new connection. This fixes session recovery breakage introduced when we stopped recreating the outbuf on reconfigure.
2017-01-05wayland_shm: Add a force flag to surface reconfigureDerek Foreman
We're going to need a way to force reconfigure unconditionally to make session recovery work again.
2016-12-02evas-wayland-shm: Fix issue of destroying & recreating wl_surfaces on hideChris Michael
When a canvas gets hidden, we don't need to destroy & recreate the wl_surface. We can simply attach a NULL wl_buffer to the surface which achieves the same result. This saves us from having to always destroy & recreate surfaces when we hide/show. Signed-off-by: Chris Michael <>
2016-11-02wayland evas engines: rename wayland display to wl_displayDerek Foreman
Continuing to make the shm and egl engines closer to eachother.
2016-10-26evas-wayland-shm: Improve next buffer selection algorithmChris Michael
When triple buffering it's possible that we'll only need two buffers at a time for long durations. When we finally call upon a third buffer it hasn't been used recently enough to do a partial redraw. By picking the oldest available buffer when multiple buffers are free we can increase the likelihood of doing partial redraws. Based on 79409757c6493738c21015708a1ba5178942ad94 by Derek Foreman. Signed-off-by: Chris Michael <>
2016-10-26evas-wayland-shm: Fix max buffer ageChris Michael
Highest possible buffer age should actually be 4, not the number of available buffers. @fix Signed-off-by: Chris Michael <>
2016-07-26wayland_shm: Use correct filename in unlinkDerek Foreman
We switched from mkstemp to eina_file_mkstemp() but ended up unlinking the template filename, which didn't exist on the filesystem.
2016-07-13evas-wayland-shm: Create buffers with ARGB by defaultChris Michael
We need to be creating buffers with ARGB by default so that things like Alpha/Transparency work when toggled. If we always create with XRGB then toggling Alpha/Transparency state fails. @fix Signed-off-by: Chris Michael <>
2016-07-08evas-wayland-shm: Fix Insecure temporary fileChris Michael
Fix using mkstemp directly without securely setting umask first by making use of eina_file_mkstemp function which does set umask. Fixes Coverity CID1357164 @fix Signed-off-by: Chris Michael <>
2016-04-19wayland_shm: Refactor surface creationDerek Foreman
Split this into two parts, one that makes the base surface, one that calls the potential back ends. Once the dmabuf backend is added this will allow a fallback path to re-initialize the surface as wl_shm if dmabuf fails.
2016-04-19wayland_shm: pass engine info to shm_surface_createDerek Foreman
Gratuitous change to pass less parameters and make some code prettier.
2016-04-19wayland_shm: Pull the damage stuff out of evas_shmDerek Foreman
This doesn't really care what the buffers were allocated with, so let's make this chunk of code useful to both the shm method and the upcoming dmabuf one
2016-04-19wayland_shm: Minor clean up of _evas_shm_surface_postDerek Foreman
Some gratuitous cosmetic fixes
2016-04-19wayland_shm: Don't pass num_buff to reconfigureDerek Foreman
We can't really reconfigure the number of buffers after they're created, there's nothing above us that would try to do it...
2016-04-19wayland_shm: Abstract the actual shm operationsDerek Foreman
Make the Surface carry function pointers and the shm surface create function set them. This refactor makes implementing dmabuf operations simpler.
2016-04-19wayland_shm: Remove unused dx, dy params from resize functionsDerek Foreman
We don't appear to actually use these for anything except long term storage
2016-04-19wayland_shm: Drop ifdefs around damage_bufferDerek Foreman
We now depend on wayland 1.10.0 so damage_buffer is always going to be present in the headers - we no longer need ifdef checks.
2016-04-19wayland_shm: Make new Surface abstraction to wrap Shm_SurfaceDerek Foreman
Wraps the Shm_Surface allocator in a new Surface type that will potentially use different allocators, such as dmabuf in a future commit.
2016-04-19wayland_shm: Move Shm private structures into evas_shmDerek Foreman
Refactor all the shm specific stuff into evas_shm so it can better co-exist with upcoming dmabuf allocations
2016-04-19wayland_shm: Remove flagsDerek Foreman
We only used this for resize, and didn't actually even need it then.
2016-04-19wayland_shm: Return buffer age from shm_surface_assignDerek Foreman
This makes refactoring the Surface abstraction a little easier.
2016-04-05evas-wayland-shm: Update copyright noticeChris Michael
As portions of this code have been derived from existing code in Weston, we should also be including their copyright/license text to give credit. Fixes T3421 @fix Signed-off-by: Chris Michael <>
2016-04-04wayland_shm: Fix resize optimizationDerek Foreman
We're supposed to allocate a large pool at startup and use it for resizing to save pool allocations. However, this was broken and we ended up allocating both a large pool and a proper sized pool every resize. This restores correct behaviour.
2016-01-14ecore_drm/ecore_wl2: logging: remove errant usage of %mDerek Foreman
Summary: printf %m stringifies and prints errno. I've tried to remove its use anywhere that the immediately preceding function might not set errno or is a complicated function for which knowing errno doesn't really give any useful information. I've left a few of the drmMode calls because they're just wrappers around ioctl, which legitimately sets errno. @fix Reviewers: zmike, devilhorns Reviewed By: zmike, devilhorns Subscribers: cedric, jpeg Differential Revision:
2015-12-28wayland: use wl_surface.damage_buffer if availableDerek Foreman
Summary: wl_surface.damage_buffer() takes surface damage in buffer co-ordinates. Right now since we don't use wayland's scaling, transforms, or viewports it's exactly the same as wl_surface.damage(). In the future if we start using those features it's much easier to do so with damage_buffer(). Reviewers: zmike, devilhorns Subscribers: cedric, jpeg Differential Revision:
2015-10-01evas-wayland-shm: Reduce size of resize pool during resize eventsChris Michael
Summary: We really don't need to be allocating a shm pool this large during resize, so reduce the size of the pool. Signed-off-by: Chris Michael <>
2015-08-20Add experimental implementation of custom animator ticksChris Michael
Signed-off-by: Chris Michael <>
2015-07-31evas-wayland-shm: Use wl_display_dispatch_pending to wait for buffersChris Michael
Summary: This fixes T2625 where launching filemanager would cause a deadlock. The issue here is that wl_display_dispatch actually uses poll() which will block and wait, while using wl_display_dispatch_pending does not case any blocking. Signed-off-by: Chris Michael <>
2015-07-30wayland-shm: When we run out of shm buffers kick the server to get some backDerek Foreman
Summary: This fixes a rendering issue with wayland apps. We consume all buffers then drop any attempted renders that take place while we have no buffers. This fix now waits for the server to give us some buffers back. This is the cause of T2612 @fix #Kansas Reviewers: zmike, devilhorns Reviewed By: devilhorns Subscribers: cedric Differential Revision: