Commit Graph

1763 Commits

Author SHA1 Message Date
jiin.moon a76fd7b37e evas: Support region_set for BMP image
Summary:
1) BMP loader support region decoding.
     @feature

2) Fix an issue what BMP loader can't decode an 16bit image with bit field
    @fix

Test Plan: attached sample codes

Reviewers: cedric, jpeg, jypark

Differential Revision: https://phab.enlightenment.org/D4228
2016-08-17 17:28:53 +09:00
Stefan Schmidt 31f289ff4c evas: engine: remove set but unused variable 2016-08-16 16:22:06 +02:00
Jean-Philippe Andre d5da8d31ce gl: Fix usage of GLX/EGL/GL extensions
This is reverts:
e4c641ed1e
  build fix
19eb7b727fbf35620a13fb65b50d3056a484360e:
  glx: Fix black windows in E on nvidia

For all extension functions, we need to match with the extension itself
since GetProcAddress() can return a non-NULL value even when the function
does not exist. Drivers can do a runtime mapping depending on the
context. So, we only trust the return value of GetProcAddress() when
we know for sure that the extension exists.

Thus, if a symbol exists we will always prefer it rather than relying
on GetProcAddress().

Also, glGetString(GL_EXTENSIONS) is now deprecated so we're lucky
it still works most of the time. glGetStringi() should be used
instead. This patch changes some of the use cases, but not all.

Fixes T3030 (again)
Fixes T4288

@fix
2016-08-16 16:14:21 +09:00
Jean-Philippe Andre 8fb2dca520 evas: Implement GL map/unmap for the simple case
Most of the code relies on the software generic engine
implementation, using inheritance between engines.

This fixes expedite image map RGBA test.
2016-08-16 16:14:21 +09:00
Carsten Haitzler 40250fda22 evas gl x11 engine - fix buffer age symbol find and use
it serems some changes broke our buffer age querying - we were using
the wrong symbol... the EXT or ARGB onenot the core one which does
work. use that first. then we get buffer age.

@fix
2016-08-16 15:19:21 +09: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 ad4c92ceeb evas: Fix shader for text masking
Fixes T4338

@fix
2016-08-12 11:10:36 +09:00
Tom Hacohen c662934be8 Change the EFL to follow the new Eo rename. 2016-08-11 17:04:43 +01:00
Chris Michael 7cf75b269e evas-gl-drm: Don't release gbm buffer twice
Not sure how this got in there, but it looks like
gbm_surface_release_buffer was being called twice on the same buffer.
This should sort out the double-free mentioned in ref T4335

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2016-08-11 07:53:51 -04:00
Jean-Philippe Andre eba63b7441 wayland_shm: Fix basic support for Evas GL
Simply add support for EVASGL native surfaces.
I removed all code related to OPENGL surfaces (deprecated stuff
from old Evas GL).

Fixes T2936

Note that here are still some missing features in Evas GL
support on Wayland (at least pbuffers support is not implemented).
2016-08-11 11:13:01 +09:00
Carsten Haitzler 60fec61c8b ecore gl module - dont check value that is already valid
make coverity happy with CID 1347410 - it's technically right that the
code assumes the im ptr is valid until then as it dereferences it
until then and then stores it under pd->image but then checks for
NULL.. it would have crashed already if it were, so rmemove the
pointless check.
2016-08-08 17:47:14 +09:00
Jean-Philippe Andre f06506c970 evas: Mark native_surface as const
The void* argument should be considered read-only.
This doesn't change anything, really.
2016-08-08 15:16:53 +09:00
Chris Michael e4c641ed1e evas: Fix compiling evas x engine with no gles
This fixes an issue from 19eb7b727f where the code
would no longer compile due to not finding noext_glXCreatePixmap in
the structure. This was due to the fact that this field was not
compiled into the structure if gl_gles was defined.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2016-08-03 09:00:50 -04:00
Jean-Philippe Andre 19eb7b727f glx: Fix black windows in E on nvidia
This fixes calls to glXCreatePixmap that would consistently
fail on nvidia >= 360.

It seems glXCreatePixmapEXT was used instead of glXCreatePixmap,
and that function always returned 0.

One could assume always using the non-EXT version of the
function should be preferred. Unfortunately, doing so for all
the other functions brings back the black windows.

I'm taking a very careful approach by doing this only for drivers
>= 360.

Fixes T3030

@fix
2016-08-03 17:32:14 +09:00
Jean-Philippe Andre 444ab8fb17 gl_x11: Minor code refactor around eglCreateImage
Trying to debug T3030... hitting a brick wall at the moment.
Add better error handling (for EGL).
2016-08-03 17:32:14 +09: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
Derek Foreman 8b87cd9e46 wayland_shm: Use correct filename in unlink
We switched from mkstemp to eina_file_mkstemp() but ended up unlinking
the template filename, which didn't exist on the filesystem.
2016-07-26 12:38:24 -05: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
Derek Foreman da6b03540f wayland_shm: Fix fd leak in dmabuf
Need to close the fd from PrimeHandleToFD.
2016-07-25 12:19:43 -05:00
Carsten Haitzler 89a3be8735 ector module - remove sueless chekc for null done already CID 1347411
fixes a pointeless check coverity found
2016-07-24 18:44:15 +09:00
Derek Foreman 6108aa942c wayland_shm: Speed up dmabuf on intel
using map_bo/unmap_bo instead of gem_map_bo_gtt/gem_unmap_bo_gtt
results in a cacheable mapping and a large performance boost.

(dmabuf will still remain turned off by default for the release)
2016-07-22 14:32:37 -05:00
Jean-Philippe Andre f09df82283 evas: Fix call to NULL object 2016-07-19 19:36:43 +09:00
Jean-Philippe Andre f18747e6dd Evas GL: Use [u]int64_t directly in all APIs
This removes the need for khronos_[u]int64_t as well as the special
typdef EvasGL[u]int64.

Hopefully this should work on all platforms (note: [u]int64_t is
used in Eina APIs, so it is already required for EFL apps).

Fixes T3200
2016-07-18 15:09:19 +09:00
Derek Foreman f48f565306 ecore_drm2: Fix page flipping
Properly handle the ticker racing ahead of the refresh rate by once again
triple buffering.

Fixes T3819
2016-07-14 15:29:54 -05:00
Derek Foreman 8507b512a0 ecore_drm2: Don't disable custom ticker if flip fails
When using a mix of vblank and pageflip events like we're stuck with now
a failed flip is going to happen sooner or later.  We fix this by triple
buffering.  We shouldn't turn off the custom ticker.
2016-07-14 15:29:49 -05:00
Chris Michael 91437a3424 evas-wayland-shm: Create buffers with ARGB by default
We need to be creating buffers with ARGB by default so that things
like Alpha/Transparency work when toggled. If we always create with
XRGB then toggling Alpha/Transparency state fails.

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2016-07-13 14:45:51 -04:00
Minkyoung Kim fd1917e90d evas/gl_generic: Recreate texture when native surface image size is changed.
Summary:
Now, if image is native, do not recreate texture when image size is changed.
Recreate next native surface set time. So during the time between image_size_set and native_surface_set, native image is fragile. Fix it.

Test Plan: Local Test

Reviewers: spacegrapher, jpeg, wonsik, dkdk, raster

Reviewed By: raster

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D4153
2016-07-12 14:11:37 +09:00
se.osadchy f796f04aae evas: fix work of engine on macOS.
Summary: Update eng_image_free function and check of references.

Reviewers: thiepha, NikaWhite, FurryMyad, raster, cedric

Subscribers: raster, jpeg

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2016-07-11 10:54:50 -07: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
Carsten Haitzler 72438ab2a1 Revert the wobbly window code in wayland_egl engine - fun is over guys
So ok. haha. Amusing. But this is inappropriate.

1. It's not an INTENDED effect in theme so unless the theme ius doing
it - it shouldn't happen.
2. There are places to do this and it's NOT inside an engine. There
are high level filter and other mechanisms.
3. Actually this shouldn't be even done client-side. It should be done
compositor-side when moving a window around. Knowing velocity vector
etc. is useful to a client so the protocol can stay but doing the
animation client-side is "wrong". Some windows wobble and others do
not based on toolkit? really? sure we have to live with the CSD
difference but this? The compositor can do this JUYST fine. leave it
to compositor... OR do this properly with filters client-side. e.g. a
2d displacement map with evas filters would do the job as long as it
interpolates. If you want a way of forcing ALL objects in the canvas
to redirect to an intermediate buffer then do it up there at the
canvas level. It then works in GL and software, as opposed to only GL.

Also.... this is now causing issues for users:

<memeka> hi, from
https://git.enlightenment.org/core/efl.git/commit/?id=fb76fe55a52ac212b6870f1d74470a79ea5c5246
i run EFL_WAYLAND_DISABLE_WWW=1 terminology -> but it crashes in
wayland_egl/www.c in the setup_shaders function .... HELP?

so the fun was fune until we do a release (now) and until this causes
problems for users. Back to tried and tested code.

If you want to do this... do it right at the portable layers above.

...

Revert "wayland-egl: Fix use after free"
Revert "wayland_egl: Fix redirect to texture"
Revert "evas-wayland-egl: Add www protocol handling to wayland-egl engine"
Revert "gl_common: Add API for redirecting render to texture"

This reverts commit 2760afbb0e.
This reverts commit c937248eac.
This reverts commit c67f50b40a.
This reverts commit 0f7f4b6de0.
2016-07-11 14:54:35 +09:00
Carsten Haitzler cdbd437c5f evas sw generic - handle alloc failures correctly for map struct
map struct allocation was not handled right - we assumed successthen
later checked for failure with an if() after using the ptr. this
should fix CID 1353722
2016-07-09 12:28:05 +09:00
Carsten Haitzler a9025a3e4f evas gl generic - fix ector end to place return in right var
fixes new CID 1357394
2016-07-09 11:44:35 +09:00
Chris Michael b2a8ef3d13 evas-wayland-shm: Fix Insecure temporary file
Fix using mkstemp directly without securely setting umask first by
making use of eina_file_mkstemp function which does set umask.

Fixes Coverity CID1357164

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2016-07-08 08:51:54 -04:00
Carsten Haitzler 3c793f98a9 gl generic ector leak - fix not using return value of eng_image_data_put
this fixes CID 1339963

@fix
2016-07-08 17:13:17 +09:00
Cedric BAIL 005375176d evas: fix initialisation and shutdown of eet and eina by mesh loader and saver. 2016-07-06 13:26:15 -07:00
Carsten Haitzler 2ca5075193 efreet - fix mime file path messing with short paths like /
this fixes T4015

@fix
2016-07-05 16:28:52 +09:00
Jean-Philippe Andre f955a20c02 Evas GL: Fix warning about invalid type (GLES 3.1) 2016-07-05 15:04:51 +09:00
Carsten Haitzler 9527240d74 efl - fix lots of little init/shutdown pairs that are wrong
i've fixed almost all the eina init/shutdown pairs to do the right
thing now... except one (ecore_shutdown) with comment inline where
eo_shutdown is not called. if this is called we are in crash land.
this needs further inspection.
2016-07-04 21:30:34 +09:00
DaeKwang Ryu 8b5d5a5a8d EvasGL: Add support for Evas GL 3.1
Summary:
2 wrapper functions are added.
(glFramebufferParameteri, glGetFramebufferParameteriv)

update gl2ext.h(generated 20160209) in evas_gl.h

Test Plan: OpenGL ES Conformance Test

Reviewers: jpeg

Subscribers: spacegrapher, wonsik, cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D3782
2016-07-04 20:47:57 +09:00
Derek Foreman 10f2e9c15f wayland_shm: free dmabuf resources on fallback
Add destructors for the buffer managers, and clean up properly when
falling back.

Fixes Coverity CID1357163 and CID1357162
2016-06-30 13:44:51 -05:00
Chris Michael 59a09e04aa evas-wayland-shm: Remove logically dead code
Coverity reports that this bpp check is actuall dead code due to the
fact that bpp can never be < 0.

Fixes Coverity CID1357144

@fix

Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
2016-06-30 10:56:01 -04:00
Jean-Philippe Andre 4adbd32a52 Revert "evas: Fix compilation when using different build directory"
This reverts commit 3c13ef14e3.

This introduced new build breaks, especially with in-tree builds.
In particular, DIR was not defined. See T3975.

I'll make the shaders regen an opt-in rather than on by default.
2016-06-27 16:19:43 +09:00
Felipe Magno de Almeida 3c13ef14e3 evas: Fix compilation when using different build directory 2016-06-24 22:47:49 -03:00
Jean-Philippe Andre e1d5d5e4a1 evas: (Try to) fix shaders gen without breaking everything
So... adding the .x files to BUILT_SOURCES means they would
get deleted during clean. This was bad, but turned to be awful
when this made the check for writability fail.

See:
8a27315878
2b8912462e

This commit reverts:
0b69356f1b

Notes:
Please revert if this breaks the build for anyone.
I'm pretty sure the use of top_srcdir is not recommended the
way I've done it.

I hate autofoo.
2016-06-24 16:46:57 +09:00
Carsten Haitzler 0b69356f1b Revert "evas: Fix distcheck by disabling shaders generation"
this breaks the simplest configure + make ... so obviously it's broken
2016-06-24 10:05:41 +09:00
Derek Foreman d2a3502481 wayland_shm: Make dmabuf opt-in
Some weird bugs and performance issues around these days, and I
keep chasing them in dmabuf first.  Removing it from the equation for
now.
2016-06-23 13:55:03 -05:00
Jean-Philippe Andre 2b8912462e evas: Fix distcheck by disabling shaders generation
make distcheck is verified by checking the env var "top_distdir"
This is not a great solution but should work.
2016-06-23 17:51:10 +09:00
Jean-Philippe Andre 41e17f7e73 evas 3d: Fix shaders compilation (parallax and normal)
My nvidia EGL driver coultn't compile some shaders because of
the error:
  error C1059: non constant expression in initialization

The proposed patch at D4068 is not acceptable since it just
brings the original problem back. Instead, make sure all vec3
variables are initialized in main() or another function, not in
the global scope.

I tested all examples in evas
2016-06-22 14:30:37 +09:00
Jean-Philippe Andre 8a27315878 evas 3d: Fix shaders generation script 2016-06-22 13:43:07 +09:00