Commit Graph

1905 Commits

Author SHA1 Message Date
Carsten Haitzler fb3fca50c1 evas fb engine - fix build break cedric added... 2016-12-08 10:19:23 +09:00
Cedric BAIL 386e06c73c evas: do not rely on Evas canvas no longer passed during setup. 2016-12-07 15:47:56 -08:00
Cedric BAIL 73b308fb66 evas: refactor setup stage and reduce complexity for engine. 2016-12-07 15:47:56 -08:00
Derek Foreman da5f41723a gl_drm: Only use dmabuf if the extension is present
Need to check for the extension string instead of just the presence of the
function pointers.
2016-12-07 16:41:34 -06:00
Derek Foreman cef41ae70a gl_drm: Query eglGetProcAddress with dlsym
eglGetProcAddress should be queried with dlsym unconditionally.  What we
had could query it with other extended forms of eglGetProcAddress, which
is probably not what anyone wants.

Also, throwing away the weird extended forms because there's a good chance
our other gl bits don't run on any stacks that don't support normal
eglGetProcAddress.
2016-12-07 16:39:17 -06:00
Derek Foreman 661e44c38d gl_drm: simplify outbuf_reconfigure
Calling render_engine_software_generic_update from eng_setup lets us
remove a bunch of stuff from evas_outbuf_reconfigure.
2016-12-07 15:54:06 -06:00
Derek Foreman b997b108b5 gl_drm: Don't destroy the outbuf in reconfigure
Cedric tells me this is bad, and I never argue with Cedric.

We now re-use the same outbuf and just reconfigure the gbm/gl stuff.
2016-12-07 11:30:03 -06:00
Derek Foreman eafb05c58a evas - software generic - fix crash
Commit fcef8d8392
breaks any evas engine that frees/NULLs its own outbuf before
calling evas_render_engine_software_generic_update()

We should unconditionally set the outbuf, we only need to
do the free conditionally.
2016-12-07 10:10:42 -06:00
Carsten Haitzler fcef8d8392 evas - software generic - fix crash when buffer is freed when its the same
evas_render_engine_software_generic_update(0 definitely is wrong where
it wants to always free the outbuf even if the buffer passed in is the
same one and thus it ends up being freed and now invalid. fix it

@fix
2016-12-07 19:24:44 +09:00
Cedric BAIL 68470a50fe evas: as an example make PMAPS decoding interruptible. 2016-12-06 16:34:48 -08:00
Cedric BAIL 365f79b7ee evas: use emile and evas new infrastructure to interrupt decoding of JPEG early. 2016-12-06 16:34:48 -08:00
Derek Foreman df4f377ad2 wayland_shm: track mappings more effectively
Unmap any active mappings from buffer_destroy.  This also means we need
to clear the mapping after unmapping in fallback.
2016-12-06 16:34:54 -06:00
Derek Foreman 7fa02c8994 wayland_shm: Refcount the dmabuf buffer manager
Because we async render into buffers before the compositor has told us
we can use them, we can end up kicking over to fallback while still
rendering into a buffer.

Refcount the manager to let us clean up properly without crashing when
this happens.
2016-12-06 16:34:54 -06:00
Derek Foreman 9b048df6ff wayland_shm: clear busy bit for buffers during dmabuf fallback
If we pre-rendered then we have a busy buffer - we need to clear that
busy bit after reading from the buffer or buffer_destroy won't clean it
up.
2016-12-06 16:34:54 -06:00
Derek Foreman b897d86943 wayland_shm: Clear busy status when replacing an unassigned buffer
If we render fast enough we can use more than one buffer before the
compositor assigns us buffer ids.  We need to be careful to clear the
busy bit on all but the most recent one.
2016-12-06 16:34:54 -06:00
Derek Foreman 4258fa4f70 gl_drm: Allow testing of dmabuf objects
Enlightenment needs to know if a specific dmabuf format is supported
before it lets clients use it.  This lets E test commit a wayland
dmabuf object without assigning it a buffer.
2016-12-06 16:34:54 -06:00
Chris Michael 673b735917 evas-wayland-shm: Keep tile buffers in sync with size changes
Previous patch to not destroy Outbuf on resize should not have removed
this line else software generic tilebuffers will not be in sync with
the updated size.

ref 5ebba4463

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2016-12-06 14:14:49 -05:00
Chris Michael 29325b7903 evas-drm: Keep tile buffers in sync with size changes
This line should not have been removed from the previous patch. Thanks
to Cedric for catching this.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2016-12-06 14:05:19 -05:00
Chris Michael 08bb6b1eec evas-drm: Don't destroy Outbuf on resize
On an engine resize, we previously would destroy the Outbuf structure.
This patch modifies the code so that on a resize we no longer have to
destroy the old Outbuf and reallocate a new one. Instead, we will just
reconfigure the existing one and update it's properties.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2016-12-06 13:18:33 -05:00
Chris Michael 5ebba44635 evas-wayland-shm: Don't destroy Outbuf on resize
On an engine resize, rather than destroy & recreate the Outbuf
structure (and the associated surface) we can just call the
eng_output_resize function (which in turn will call
outbuf_reconfigure) to update Outbuf with new properties. This saves
us from having to create a whole new Outbuf every time we resize.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2016-12-06 13:03:52 -05:00
Stefan Schmidt e90622ec41 all: use void if we really want to make sure we do not accept parameters
In C we need this to make clear that we really do not accept parameters.
Found by the smatch source code matcher. I had run and fixed this before
but it seems to creep in again over time.
2016-12-06 17:16:24 +01:00
Stefan Schmidt 10fb982ac0 evas: native_dmabuf: make sure we check for NULL before not after we dereference
Same change as  just done in evas_native_tbm in commit
38dbe932db5c12f66ff2e045ac74107e149c14da.
2016-12-06 11:05:41 +01:00
Stefan Schmidt 7d93a1d45f evas: native_tbm: make sure we check for NULL before not after we dereference
Using *im and dereferencing it before doing the actual NULL check does not make
much sense. I kept the checks as they have been there before so the intent was
probably that they could be NULL and should be checked.

CID: 1270030, 1270029, 1270028
2016-12-06 11:05:41 +01:00
Carsten Haitzler e25b3eedb4 evas - protect against outbuf alloc fail possibility
this should fix T4967
2016-12-06 11:21:28 +09:00
Cedric BAIL 6427c77707 evas: refactor initialisation and shutdown of evas_common. 2016-12-05 11:22:52 -08:00
Chris Michael 5c1d6b1064 evas-wayland-shm: Don't recreate Outbuf if we are hidden
If the hidden flag is set, then we don't need to recreate the Outbuf
for a given canvas as the window is hidden and we are not going to
render there until it's shown again.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2016-12-05 09:21:20 -05:00
Chris Michael 9492ee21df evas-wayland-shm: Fix issue of destroying & recreating wl_surfaces on hide
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 <cp.michael@samsung.com>
2016-12-02 14:25:10 -05:00
Chris Michael 725e439545 ecore-evas-wayland: Add a 'hidden' field to engine structure
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2016-12-02 14:25:10 -05:00
Jean-Philippe Andre 182418dc1c gl drm/x11: Fix compilation for EGL < 1.5
This is an attempt at fixing compilation for systems with old
EGL headers (version < 1.5).

Thanks Roy for the report!
2016-12-02 14:26:47 +09:00
Derek Foreman f0e8ebeaea gl_drm: Fix eglCreateImage for 32-bit systems
eglCreateImageKHR and eglCreateImage have different prototypes, but we
treated them the same.  Fix that so 32-bit users can have them too.
2016-12-01 15:06:58 -06:00
Derek Foreman adabe89b3a gl_drm: Don't query gl functions that don't exist anywhere
We're just making stuff up now and hoping they magically match existing
prototypes, I guess.

Hardly the weirdest thing in this file.
2016-12-01 15:06:58 -06:00
Derek Foreman 9b6ec1ecc3 wayland_shm: enable dmabuf by default
Software rendered wayland clients will now attempt
to use dmabuf on some platforms.  This results in a window
that a compositor may be able to drop into a plane without a copy.

Disable it with the env var EVAS_WAYLAND_SHM_DISABLE_DMABUF
but if you need to disable it, please ping me or file a bug report.
2016-12-01 15:05:52 -06:00
Jean-Philippe Andre a3276714ee evas/x11: Fix EGL engine for recent nvidia binary
Thank you NVIDIA for breaking your drivers regularly!
eglGetDisplay(x11_display) should work but was consistently
returning 0 instead.

Apparently EGL 1.5 introduced "eglGetPlatformDisplay" that
is more advanced to open a display. So, prefer that over
eglGetDisplay if it's available.

@fix
2016-12-01 15:32:17 +09:00
Jaeun Choi b9965ffd8f evas: bug fix in bmp loader
when the DIB header is BITMAPINFOHEADER (size 40),
a bitmap file has alpha channel only if the compression method is BI_ALPHABITFIELDS (= 6).
the original code enabled alpha channel when the compression method was BI_RGB (= 0),
which made an opaque bmp image loaded as a transparent one.

@fix
2016-11-30 11:33:33 +09:00
Carsten Haitzler 254919d6d4 evas gl common engine - handle render to texture atlases properly 2016-11-22 20:01:25 +09:00
Jean Guyomarc'h 90c7a95a54 evas-gl_cocoa: add missing EVGL function
Not providing a call to the first method segfaults in elm_glview
right away. Instead of crashing, we now just issue a runtime error
about the method not being implemented.
2016-11-20 16:54:24 +01:00
Jean Guyomarc'h d91caf3e3b evas-gl_cocoa: fix error message
The call is actually NOT implemented.
2016-11-20 16:51:10 +01:00
Derek Foreman 8a7c154a57 gl_drm: Release any unqueued buffer before starting a render
If there's a "next" buffer set, we're better off freeing it before we
start to render.  This lets us keep gbm from allocating an extra buffer
which it currently never frees.
2016-11-18 09:43:15 -06:00
Derek Foreman aa3479570d ecore_drm2: Add a panic mode to drm2_fb_release
Previously we'd call this only when we absolutely needed to, so it made
sense to always attempt to free a buffer, including ones on scanout or
pending flip.

However, it's useful to have a way to release the "next" only, so we can
do that before starting a render to free up the buffer that's never going
to be scanned out.
2016-11-18 09:41:52 -06:00
Chris Michael 0f1e7bad92 evas-gl-generic: Add missing EINA_UNUSED for unused function parameter
NB: No real functional changes, just adding a missing EINA_UNUSED

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2016-11-18 08:13:47 -05:00
Chris Michael 55e2ed5279 evas-software-generic: Add missing EINA_UNUSED for unused function
parameter

NB: No real functional changes, just adding a missing EINA_UNUSED

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2016-11-18 08:09:17 -05:00
Carsten Haitzler 3eb0df1022 evas engines - add more support for noscale pixel buffers esp in gl
for gl noscale buffers are texture atlases that are fbo's. the point
is never to scale or transofmr them but to render them pixel for pixel
and just store pre-rendered data where its cheaper to do this than
rebuild every time. this is the enigne infra for sw and gl with the gl
code... it SHOULD work... in theory...
2016-11-17 18:41:32 +09:00
Carsten Haitzler 622277c82a evas - add engine api to get a specific fbo/surf that wont be scaled
this is to allow gl to specifically use an fbo as an atlas for these
kinds of buffers
2016-11-17 18:41:31 +09:00
Carsten Haitzler a479745e4f evas - add a prepare stage for objects before render
preparing an object is a good idea. especially with gl. you want to do
texture uploads BEFORE using textures all in one batch. otherwise this
may mean the gl implementation has to make a copy of your data in a
tmp location then copy it in later when texture becomes "unused" as it
may be in use at the moment, or it may have to stall and wait.

i have seen somewhere around 7-10% speedups on nvidia and intel
drivers with this on given a very special test case i brewed up (1000
32x32 images where i change 1 pixel every frame). this should have
impact really when we are modifying textures a lot. this is all i've
implemented for now, but this should/would/could do much more like
re-order map, proxy renders to render FIRST in a pre-render list
instead of inline and to pre-render fbo/buffer content for complex
objects like text or textblock etc.
2016-11-17 18:41:31 +09:00
Carsten Haitzler dbebf2835f evas surface/buffer wl support - define missing egl ifdefs if missing
this will define EGL_WAYLAND_PLANE_WL and EGL_WAYLAND_BUFFER_WL if
missing as SOME older egl public headers dont expose them and yet we
still wans to compile and support the feature should the egl BINARY
etc. actually support this (or be upgraded to support it after efl
compilation).

@fix
2016-11-17 18:41:31 +09:00
Carsten Haitzler 35cbdbb08f evas gl engines - buffer age - remove 'if age changes go to full' code
this technically isn't needed. it does help in some cases hide driver
or other buffer swap bugs, but in and of itself is not needed, so
remove. at least the drm egl bugs still happen on my pi3 so its
something else...
2016-11-17 18:41:31 +09:00
Carsten Haitzler e146371ed9 evas modules - only unregister log domain if its registered
some modules did check, some didnt... but this makes them consistent
and silences and eina err log. :)
2016-11-17 18:41:31 +09:00
Subhransu Mohanty 16cb5f7af9 evas/gl: Added support for stencil buffer creation while creating gl Surface.
Reviewers: jpeg, cedric

Reviewed By: jpeg, cedric

Subscribers: cedric, jpeg

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2016-11-16 13:46:40 -08:00
Stefan Schmidt 1976a02951 docs: module: add some missing docs in our modules using eo 2016-11-11 10:59:08 +01:00
Carsten Haitzler b1e5539005 swap mode - add evlog logging for querying surface age
more debugging to hunt down possible blocks in getting buffer age if
it happens
2016-11-07 11:47:46 +09:00