Commit Graph

66 Commits

Author SHA1 Message Date
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 7316bda150 evas: refactor swap mode info get. 2016-12-08 15:06:25 -08:00
Chris Michael a85605553b evas-gl-drm: Cleanup evas-gl-drm engine build and fix build break
A previous patch from some french guy broke building of the gl_drm
engine. This patch fixes the build break and cleans up unused
variables, etc.

ref 73b308fb66

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2016-12-08 09:02:43 -05:00
Derek Foreman add19c8a77 gl_drm: Check for the correct dma_buf extension
We're importing, not exporting
2016-12-08 07:36:26 -06: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 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
Cedric BAIL 6427c77707 evas: refactor initialisation and shutdown of evas_common. 2016-12-05 11:22:52 -08: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
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 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
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 794798f559 ee_drm: Move all ticking into ecore_evas_drm and use new tick system
Combines all the gl_drm and drm ticking code into one set in
ecore_evas_drm and uses the new evas tick register/unregister callbacks
to set it up.
2016-09-08 13:55:23 -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
Jean-Philippe Andre ecc1d5dfaf gl_drm: Fix shadow warning 2016-06-07 15:10:28 +09:00
Chris Michael ccb573ec7b evas-engines: Port evas drm engines to use Ecore_Drm2 library
This patch ports the evas drm and gl_drm engines to use the new
Ecore_Drm2 library

Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
2016-05-27 11:57:53 -04:00
Derek Foreman d93db5bcaa gl_drm: switch to GLERRV macro for error reporting
eglGetError() is actually somewhat heavy, so hide it behind the GLERRV
macro which compiles out the test by default.
2016-05-20 15:53:20 -05:00
Derek Foreman f8976aed13 gl_drm: Fix silly run time warning for wayland dmabuf
DMABuf buffers destroy their glimage in the unbind callback, so it's
usually already gone for the free callback.

Now we test if we actually need to destroy anything.

Also, switch to GLERRV macro for error reporting - it saves us the heavy
eglGetError() unless we've built it in intentionally.
2016-05-20 15:47:21 -05:00
Derek Foreman 5f0aea2e24 gl_drm: Add wayland dmabuf native surface support 2016-05-18 11:52:24 -05: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
Minkyoung Kim fb3368111d evas: Move engine data to native.
Summary:
native_xx_cbs must be independent to evas render engine.
This was applied to only gl_x11 backend.
Propagate to others.

Test Plan: Tizen3.0 Mobile

Reviewers: wonsik, spacegrapher, jpeg

Reviewed By: jpeg

Subscribers: cedric, dkdk

Differential Revision: https://phab.enlightenment.org/D3840
2016-03-30 15:09:27 +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
Derek Foreman 943f2df006 ecore_drm/ecore_wl2: logging: remove errant usage of %m
Summary:
printf %m stringifies and prints errno.  I've tried to remove its use
anywhere that the immediately preceding function might not set errno
or is a complicated function for which knowing errno doesn't really
give any useful information.

I've left a few of the drmMode calls because they're just wrappers
around ioctl, which legitimately sets errno.

@fix

Reviewers: zmike, devilhorns

Reviewed By: zmike, devilhorns

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D3572
2016-01-14 13:06:02 -05: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
Dongyeon Kim 16eb3942bb evas/gl: Do not check for egl errors with glEGLImageTargetTexture2DOES
Summary:
glEGLImageTargetTexture2DOES is a GL extension API, so we need to use
glGetError instead of eglGetError!
2015-11-12 10:03:10 +09:00
Chris Michael b2785f01c5 evas-gl-drm: Find symlink for eglSetDamageRegionKHR
In efforts to reduce tearing in the gl_drm engine, find and link to
the eglSetDamageRegionKHR function so we can mark damaged regions of a
surface

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-11-04 11:18:25 -05:00
Mike Blumenkrantz 99d0f03c6f evas gl_drm: don't deref null ptr on output free 2015-11-02 16:21:56 -05:00
Srivardhan Hebbar 5964a44826 evas: removing redundant assignment in gl_drm.
Summary: Signed-off-by: Srivardhan Hebbar <sri.hebbar@samsung.com>

Reviewers: cedric

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-10-31 02:12:06 +01:00
Chris Michael 5746f792af evas-gl-drm: Move definition of Render_Engine out to header
@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-10-30 14:47:20 -04:00
Cedric BAIL 0d6c53268d evas: follow API documentation more closely. 2015-10-13 11:45:52 -07:00
Chris Michael ba5d3b0480 evas-gl-drm: Add support for 'smart' merge mode
Summary: This just adds support for 'smart' merge mode in the evas
gl_drm engine to keep in line with gl_x11 engine.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-10-01 09:00:44 -04:00
Cedric BAIL 72b13c3ebb evas: move all GL safe define to a common header and use it. 2015-09-30 15:12:48 -07:00
Chris Michael 88cb6b74bf evas-gl-drm: Cleanup gl_drm engine code a bit more
Summary: This cleans up the gl-drm engine code a bit and avoids the
need to constantly destroy and recreate the gbm device itself. This
also adds checks during Outbuf create to handle the swap_mode as per
previously added enum.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-06-12 11:50:24 -04:00
Chris Michael a83bb5e45d evas-gl-drm: Refactor gl_drm engine to not use dumb buffers
@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-06-05 10:00:45 -04:00
Chris Michael 47a2602af7 evas-gl-drm: Readd support for pre_swap/post_swap callbacks
Summary: The pre/post swap callbacks were forgotten when doing the
engine rewrite, so readd them

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-06-05 10:00:44 -04:00
Chris Michael ee593050f1 evas-gl-drm: Rework gl_drm engine to function again
Summary: Previous gl_drm evas engine code did not work properly (or at
all really). This reworks/refactors the gl_drm engine code to work
again with the changes made to ecore_drm.

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-06-05 10:00:44 -04:00
Dongyeon Kim 517109858e Evas GL: Match FBO config with window surface config
Summary:
When direct rendering is enabled, FBO configuration should match
window surface configuration as FBO will be used in fallback cases.
So create FBO with configuration from window surface.
@fix
2015-06-03 11:30:22 +09:00
Sunghyun Kim 9a767921c5 evas/gl_x11: add env variables for disable partial rendering
Summary: add 'EVAS_GL_PARTIAL_DISABLE' environment variables for disable partial rendering

Reviewers: cedric, jpeg

Reviewed By: jpeg

Subscribers: mer.kim, spacegrapher, cedric, wonsik

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

Signed-off-by: Jean-Philippe ANDRE <jpeg@videolan.org>

jpeg added atoi(s) and copied the code for gl_drm and wayland_egl.
2015-03-23 17:33:25 -07:00
Jean-Philippe ANDRE 5bc4b89115 Revert "evas/gl_x11: Optimize out calls to make current"
This reverts commit 0585540bb3.

This broke Evas 3d examples. I also suspected some weird things and
wasn't 100% confident with this patch.

Closes T2215.
Thanks for the report.
2015-03-24 06:27:20 +09:00
Minkyoung Kim 0585540bb3 evas/gl_x11: Optimize out calls to make current
Summary: Reducing the number of calling eglMakeCurrent.

Reviewers: jpeg

Subscribers: wonsik, cedric, spacegrapher

Differential Revision: https://phab.enlightenment.org/D2094
2015-03-17 11:47:35 +09:00
Wonsik Jung 25502e37f8 evas_gl: Add feature to set depth/stencil/msaa bit to window surface.
Summary:
When Evas GL runs with direct rendering, it can not set depth, stencil and msaa to Window surface.
This patch is possible to use "option" input paramater of ecore_evas_gl_x11_options_new.
So, new API is not needed.

The other patch is in elementary. The elementary patch will be used this patch.

Test Plan: Test elm gl veiw in elementary_test and JP's test app.

Reviewers: spacegrapher, cedric, raster, jpeg

Reviewed By: jpeg

Subscribers: cedric, mer.kim

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

Signed-off-by: Jean-Philippe Andre <jp.andre@samsung.com>
Note: jpeg changed the original patch a bit (fix style and depth value)
2015-03-16 14:50:56 +09:00
Chris Michael f14a893ce5 evas-gl-drm: Cleanup compiler warnings for dbg/err messages
Summary: This commit compiles out the debug messages that were
generating compiler warnings during build. You can reenable these
messages if you uncomment GL_DRM_DBG in evas_engine.h

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-03-01 10:45:39 -05:00
Cedric BAIL 93333ede15 evas: refactor shutdown. 2015-02-23 11:35:29 +01:00
Cedric BAIL 552a38cde5 evas: refactor software engine initialisation. 2015-02-20 15:04:52 +01:00
Jean-Philippe Andre 651f0ae241 Evas GL common: Improve code readability (simplify macro)
The exact same ugly macro would appear hundreds of times in the GL
code:
  GLERR(__FUNCTION__, __FILE__, __LINE__, "");

Instead, override the common GL functions iif GL_ERRORS is defined.
This greatly simplifies code and removes tons of useless lines.
Also, this will give better debugging output as the exact code line
is printed, and the function name is also printed.

Also, fix linking to the glerr function.

This is a code cleanup. Hopefully I didn't break anything with this
big operation of find & replace.
2015-02-12 11:23:03 +09:00