Commit Graph

120 Commits

Author SHA1 Message Date
Romain Naour 8af42ec11d E: include uuid.h only when Wayland support is enabled.
libuuid is checked only when Wayland support is enabled and
uuid_t uuid is guarded by HAVE_WAYLAND.

So move include uuid.h below a HAVE_WAYLAND.

Signed-off-by: Romain Naour <romain.naour@gmail.com>

fix T4298
2016-08-08 11:36:54 -04:00
Chris Michael ab1c2ed5d1 Revert "e - fix major memory bloat when in gl mode - dont create shm segments"
This reverts commit ae6e09ec11.

This breaks resizing of windows inside Enlightenment. Evas_Engines
don't bind a pixmap permanently, they just bind during each render, so
on resize this caused a broken pixmap if we don't create a new one for
each size. This patch Would be correct IF engines worked differently
wrt x pixmap binding during render.
2016-07-26 10:31:03 -04:00
Carsten Haitzler ae6e09ec11 e - fix major memory bloat when in gl mode - dont create shm segments
so e pixmap was ALWAYS creating an ecore_x_image EVERY time for EVERY
window. this means allocate all the sysv shared memory segments for
every window even if never used. this is bad. it litters systems
with unused shared memory segments (ipcs and see) and eats up shared
mem limits/quotas too. we just don't need them in gl unless a window
is shaped or texture from pixmap is off. so allocate the pixmap on
demand, and otherwise leave the ecore x image NULL. this fixes this
bloat.

@fix
2016-07-26 13:27:56 +09:00
Derek Foreman e5e875ded8 Fix dmabuf breakage of non wayland builds.
#IWearTheHatOfShame
2016-05-19 10:23:22 -05:00
Derek Foreman 402c56e1f2 clean up warnings in dmabuf code 2016-05-18 12:34:23 -05:00
Derek Foreman 2d1802375d Add DMABuf support for wayland
This adds compositor handling of DMABuf buffers.  DMAbuf capabilities
are advertised for the drm back-ends, and DMAbuf buffers are handled
as native surfaces.
2016-05-18 12:05:34 -05:00
Derek Foreman 1774b59923 Add e_pixmap API for testing if a pixmap is a native surface
DMAbuf for wayland will complicate determining whether a pixmap can use
a native surface or not, so we add an API here to check this.

Note that this doesn't take compositor capabilities into account - for
example, X pixmaps need GL enabled to use native surfaces.  This is
already tested elsewhere.
2016-05-18 12:05:33 -05:00
Derek Foreman b8ab7b0738 Remove unwanted debug detritus from last commit
#Oops

Reviewed-by: Mike Blumenkrantz <zmike@osg.samsung.com>
2016-04-07 13:29:58 -04:00
Derek Foreman 68587276cf Clean up some header inclusion
Including certain headers in the wrong order can cause problems if
we're configured to use beta api (right now wayland forces this).

In most cases we should just be including e.h and not the individual
EFL headers anyway.  This fixes some of that.

fix T3426, T3428
2016-04-07 13:14:43 -04:00
Derek Foreman 8f0f9ce4f7 wayland: Fix xdg-popup crash
We need to remove the destroy listener when we delete a pixmap or it
leaves an invalid node on the signal list.
2016-04-01 14:07:45 -04:00
Derek Foreman a4fc286d7f Fix internal window borders on 32-bit computers
Our wayland window ids are 64 bit integers, we need to be careful
about the data type on 32-bit machines where pointers are smaller
than this.
2016-03-10 16:47:09 -05:00
Derek Foreman df7bc5963d Remove argb_convert for wayland buffers
Wayland buffers are currently either ARGB or XRGB - we don't need to
convert either of these, we just need to set alpha appropriately - which
we now do.
2016-03-08 12:46:32 -05:00
Derek Foreman dfc7c26ce4 Rework wayland buffer handling
We need to keep wayland buffers around even if they'll never be written
to again.  This is part of Buffer_Reference's task in weston, but we
already have our pixmap abstraction which can serve mostly the same
purpose.

Remove the "buffer reference" stuff from e_pixmap and replace it with a
kept buffer for the last commit.

Add shared memory pool references to keep pools from going away on us.
2016-03-08 12:46:32 -05:00
Derek Foreman e5e887c773 Add a NULL check in native_surface_init under wayland 2016-03-08 12:46:32 -05:00
Mike Blumenkrantz 6fe6fba44e redo wayland pixmap ids to use monotonic decreasing ints with no collisions
using pointers for this turned out to have some corner case collisions, so
now just use something totally unrelated to the surface to ensure uniqueness
2016-02-25 11:16:09 -05:00
Derek Foreman 6a65d2a546 Protect the wayland frame callback list from corruption
The resource destroy callback for frame callbacks will walk the frame list
to remove itself.  When freeing that list we need to make sure the
resource destroy callback doesn't see the same list we're walking and
corrupt it.
2016-02-18 12:31:31 -06:00
Mike Blumenkrantz ae6416c27c add wayland egl client support
definitely not a feature, I promise™
2015-11-02 16:25:02 -05:00
Mike Blumenkrantz cea91b111c Revert "queue pending buffers for wayland shm clients"
This reverts commit 1ee825d29c.

this was fixing the wrong problem and was not functioning accurately
in any case
2015-11-02 14:53:15 -05:00
Mike Blumenkrantz 1ee825d29c queue pending buffers for wayland shm clients
due to how deferred rendering works, it's possible for a client to
send a second buffer before enlightenment has rendered the first one.
in this situation, it seems that the best solution is to queue successive
buffers (frames) and pop the queue after each render

ref T2784
2015-10-16 15:48:46 -04:00
Mike Blumenkrantz cdf6650a11 redo wayland client buffer referencing
the previous methodology was effectively:
attach -> ref(new buffer) x2 / unref(old buffer) x2
...
...
attach -> ref(new buffer) x2 / unref(old buffer) x2

this resulted in buffer management failures and crashing. now the
buffer gets 1x ref before render and 1x unref after render, ensuring
that the lifetime is accurate (assuming evas doesn't lie to us)

now we still have random crashing during resize, but not as much as
before
2015-09-29 18:53:15 -04:00
Mike Blumenkrantz 441e266a83 add function for getting x11 pixmap from E_Pixmap 2015-09-17 16:54:00 -04:00
Chris Michael cb622b8a7a enlightenment: Remove legacy unused e_pixmap_image_draw_done function
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-08-12 14:20:05 -04:00
Mike Blumenkrantz 6aa9a9477e add pixmap aliasing
this provides the ability to alias one pixmap id as another pixmap
2015-08-06 19:31:20 -04:00
Stefan Schmidt 0522053dd1 e_pixmap: Create uuid when being used as a wl surface 2015-06-29 17:02:20 +02:00
Mike Blumenkrantz 2ae8d726f3 HAVE_WAYLAND_CLIENTS || HAVE_WAYLAND_ONLY -> HAVE_WAYLAND
these are semantically identical
2015-06-25 20:04:31 -04:00
Chris Michael 0a94e8ba71 enlightenment: Make E build again with EFL from git
sed -i 's/EAPI/E_API/g'

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-05-07 15:13:10 -04:00
Mike Blumenkrantz de0b1b2d39 add E_PIXMAP_TYPE_NONE
null type currently only used during comp init
2015-04-22 21:18:42 -04:00
Mike Blumenkrantz f254531182 use pointer hash for wl pixmaps 2015-04-21 15:57:18 -04:00
Mike Blumenkrantz 96f07bff8a wl client pixmaps now use a different method for creating the pixmap id 2015-04-21 15:19:20 -04:00
Mike Blumenkrantz 14f44ef6e3 fix pixmap image clearing based on pixmap type
!@%!@$#!# borkerhorns!!!!!!

invalidates T2291
2015-04-16 14:39:09 -04:00
Derek Foreman feca6dce4f Wayland frame callback times are in milliseconds
Reviewers: zmike, devilhorns

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D2173
2015-03-16 13:35:16 -04:00
Mike Blumenkrantz d93bb6c899 don't modify pixmap hash when changing pixmap parent window
moderately certain I originally wrote this to work in the other direction
and then failed to remove it when I switched to setting parents instead of
children. regardless, pixmap hash should not be changed here
2015-03-10 18:29:09 -04:00
Mike Blumenkrantz 4c96e40f55 CRI on attempting to change a pixmap's client when pixmap already has client
this should never occur, so do something if it does since it means there's a big problem
2015-03-10 18:28:18 -04:00
Chris Michael b6be9efe26 Implement buffer_reference to fix client resizing issue
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-02-26 15:33:40 -05:00
Carsten Haitzler 956aac9341 e - fix build. build break! 2015-02-11 10:47:02 +09:00
Mike Blumenkrantz d97c6b04bb redo pixmap image border to take xywh instead of lrtb
client size is not set by the time opacity is set so it's necessary to store the full rect
2015-02-10 18:07:41 -05:00
Chris Michael 1c5e71bffc fix e_pixmap compile for non-wayland usecase
pixmap->border is only defined if we have some wayland support. Not
used in X11.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-02-10 12:41:27 -05:00
Mike Blumenkrantz 536342c085 add pixmap image border functions 2015-02-09 21:14:15 -05:00
Mike Blumenkrantz f39630fc8c use unixtime instead of loop time for wl frame callback done 2015-02-09 14:17:44 -05:00
Mike Blumenkrantz ea230eeaf5 remove pixmap resource delete cb
this was a stupid idea and I'm stupid for having such a stupid iea
2015-02-05 17:13:44 -05:00
Mike Blumenkrantz e7fcba8e8f clear wl pixmap cache on client free instead of leaking 2015-02-05 16:32:10 -05:00
Mike Blumenkrantz a19957d3eb move wl pixmap stuff to use pixmap functions in compositor instead of in pixmap 2015-02-05 16:32:10 -05:00
Mike Blumenkrantz 7f2b83c8d9 remove unnecessary comp work in wl pixmap functionality
these are all basically no-ops anyway
2015-02-03 19:44:06 -05:00
Mike Blumenkrantz bc59464f99 make wl clients use post render canvas cb to clear buffers 2015-02-02 16:45:18 -05:00
Chris Michael 4dfdfe2428 Implement caching of pixmap resources for wayland clients.
Move sending of frame completion to the image_draw function.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-11-10 11:55:18 -05:00
Chris Michael 3ef4ca19bc Fix incorrect return value when creating native surface for wayland
clients

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-11-07 13:15:10 -05:00
Chris Michael 240d651d2f send wl_buffer release after we have drawn this pixmap
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-10-31 12:26:50 -04:00
Chris Michael 458ce8e86f remove call to release compositor buffer reference in e_pixmap. This
is handled differently now.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-10-30 10:39:08 -04:00
Chris Michael 1cd25a1595 Revert "bugfix: When we free the pixmap, clear any user data set on the resource"
This reverts commit b41dbbe9cf.

Revert this ... it works, but it's not the "proper" fix as it just
causes the crash(s) to happen elsewhere ... time to dig deeper
2014-09-10 10:24:07 -04:00
Chris Michael b41dbbe9cf bugfix: When we free the pixmap, clear any user data set on the resource
This was a cause of some memleaks/crashes in the wayland compositor
because the compositor was trying to access properties of the E_Pixmap
after it had already been freed. By setting the user_data to NULL, the
functions in the compositor which were failing will now stop trying to
access the pixmap after it's been freed.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-09-10 09:49:53 -04:00
Mike Blumenkrantz 79b1f37a36 fix stupid pixmap refresh logic 2014-09-01 10:30:53 -04:00
Chris Michael 4bc11ee5d5 fix dereference of incomplete pointer type
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-08-26 10:10:39 -04:00
Chris Michael b10c0d91ab Fix formatting
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-08-26 10:10:39 -04:00
Mike Blumenkrantz 362a9b6cce reuse existing render post callback for wayland clients 2014-08-26 10:10:38 -04:00
Mike Blumenkrantz 3b649534c9 Fix building Enlightenment for X11-only, Wayland-Only, and X11 with Wayland clients.
Signed-off-by: Chris Michael <cp.michael@samsung.com>

Additional authors: Chris Michael <cp.michael@samsung.com>
2014-08-26 10:10:38 -04:00
Seunghun Lee 2b21742a91 Added conversion for image format to ARGB from XRGB for wayland. evas_object_image_data_set will be used instead of evas_object_image_data_copy_set.
Summary: this patch will provide to launch the application based on XRGB8888 like weston-simple-shm.

Test Plan: launch weston-simple-shm

Reviewers: devilhorns, zmike, raster

CC: cedric

Differential Revision: https://phab.enlightenment.org/D1137
2014-08-26 10:10:37 -04:00
Chris Michael 46f34ace54 fix compiler warning about unused variables when building for X11 or Wayland.
NB: Each different build (x11/wl-only) had various unused variables.
This is a squash of the commits to fix all that.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-08-26 10:10:36 -04:00
Chris Michael 2e24cc5760 cleanup e_pixmap code (remove debugging statements)
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-08-26 10:10:35 -04:00
Chris Michael 84f5c2f608 add checks for pixmap type being X before accessing the image (for
cases where we are running wayland clients)

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-08-26 10:10:35 -04:00
Chris Michael 1b7103323d fix e_pixmap for compositor structure change.
remove memcpy of wl_buffer data.

NB: This Is REALLY not needed in ANY compositor !!!
NB: This DOES cause lots of current Failures within the existing X Compositor ... ie: Wayland Clients inside X do NOT work at this point :(

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-08-26 10:10:35 -04:00
Chris Michael 6fded4853d rewrite e_pixmap code:
- reduce variable usage for non-x
  - remove need to memcpy wayland buffer image data
  - add function for setting pixmap buffer resource
  - add shm_buffer access calls around getting wl_buffer data

Signed-off-by: Chris Michael <cp.michael@samsung.com>

Additional authors: zmike
2014-08-26 10:10:34 -04:00
Chris Michael 688c5303f6 fix unused variables if building for wayland only
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-08-26 10:10:34 -04:00
Mike Blumenkrantz 462d79e147 redo/simplify PRESENT usage in compositor to no longer use PRESENT
keith said no
2014-08-22 09:56:11 -04:00
Chris Michael 915f8f0613 @bugfix: Fix building for WAYLAND_ONLY by using the proper define
sed -i 's/WAYLAND_ONLY/HAVE_WAYLAND_ONLY/g'

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-03-18 07:43:04 +00:00
Mike Blumenkrantz b373b561e4 check X comp_data existence in pixmap PRESENT usage during refresh
CID 1155279
2014-03-13 12:22:04 -04:00
Mike Blumenkrantz ddcc678d78 ensure va_end is called when creating new pixmaps
CID 1155292
2014-03-13 12:02:11 -04:00
Mike Blumenkrantz eba912cf6a e_client_resizing_get() -> e_client_util_resizing_get()
functions in e_client.x should be namespaced with e_client_util to indicate that they are inline (and in e_client.x)
2014-02-05 10:51:36 -05:00
Mike Blumenkrantz df0173d24c feature: support XPRESENT extension to reduce compositing overhead
xorg 1.15 introduces this extension which has a magical event to notify when a pixmap's size changes, which means that the size never needs to be manually fetched
2014-01-14 20:29:00 -05:00
Mike Blumenkrantz 12d7405a0f huge wl fixup (wayland clients actually working again)
* try to clear up build system for separating out ecore-x

* add #ifdefs for lots of ecore-x stuff

* break out some internal e wl functions for reuse in api

* store wl surface buffers as an inlist

* add protocol-specific client compositor data

** move lots of X client attributes here

* add pixmap type checks to a number of X-specific things, such as grabinput, to block them for non-X clients

* rearrange startup order to work with wayland

* move X screensaver code to e_comp_x

* flag modules still requiring X with -DNEED_X
2014-01-14 20:28:57 -05:00
Mike Blumenkrantz 86656e4df9 compositor rewrite / charlie-foxtrot situation
huge fustercluck commit because there wasn't really a way to separate out the changes. better to just rip it all out at once.

* compositor and window management completely rewritten. this was the goal for E19, but it pretty much required everything existing to be scrapped since it wasn't optimized, streamlined, or sensible. now instead of having the compositor strapped to the window manager like an outboard motor, it's housed more like an automobile engine.

** various comp structs have been merged into other places (eg. E_Comp_Zone is now just part of E_Zone where applicable), leading to a large deduplication of attributes

** awful E_Comp_Win is totally dead, having been replaced with e_comp_object smart objects which work just like normal canvas objects

** protocol-specific window management and compositor functionality is now kept exclusively in backend files

** e_pixmap api provides generic client finding and rendering api

** screen/xinerama screens are now provided directly by compositor on startup and re-set on change

** e_comp_render_update finally replaced with eina_tiler

** wayland compositor no longer creates X windows

** compositor e_layout removed entirely

* e_container is gone. this was made unnecessary in E18, but I kept it to avoid having too much code churn in one release. its sole purpose was to catch some events and handle window stacking, both of which are now just done by the compositor infra

* e_manager is just for screensaver and keybind stuff now, possibly remove later?

* e_border is gone along with a lot of its api. e_client has replaced it, and e_client has been rewritten completely; some parts may be similar, but the design now relies upon having a functional compositor

** window configuration/focus functions are all removed. all windows are now managed solely with evas_object_X functions on the "frame" member of a client, just as any other canvas object can be managed.

*** do NOT set interceptors on a client's comp_object. seriously.

* startup order rewritten: compositor now starts much earlier, other things just use attrs and members of the compositor

* ecore_x_pointer_xy_get usage replaced with ecore_evas_pointer_xy_get

* e_popup is totally gone, existing usage replaced by e_comp_object_util_add where applicable, otherwise just placed normally on the canvas

* deskmirror is (more) broken for now

* illume is totally fucked

* Ecore_X_Window replaced with Ecore_Window in most cases

* edge binding XWindows replaced with regular canvas objects

* some E_Win functionality has changed such that delete callbacks are now correctly called in ALL cases. various dialogs have been updated to not crash as a result

comp files and descriptions:

e_comp.c - overall compositor functions, rendering/update loop, shape cutting

e_comp_x.c - X window management and compositor functionality

e_comp_wl.c - Wayland surface management and compositor functionality

e_comp_canvas.c - general compositor canvas functions and utilities

e_comp_object.c - E_Client->frame member for managing clients as Evas_Objects, utility functions for adding objects to the compositor rendering systems

additional authors: ivan.briano@intel.com

feature: new compositor

removal: e_border, e_container, e_popup
2014-01-14 20:22:02 -05:00