Commit Graph

120 Commits

Author SHA1 Message Date
Carsten Haitzler 0bd602b7ed check glapi better and report errors sensibly if it fails init 2021-08-05 14:14:31 +01:00
Carsten Haitzler bc8a4f9a89 e - wl - fix re-adding wl listener twice to the same list
this causes calling the same cb multiple times and this causes mayhem.
fix.
2021-05-11 03:33:42 +00:00
Carsten Haitzler d96c75b8d5 e - wl - fix buffer referencing to not have junk on surface del
we were losing refs to buffers when clients quit and surface were
deleted thus causing junk and errors in binding these now deleted
buffers as fds now were invalid. keep them around longer until hide
anim is done. this is callback-hell...

@fix
2021-04-16 03:27:11 +00:00
Carsten Haitzler c50eec9d81 e - comp - wl - fix garbage pixles on rpi4 - properly do fmts/mods
we didnt properly do formats/modifiers. this meant that qwhen
something like the rpi4 started using interesting ones we ended up
with garbage pixels. this fixes that - uses new evas gl feature so
will need efl git master and eventiually efl 1.26 (already do anyway)

@fix
2021-03-26 20:36:03 +00:00
Carsten Haitzler 09f0d52602 e pixmap - dont consider null pixmaps worth making a lot of noise about 2020-11-25 20:19:16 +00:00
Carsten Haitzler ac6ad8cb96 add debug printf (commented out) for frame requests 2020-05-23 09:35:44 +01:00
Carsten Haitzler fb5bcc24af remove base time - not needed anymore 2020-05-21 21:17:37 +01:00
Carsten Haitzler c742c011ae e wl - fix frame req timestamp to be the same as others
no others subtrace the base... weston doesnt.. no input events cb's
do... this is a mistake with what is a wrong timeline as a result. fix
and use the same timeline as everyone else

@fix
2020-05-21 21:11:14 +01:00
Elyes HAOUAS b980034665 tree-wide: get rid of trailing whitespace (part 2)
Remove trailing whitespaces

Reviewed-by: Stefan Schmidt <stefan@datenfreihafen.org>
Differential Revision: https://phab.enlightenment.org/D11821
2020-05-14 13:49:11 +02:00
Christopher Michael 77f8008334 e_pixmap: Missed one on that variable change 2020-04-20 18:55:51 -04:00
Christopher Michael e365138a2b e_pixmap: No need for this variable here
We only ever used this var Once in this func...
2020-04-20 18:52:08 -04:00
Christopher Michael 7c678e5762 e_pixmap: Final formatting
This code is now readable in a terminal...yay !! :)
2020-04-20 18:51:57 -04:00
Carsten Haitzler ac6ceb0b99 reduce getenv calls by only getting once
we do egetvn's quite frequently and this is more costly than
remembering once and getting it once... fix that in some cases.
2019-08-08 23:54:09 +01:00
Carsten Haitzler d4340cb168 e wl pixmap - use id not xwin
copy & paste failure here. fix. found by asan.
@fix
2019-08-07 16:51:41 +01:00
Carsten Haitzler 154c42926d e pixmap - follow on from previous commit to finally fix pixmap tracking
follow on form 4c7b798b45 - really
remove from the alias hash. the alias id is different and should ave
been stored in the pixmap and be deleted when pixmap is freed. i had
it right to remove from the aliases hash too, but i used the wrong id
- i used the "core" pixmap id, not alias. this tracks and uses that
alias.

this means internal windows are reliable now and dont crash...

@fix.
2018-07-19 16:24:08 +09:00
Carsten Haitzler 4c7b798b45 e wl - fix e pixmap tracking to remove from both aliases and pixmaps
on pixmap free only the pixmaps entry was deleted not the pixmaps hash
one. this led to lookup of stale pixmaps in the aliases hash... and
then a crash.

also use the correct local type with the correct byte order as well.
this has probably been an issue for a while but now internal windows
should work much better without crashes.

@fix
2018-07-19 01:58:00 +09:00
Mike Blumenkrantz 99db9e2557 more E_BITFIELD conversions 2017-11-08 09:22:24 -05:00
Derek Foreman 680b7b485d Fix xwayland related crash when mousing out of a window
XWayland likes to set a buffer on the cursor surface then delete it before
we release it.  I'm pretty sure when a client does that we're within spec
to just kill it, but users will likely find this response ungratifying.

So, instead, just gracefully fail to render the undefined surface.

@ref T5593
2017-10-24 13:57:00 -05:00
Derek Foreman f4f08ee99a Stop queuing wl_buffer release events
Now we just kick them out immediately.
2017-09-26 11:41:19 -05:00
Derek Foreman 1cdbcb0d94 Resynch with weston's dmabuf implementation
Weston's dmabuf implementation continues to be modular enough that we can
pull it in with minimal change.

This updates us to version 3 of the protocol - required by recent mesa to
use dmabuf buffers instead of wl_drm ones.

Currently only contains stubs for format query.
2017-08-10 11:32:45 -05:00
Derek Foreman 034211051b Remove some duplicate dmabuf validity checks
These have been moved into EFL where they belong.
2017-06-30 14:51:05 -05:00
Derek Foreman cb83120863 Remove old test for dmabuf validity
EFL now sets image load error for native surface set, so this hack is
no longer required.
2017-06-30 14:51:05 -05:00
Derek Foreman e26f2a12f5 Test dmabuf via native_surface_set even in software render
This is necessary to verify the the attributes struct is the same
version EFL can process, before we commit to displaying it.

@fix
2017-06-29 16:01:56 -05:00
Derek Foreman 4879b340a2 Initialize the Evas_Native_Surface to 0 for dmabuf tests
ref e6f17dee5d

Should probably clear this one too, though the recent native surface api
changes won't cause any breakage here, future ones might.
2017-06-23 11:55:37 -05:00
Derek Foreman 5de9f0f8a3 Allow enabling experimental hardware plane support
Hardware plane support is inactive unless a scanout handler is set, this
patch adds a scanout handler and uses it when the env var
E_USE_HARDWARE_PLANES is set.

In the future this env var will go away when hardware plane support is
stable enough to enable it everywhere.
2017-06-23 11:54:08 -05:00
Derek Foreman 18fbd1da32 Don't delete busy E_Comp_Wl_Buffers
Hardware planes are going to make E_Comp_Wl_Buffer lifetimes harder to
manage, so we need to let the E_Comp_Wl_Buffer object outlive the
resource attached to it.

We already track a busy count, so we just have to use it to prevent
deleting a busy buffer.
2017-06-23 11:52:04 -05:00
Derek Foreman acd0e4b036 Refactor wayland buffer releasing
This code should've been common but wasn't, so this might fix some
resource leaks.
2017-06-23 11:52:01 -05:00
Derek Foreman e6f17dee5d Clear the native surface structure before initializing it
Since the native surface "API" is isomorphic with pain and suffering, we
should be extra careful when we touch it.
2017-06-22 14:05:24 -05:00
Derek Foreman 2bd4a9dc85 clean up some code
remove write-only variable in the pixmap struct
2017-06-07 12:12:16 -05:00
Derek Foreman b37acd6e39 Revert "Stop misuing EVAS_NATIVE_SURFACE_VERSION macro"
This reverts commit 4a40614f2f.

Apparently this macro is unlike similar macros in other libraries
that have more sensible semantics.
2017-06-06 16:42:01 -05:00
Derek Foreman 4a40614f2f Stop misuing EVAS_NATIVE_SURFACE_VERSION macro
We should be stating the version the code supports, not the version
that the EFL version we compiled against supports.
2017-06-06 16:28:20 -05:00
Derek Foreman 52c379f4b2 Remove some duplicate operations
the native surface version was set outside of the switch statement,
so we don't need to re-set it to the same thing here.
2017-06-06 16:28:20 -05:00
Derek Foreman 4fca111eb5 Don't require dmabuf buffers to be writeable
Compositor doesn't need to write to this buffer, and most clients won't
allocate them in a way that the compositor can.  Relax the test criteria.
2017-05-30 11:58:32 -05:00
Mike Blumenkrantz 8c621db693 check image load error when checking dmabuf viability in gl
ref T5418
2017-04-21 16:16:38 -04:00
Mike Blumenkrantz ffb402786b remove uuid references from e_pixmap.c
I don't know what these are for?
2017-04-07 16:08:38 -04:00
Derek Foreman 1fe5b56500 Replace some ecore_time_get users with ecore_loop_time_get
I'm confident these sites can use loop time safely, and they're
frequent callers.
2017-02-10 15:18:19 -06:00
Mike Blumenkrantz aba6687b30 handle pixmap_refresh() failure cases more accurately under wayland
non-usable pixmaps here are still valid in some cases, such as when
no buffer is attached
2017-01-13 11:35:20 -05:00
Derek Foreman d83e885673 Use a monotonic clock for frame callback times 2016-12-15 09:59:21 -06:00
Derek Foreman 0493abf457 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.
2016-12-13 13:54:21 -06:00
Derek Foreman ae9d2904c7 test dmabuf pixmaps properly
If we can't handle a dmabuf format we now properly tell the client instead
of accepting it anyway and falling apart later.
2016-12-06 16:37:35 -06:00
Mike Blumenkrantz 0e4ddaffbe use better check for getting wl surface alpha from cursor pixmaps
ref 6ba85cf864
2016-12-05 11:05:24 -05:00
Mike Blumenkrantz b1037cbc5c Revert "Check for deleted client in e_pixmap_image_is_argb"
This reverts commit 6ba85cf864.

returning false here causes csd regions to become opaque (black) during
close animations
2016-12-05 11:05:24 -05:00
Derek Foreman 6ba85cf864 Check for deleted client in e_pixmap_image_is_argb
Fixes a crash when closing Qt applications.
2016-11-29 11:13:50 -06:00
Derek Foreman 9f3de5e346 Fix wayland deferred buffer free crash
We'd sometimes get a stale pointer when doing a deferred buffer free.
2016-11-25 11:14:38 -06:00
Mike Blumenkrantz 38e4e2b9a9 always free wl pixmap buffer list on non-cache image clear
this is only used when the pixmap is freed, after which point accessing
the list guarantees a crash
2016-11-08 12:49:23 -05:00
Mike Blumenkrantz 03ad3620c7 add special case for returning pixmap argb of unusable wl cursor pixmaps
this is usually called before the surface commits, so ensure that the
most likely case is returned as the default until the commit occurs

fixes black rect flickerings around the cursor
2016-11-03 12:28:24 -04:00
Mike Blumenkrantz 13f408f1e1 add more parens for previous pixmap commit 2016-11-03 12:28:06 -04:00
Mike Blumenkrantz 669f00e2e2 avoid crash when calling e_pixmap_image_exists on wl pixmaps without buffers 2016-11-03 12:24:25 -04:00
Mike Blumenkrantz e3590f6c3e determine wl pixmap argb solely based on image_argb flag
the existence of a buffer does not mean that the pixmap can stop being
argb

fixes random black rects
2016-11-03 12:07:46 -04:00
Carsten Haitzler 1afddc3b5e explicitly use eina list types passing into EINA_LIST_FREE() 2016-10-03 11:55:55 +09:00