Commit Graph

63 Commits

Author SHA1 Message Date
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