Commit Graph

282 Commits

Author SHA1 Message Date
MinJeong Kim 6fe870de14 evas/gl_x11: set EGL_PLATFORM environment variable
Summary:
Without EGL_PLATFORM environment variable, eglInitialize() can be
failed because egl tried to load DRM platform instead of X11 platform and it
tried to handle XDisplay pointer as a gbm_device pointer as well.
The failure seems to be occured especially if the egl was built
with DRM platform as native platform.

This revision can prevent the failure by indicating proper egl platform using
EGL_PLATFORM environment variable.

@fix

Reviewers: gwanglim, jaehwan, seoz

Reviewed By: seoz

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D1828
2014-12-29 20:14:07 +09:00
Jean-Philippe Andre af43bc67e4 Evas GL: Try harder to find a matching config for GLESv1
If MSAA was requested, it is very likely that no config was
found (depending on the driver), so we'll try again without
MSAA. Yeah, this might not look very smooth but it should be
better that failing at eglMakeCurrent.
2014-12-22 22:15:12 +09:00
Jean-Philippe Andre 3572b3bf3d Evas GL: Add a warning in gl_x11 about MSAA & RGBA for GLES1
We've discovered some bugs on some drivers related to
MSAA and RGBA blending. Dunno yet if the same problem can affect
GLES2 as well.
2014-12-19 18:14:25 +09:00
Carsten Haitzler 8fcfae57d1 evas - gl - fix warning for unused var in glx build 2014-11-29 12:07:33 +09:00
Jean-Philippe Andre 6d652589ad Evas GL: Print GLSL version with EVAS_GL_INFO 2014-11-27 20:50:40 +09:00
Jean-Philippe Andre 8771c78a90 Evas GL: Fix indirect rendering surfaces for GLES 1.1
Carefully select the requested EGL config and match it with
the available visual from X, including the following options:
- Stencil
- Depth
- MSAA

TODO: The same thing for GLX. And fix direct rendering as well.
2014-11-26 22:56:06 +09:00
Jean-Philippe Andre f3a53acbf0 Evas GL: Fix bug in evgl_eng_pbuffer_surface_create (EGL)
Thanks Henry Song for the report.

@fix
2014-11-14 11:32:56 +09:00
Carsten Haitzler adc1465049 clean up glx context code to remove legacy and avoid server segv
this cleans oyt a few bits o9f old glx context handling code that are
no longer used as well as avoids  causing server-side to crash on
tryng to set a "none" glxwindow as current. this is what cases the
nvidia server-side crashes.
2014-11-02 11:36:21 +09:00
Chris Michael 9599007a68 evas-gl-x11: Don't call gl_common_error_set if MakeContextCurrent fails
Summary: glsym_evas_gl_common_error_set used here leads to an implicit
declaration in compiler warnings. Remove the call to that function and
just print out an error message. This is a cleanup function anyway.

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-10-29 12:07:48 -04:00
Chris Michael 300d20f47b Revert "evas-gl-x11: Fix copy/paste error from Coverity fix"
This reverts commit fb4ad043f6.

Revert this. This also leads to an implicit declaration of the
error_set function.
2014-10-29 12:07:03 -04:00
Chris Michael fb4ad043f6 evas-gl-x11: Fix copy/paste error from Coverity fix
Summary: In fixing a Coverity issue, I copy/pasted a call to
evas_gl_common_error_set without compiling :( Bad me !! This commit
fixes the issue (data was undefined). Since evas_gl_common_error_set can
take NULL as the data parameter, lets use that.

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-10-29 12:02:26 -04:00
Stefan Schmidt 2f49ec1115 evas/gl_x11: Do not shadow another local variable. 2014-10-29 16:05:42 +01:00
Chris Michael b1bf718f1b evas-gl-x11: Check return value of glXMakeContextCurrent
Summary: Fix Coverity CID1249651 (unchecked return value)

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2014-10-29 10:28:50 -04:00
Carsten Haitzler e164d14208 evas - fix new issue with segv when switching to alpha win with gl
evas gl window was freed before new one was created getting shared ctx
to 0 refcount thus freeing everything there - BAD. fix. new issue in
git, not from release
2014-10-28 20:10:40 +09:00
Carsten Haitzler 696346c467 evas gl rgba visual/rendering fix try ... again
so this is a re-try at the evas gl destination alpha fix. this is what
cedric tried, but done RIGHT. it required adding an ecore_x call to
create a window with correct visual/colormap. it requires doing
visuals totally correctly all the way from ecore_evas to the evas
gl_x11 core. nvidia drivers are very picky about visuals. i also had
to vid the egl/gles code too to do the same thing. nvidia gles/egl
drivers are also picky, mesa is not. this all requires a lot of code
changes. it's far from trivial

this isn't backported for a few reasons:

1. verify this fix doesn't break for anyone.

i tested:

nvidia glx + egl/gles
intel glx + egl/gles
radeon glx

it needs wider testing. nouveau, fglrx for starters and maybe
some other gles/egl drivers.

2. have some review time
3. time to settle before blasting to stable branches

@fix
2014-10-26 00:34:40 +09:00
Jean-Philippe Andre d4eb07b4bb Evas GL: Don't pass shared context for GLX with 1.1 API
Not sure if this is very relevant, since GLX does not support
GL-ES as such, anyways... We should be using the extension
GLX_EXT_create_context_es_profile to create proper contexts.

Note: GLX + OpenGL-ES 1.1 crashes at any function call on my
machine (binary bloc driver), while EGL + GLES1.1 is fine.
2014-10-22 10:44:06 +09:00
Stefan Schmidt a7ef5bd7da Revert "evas: GL_X11 context need to always be with alpha or it will fail to change."
Need to also revert this in master. Cedric seems busy with other things and this
should not end up in 1.12  alpha1

This reverts commit 4ea75113ca.
2014-10-21 09:23:58 +02:00
Jean-Philippe Andre 904b1c5249 Evas: Fix some debug output formatting
Remove trailing newline.
2014-10-21 15:59:50 +09:00
Jean-Philippe Andre 25aaee99af Evas GL: Fix gl_x11/GLX engine
Forgot to set the TLS value after creating a new context.
No problem would show up in most cases, even in my test app.
But elementary_test GLView would just not work at all, spitting
incomplete FBO errors at me. Damn this one line was hard to find.

But introduced in df66916cd22ec6c4.
2014-10-20 12:16:08 +09:00
Jean-Philippe Andre c17cfbd13e Evas GL: Add support for PBuffer surfaces with GLX
Not fully tested, but allows calling evas_gl_make_current, so
it works for dummy surfaces (eg. 1x1 for a render thread).
2014-10-20 12:16:08 +09:00
Jean-Philippe Andre 47ddb889ad Evas GL: Add support for OpenGL-ES 1.1 (part 3)
This introduces XPixmap usage for indirect rendering.
Of course this works only for the gl_x11 engine... and for
now only when using EGL... and only on some drivers...
damn limitations.
Direct rendering should work on more platforms (eg. some desktop
nvidia cards with the EGL drivers).
2014-10-20 12:16:08 +09:00
Jean-Philippe Andre 4315537820 Evas GL: Add support for OpenGL-ES 1.1 (part 2)
Add version param to context_create.
Add support for 1.1 contexts in the GL_X11 engine, and checks
for version in all other engines (return NULL).
Add API wrappers for all OpenGL-ES 1.1 APIs (normal and debug
modes).
2014-10-20 12:16:08 +09:00
Jean-Philippe Andre 38aa72d139 Evas GL: Fix sigsegv with recent Nvidia EGL driver
Welp, glGetString() crashes if called before eglInit... And this
piece of code is now useless because "safe native" mode is not
used anymore (safe_native is never read).

Remove all safe native-related code.
2014-10-20 12:16:08 +09:00
Jean-Philippe Andre f30f55f9f4 Evas GL: Fix compilation for EGL/GLES
Configure with --with-opengl=es --enable-egl
Fixes runtime link dependencies
2014-10-20 12:16:08 +09:00
Jean-Philippe Andre a0712e25e1 Evas GL: Add support for pbuffer surfaces
Supports only EGL for now :(

These pbuffer surfaces can be used to create dummy surfaces for
make_current and render threads.

@feature
2014-10-20 12:16:08 +09:00
Jean-Philippe Andre 90b07fc42a Evas GL: Fix rotation angle get to check for DR first
direct_enabled() is not visible from the engines... but it is from
evas_gl_core which calls the engine.
2014-10-20 12:16:07 +09:00
Jean-Philippe Andre de7a8a3dab Evas GL: Add API evas_gl_rotation_get
This will be used to increase the chances of having direct
rendering (no fallback to FBO) even if the window is rotated.

The client is then responsible for handling the view rotation.

@feature
2014-10-20 12:16:07 +09:00
Jean-Philippe Andre 28a76266c6 Evas GL: Fix runtime linking issues
There is some mess with gl common functions that need to be
called from the engine itself, eg. error set/get.
2014-10-20 12:16:07 +09:00
Jean-Philippe Andre cb5e88d20f Evas GL: Add APIs to get current surface/context
- evas_gl_current_surface_get
- evas_gl_current_context_get

@feature
2014-10-20 12:16:07 +09:00
Jean-Philippe Andre 68ca82e83f Evas GL: Add more thread safety to gl_x11 2014-10-20 12:16:07 +09:00
Jean-Philippe Andre 6e4d7151b8 Evas GL: Save EGL error codes in gl_x11 engine 2014-10-20 12:16:07 +09:00
Cedric BAIL 4ea75113ca evas: GL_X11 context need to always be with alpha or it will fail to change.
@fix
2014-10-09 12:20:53 +02:00
Cedric BAIL dccbd559d4 evas: GL_X11 - add some more error message. 2014-09-30 18:31:51 +02:00
Cedric BAIL af40a4b4e1 evas: GL_X11 - remove lef over unref. 2014-09-30 18:06:12 +02:00
Cedric BAIL ebaec0dfaf evas: GL_X11 - fix use of deleted memory by pointing to the right data. 2014-09-30 17:23:25 +02:00
Cedric BAIL 59501027c0 evas: fix gl_context to correctly match window description after a change.
This was affecting use of GL backend when having a transparent window. It
is actually a fix for a bug reported by Thanatermesis. It has been inspired
by D1229.

To reproduce the issue just do ELM_ACCEL=gl elementary_test -to "Icon transparent".
2014-09-30 16:25:46 +02:00
Jérémy Zurcher 119134751f evas/engines: avoid redefinition of typedef Outbuf
'typedef struct _Outbuf Outbuf' is in software_generic/Evas_Engine_Software_Generic.h
that is always included
2014-09-23 11:16:47 +02:00
Jean-Philippe Andre 0d9005aa0c Evas GLX: Simplify code
if (A) then B else B
2014-09-19 10:29:58 +09:00
Carsten Haitzler 489404c785 evas gl x11 - fix structurally dead code
fix previous "shut up unused params warnings code bits and use
EINA_UNUSED. fixes CID 1039495
2014-08-22 20:14:59 +09:00
Gwanglim Lee cba164072d evas: Evas_Gl_X11 - add missing eng_window_free
Summary:
add missing eng_window_free before return from eng_setup.
@fix

Test Plan: N/A

Reviewers: cedric, raster, devilhorns, stefan_schmidt

Subscribers: cedric

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2014-08-21 12:04:53 +02:00
Carsten Haitzler 401d788bd6 evas gl - fix undefined return added from coverity fixing 2014-08-16 12:40:42 +09:00
Carsten Haitzler 5a722ca6fe fix structurally dead code warning
CID 1039494
2014-08-14 20:21:19 +09:00
Carsten Haitzler 111fd9339c evas gl - fix structurally dead code
unused var protection in ifdef - use unused macro instead. fixes
CID 1039495
2014-08-14 20:18:56 +09:00
Carsten Haitzler 05d839e854 evas gl x11 engine do extra check to make coverity happen
this fixes CID 1226192
2014-08-13 18:27:46 +09:00
Carsten Haitzler 01cd90b6c3 evas gl - glx - sety current to NULL on free of window or context
hunting a mem leak i found we dont nuke the current context when
freeing it or the window bound to the current context. fix this.
2014-08-07 19:39:16 +09:00
Carsten Haitzler beb7e6e611 evas - gl-x11 - extensions - be more specific about video_sync extn
this should avoid false-positive detection for this extension - other
extensions share string content
2014-07-30 21:40:16 +09:00
Cedric BAIL 9a9d78dfcb evas: provide GetProcAddress by the engine. 2014-07-25 20:24:28 +02:00
Cedric BAIL cec904cd03 evas: make gl_x11 rely on gl_generic.
Note that we can't access gl_common directly as it is not possible to link it
2 times. I also didn't want to force evas to be linked with GL/EGL. So I rely
now on dlsym on about 20 symbols to get that backend going.
2014-07-11 15:32:51 +02:00
Cedric BAIL 255ceb419c evas: gl_common already provide the infrastruture to manipulate ImageSEC. 2014-07-10 11:34:34 +02:00
Cedric BAIL 68110c63b6 evas: actually put the specific code in the right place. 2014-07-09 15:17:03 +02:00
Jean-Philippe Andre 48bcf182b4 Evas gl: Add support for ETC1+Alpha textures
Compile-in the required shaders, add support for the
new EVAS_COLORSPACE_ETC1_ALPHA, and upload textures as RGB+A
pairs.

@feature
2014-07-09 09:04:55 +09:00
Cedric BAIL 5bf4ae22cb evas: fix bogus update rect, that's what I call black magic. 2014-07-08 14:27:08 +02:00
Cedric BAIL 1b14531146 evas: fix use of already freed data use. 2014-07-08 11:00:23 +02:00
Gwanglim Lee e3192c374d evas: gl_x11 - add missing function pointer glsym_eglSwapBuffersWithDamage
Summary: added missing global function pointer to gl_x11

Test Plan: N/A

Reviewers: cedric, raster, devilhorns

CC: cedric

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

Signed-off-by: Cedric BAIL <c.bail@partner.samsung.com>
2014-07-06 20:19:34 +02:00
Cedric BAIL 235caec745 evas: remove multiple definition of glsym_eglSwapBuffersWithDamage. 2014-07-06 18:18:29 +02:00
Cedric BAIL f1590e06b0 evas: fix build break with GLES. 2014-07-06 18:16:10 +02:00
Cedric BAIL 87bcb1da23 evas: missing shared declaration. 2014-07-05 21:03:36 +02:00
Cedric BAIL 410a2a7953 evas: missed replacement. 2014-07-05 13:13:43 +02:00
Cedric BAIL 914b529e38 evas: make partial update extention compile for every one in gl_x11 backend. 2014-07-05 12:50:56 +02:00
Cedric BAIL 14d22c5a08 evas: migrate GL_X11 to use more infrastructure of software_generic. 2014-07-04 15:11:22 +02:00
Cedric BAIL 4be4991315 evas: rename Evas_GL_X11_Window to Outbuf. 2014-07-04 15:11:22 +02:00
Tom Hacohen 7f3a44894b Evas canvas eolian: Fix namespace and class name for the evas canvas. 2014-06-30 17:47:06 +01:00
Jaehyun Cho abbfd23a22 gl_x11/evas_engine: Prevent dereference before NULL check
Summary: re->win pointer was not compared with NULL pointer before re->win was referenced.

Reviewers: Hermet

Reviewed By: Hermet

CC: seoz, cedric

Differential Revision: https://phab.enlightenment.org/D910
2014-05-28 14:32:39 +09:00
ChunEon Park 53e11f3b05 evas/gl_x11 - replace inlist counting to one api call. 2014-05-19 18:48:05 +09:00
Jérémy Zurcher 9a79d1e864 silence a few warnings 2014-05-08 00:15:53 +02:00
Carsten Haitzler d237f2236d return stride for yuv formats as width in bytes (y width). 2014-04-29 23:11:23 +09:00
ChunEon Park 78142d0566 evas/gl - make simple.
it already prints error msg inside new functions.
2014-04-28 20:51:02 +09:00
Jean-Philippe Andre 86ce491a86 Evas gl_x11: Add ETC2 support to the GL/X11 engine
This should allow texture upload with ETC2 RGB8 or RGBA8 formats.
Untested for now...

@feature
2014-04-25 16:50:29 +09:00
Taekyun Kim 8fda631730 Evas: 3D: Introducing 3D scene rendering features
Enable 3D features using --enable-evas-3d=yes when configuring.
APIs are exposed through Evas_3D.h.
Currently, evas-3d is being supported only on gl_x11 engine.

Conflicts:

	src/lib/evas/Evas_Eo.h
2014-04-25 16:15:41 +09:00
Jean-Philippe Andre 2ff9b054f9 Evas gl_x11: Fix abort() in evas_object_image_data_get()
Since the introduction of new colorspaces for GL_X11
(GRY8, AGRY88 and ETC1), stride_get() would return
an invalid value and data_get() would just abort().

Add proper support for these functions.
ETC1 data will NOT be returned from data_get() and
stride_get() will return 0. This is to avoid people from
messing up badly with encoded color spaces.
2014-04-22 17:46:30 +09:00
Jean-Philippe Andre 54fb9b2346 Evas: Use Evas_Colorspace to declare cspace
Why use int when we have a proper type?
All these APIs are internal.
2014-04-15 18:50:37 +09:00
Carsten Haitzler 9d87d155f7 fix swap buffers with damage to not detect if ext str is not there
@fix
2014-04-05 22:21:13 +09:00
Cedric BAIL dc75a1fcff evas: remove dead code. 2014-04-01 22:00:15 +09:00
Stefan Schmidt 80497d75bc evas/gl_x11: Cast GLubyte to const char for strstr
The GLubyte we are getting back here are strings we want to search
in with strstr. Cast is only to avoid warnings.
2014-03-19 11:48:46 +01:00
Jean-Philippe Andre 8672f3176e Evas gl_x11: Do not premultiply pixels after reading FBO
The pixels are already premultiplied in such an FBO.

(cherry picked from commit 2b3e065ffeb9b587ca35909940beb59b25081e7f)
2014-03-18 15:44:15 +09:00
Jean-Philippe Andre 1a9b58f083 Evas gl: Fix buffer dump filenames
evas_gl_common_buffer_dump can be used to dump all frames into
a series of PNG files. But the filename contained some garbage
characters (and potential segv, too).

(cherry picked from commit a0f886138ed5a28d0d1596df3b805fca06d1ae31)
2014-03-18 15:44:13 +09:00
Jean-Philippe Andre 7ad4a269e0 Evas gl_x11: Fix usage of glReadPixels
It is not necessary to dynamically link to glReadPixels since
this is not an extension. This code wouldn't even work on some
devices.

Also, the pixels returned are not premultiplied (yeah >_<)

And some devices (EGL) don't support GL_BGRA... so glReadPixels
would just fail and not fill in the pixels. Conversion is required.
2014-03-13 17:04:42 +09:00
Jean-Philippe Andre a6950567a3 Evas filters: Use GL_FRAMEBUFFER instead of GL_READ_FRAMEBUFFER
GL_READ_FRAMEBUFFER isn't defined when compiling for Wayland
Thanks Stefan for the report.

Also, import GL_FRAMEBUFFER overrides from other GL files, so
that it points to the proper extension (_OES or _EXT if applicable).
2014-03-07 17:48:23 +09:00
Jean-Philippe Andre 59f5216391 Evas gl_x11: Add support for glReadPixels
This will be needed by the filters for proxy rendering,
for textures and maps (displacement).

Add new engine functions to unleash the (sluggish) power of glReadPixels.
The idea is to be able to bypass glReadPixels later, so 3 new APIs are
added:
- surface_lock
- surface_read_pixels
- surface_unlock
They must be called in that order.

Note (for history):
glReadPixels was always getting the wrong data during first draw,
but the right data during a redraw...
Why? Well simply because for OpenGL itself, the image had never
been drawn in teh first place! Only the Evas GL context knew
about the image drawing, as it was queued somewhere in the pipe.

One line solution: Call evas_gl_common_context_flush before
doing anything else.
2014-03-07 11:07:09 +09:00
Sung W. Park 2b4a7b438d evas gl: added partial rendering support for qcom extension
When running in direct rendering mode, properly support partial
rendering if the extension is properly supported.

Also, fixed the SwapBufferwWithDamage rectangle coordinate bug.
It wasn't properly y-inverted before.
2014-02-15 02:33:47 +09:00
Carsten Haitzler 2e95690201 evas - gl x11 - fix glx texture from pixmap target rectangle mode check
even though we don't support rectangle bits in texture targets for
texture-from-pixmap the code checked and complained - problem is it
checked the wrong thing. fixes CID 1135267
2014-02-13 19:35:17 +09:00
Wonsik Jung 6ea0566e6c evas: add eglMakeCurrent in evas map create/free.
Summary: Ensure Evas's eglContext when several eglContexts are used.

Test Plan:
1. Native GLES application works with evas_object_image_native_surface_set
2. One Evas object works with evas map.

Reviewers: seoz, tasn, cedric

Reviewed By: cedric

CC: cedric, raster

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

Signed-off-by: Cedric BAIL <cedric.bail@samsung.com>
2014-02-10 10:40:56 +09:00
Wonsik Jung 0e04219758 Add quadruple swap mode for partial rendering
Summary: This patch is for QUADRUPLE window buffers.

Test Plan:
When enlightenment uses quadruple buffers or window system can support quadruple buffers,
application can use quadruple buffers with partial rendering

Reviewers: tasn, seoz, raster

Reviewed By: raster

CC: cedric

Differential Revision: https://phab.enlightenment.org/D527
2014-02-08 23:04:04 +09:00
Wonsik Jung 3420eda31a evas: gl backend - ensure eng_window_use in image_content_hint_set
Summary: Ensure eng_window_use in image_content_hint_set

Test Plan:
1. make native OpenGLES application.
2. set evas object image  with evas_object_image_native_surface_set.
3. GLES Application try to call eglMakeCurrent with own eglContext, then resize evas object resize

Reviewers: Hermet, raster, cedric

Reviewed By: cedric

CC: cedric, seoz

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

Signed-off-by: Cedric BAIL <cedric.bail@samsung.com>
2014-02-07 12:18:16 +09:00
Carsten Haitzler e8c13118eb fix mingw build for setuid fix/checks 2014-01-08 22:06:41 +09:00
Carsten Haitzler b95ef3801f setuid safeness - ensure if an app that is setuid doesn't do bad things
this makes efl ignore certain env vars for thnigs and entirely removes
user modules (that no one ever used) etc. etc. to ensure that *IF* an
app is setuid, there isn't a priv escalation path that is easy.
2014-01-08 19:46:23 +09:00
Carsten Haitzler e9783c3caf evas - gl-x11 engine - put in guessed blacklist of yinvert extn for intel mesa 2014-01-07 16:28:46 +09:00
Carsten Haitzler 2373e1f636 evas - gl-x11 remove +x bit on src file! 2013-12-30 18:27:06 +09:00
Vostokov Sergey 36a52ca062 evas - gl-x11 engine - don't re-init engine window on rotate
this puts rotationc hanges in the same class as resizes for evas gl
x11 engine info updates and doesnt re-create the engine window data on
rotate.
2013-12-26 19:19:15 +09:00
Daniel Juyung Seo 76d8532b54 efl: Unified eina critical manro to CRI.
Being annoyed by different types of eina critical macros - CRI, CRIT,
 CRITICAL -, I concluded to unify them to one. Discussed on IRC and
 finally, CRI was chosen to meet the consistency with other macros -
 ERR, WRN, INF, DBG - in terms of the number of characters.
If there is any missing bits, please let me know.
2013-12-26 12:27:13 +09:00
Carsten Haitzler 97a491dd90 evas - gl - ifdef out unused var with non-gles build 2013-12-11 18:26:45 +09:00
Carsten Haitzler 24c6424670 evas - gl - use snprintf for safety (never likely anyway, so code was fine) 2013-12-11 18:25:29 +09:00
Stanislav Vorobiov 9e3b778acb evas - fix gl egl textrue from pixmap support y invert query extension
Instead of hardcoding yinvert=1 we should query for
EGL_NOK_texture_from_pixmap extension and if it's present
use EGL_Y_INVERTED_NOK value
2013-11-29 19:09:17 +09:00
Sebastian Dransfeld aed4dbea30 evas: No error if blacklisted, just warn 2013-11-21 10:51:25 +01:00
Cedric Bail de13560056 evas: those if (re) are useless indeed.
Should fix CID 1129611 and CID 1129612 from this week coverity scan.
2013-11-18 19:21:06 +09:00
Wonsik Jung d2b647d2b3 evas: fix a missing eglMakeCurrent in image_cache_flush/image_cache_set in the GL X11 backend.
[Problem] When glTextureDelete is called in image_cache_flush(), it sometimes doesn't work.
[Cause] glTextureDelete is called with the wrong eglContext.
[Solution] Call eng_window_use() in image_cache_flush() and image_cache_set() to use the correct eglContext.

Change-Id: Id7ab1aaeb456be6dbc5f09cb2731ace5399a5dce
Signed-off-by: Cedric Bail <cedric.bail@samsung.com>
2013-11-15 14:08:40 +09:00
Carsten Haitzler 92d7235e0b warning-- 2013-11-09 10:42:49 +09:00
Carsten Haitzler 2da7295af2 evas - gl engine - this fixes the breakages in new nvidia drivers
nvidia > 319 broke alpha windows. this code that was left commented
out fixes it. it didn't used to have any use.
2013-11-09 10:40:17 +09:00
Jean-Philippe Andre 82e8028b5d evas/cserve2: Fix image preload with gl-x11 engine
Cserves supports only the SW (xlib) and GL (gl-x11) engines.
Also, improve cs2 support for some lesser used functions in the
gl_x11 engine.
2013-10-30 19:48:17 +09:00
Sung W. Park 7dc102c55f EvasGL: Fixed direct rendering not clipping issue
Evas GL direct rendering mode didn't properly take into account
the image object's clipping information and clip the region that
it was directly rendering to. Hence there were issues with the
direct rendering region drawing over the objects that are sitting
on top of it.

Also, cleaned up the direct rendering coordinate computation code
and a nasty dependency with image object that should have been
removed a long time ago.  Basically the evas-gl engine was directly
accessing the image object data structure for its data when it
really should have just passed along necessary information.
2013-10-24 17:42:21 +09:00
Carsten Haitzler 7d7f548afc evas - gl - dont allocate image and/or texture until needed on native unset 2013-10-16 22:56:38 +09:00
Sung W. Park 56e71e05bb Evas: EGL-GL backends. Call eglReleaseThread() upon shutdown
Call proper cleanup code upon terminating egl use.
2013-10-14 14:37:36 +09:00
Carsten Haitzler 70f443d8a8 evas - avoid memleak on rotation of tilebuf in engine for gl and sw possibly. 2013-08-29 14:58:09 +09:00
Rafael Antognolli f69cde8107 evas/gl_x11: eng_window_use will not always force makecurrent.
If the egl_surface is different from the current one, it may be that the
it has been destroyed already. Removing the below check (and just
checking for different contexts) will avoid calling makecurrent when
destroying a window.  That was always failing anyway.

Should fix https://phab.enlightenment.org/T311 for gl_x11 too.
2013-08-29 17:25:40 -03:00
Sung W. Park 5ac17a52d5 Evas: Fix Evas_GL engine shutdown error.
It was trying to use access a struct for egl_disp after the struct
was freed..
2013-07-30 19:45:40 +09:00
Sung W. Park 3074280217 Evas: adding image dump debug feature for gl_x11 backend
Added a feature to dump out a png image before calling SwapBuffers.
To turn on the feature, use the following env vars.

EVAS_GL_SWAP_BUFFER_DEBUG_DIR="dir_name" sets the name of the directory
that the files will be output to and enables the debug mode.

EVAS_GL_SWAP_BUFFER_DEBUG_ALWAYS=1 will enable the writing of the
files every frame.  This in effect turns on the swap_buffer_debug
variable, which can be set on or off in gdb for debugging.  This will
allow dumping of certain frames without having to dump out a ton of
files to track down one frame.
2013-07-23 10:27:28 +09:00
Cedric Bail f54a09ef83 Revert "evas: use Eina_Tiler for GL backend."
This reverts commit 87b49cf103.
2013-07-09 10:42:01 +09:00
Cedric Bail 87b49cf103 evas: use Eina_Tiler for GL backend.
This is a start to leverage more on our infrastructure so that later
optimizing Eina_Tiler will be more usefull.
2013-07-09 09:48:09 +09:00
Carsten Haitzler 22ad827274 evas gl: fix origin of swapbufferswithdamage to be BOTTOM-LEFT based... 2013-07-03 12:11:18 +09:00
Daniel Willmann dd76f4cd05 evas gl_x11: Fix uninitialized use of re in eng_output_flush()
In case of render_mode == EVAS_RENDER_MODE_ASYNC_INIT we're jumping
directly to end which then calls
evas_gl_preload_render_unlock(eng_preload_make_current, re);

Make sure re is initialized with the render engine data so we don't
dereference junk.

Signed-off-by: Daniel Willmann <d.willmann@samsung.com>
2013-06-26 14:42:10 +01:00
Chris Michael 712a528025 Make gl_x11 compile again
eglSwap|BuffersRegion was replaced with eglSwapBuffersWithDamage.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-06-24 09:27:14 +01:00
Cedric Bail d06a0982ef evas: add support for asynchronously uploading GL texture.
NOTE: when using Evas_Object image preload infrastructure the GL texture
upload was uploaded from the main loop during the rendering stage. This
could lead to some frame drop during fast animation due to the time needed
to upload that texture.

This patch fix this problem by uploading a small texture quickly (16x16)
and waiting for going back to the main loop to be able to use the same GL
context from another thread to do the texture upload asynchronously without
blocking the main loop.
2013-06-24 12:04:18 +09:00
Sebastian Dransfeld 51023d2d4f evas: Keep sane name for public header
Evas_Common.h should be used for the public header, and rather rename
evas_common.h internal header to another name.

Sa:
Evas_Common_Header.h -> Evas_Common.h
evas_common.h -> evas_common_private.h

Shouldn't have both Evas_Common.h and evas_common.h because of case
insensitive filesystems.
2013-06-20 12:53:29 +02:00
Sung W. Park 8e6f0aa11c Evas: add partial rendering support for evasgl direct rendering
Evas_GL Direct rendering is an optimization path that renders
directly to the window if conditions are met.  Because evas gl
backend used to re-render the entire screen, evas_gl direct
rendering didin't have to concern with partial region rendering.
Now that partial rendering/swapping has been applied to evas gl-
backend, evas_gl direct rendering also had to take into account
clip regions. in order to properly apply it, some adjustments
were made to the engine functions and etc.
2013-06-17 18:32:00 +09:00
Sung W. Park 316be3e6c7 Revert "Saving evasgl direct partial rendering fix temporarily"
This reverts commit e6359132de.
2013-06-17 18:22:15 +09:00
Sung W. Park d5d5a0125d Revert "Added Wayland fix for evas_gl direct fix"
This reverts commit e1c238b1be.
2013-06-17 18:21:55 +09:00
Sung W. Park e1c238b1be Added Wayland fix for evas_gl direct fix 2013-06-17 17:52:16 +09:00
Sung W. Park e6359132de Saving evasgl direct partial rendering fix temporarily 2013-06-17 17:52:16 +09:00
Chris Michael 509090bafc Port wayland_egl changes for swapbufferswithdamage to gl_x11
Signed-off-by: Chris Michael <devilhorns@comcast.net>
2013-06-14 12:30:17 +01:00
Cedric Bail 1403b3a9ad evas: preliminary work on texture destruction for async preload of texture. 2013-06-14 16:38:18 +09:00
Cedric Bail 1073084807 evas: change cache API to forward Eo object. 2013-06-14 16:38:18 +09:00
Carsten Haitzler c1190d4539 evas: gl engine: chg eglswapbuffersregion to swapbufferswithdamage extn instead. 2013-06-14 14:42:03 +09:00
Carsten Haitzler fdabe06989 evas - partial rendering support now for qualcomm extn too. 2013-06-11 18:12:07 +09:00
Carsten Haitzler d32758e2de evas: mirror partial swap fix in wl egl and move to alloca for rect buf. 2013-06-05 18:11:46 +09:00
Carsten Haitzler 0b8815a7e1 evas: fix partual swap rect output list - coords wrong. 2013-06-05 18:11:46 +09:00
Carsten Haitzler 2bfe58887d evas gl: do not assume querying extension strings are extns in glx and egl. 2013-06-04 15:35:15 +09:00
Cedric Bail ad5d75dfcd evas: add support for engine specific extention during thread task. 2013-06-04 11:20:25 +09:00
Carsten Haitzler 6a4cdea904 fix evas partial swapotkeep the full re-render in the rects if it switches to full mode. 2013-05-29 21:38:11 +09:00
Carsten Haitzler c8256f5fae fix evas gl engine partial swap to do full swap in full mode. 2013-05-29 17:30:42 +09:00
Carsten Haitzler 0532a992d9 remove about 16m mem for mesa for extra evgl context
only creating the extra evasgl context on demand when/if needed and
thus save 16m of memory allocations corresponding to the extra context
2013-05-20 18:09:50 +09:00
Carsten Haitzler e7349e8005 disable all the waiting on gl - squeeze some more performance out of gl. 2013-05-18 10:04:37 +09:00
Sung W. Park 97806103eb evas: fix evas flushing its command queue to wrong gl context in gl-backends
For native surface rendering (glX, egl) in gl-backend,  if pixel get callback
function is called for native rendering, there is a case where evas will
try to call evas_gl_common_context_flush() to flush its remaining commands
in its command queue while the context is set current to the native surface/
context that is called within the pixel get callback.  So, I've added an
engine function that forces a flush before it enters the pixel get callback
function.
2013-05-13 14:12:36 +09:00
Sung W. Park 289a666333 evas: Fixed evas_gl multi-window support design issue.
Evas engine is created per window but evas_gl engine was not properly
updating the engine info for new windows that are created. So, addressed
the design issue by passing engine_data to evas_gl engine apis..
2013-05-08 18:39:12 +09:00
Cedric Bail d833244100 evas: add infrastructure to open from Eina_File. 2013-05-08 18:17:00 +09:00
Carsten Haitzler 01d816fb96 fix swapregion rect to account for canvas rotation. 2013-05-07 10:26:43 +09:00
Cedric Bail c5b0d28d73 evas: move flags and attribute around. 2013-05-06 19:02:04 +09:00
Carsten Haitzler 1a81f0a8c2 force scissor to always be on indicating partial gl update region so
gpu can.. do more sensible things.
2013-05-03 19:31:28 +09:00
Carsten Haitzler f8c9a8d167 revert the revert... damn you git!
Revert "Revert "Efl: replace eo_data_get for objects data referencing.""

This reverts commit b64a2994b3.
2013-05-02 16:47:16 +09:00
Carsten Haitzler b64a2994b3 Revert "Efl: replace eo_data_get for objects data referencing."
This reverts commit 654a3f5f94.
2013-05-02 14:17:19 +09:00
Daniel Zaoui 654a3f5f94 Efl: replace eo_data_get for objects data referencing. 2013-05-01 10:37:08 +03:00
Carsten Haitzler 36b1b06a60 note in comments som get visual info from fbconfig stuff to mach
depths. doesn't help though.
2013-04-23 00:06:47 +09:00
Tom Hacohen 8b6c9449fb Evas engine gl_x11: Fixed signed, unsigned comparison. 2013-04-18 12:42:06 +01:00
Carsten Haitzler e5065da29c fix nvidia texture from pixmap config depth match to be looser to
avoid non-matches.
2013-04-18 20:30:39 +09:00
Carsten Haitzler d0f1933923 clean up glx native surface (texture from pixmap code) to be more anal
about matching depth etc.
2013-04-18 17:16:41 +09:00
Carsten Haitzler 7cae29becd fix evas gl_x11 in 16bpp (and similar depths). 2013-04-18 15:17:10 +09:00
Sung W. Park 34ce73badd [Evas] Updated eglMap/UnmapImageSEC extension definition
Recently Samsung specific eglMap/UnmapImageSEC has been updated to
support new features.  The extension definition was updated in evas
accordingly.
2013-04-12 17:34:13 +09:00
Sung W. Park 00cffc0585 [Evas GL] Initialize evas gl engine after evas stuff is initialized first. 2013-04-12 17:02:43 +09:00
Carsten Haitzler 7fd0cf1731 this is not a big change - not worth changelog, but allow gl partial
updates to be rounded up to specific tile sizes (and make it 16x16 by
default).
2013-04-11 21:24:06 +09:00
Carsten Haitzler 9dffb4eed8 and further work on buffer age support in evas... after more testing
on nvidia...
2013-04-11 09:21:42 +09:00
Carsten Haitzler 8f73a2bd0e add environemnt vars to switch bounding box to full region list calcs
and an env var to show debug for partial updates.
2013-04-10 18:47:44 +09:00