Commit Graph

132 Commits

Author SHA1 Message Date
Marcel Hollerbach bb6c7c6782 meson: make it possible to link our engines against evas
Summary:
it FINALLY happend! With this python bindings should be able to work
again with a meson build, you can also enable b_lundef right now. And it
appears to work, with this we can also get another step closer to a
windows build.
Depends on D8669

Reviewers: zmike, stefan_schmidt, cedric, vtorri

Reviewed By: zmike

Subscribers: #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8670
2019-04-19 14:39:31 -04:00
Marcel Hollerbach c8c374ef48 meson: move build definitions of software_generic to libevas
Summary:
with this we don't have any static module anymore in the engine
directory. This means either *all* modules in the enignes directory are
static OR shared. There is no mixture anymore. This is a requirement for
the directory to be build whenever we want it to be build.
Depends on D8667

Reviewers: zmike, stefan_schmidt, cedric, vtorri

Reviewed By: zmike

Subscribers: #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8668
2019-04-19 14:39:22 -04:00
Carsten Haitzler df5702a609 evas sw x11 - warn - use void ptr for error handler
warnings now are being super picky with:

../src/modules/evas/engines/software_x11/evas_xlib_buffer.c: In
function ‘evas_software_xlib_x_output_buffer_new’:
../src/modules/evas/engines/software_x11/evas_xlib_buffer.c:306:56:
warning: cast between incompatible function types from ‘void
(*)(Display *, XErrorEvent *)’ {aka ‘void (*)(struct _XDisplay *,
struct <anonymous> *)’} to ‘int (*)(Display *, XErrorEvent *)’ {aka
‘int (*)(struct _XDisplay *, struct <anonymous> *)’}
[-Wcast-function-type]
                                  ph = XSetErrorHandler((XErrorHandler)

can we really match a struct <anonymous> somehow? i don't think so...
so... void to the rescue.
2018-11-09 11:44:00 +00:00
Marcel Hollerbach 46d464e5bf here comes meson
a new shiny buildtool that currently completes in the total of ~ 4 min..
1 min. conf time
2:30 min. build time
Where autotools takes:
1:50 min. conf time
3:40 min. build time.

meson was taken because it went quite good for enlightenment, and is a traction gaining system that is also used by other mayor projects. Additionally, the DSL that is defined my meson makes the configuration of the builds a lot easier to read.

Further informations can be gathered from the README.meson

Right now, bindings & windows support are missing.

It is highly recommented to use meson 0.48 due to optimizations in meson
that reduced the time the meson call would need.

Co-authored-by: Mike Blumenkrantz <zmike@samsung.com>

Differential Revision: https://phab.enlightenment.org/D7012
Depends on D7011
2018-10-02 17:22:50 +02:00
Chris Michael ad9e13ea56 evas-software-x11: Remove cserve2 support
Summary:
ref T7226

Depends on D6928

Reviewers: raster, cedric, zmike, Hermet

Reviewed By: Hermet

Subscribers: #reviewers, #committers

Tags: #efl

Maniphest Tasks: T7226

Differential Revision: https://phab.enlightenment.org/D6929
2018-08-30 13:25:05 +09:00
Marcel Hollerbach 01df8b7f78 evas: make tbm_surface api fields static
When building statically this breaks build, since both symbols would be
defined globally.
2018-01-04 14:31:22 +01:00
Chris Michael 31a7963196 evas-software-x11: Remove need for useless free_region function
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2017-11-06 09:19:20 -05:00
Cedric Bail 7e00ab4222 evas: mark parameter unused now that it is not necessary anymore. 2017-10-13 12:58:01 -07:00
Prince Kumar Dubey df5f404f09 evas: to avoid warning unused variable and unnecessary assignment is removed.
Reviewers: raster, cedric

Subscribers: rajeshps, jpeg

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

Signed-off-by: Cedric Bail <cedric@osg.samsung.com>
2017-10-13 12:14:26 -07:00
Cedric BAIL 28397e7206 evas: differentiate engine from output. 2017-08-25 10:49:53 -07:00
Cedric BAIL 3e88aa37bc evas: Render_Engine_Swap_Mode is actually about output swap. 2017-08-25 10:49:15 -07:00
Cedric BAIL f4afd5f1bd evas: reduce duplication of merge_mode getenv logic. 2017-08-25 10:49:06 -07:00
Cedric BAIL 29cde0ee81 evas: make the info size a parameter of the function to make it safer to roll in. 2017-08-25 10:48:20 -07:00
Cedric BAIL 46e1df839b evas: factorize call to info and info_free. 2017-08-25 10:48:13 -07:00
Cedric BAIL 1e2bbf8fea evas: all this function (info, setup and update) are really output related. 2017-08-25 10:48:09 -07:00
Cedric BAIL bf2439b501 evas: Render_Engine_Software_Generic is actually Render_Output_Software_Generic. 2017-08-25 10:47:11 -07:00
Cedric BAIL 268d9984b4 evas: engine should not access Evas canvas directly. 2017-08-25 10:47:03 -07:00
Mike Blumenkrantz 9a56b267cd evas sw x11: formatting 2017-07-21 16:17:53 -04:00
Cedric BAIL 35e54acc46 evas: stat introducing a concept of engine and output in the backend. 2017-05-12 15:24:45 -07:00
Cedric BAIL 12fcaf77d6 evas: remove pixels hook from x11 backend now that we don't use it anymore 2017-04-12 15:13:19 -07:00
Jean-Philippe Andre 581505791a evas: Remove context from some engine function
This is for canvas_alpha_get. context is never used.
2016-12-16 10:40:55 +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
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
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
Carsten Haitzler 4ed2e01591 remove xcb support in ecore_x and evas engines as per mailing list
as per mailing list discussion about dropping xcb support now. it
hasn't been complete for a long time, thus not recommented for being
turned on. as we are moving to a wayland world xcbmakes even less
sense. as agreed, time to clean up a bit and remove a distraction as
well as not well tested code. this also updates po's too.

@feature
2016-11-03 22:22:54 +09:00
Guilherme Iscaro 8040d20f90 This series fixes two problems in the VNC implementation.
One deadlock and one segfault.

Patch 1:

Software X11 Evas Engine: Fix deadlock

Summary:
The patch bc6e8d2692 introduced a callback responsible to notify the pixels
that were sent to the X server. Since all EFL rendering is done by another
thread, the callback should be called from the main thread context.
To achieve this behaviour evas_software_x11_region_push_hook_call()
was using ecore_thread_main_loop_begin(), which may cause deadlocks, since
evas mainloop waits for the render thread and the render thread waits
the mainloop.

In order to fix this problem, the function
ecore_main_loop_thread_safe_call_async() will be used to
schedule the callback to run in the main loop context.

Since a callback is schedule to run in async manner, the pixels that
were sent to the X server must not be deleted until the user is informed.
In order to avoid more mallocs(), this patch adds the support for refcounts to the
X_Output_Buffer and Xcb_Output_Buffer.

Patch 2:

Ecore_Evas VNC: Use the image size to create the buffer.

In same cases they may differ and may lead to a segfault, since
memcpy() causes a buffer overrun.

Reviewers: bdilly, raster

Reviewed By: raster

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D4323
2016-10-21 13:56:00 +09:00
Derek Foreman 7a978fe58c evas_engines: Send both surface and buffer damage to outbuf_flush callback
Some engines should using sending surface damage, until now we'd only ever
provided them with buffer damage.

The difference is that surface damage is the damage to the surface the
compositor is displaying, and the buffer damage is the damage to the
buffer the client has rendered.  These are different when the client
is using multiple buffers of different ages to render into.

Anything that calls eglSwapBuffersWithDamage, wl_surface_damage() or
wl_surface_damage_buffer() should be using surface damage, and not
buffer damage.

This patch is intended to make no functional change - any flush cb that
used buffer damage before still should.  Actual fixes to follow.

Apologies if I broke any engines - it's a bit of a copy and wasteland
out here.
2016-10-19 16:29:05 -05:00
Chris Michael 7b049ab7ac evas-software-x11: Remove unused variable and mark unused parameters
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2016-10-04 09:41:53 -04:00
Carsten Haitzler c88c74de1b evas sw x11 - disable the loop begin/end that deadlocks evas
this is quick to get evas working again. this disables part of
7e2d700d06 that creates deadlocks. this
thread waits on mainloop. mainloop waits on this render thread. BOOM.
deadlock.
2016-09-27 16:14:31 +09:00
Guilherme Iscaro 7e2d700d06 Evas Software X11: Add a callback that informs the current screen content pixels.
This is necessary in order to implement a VNC server. Using this
callback the VNC server will be able to draw the current screen to the
VNC clients.
2016-09-26 22:06:59 -03:00
Derek Foreman 5eec34812e evas_engines: Add a redraws_clear callback
This gives us a callback from the main thread after outbuf_flush occurs -
this is useful to get timing right on the drm and wayland engines.
2016-09-08 13:55:24 -05:00
Derek Foreman 0c21a926a3 engines: Add a damage_region_set callback
To properly implement EGL_KHR_partial_update we need to know the buffer
damage before any drawing operations take place.  Add a new callback to
software_generic that takes place after combining of surface damage and
swap mode when we actually have this available.

Note: This means the three copy pasta implementations of
EGL_KHR_partial_update scattered around the tree are all wrong.  bummer.
2016-08-19 16:26:20 -05:00
Tom Hacohen e65aae994e Eo: Finish the renaming of Eo to the EFL.
This renames all the rest of the API to the EFL namespace except for
Eo_Event that will follow soon.

Obviously breaks both API and ABI.
2016-08-15 15:07:42 +01:00
Stefan Schmidt 620d0031de evas: xcb: fix build break of xcb engine
This was broken since commit ed2e78286b
The variable is named differently in the xlib vs. xcb code
2016-07-29 14:17:39 +02:00
Carsten Haitzler ed2e78286b evas software x11 - be agressive with shm cache and keep it low
shm cache size is now 1.5x the total number of pixels in sw x11
outbutf's and that's it. 32 segment max limit too. this should keep
things down

@opt
2016-07-26 13:59:54 +09:00
Carsten Haitzler 93a683daad evas and ecore_x shm segment management - fix over allocation and perms
so our sysv shm segments were both over-permissive (nothing bad
really, just other users could read and write to/from our pixel data
destined for the screen... they could do this to x11 directly anyway
so no real issue), but be more restrictive and use 0600 as xserver
runs as root so can read/write anyway and we only want our own uid
access. but even more - fix our shm segment flushing to not keep lots
of segments floating about like a bad smell when we don't need them.
we had a cache but it wasnt flushed when it should be since async
rendering turned up. this fixes that and we're back to agressively
flushing them out when idle.

@fix
2016-07-26 13:21:50 +09:00
Carsten Haitzler ea99e6288d evas software x11 - dri swapping - fix possible coverity bug
fix CID 1039620 - coverity is right, in theory.
2016-07-11 21:29:32 +09:00
Minkyoung Kim 93b4df1f5a evas-native-tbm: fix stride mismatch and allocate image data for converting from yuv to rgb.
Summary:
1. For converting tbm buffer from yuv to rgb, image.data should be allocated.
2. Stride should be set by info of tbm surface.
3. The number of row is height*2. but if height is odd, last row is invalid in process of _evas_video_i420.

Test Plan: Local Test, Tizen2.4 Mobile

Reviewers: spacegrapher, wonsik, jpeg

Subscribers: cedric, dkdk

Differential Revision: https://phab.enlightenment.org/D3870
2016-06-13 15:27:56 +09:00
Jean-Philippe Andre cf2804a220 Evas x11: Fix warnings and invalid calls in engine
This follows commit f10672dd74
which apparently forgot some changes in xlib and eglfs.

I hope there are no remains of the old native bind/unbind
functions. Also... I can't build everything, so I'm just hoping
this works. Note: GL and SW native images are not using the
same internal api prototypes.
2016-04-04 14:42:34 +09:00
Minkyoung Kim f10672dd74 evas : remove native.func.data variable and data argument of native calblacks.
Summary:
Evas Image should be independent of render engine.
So remove native.func.data member of RGBA_Image, Evas_GL_Image struct.
And remove data argument,too.

Test Plan: Local test, Tizen3.0 mobile, Desktop englitenment

Reviewers: jpeg, spacegrapher, wonsik

Subscribers: cedric, dkdk

Differential Revision: https://phab.enlightenment.org/D3850
2016-04-01 12:09:06 +09:00
Carsten Haitzler 5f307809b1 efl - evas - sw engine - donmt free spinlock because cache always needed
never free the shm pool cache spinlock as it is alwasy needed once
initiialized. this likely fixes a bsd hardlock issues

@fix
2016-03-29 12:11:10 +09:00
Jean-Philippe Andre 20b4d9dd6a Evas engines: Add internal functions for native images
- image_native_init
- image_native_shutdown

init() will be used to test whether the engine supports a
certain type of native image.

Note: Native image support is very much dependent on the engine,
and some stuff like opengl should work everywhere (even in sw
with osmesa) but that's not the case.
2016-03-15 11:11:59 +09:00
Stefan Schmidt 3557b346c4 evas_xcb: fix build with xcb after TBM patches
GLX was not the only thing which did no longer compile. Same for xcb here.
Thanks Jenkins for testing this for us.
2016-01-07 08:50:47 +01:00
Wonsik Jung 7db9613e8c Evas_Engine: add TBM surface and clean up Native Struct
Summary:
Add TBM surface in wayland and clean up Native struct on Evas Engine.
Previous TBM surface for evas_object_image's native_surface_set is only in Evas X11 backend.
This patch has the code for wayland backend.
In addition, evas_native_tbm.c is moved to software_generic. Becuase this file is common.
And, Native in Evas_Engine is clean-up.

@feature

Test Plan:
TBM surface is tested with spacegrapher's test app(tbm.c) in Tizen Device.
Pixmap surface is tested in ubuntu with same test app.
EvasGL is tested with elementary_test.

Reviewers: jpeg, spacegrapher, raster, cedric

Subscribers: dkdk, scholb.kim, JoogabYun

Differential Revision: https://phab.enlightenment.org/D3501
2016-01-05 17:01:45 +09:00
Stefan Schmidt bc5c239d2d evas software_x11: use void to force empty function parameters
We have to use void in a function declaration if we want no function
parameters. Using just empty parenthesis means the function takes an
unspecified number of parameters.

We had it correct for most declarations and this series fixes it for
the rest.
2015-11-26 17:26:36 +01:00
Chris Michael e29da3ca69 evas-software-x11: Fix resource leak
If we end up leaving evas_xlib_image_dri_native_set due to a failure
to allocate memory, we should free the previously allocated
Evas_DRI_Image so that we don't leak

NB: Fixes Coverity CID1339782

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-11-17 10:02:03 -05:00
Chris Michael 59ffefb9c1 evas-software-x11: Fix returning NULL pointer
evas_xlib_image_dri_native_set should be returning a pointer to an
RGBA_Image on success, or NULL on failure. Returning EINA_FALSE here
leads to an expression which evaluates to zero being treated as a null
pointer constant

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-11-17 09:07:45 -05:00
Chris Michael 2f0349f697 evas-software-x11: Fix formatting
NB: No functional changes

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-11-17 09:06:51 -05:00