Commit Graph

2648 Commits

Author SHA1 Message Date
Jean-Philippe Andre 42b63f5507 Evas: Add smart_ prefix to all smart functions (eo)
This is a first step at separating legacy smart
object features away from standard efl interfaces.
2016-06-17 19:25:48 +09:00
Ji-Youn Park 830faf2502 evas_image_load_bmp: fix bug that image is not decoded, if image is not perfact. 2016-06-17 18:42:28 +08:30
Derek Foreman 47e9d11f74 wayland_shm: Fix another dmabuf corner case
When kernel support for locally mmapping buffers is unavailable and
software rendering is used, dmabuf may need to fallback to shm for the
very first frame rendered.

We need to copy that frame to a shm buffer during the fallback to make
sure it's actually displayed.
2016-06-15 12:40:36 -05:00
Carsten Haitzler fa19b37458 shader gen - make this use plain sh not bash for portability
this should fix T3793
2016-06-15 14:33:56 +09:00
Jean-Philippe Andre c9d94a44cf wl_shm: Fix compilation warning (cast) 2016-06-14 16:27:42 +09:00
Chris Michael c163e51dd3 ecore-evas-wayland: Minor formatting fixes
NB: no functional changes

Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
2016-06-13 16:19:46 -04:00
Chris Michael fb569d7eb0 ecore-evas-drm: Re-enable direct input callback
As it seems the jpeg breakage is over wrt direct input callbacks, we
can re-enable these for the drm engines

@fix

Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
2016-06-13 16:19:46 -04: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 e691de04be Evas: Rename Clickable_Interface to Efl.Ui.Clickable
Event prefix is efl_ui:
 EFL_UI_EVENT_CLICKED
 EFL_UI_EVENT_CLICKED_DOUBLE
 ...

The event prefix could be reduced to efl but I personally
prefer with UI.
2016-06-10 17:33:53 +09:00
Benjamin Jacobs 16f4c5c35a evas-wayland-egl: Make sure surface pointer is valid before using it
Summary:
Prevents the uninitialized surface pointer to be used when
glsym_evgl_native_surface_buffer_get is NULL.

Reviewers: devilhorns

Subscribers: cedric, jpeg

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

@fix
2016-06-09 09:33:16 -04:00
Oleksandr Shcherbina 32d1f4b2e5 evas: fix possible memory leaks in e3d_drawable_texture_rendered_pixels_get
Summary:
@fix
CID: 1356243, 1356242, 1356242, 1356242

Reviewers: cedric, Hermet, raster

Subscribers: jpeg

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2016-06-08 13:58:30 -07:00
Jean-Philippe Andre 0e17dc79b3 wl_shm: Fix uninitialized warning
warning: variable 'surf' is used uninitialized whenever 'if' condition
is true [-Wsometimes-uninitialized]
2016-06-07 15:11:27 +09:00
Jean-Philippe Andre ecc1d5dfaf gl_drm: Fix shadow warning 2016-06-07 15:10:28 +09:00
Benjamin Jacobs 08585ba0c4 gl_x11: Working GLES2 fallback.
Summary:
Disables GLES3 support when it cannot be determined that it is
available. Prevents to repeatly request a (missing) gles3 support and
fail.
Fixes T3795.

Reviewers: jpeg

Subscribers: cedric, jpeg

Maniphest Tasks: T3795

Differential Revision: https://phab.enlightenment.org/D4014
2016-06-07 13:58:14 +09:00
Oleksandr Shcherbina e3eb246e2c evas: fix typo in description of the engine functions.
Reviewers: Hermet, raster, cedric

Reviewed By: cedric

Subscribers: jpeg

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2016-06-06 16:40:25 -07:00
Oleksandr Shcherbina 6c580faad9 evas: fix order binding attributes to gl.
Summary:
In same cases(devices) can lead to mix up attributes in shaders.
@fix

Reviewers: cedric, Hermet, raster

Subscribers: jpeg

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2016-06-06 16:39:41 -07:00
Jean Guyomarc'h 1f69a7cfa7 ecore_evas_cocoa: better handling of resize callback 2016-06-05 12:12:02 +02:00
Jean Guyomarc'h b2775d90b1 evas-gl_cocoa: resize the gl context before resizing the window
This order seems more right. It does not have a visible
impact though...
2016-06-05 12:12:02 +02:00
Derek Foreman 3de4e31003 wayland_shm: Fix more dmabuf failure corner cases
With the exynos allocator a failure can happen during a resize, and the
resize path wasn't properly falling back to wl_shm buffering.
2016-06-03 16:28:24 -05:00
Derek Foreman 34ce296cac psd_loader: Fix bad assumption about signedness of chars
Whether "char" is signed or unsigned is architecture dependent, so if we
know we need a -1 in a char type we must declared it to be signed.
2016-06-03 16:28:24 -05:00
Derek Foreman 821aada3c4 wayland_shm: Add exynos allocator for dmabuf
Allows clients on exynos hardware to allocate GEM buffer objects
to back DMAbuf buffers.
2016-06-03 11:05:28 -05:00
Derek Foreman 0f07f67b12 wayland_shm: Abstract out dmabuf management
Split out the intel specific stuff into an abstraction in preparation for
adding exynos support.
2016-06-03 11:05:16 -05:00
Oleksandr Shcherbina 7e0601c980 evas: Get pixels from rendered 3D scene
Summary:
Implemented interface Efl.Gfx.Buffer functions bufer_map/unmap for Efl.Canvas3D.Scene.
Added function e3d_drawable_texture_rendered_pixels_get to module evas_gl_3d
to getting pixels from FBO. Added wrappers for functions
e3d_drawable_texture_rendered_pixels_get and e3d_drawable_texture_id_get
to have possibility call it through engine functions.

Reviewers: cedric, Hermet, raster, jpeg

Reviewed By: jpeg

Subscribers: jpeg

Differential Revision: https://phab.enlightenment.org/D3978
2016-06-03 14:22:33 +03:00
Cedric BAIL c77856456e evas: attempt to fix massive memory leak in the fb engine.
T3763
2016-06-02 10:53:42 -07:00
Jean-Philippe Andre 014295fbc9 ecore_evas: Fix mouse in/out events
Apparently I broke some inputs in E (efm) like mouse wheel.
Somehow the list of objects where the pointer is in was NULL.
This was because the mouse_in/out events were not matched to
the proper window ID.

Fixes T3760
2016-06-02 14:19:18 +09:00
Tom Hacohen a6a2338962 Revert "Eo: Remove eo_del() and make eo_unref() the replacement."
This reverts commit 546ff7bbba.

It seems that eo_del() is useful and removing it was creating bugs.
The issue is that the way we defined parents in eo, both the parent and
the programmer share a reference to the object. When we eo_unref() that
reference as the programmer, eo has no way to know it's this specific
reference we are freeing, and not a general one, so in some
circumstances, for example:
eo_ref(child);
eo_unref(child); // trying to delete here
eo_unref(container); // container is deleted here
eo_unref(child); // child already has 0 refs before this point.

We would have an issue with references and objects being freed too soon
and in general, issue with the references.

Having eo_del() solves that, because this one explicitly unparents if
there is a parent, meaning the reference ownership is explicitly taken
by the programmer.

eo_del() is essentially a convenience function around "check if has
parent, and if so unparent, otherwise, unref". Which should be used when
you want to delete an object although it has a parent, and is equivalent
to eo_unref() when it doesn't have one.
2016-06-01 13:33:21 +01:00
Chris Michael e01ac62e5f ecore-evas-drm: Disable direct input callback
For ecore_evas drm engine(s), disable setting of
ecore_event_window_direct_callback as this Completely Breaks all input
when running Enlightenment Wayland.

NB: This can likely be re-enabled at some point, when the jpeg
breakage is over ;)

@fix

Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
2016-05-31 09:49:43 -04:00
Chris Michael 1ca1f8b06d ecore-evas-drm: Register direct input callback for gl_drm also
@fix

Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
2016-05-31 09:23:20 -04:00
Jean-Philippe Andre 8e31929aab Efl.Pointer.Event: Add dup() method to copy an event 2016-05-31 19:03:04 +09:00
Jean-Philippe Andre 05dfab8442 ecore_x: Pass in/out through ecore_input_evas
This whole input system is a massive mess. It looks like spaghetti.
Long live the giant flying monster.

This commit changes how some events are propagated in X.

Before:
 ecore_x -> evas_event -> evas

After:
 ecore_x -> ecore_input_evas -> ecore_evas -> evas_event -> evas

There are still inconsistencies between events and between X and WL,
but ecore_evas should be used for all events since it rotates the
inputs.
2016-05-31 19:03:04 +09:00
Jean-Philippe Andre 5aa00004a5 ecore_evas: Register direct input cb from modules
If the ecore_evas modules were using
ecore_event_window_register() then they can also redirect
everything though the direct callback instead.
2016-05-31 19:03:04 +09:00
Chris Michael 593961c2e2 ecore-evas-drm: Fix issue of mouse pointer not centering on startup
This patch fixes an issue where starting Enlightenment would not
center the mouse pointer. Basically the issue is that we cannot warp
the mouse pointer until After the ee->prop.window has been set else
E will not process the mouse_move event

@fix

Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
2016-05-27 11:57:53 -04:00
Mike Blumenkrantz da8bcbc7c6 ecore-drm2: update to latest elput 2016-05-27 11:57:53 -04:00
Derek Foreman 5535c049cd evas-drm: Fix occasoinaly freezes
We need to continue to tick even if we can't find a buffer - otherwise
we'll stop updating forever.

We also need to reset buffer busy bits to 0 if we run out of buffers or
we'll never try to assign one.  (The page flip handler would eventually
clear the busy bit for the current buffer, but a few lines ago we just
set that to NULL so it will never happen...)
2016-05-27 11:57:53 -04:00
Derek Foreman bdcd84cd2c evas-drm: Don't re-use the current buffer immediately
If we don't block the current buffer from being assigned to the new
current buffer we'll end up rendering into the same buffer over and over
and never actually double buffer.
2016-05-27 11:57:53 -04:00
Chris Michael 93178199a6 ecore-evas: Port ecore_evas drm engine to use Ecore_Drm2 library
Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
2016-05-27 11:57:53 -04: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
Carsten Haitzler 072674dbe2 efl - ecore c+ ecore-imf - fix odd case input when faking a real event
so ibus module for ecore-imf likes to send an x event back to
ourselves faking a key... this works unless we are looking at
modifiers that make make for odd combos with keysyms turned into
keycodes. so actualyl use the correct original keycode plus state
unless we are having to explicitly send a keysym from ibus core.

this fixes T3703

@fix
2016-05-27 23:57:30 +09:00
Jean-Philippe Andre 2af9f15bf9 Evas: Fix compilation warning
Missing initializers. Damn C and {0}.
I could also have used GCC's {} form.
2016-05-26 20:53:53 +09:00
Jean-Philippe Andre 3d6ea827b9 Evas GL: Fix compilation warning, use func pointer
GLES 3 support should be a runtime-only requirement, so
no direct call to a GLES3 function should appear in evas.
Use our dlsym() pointer instead.
2016-05-26 20:50:53 +09:00
Jean-Philippe Andre 56a7a66e97 Evas GL common: Simplify GLPIPES... trying to prevent a crash
An unknown crash happened in glDrawArrays() where color_ptr is
a non-reachable pointer that looks like a valid malloc() zone.

Unreproducible issue. I can only hope this patch doesn't actually
break anything.

This cleans up rectangle and line in particular, that were not
using common code to use GLPIPES. I honestly couldn't find a
problem though.
2016-05-26 18:35:07 +09:00
Nicolas Aguirre 85682678e6 evas: gl_common add define for missing EGL_WAYLAND_Y_INVERTED_WL 2016-05-22 23:41:18 +02: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
Mike Blumenkrantz 7510e42c1b elm_win: implement v2 of teamwork api using window-based display protocol
this adds support for wayland and makes teamwork integration trivial for any
application

@feature
2016-05-20 14:54:06 -04:00
Carsten Haitzler a52c7da714 evas 3d - fix mesh savers/loaders to not leave memory unset
i've been gettign persistent evas test suite suite failures ffor a
while. annoying as i can't get 100% pass anymore. it's due to segv's
in evas test suite thanks to chunks of uninitialized memory in the
mesh loaders/saver code.

this fixes that

@fix
2016-05-20 21:46:50 +09:00
Jean Guyomarc'h 147ef32b2b efl: fix misleading indentation
GCC's -Wmisleading-indentation is complaining...
It is a warning flag introduced in GCC 6.x, and
is enabled by -Wall.
2016-05-18 21:57:02 +02:00
Derek Foreman d485e1f161 software_generic: Add wayland dmabuf native surface support 2016-05-18 11:52:24 -05:00
Derek Foreman 5f0aea2e24 gl_drm: Add wayland dmabuf native surface support 2016-05-18 11:52:24 -05:00
Derek Foreman 72b1997f06 evas: Add wayland dmabuf native surface type
Add the structures required for supporting dmabuf native surfaces
2016-05-18 11:52:24 -05:00
Derek Foreman 0a6cdcc58c software_generic: Call native surface free callbacks
In the near future this will prevent leaking native surface data for
wayland dmabuf buffers.
2016-05-18 11:52:23 -05:00
Derek Foreman c59eb1ce62 wayland_shm: Attempt to create mmappable dmabuf objects
To composite from dmabuf buffers without GL we need to be able to mmap them
in the compositor - create the buffers in a way that makes that possible.
2016-05-18 11:52:23 -05:00
Derek Foreman dfd9159a53 wayland_shm: Fix dmabuf failed allocation handling
We frequently attempt to generate multiple buffers before any come back
as failed - the orphaned buffers need to be handled more carefully.
2016-05-18 11:52:23 -05:00
Cedric Bail 75a53ece10 eo: for consistency use object like all our API. 2016-05-18 08:18:04 -07:00
Jihoon Kim 2b8d93a5d1 ecore_imf: Add multiline hint in input hint
@feature
2016-05-18 15:21:12 +09:00
Daniel Kolesa 7782c0bcb9 eolian: add event_prefix and have classes follow that or eo_prefix by default
Previously events used to use class name as a prefix and ignored eo_prefix
when specified. This is no longer the case. Events follow eo_prefix by default
now. In order to get around this for classes where this is undesirable, a new
field event_prefix was added which takes priority over eo_prefix. If neither
is specified, class name is used like previously.

@feature
2016-05-17 17:50:43 +01:00
Tom Hacohen 546ff7bbba Eo: Remove eo_del() and make eo_unref() the replacement.
We used to have eo_del() as the mirrored action to eo_add(). No longer,
now you just always eo_unref() to delete an object. This change makes it
so the reference of the parent is shared with the reference the
programmer has. So eo_parent_set(obj, NULL) can free an object, and so
does eo_unref() (even if there is a parent).

This means Eo no longer complains if you have a parent during deletion.
2016-05-17 16:23:23 +01:00
Jihoon Kim 988fe37232 ecore_imf/wayland: Change sequence to call preedit changed and end callback
preedit changed and end callback should be called before commit callback
2016-05-17 08:34:17 +09:00
Nicolas Aguirre 21da8f1475 Evas: gl_common remove gl3.h and gl3ext.h includes 2016-05-16 00:58:52 +09:00
Nicolas Aguirre 436a9db6a6 Evas: gl_common add define for missing GL_DEPTH_COMPONENT24 2016-05-16 00:58:52 +09:00
Tom Hacohen 96c4c88070 Efl: Remove "legacy_prefix: null;" as it's now the default. 2016-05-12 17:27:35 +01:00
Tom Hacohen 0253d91ade Evas object smart: Fix namespace to use . and not _. 2016-05-12 11:12:15 +01:00
Tom Hacohen 28a2d34ae2 Ector generic: Remove .Generic and .Base (hack no longer needed). 2016-05-11 12:57:55 +01:00
Cedric BAIL 0c4880e99d efl: everyone should now rely on Eina MIN/MAX redefinition. 2016-05-09 16:58:53 -07:00
Mike Blumenkrantz 9d5caf00b6 wayland: implement session recovery
add support for reconnecting wayland applications if the compositor dies

disconnect -> destroy gl ctx + image textures -> block rendering ->
reconnect -> create gl ctx -> create image textures -> unblock rendering ->
sprinkle special seasoning on top -> just like ma used to make

 #SamsungFeatures

@feature
2016-05-05 10:49:31 -04:00
Mike Blumenkrantz bdfbd4a4e1 wayland_egl: return immediately in eng_window_free() when null is passed 2016-05-05 10:49:31 -04:00
Mike Blumenkrantz 4f4556be35 wayland_egl: unset global egl context if used wl_display changes
as long as evas uses a global gl context any change to the wl_display
must trigger a full re-create on that context
2016-05-05 10:49:30 -04:00
Mike Blumenkrantz 217551e92b wayland_egl: ensure gl context destruction when unsetting wl_display
extra refcounting during setup in this case will prevent the context
destruction, leading to a dead gl context which is unable to render
2016-05-05 10:49:30 -04:00
Derek Foreman d6818131c0 wayland_shm: Fix extra buffer allocation on client shutdown
On shutdown we need to set wl_surface to NULL to let the engine know
there's nothing to write to - however we've been setting up an entirely
new outbuf instead of just changing the old one.
2016-05-03 14:24:45 -05:00
Derek Foreman 16108a972f wayland_shm: Fix bad indenting 2016-05-03 14:24:45 -05:00
Derek Foreman 4f6e7a8ab3 wayland_shm: Fix dmabuf fallback to shm
The outbuf code should free the surface structure, not the dmabuf
abstraction or a use after free occurs on fallback.

Re-organize some code to make sure we don't rely on anything that may
have already been freed.

Add a wl_surface_commit() to keep the animation timer alive through
the fallback process.
2016-05-03 14:24:45 -05:00
Derek Foreman 6ef0fdfe2b wayland_shm: Fix uninit variable
also make it an Eina_Bool
2016-05-03 14:24:45 -05:00
Chris Michael eefee97c2a ecore-evas-wayland: Remove include for old Ecore_Wayland library
This include is leftover from the porting to Ecore_Wl2. Remove
unused include for old Ecore_Wayland library

@fix

Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
2016-05-03 11:21:31 -04:00
Derek Foreman bb036dbceb wayland_shm: Remove debug detritus
Should've been removed before push.  Oops.
2016-04-19 16:40:27 -04:00
Derek Foreman 45a662c91c wayland_shm: Add dmabuf support
This adds a separate backend to the "shm" engine that allows allocation
of buffers via libdrm that can be turned into dmabuf handles and used
with the wayland dmabuf extension.

Currently only the intel buffer manager is supported.

The benefit of dmabuf buffers is that they don't require a texture upload
like shm buffers do, and when we have plane support they can be dropped
directly into a plane without a memcpy.
2016-04-19 15:11:10 -04:00
Derek Foreman 0d684d4559 wayland_shm: Refactor surface creation
Split this into two parts, one that makes the base surface, one that
calls the potential back ends.

Once the dmabuf backend is added this will allow a fallback path to
re-initialize the surface as wl_shm if dmabuf fails.
2016-04-19 15:11:10 -04:00
Derek Foreman 8635f56aeb wayland_shm: pass engine info to shm_surface_create
Gratuitous change to pass less parameters and make some code prettier.
2016-04-19 15:11:10 -04:00
Derek Foreman 0ada4d3d56 wayland_shm: Pull the damage stuff out of evas_shm
This doesn't really care what the buffers were allocated with, so
let's make this chunk of code useful to both the shm method and the
upcoming dmabuf one
2016-04-19 15:11:10 -04:00
Derek Foreman 11cf0206e4 wayland_shm: Minor clean up of _evas_shm_surface_post
Some gratuitous cosmetic fixes
2016-04-19 15:11:10 -04:00
Derek Foreman 2c33bae2d5 wayland_shm: Don't pass num_buff to reconfigure
We can't really reconfigure the number of buffers after they're created,
there's nothing above us that would try to do it...
2016-04-19 15:11:10 -04:00
Derek Foreman e5fb4cada7 wayland_shm: Gratuitous code simplification
Refactor evas_outbuf_setup a bit so there's only one call to
_evas_shm_surface_create.

Also makes the NULL return on unhandled rotation a lot more obvious.
2016-04-19 15:11:09 -04:00
Derek Foreman 405b278528 wayland_shm: Pass Evas_Engine_Info_Wayland_Shm directly to setup functions
We pretty much pass all its contents anyway.
2016-04-19 15:11:09 -04:00
Derek Foreman 34e539a3c1 wayland_shm: Add dmabuf to engine info
Get the dmabuf protocol object from ecore_wl2 and store it in engine info
2016-04-19 15:11:09 -04:00
Derek Foreman ed665ee6ee wayland_shm: Abstract the actual shm operations
Make the Surface carry function pointers and the shm surface create
function set them.  This refactor makes implementing dmabuf operations
simpler.
2016-04-19 15:11:09 -04:00
Derek Foreman 63a255750b wayland_shm: Remove outbuf_reconfigure function pointer
We only ever call it from one place, and we only ever initialize it
to one value, so there's no need for a function pointer.
2016-04-19 15:11:09 -04:00
Derek Foreman 4c61ec5e05 wayland_shm: Remove unused dx, dy params from resize functions
We don't appear to actually use these for anything except long term storage
2016-04-19 15:11:09 -04:00
Derek Foreman 7cd2693075 wayland_shm: Drop ifdefs around damage_buffer
We now depend on wayland 1.10.0 so damage_buffer is always going to be
present in the headers - we no longer need ifdef checks.
2016-04-19 15:11:09 -04:00
Derek Foreman cd124f938f wayland_shm: Make new Surface abstraction to wrap Shm_Surface
Wraps the Shm_Surface allocator in a new Surface type that will
potentially use different allocators, such as dmabuf in a future commit.
2016-04-19 15:11:09 -04:00
Derek Foreman 78688b226f wayland_shm: Move Shm private structures into evas_shm
Refactor all the shm specific stuff into evas_shm so it can better
co-exist with upcoming dmabuf allocations
2016-04-19 15:11:09 -04:00
Derek Foreman 7e2f5e759e wayland_shm: Remove flags
We only used this for resize, and didn't actually even need it then.
2016-04-19 15:11:09 -04:00
Derek Foreman 745435deab wayland_shm: Don't use number of buffers in swap mode calculation
The number of allocated buffers shouldn't change a thing...
2016-04-19 15:11:09 -04:00
Derek Foreman f92c2d2330 wayland_shm: Return buffer age from shm_surface_assign
This makes refactoring the Surface abstraction a little easier.
2016-04-19 15:11:09 -04:00
Jihoon Kim 8c1776d177 ecore_imf/wayland: Fix bug language changed event is always called 2016-04-18 14:51:46 +09:00
Carsten Haitzler b7d882515d eina mempool: don't allow 0 sized mempools
there is no point in having a mempool with a max 0 size. this leads to
us mallocing 0 bytes for the base. not good. make minimim size 1. :)

@fix
2016-04-18 09:31:08 +09:00
Vitalii Vorobiov a69903e3b2 datetime_input_ctxpopup: delete previously created ctxpopup if theme is broken
Summary:
Or else it will create dozens of ctxpopup's if user applied wrong or broken
theme that do not remove ctxpopups at all (lack of programs/signals or whatever
brokes ctxpopup behaviour)

@fix

Reviewers: cedric, reutskiy.v.v, NikaWhite, raster, an.kroitor, wc, Hermet

Reviewed By: Hermet

Subscribers: jpeg

Differential Revision: https://phab.enlightenment.org/D3885
2016-04-14 20:35:42 +09:00
Oleksandr Shcherbina 172cfa0f04 evas.canvas3d: Change shade_mode to shader_mode
Summary:
enum Evas.Canvas3D.Shade_Mode are using for choose relevant shader source code.
So renaming have a sence.
Rename evas_canvas3d_shade_mode_set/get property to evas_canvas3d_shader_mode_set/get
Rename internal fields and functions

Reviewers: cedric, Hermet, raster

Subscribers: jpeg

Differential Revision: https://phab.enlightenment.org/D3882
2016-04-14 20:28:20 +09:00
Tom Hacohen f14305024e Eo event: rename Eo_Event->event_info to Eo_Event->info.
The previous naming was redundant and too long.
2016-04-12 15:23:55 +01:00
Carsten Haitzler febfa6de9d ecas gl: ensure make current/window/outpbut enabled before flushing
this should cover up possible texture leaks from gl engine with a null
context on font freeing.

@fix
2016-04-12 17:30:48 +09:00
Carsten Haitzler 53c66c98c2 ecore - system modules - fix eldbus interdependency and complaints
so ecore uses ecore system modules ... that use eldbus. eldbus inits
ecore. this is a vicious cycle. eldbus shouldnt init ecore. it's a
dependency but should be provided outside of initting eldbus. this all
led to hack-arounds on initting eldbus in these ecore modules that
just break things like shutting down eldbus when still in use.

this ensures any pending messages are canceled on ecore module shutdown.
this ensures every ecore module fully inits and shuts down eldbus as
they should so refcounting the inits works.
this stops eldbus from inittign ecore to avoid the circuluar dependency.

this stops lots of CRI/ERR complaints eg if you run elua with no
cmdline options.

this is just better.

@fix
2016-04-12 14:11:32 +09:00
Carsten Haitzler f54a2eb570 ecore system upower - silence if service doesnt exist
this silences come complaint warnings that should not be noisy - eg if
upower dbus service doesn't exist.
2016-04-12 12:51:48 +09:00
Carsten Haitzler af4c3c0fe1 evas gl - fix leak with font glyph textures
some font glyphs are still allocated after tyhe last gl window is
freed which means we can't make current anymore to free textures after
that. this fixes that by flushing gl texture info from the font cache
when the last gl windows are gone.

@fix
2016-04-12 12:47:30 +09:00
Oleksandr Shcherbina 1f66a9e731 evas.canvas3d: Add FXAA post processing render.
Summary:
Add post processing render function as rendering full screen quard after
rendering to texture.
Add possibility use size of current frame in shader.
Add FXAA shader source files

Reviewers: raster, cedric, Hermet

Subscribers: jpeg

Differential Revision: https://phab.enlightenment.org/D3847
2016-04-12 00:50:46 +09:00
Jean-Philippe Andre f253f9a7bc Evas 3d: Fix compilation for Windows
near and far are #defined in windows.h. Old legacy stuff.
To be sure the code compiles, rename the variables.

Fixes T3423
2016-04-08 11:13:06 +09:00
Mike Blumenkrantz 0712218537 wayland: hook engine data from elm_win and update rect with evas size
the only way to accurately calculate the "evas" size in the engine from
window geometry is to have the size of the frame available to subtract from
window geometry

window geometry is NOT framespace--framespace is the entire csd region, possibly
containing a shadow, and window geometry is explicitly the region occupied by the
window, ie. not the shadowed part.

not my ideal solution to the synchronization issue here, but I guess this is a
benefit of the unified tree

fix T3396
2016-04-07 14:19:25 -04:00
Mike Blumenkrantz 5292b3de05 ecore-wl2: redo Ecore_Wl2_Event_Window_Configure entirely
this is an event representing the "new" state of the surface after a
configure event. it must contain the exact states which could potentially
have changed in the configure in order to ensure synchronization between
csd states and window size.

ecore events for xdg-shell configures must be sent only upon receiving a
configure event since states are set by the compositor and not by the client

@fix

 #hoorayforbeta
2016-04-07 14:19:25 -04:00
Chris Michael fb3b6ac327 evas-wayland-shm: Update copyright notice
As portions of this code have been derived from existing code in
Weston, we should also be including their copyright/license text to
give credit.

Fixes T3421

@fix

Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
2016-04-05 07:44:19 -04:00
Jean-Philippe Andre f57da20b88 Evas: Fix GL shader selection for afill
AFILL should be used only for certain images, which are
actually native external or dynamic content images.

All normal image don't need the AFILL flag, since they should
have proper argb and alpha flag.
2016-04-05 18:20:36 +09:00
Derek Foreman 406c234346 wayland_shm: Fix resize optimization
We're supposed to allocate a large pool at startup and use it for
resizing to save pool allocations.  However, this was broken and
we ended up allocating both a large pool and a proper sized pool
every resize.

This restores correct behaviour.
2016-04-04 18:00:40 -04:00
Derek Foreman 2760afbb0e wayland-egl: Fix use after free
eng_window_use() uses outbuf->redirect, so the clever code in
eng_outbuf_reconfigure that avoided setting it to NULL to check
if we needed to recreate the redirect was not very clever at all.
2016-04-04 14:11:28 -04:00
Derek Foreman c937248eac wayland_egl: Fix redirect to texture
Previous redirect to texture approach broke multiple window applications
by having only a single redirect per context.  This approach allows
multiple redirections.
2016-04-04 12:13:23 -04: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
Carsten Haitzler db4ff548d3 evas - gif loader - handle missing colormap
follow on from dd90b6afad - this handled
if a gif file has no colormap (it'll decode as blank now as a colormap
of all 0's is used instead).

@fix
2016-04-04 09:51:12 +09:00
Jean Guyomarc'h 8fb153cf8c evas_gl_cocoa: fix segmentation fault at program exit
Programs crashed on a segmentation fault when the last window was
closed. The eng_output_idle_flush() function was removed... but
since gl_cocoa does not properly use *_generic modules, the
output_idle_flush() function called by the render engine was
garbage (hence the segfault).

Now nothing is done... but at least we don't crash anymore.
2016-04-02 22:27:12 +02:00
Carsten Haitzler f56e33f429 evas - gif loader - be a little more optimal in pixel lookups on decode 2016-04-02 13:32:36 +09:00
Carsten Haitzler dd90b6afad evas: gif loader - fix out of bounds access on cmap of invalid pixels
if gif has example 4 colors in colormap, pixels provided still can
hold values higher than 3 (4, 8, 255 etc.) ass a pixel is still a
byte. it should not, but it could. technically it'd be nice for gitlib
to pad its palette out to 256 entires to ensure this cant be a
problem, but it doesn't have to , so make a local copy of the cmap
when decoding pixels and pad out to 256 entires (using color 0 as any
value > pallette ize is invalid anyway so any color will do).

this fixes a possible security attack vector in reading memory out of
bounds of an allocated array. not very far out of bounds - but enough
to cause a crash - ie a dos attack, (not to inject code though).

@fix
2016-04-02 13:32:28 +09:00
Chris Michael e84b2e50f7 evas-software-generic: remove native.func.data variable and data argument of native calblacks.
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.

ref f10672dd74

@fix

Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
2016-04-01 07:56:54 -04:00
Derek Foreman c67f50b40a evas-wayland-egl: Add www protocol handling to wayland-egl engine
Use the new post-processing API and www extension to implement
CSS effects for wayland-egl applications.

Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
Signed-off-by: Mike Blumenkrantz <zmike@osg.samsung.com>
2016-04-01 06:49:50 -04:00
Derek Foreman 0f7f4b6de0 gl_common: Add API for redirecting render to texture
New API allows a context to be redirected to texture.  When rendering is
complete the texture can be unbound from the frame buffer and used for
post-processing effects.

Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
Signed-off-by: Mike Blumenkrantz <zmike@osg.samsung.com>
2016-04-01 06:49:50 -04:00
Mike Blumenkrantz 17bb2d60ca ecore_evas wayland: store relevant www data in engine info
this accumulates all data relevant to client-side www into
the Evas_Engine_Info_Wayland_Egl struct so the client can react to it.

Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
2016-04-01 06:49:49 -04:00
Mike Blumenkrantz afd083788b ecore-evas wayland: use www protocol when available
handle www protocol events and store the provided data into engine data

Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
2016-04-01 06:49:49 -04: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
Mike Blumenkrantz a6924ced9d wayland: add comment for ref T3396 2016-03-30 16:00:10 -04:00
Mike Blumenkrantz f70649a13d wayland: ignore resize from no-op surface configure events, send events always
this fixes the case where a configure event with the current window geometry
would cause (inaccurate) resizes

@fix
2016-03-30 15:42:21 -04: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
Cedric BAIL 95808a226a elementary: add back modules. 2016-03-29 14:53:38 -07:00
Li Zhang 7ad6c34a2c Add ECORE_IMF_CALLBACK_DELETE_SURROUNDING
Change-Id: I0e1ab14736a3d3849becb7cbeea81fe7b61053b7
2016-03-29 20:17:13 +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
Minkyoung Kim a536f068dd evas/wayland_egl: Remove redundant function call.
Summary: ob is already declared. need not to call again.

Test Plan: Tizen3.0 Mobile

Reviewers: jpeg, wonsik

Subscribers: dkdk, cedric

Differential Revision: https://phab.enlightenment.org/D3837
2016-03-29 11:04:12 +09:00
Thomas Guillem 3f1686d01e emotion/libvlc: fix url opening 2016-03-28 16:40:02 +09:00
Thomas Guillem b12c2a2cfd emotion/libvlc: replace libvlc_mp_is_ready with ev->started 2016-03-28 16:40:02 +09:00
Thomas Guillem a6bd5dda42 emotion/libvlc: use vlc vout display module
The vlc vout display module adds key and mouse event support. It improves
performances since a video filter is not needed anymore to scale the image, and
direct rendering with vlc avcodec module is now possible (less memcpy).
2016-03-28 16:40:02 +09:00
Thomas Guillem 50d9f63c2e emotion/libvlc: log: print vlc module and id 2016-03-28 16:40:02 +09:00
Thomas Guillem 7d3e96757d emotion/libvlc: fix C89 2016-03-28 16:40:02 +09:00
Thomas Guillem f5296e8afc emotion/libvlc: set libvlc args from "EMOTION_LIBVLC_ARGS" env 2016-03-28 16:40:02 +09:00
Thomas Guillem 941ccc4324 emotion/libvlc: fix video/audio/spu mute 2016-03-28 16:40:02 +09:00
Thomas Guillem f04903119c emotion/libvlc: set libvlc_log static 2016-03-28 16:40:02 +09:00
Jean-Philippe Andre cb93c26db7 Evas proxy: Implement buffer map/unmap 2016-03-28 16:40:02 +09:00
Jean-Philippe Andre 22353e31e1 Efl.Canvas.Image: Remove object data for maps
The engine is responsible for the complete tracking of
maps.

Also, make buffer_unmap return bool.
2016-03-28 16:40:02 +09:00
Jean-Philippe Andre 488854af2b Efl.Gfx.Buffer: Switch to void* data and signed ints
1. unsigned char* as a return type was not even compatible
   with the default colorspace (ARGB: 32 bits).

2. Change all unsigned to int for... uh... simplicity
   unsigned is more correct than int for things like width,
   size or stride, but in fact having both ints (x,y) and unsigned
   ints makes the code more complex.
   This is a matter of personal taste.
2016-03-28 16:40:01 +09:00
Jean-Philippe Andre d5b0b1e683 Evas: Add SW engine map/unmap functions
Also, fix some of the code using them.
2016-03-28 16:40:01 +09:00
Jean-Philippe Andre 39a970835b Evas: Remove unimplemented border_set/get (engine internal) 2016-03-28 16:40:01 +09:00
Jean-Philippe Andre 28a03d6e19 Evas: Remove unimplemented image comment (internal)
This is a minor cleanup of RGBA_Image.
2016-03-28 16:40:01 +09:00
Jean-Philippe Andre 326ff9ae82 Efl.Canvas.Image: Implement support for map/unmap
Now the real hard work is to actually implement support inside
the engines: SW and GL generic.
2016-03-28 16:40:01 +09:00
Jean-Philippe Andre 91e0bdb1e7 Evas: Simplify direct access to image data
This should avoid issues with image_data_get from the engines,
when we really just want to fetch the original data pointer.
2016-03-28 16:40:01 +09:00
Tom Hacohen 5bcb9fe528 Merge Elementary into the EFL
Some things may still be broken, but Cedric will progressively fix
things as they pop. Default configuration works as expected.
2016-03-24 18:50:47 +00:00
Jihoon Kim 161883291c ecore_imf/wayland: fix IME flickering issue when input_panel_hide and show is called sequentially
Change-Id: Ieafa9cd921cc8d68c64af6b72404ef52e7bbf724
2016-03-24 20:46:15 +09:00
Jean-Philippe Andre 959e6de3e7 Evas 3d: Fix typo in previous commit
I didn't reject so I can push this now.
2016-03-24 11:12:30 +09:00
Oleksandr Shcherbina 35a64ecae7 evas.canvas3d: Remove repeated code in e3d_drawable_new function
Reviewers: cedric, Hermet, raster

Subscribers: jpeg

Differential Revision: https://phab.enlightenment.org/D3824
2016-03-24 11:07:54 +09:00
Cedric BAIL b1f28ef697 elementary: removing webkit2 module as it should now be built outside of tree.
A later new repository will show up with it.
2016-03-23 14:05:36 -07:00
Cedric BAIL c2a1c49ab2 elementary: move all legacy files to their expected new location. 2016-03-23 13:24:41 -07:00
Jean-Philippe Andre 2ba92c07e9 Evas: Add missing cspaces to data_get/put (sw engine)
Also, remove abort() in default case. Leftover abort()
can actually make applications crash.
2016-03-22 14:16:15 +09:00
Chris Michael 6a1a1305b5 evas-wayland-shm: Fix rotation for wayland shm engine
Prior to this fix, window rotation was not operating correctly and the
surface contents would get rendered at the wrong size and position.
This patch fixes the engine so that rotation operates properly now.

NB: Tested with the Window States(2) test in elementary

Thanks to shiin for reporting :)

@fix

Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
2016-03-21 09:29:32 -04:00
Jihoon Kim ce17d5d987 ecore_imf/wayland: use default preedit style
Change-Id: Iffb2d450923bbde191c4928253f133b13608a8e8
2016-03-21 19:51:31 +09:00
Nicolas Aguirre 290fc88e3f evas: add eglfs evas module.
EGL Fullscreen is a module intended to support many proprietary GL driver that come
with custom API to create framebuffer/window. This one is starting by covering Android
with libhybris/hwcomposer. Later on, it should be able to support easily the Raspberry Pi
driver.

At this moment this does not work properly. Activate it at your own risk ! Do not report
bug if you don't know what you are doing :-) A backend for Ecore_Evas will come later on
along with a patch for Ecore_FB to use libinput. Finally a few patch should hopefully
enable this backend to work and compile more easily (relying on proper header detection
and dlopen/dlsym for access to proprietary function).

You can read more about the goal of this patch by reading our wiki at :
https://phab.enlightenment.org/w/boot2efl/

Signed-off-by: Cedric Bail <cedric@osg.samsung.com>
2016-03-18 10:17:49 -07:00
Chris Michael 6418810307 evas-wayland-shm: Override image_native init and shutdown functions
A previous commit added these functions so we can test if native image
is supported, however that commit did not actually override this
functions (evas api override). This small patch simply does that.

ref 20b4d9dd6a

@fix

Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
2016-03-18 08:53:35 -04:00
Chris Michael 67db4d7c1a evas-wayland-egl: Override image_native init and shutdown functions
If we are going to define native_init & native_shutdown functions,
then we should probably be using them ;) Also, as this is a wayland
egl engine, we can return from native_init based on
eglQueryWaylandBufferWL

ref 20b4d9dd6a

@fix

Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
2016-03-18 08:50:54 -04:00
Minkyoung Kim bc2b32cba7 evas/gl_x11 : Move engine data to native.
Summary:
If 2 evases refer to same pixmap, use same EvasGL_Image.
But EvasGL_Image can have only one engine data.
When evas related to native is destroyed and another evas use that native, crash occur.
So native callbacks need to be independent to engine data.

Test Plan: mobile, local test

Reviewers: cedric, spacegrapher, wonsik, jpeg

Reviewed By: jpeg

Differential Revision: https://phab.enlightenment.org/D3800
2016-03-18 13:28:45 +09:00
Jean-Philippe Andre 8367f497b8 Evas.Image: Create Efl.Canvas.Image for file & data images
This replaces standard Evas_Object_Image when it is used "normally",
ie. it's an image from a file or from a pixel buffer. All other APIs
(proxy, snapshot, 3d, gl, ...) are disabled on this object.

Also, reduce number of failing calls when the object is not a legacy
object, but a legacy function is called. This is because a lot of
image APIs are called internally using the legacy APIs, often in
order to reset the state of the image object (eg. set file to NULL,
etc...)
2016-03-17 13:10:35 +09:00
Oleksandr Shcherbina 296e8c22b0 evas.canvas3d: support static LOD technic
Summary:
Main flow: add several meshes(with different number of polygons) in one node,
enable LOD for node, set boundary distances to choose need mesh depend on distance
to the camera node, render only need mesh. Add API's enable lod in
evas_canvas3d_node module and set boundary distance to module
evas_canvas3d_mesh module Refactored function evas_canvas3d_node_mesh_collect
to calculate distance. Refactored _scene_render to have possibility pass to the
render only need LOD mesh.

Reviewers: cedric, Hermet, raster

Subscribers: jpeg

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

Signed-off-by: Cedric Bail <cedric@osg.samsung.com>
2016-03-15 12:49:39 -07:00
Tom Hacohen 8706d03b43 Change the EFL according to the renaming of the eo_add() current object. 2016-03-15 15:25:54 +00: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
Thiep Ha 9c204eb369 ecore_evas_cocoa: correct focus handlers
Focus handlers are set incorrectly.
It causes windows process focus when they are acttually unfocused.
This patch corrects it.

Signed-off-by: Thiep Ha <thiepha@gmail.com>
2016-03-15 08:15:05 +09:00
Mike Blumenkrantz 437ba4c46d gl_common: call evas_gl_common_texture_free() before dropping image cache
texture_free() accesses struct members which can be freed if image cache entry
reaches zero references

@fix

==30989== Invalid read of size 1
==30989==    at 0x23BA2934: evas_gl_common_texture_free (evas_gl_texture.c:1506)
==30989==    by 0x23BA9117: evas_gl_common_image_free (evas_gl_image.c:724)
==30989==    by 0x23B80DA1: eng_image_data_put (evas_engine.c:988)
==30989==    by 0x872681A: _evas_image_data_set (evas_object_image.c:1264)
==30989==    by 0x87360B5: evas_obj_image_data_set (evas_image.eo.c:236)
==30989==    by 0x8736B43: evas_object_image_data_set (evas_image.eo.c:741)
==30989==    by 0x4820A4: e_comp_object_render (e_comp_object.c:3746)
==30989==    by 0x477B92: _e_comp_object_pixels_get (e_comp_object.c:909)
==30989==    by 0x872CF52: evas_process_dirty_pixels (evas_object_image.c:3154)
==30989==    by 0x872DD16: _evas_image_render (evas_object_image.c:3389)
==30989==    by 0x872DB01: evas_object_image_render (evas_object_image.c:3351)
==30989==    by 0x879C524: evas_render_mapped (evas_render.c:1802)
==30989==    by 0x879E82A: evas_render_updates_internal_loop (evas_render.c:2380)
==30989==    by 0x87A005D: evas_render_updates_internal (evas_render.c:2770)
==30989==    by 0x87A140D: evas_render_updates_internal_wait (evas_render.c:3122)
==30989==    by 0x87A1502: _evas_canvas_render_updates (evas_render.c:3144)
==30989==    by 0x871ED0D: evas_canvas_render_updates (evas_canvas.eo.c:354)
==30989==    by 0x8720C5F: evas_render_updates (evas_canvas.eo.c:1089)
==30989==    by 0x22F65C35: _ecore_evas_drm_render (ecore_evas_drm.c:1072)
==30989==    by 0x7416F7B: _ecore_evas_idle_enter (ecore_evas.c:172)
==30989==    by 0xDDE3577: _ecore_call_task_cb (ecore_private.h:282)
==30989==    by 0xDDE3A5E: _ecore_idle_enterer_call (ecore_idle_enterer.c:174)
==30989==    by 0xDDE836B: _ecore_main_loop_iterate_internal (ecore_main.c:2261)
==30989==    by 0xDDE67B8: ecore_main_loop_begin (ecore_main.c:1284)
==30989==    by 0x4407B6: main (e_main.c:1087)
==30989==  Address 0x23a9e1d2 is 338 bytes inside a block of size 552 free'd
==30989==    at 0x4C29E00: free (vg_replace_malloc.c:530)
==30989==    by 0x882B2E2: _evas_common_rgba_image_delete (evas_image_main.c:343)
==30989==    by 0x87B1E17: _evas_cache_image_entry_delete (evas_cache_image.c:205)
==30989==    by 0x87B3C52: evas_cache_image_drop (evas_cache_image.c:950)
==30989==    by 0x23BA90F5: evas_gl_common_image_free (evas_gl_image.c:722)
==30989==    by 0x23B80DA1: eng_image_data_put (evas_engine.c:988)
==30989==    by 0x872681A: _evas_image_data_set (evas_object_image.c:1264)
==30989==    by 0x87360B5: evas_obj_image_data_set (evas_image.eo.c:236)
==30989==    by 0x8736B43: evas_object_image_data_set (evas_image.eo.c:741)
==30989==    by 0x4820A4: e_comp_object_render (e_comp_object.c:3746)
==30989==    by 0x477B92: _e_comp_object_pixels_get (e_comp_object.c:909)
==30989==    by 0x872CF52: evas_process_dirty_pixels (evas_object_image.c:3154)
==30989==    by 0x872DD16: _evas_image_render (evas_object_image.c:3389)
==30989==    by 0x872DB01: evas_object_image_render (evas_object_image.c:3351)
==30989==    by 0x879C524: evas_render_mapped (evas_render.c:1802)
==30989==    by 0x879E82A: evas_render_updates_internal_loop (evas_render.c:2380)
==30989==    by 0x87A005D: evas_render_updates_internal (evas_render.c:2770)
==30989==    by 0x87A140D: evas_render_updates_internal_wait (evas_render.c:3122)
==30989==    by 0x87A1502: _evas_canvas_render_updates (evas_render.c:3144)
==30989==    by 0x871ED0D: evas_canvas_render_updates (evas_canvas.eo.c:354)
==30989==    by 0x8720C5F: evas_render_updates (evas_canvas.eo.c:1089)
==30989==    by 0x22F65C35: _ecore_evas_drm_render (ecore_evas_drm.c:1072)
==30989==    by 0x7416F7B: _ecore_evas_idle_enter (ecore_evas.c:172)
==30989==    by 0xDDE3577: _ecore_call_task_cb (ecore_private.h:282)
==30989==    by 0xDDE3A5E: _ecore_idle_enterer_call (ecore_idle_enterer.c:174)
==30989==    by 0xDDE836B: _ecore_main_loop_iterate_internal (ecore_main.c:2261)
==30989==    by 0xDDE67B8: ecore_main_loop_begin (ecore_main.c:1284)
==30989==    by 0x4407B6: main (e_main.c:1087)
==30989==  Block was alloc'd at
==30989==    at 0x4C2AA98: calloc (vg_replace_malloc.c:711)
==30989==    by 0x882B0A0: _evas_common_rgba_image_new (evas_image_main.c:295)
==30989==    by 0x87B1F1B: _evas_cache_image_entry_new (evas_cache_image.c:253)
==30989==    by 0x87B4170: evas_cache_image_data (evas_cache_image.c:1079)
==30989==    by 0x23BA7EDE: evas_gl_common_image_new_from_data (evas_gl_image.c:333)
==30989==    by 0x23B7F972: eng_image_new_from_data (evas_engine.c:531)
==30989==    by 0x23B80D81: eng_image_data_put (evas_engine.c:984)
==30989==    by 0x872681A: _evas_image_data_set (evas_object_image.c:1264)
==30989==    by 0x87360B5: evas_obj_image_data_set (evas_image.eo.c:236)
==30989==    by 0x8736B43: evas_object_image_data_set (evas_image.eo.c:741)
==30989==    by 0x4820A4: e_comp_object_render (e_comp_object.c:3746)
==30989==    by 0x477B92: _e_comp_object_pixels_get (e_comp_object.c:909)
==30989==    by 0x872CF52: evas_process_dirty_pixels (evas_object_image.c:3154)
==30989==    by 0x872DD16: _evas_image_render (evas_object_image.c:3389)
==30989==    by 0x872DB01: evas_object_image_render (evas_object_image.c:3351)
==30989==    by 0x879C524: evas_render_mapped (evas_render.c:1802)
==30989==    by 0x879E82A: evas_render_updates_internal_loop (evas_render.c:2380)
==30989==    by 0x87A005D: evas_render_updates_internal (evas_render.c:2770)
==30989==    by 0x87A140D: evas_render_updates_internal_wait (evas_render.c:3122)
==30989==    by 0x87A1502: _evas_canvas_render_updates (evas_render.c:3144)
==30989==    by 0x871ED0D: evas_canvas_render_updates (evas_canvas.eo.c:354)
==30989==    by 0x8720C5F: evas_render_updates (evas_canvas.eo.c:1089)
==30989==    by 0x22F65C35: _ecore_evas_drm_render (ecore_evas_drm.c:1072)
==30989==    by 0x7416F7B: _ecore_evas_idle_enter (ecore_evas.c:172)
==30989==    by 0xDDE3577: _ecore_call_task_cb (ecore_private.h:282)
==30989==    by 0xDDE3A5E: _ecore_idle_enterer_call (ecore_idle_enterer.c:174)
==30989==    by 0xDDE836B: _ecore_main_loop_iterate_internal (ecore_main.c:2261)
==30989==    by 0xDDE67B8: ecore_main_loop_begin (ecore_main.c:1284)
==30989==    by 0x4407B6: main (e_main.c:1087)
==30989==
==30989== Invalid write of size 1
==30989==    at 0x23BA293E: evas_gl_common_texture_free (evas_gl_texture.c:1506)
==30989==    by 0x23BA9117: evas_gl_common_image_free (evas_gl_image.c:724)
==30989==    by 0x23B80DA1: eng_image_data_put (evas_engine.c:988)
==30989==    by 0x872681A: _evas_image_data_set (evas_object_image.c:1264)
==30989==    by 0x87360B5: evas_obj_image_data_set (evas_image.eo.c:236)
==30989==    by 0x8736B43: evas_object_image_data_set (evas_image.eo.c:741)
==30989==    by 0x4820A4: e_comp_object_render (e_comp_object.c:3746)
==30989==    by 0x477B92: _e_comp_object_pixels_get (e_comp_object.c:909)
==30989==    by 0x872CF52: evas_process_dirty_pixels (evas_object_image.c:3154)
==30989==    by 0x872DD16: _evas_image_render (evas_object_image.c:3389)
==30989==    by 0x872DB01: evas_object_image_render (evas_object_image.c:3351)
==30989==    by 0x879C524: evas_render_mapped (evas_render.c:1802)
==30989==    by 0x879E82A: evas_render_updates_internal_loop (evas_render.c:2380)
==30989==    by 0x87A005D: evas_render_updates_internal (evas_render.c:2770)
==30989==    by 0x87A140D: evas_render_updates_internal_wait (evas_render.c:3122)
==30989==    by 0x87A1502: _evas_canvas_render_updates (evas_render.c:3144)
==30989==    by 0x871ED0D: evas_canvas_render_updates (evas_canvas.eo.c:354)
==30989==    by 0x8720C5F: evas_render_updates (evas_canvas.eo.c:1089)
==30989==    by 0x22F65C35: _ecore_evas_drm_render (ecore_evas_drm.c:1072)
==30989==    by 0x7416F7B: _ecore_evas_idle_enter (ecore_evas.c:172)
==30989==    by 0xDDE3577: _ecore_call_task_cb (ecore_private.h:282)
==30989==    by 0xDDE3A5E: _ecore_idle_enterer_call (ecore_idle_enterer.c:174)
==30989==    by 0xDDE836B: _ecore_main_loop_iterate_internal (ecore_main.c:2261)
==30989==    by 0xDDE67B8: ecore_main_loop_begin (ecore_main.c:1284)
==30989==    by 0x4407B6: main (e_main.c:1087)
==30989==  Address 0x23a9e1d2 is 338 bytes inside a block of size 552 free'd
==30989==    at 0x4C29E00: free (vg_replace_malloc.c:530)
==30989==    by 0x882B2E2: _evas_common_rgba_image_delete (evas_image_main.c:343)
==30989==    by 0x87B1E17: _evas_cache_image_entry_delete (evas_cache_image.c:205)
==30989==    by 0x87B3C52: evas_cache_image_drop (evas_cache_image.c:950)
==30989==    by 0x23BA90F5: evas_gl_common_image_free (evas_gl_image.c:722)
==30989==    by 0x23B80DA1: eng_image_data_put (evas_engine.c:988)
==30989==    by 0x872681A: _evas_image_data_set (evas_object_image.c:1264)
==30989==    by 0x87360B5: evas_obj_image_data_set (evas_image.eo.c:236)
==30989==    by 0x8736B43: evas_object_image_data_set (evas_image.eo.c:741)
==30989==    by 0x4820A4: e_comp_object_render (e_comp_object.c:3746)
==30989==    by 0x477B92: _e_comp_object_pixels_get (e_comp_object.c:909)
==30989==    by 0x872CF52: evas_process_dirty_pixels (evas_object_image.c:3154)
==30989==    by 0x872DD16: _evas_image_render (evas_object_image.c:3389)
==30989==    by 0x872DB01: evas_object_image_render (evas_object_image.c:3351)
==30989==    by 0x879C524: evas_render_mapped (evas_render.c:1802)
==30989==    by 0x879E82A: evas_render_updates_internal_loop (evas_render.c:2380)
==30989==    by 0x87A005D: evas_render_updates_internal (evas_render.c:2770)
==30989==    by 0x87A140D: evas_render_updates_internal_wait (evas_render.c:3122)
==30989==    by 0x87A1502: _evas_canvas_render_updates (evas_render.c:3144)
==30989==    by 0x871ED0D: evas_canvas_render_updates (evas_canvas.eo.c:354)
==30989==    by 0x8720C5F: evas_render_updates (evas_canvas.eo.c:1089)
==30989==    by 0x22F65C35: _ecore_evas_drm_render (ecore_evas_drm.c:1072)
==30989==    by 0x7416F7B: _ecore_evas_idle_enter (ecore_evas.c:172)
==30989==    by 0xDDE3577: _ecore_call_task_cb (ecore_private.h:282)
==30989==    by 0xDDE3A5E: _ecore_idle_enterer_call (ecore_idle_enterer.c:174)
==30989==    by 0xDDE836B: _ecore_main_loop_iterate_internal (ecore_main.c:2261)
==30989==    by 0xDDE67B8: ecore_main_loop_begin (ecore_main.c:1284)
==30989==    by 0x4407B6: main (e_main.c:1087)
==30989==  Block was alloc'd at
==30989==    at 0x4C2AA98: calloc (vg_replace_malloc.c:711)
==30989==    by 0x882B0A0: _evas_common_rgba_image_new (evas_image_main.c:295)
==30989==    by 0x87B1F1B: _evas_cache_image_entry_new (evas_cache_image.c:253)
==30989==    by 0x87B4170: evas_cache_image_data (evas_cache_image.c:1079)
==30989==    by 0x23BA7EDE: evas_gl_common_image_new_from_data (evas_gl_image.c:333)
==30989==    by 0x23B7F972: eng_image_new_from_data (evas_engine.c:531)
==30989==    by 0x23B80D81: eng_image_data_put (evas_engine.c:984)
==30989==    by 0x872681A: _evas_image_data_set (evas_object_image.c:1264)
==30989==    by 0x87360B5: evas_obj_image_data_set (evas_image.eo.c:236)
==30989==    by 0x8736B43: evas_object_image_data_set (evas_image.eo.c:741)
==30989==    by 0x4820A4: e_comp_object_render (e_comp_object.c:3746)
==30989==    by 0x477B92: _e_comp_object_pixels_get (e_comp_object.c:909)
==30989==    by 0x872CF52: evas_process_dirty_pixels (evas_object_image.c:3154)
==30989==    by 0x872DD16: _evas_image_render (evas_object_image.c:3389)
==30989==    by 0x872DB01: evas_object_image_render (evas_object_image.c:3351)
==30989==    by 0x879C524: evas_render_mapped (evas_render.c:1802)
==30989==    by 0x879E82A: evas_render_updates_internal_loop (evas_render.c:2380)
==30989==    by 0x87A005D: evas_render_updates_internal (evas_render.c:2770)
==30989==    by 0x87A140D: evas_render_updates_internal_wait (evas_render.c:3122)
==30989==    by 0x87A1502: _evas_canvas_render_updates (evas_render.c:3144)
==30989==    by 0x871ED0D: evas_canvas_render_updates (evas_canvas.eo.c:354)
==30989==    by 0x8720C5F: evas_render_updates (evas_canvas.eo.c:1089)
==30989==    by 0x22F65C35: _ecore_evas_drm_render (ecore_evas_drm.c:1072)
==30989==    by 0x7416F7B: _ecore_evas_idle_enter (ecore_evas.c:172)
==30989==    by 0xDDE3577: _ecore_call_task_cb (ecore_private.h:282)
==30989==    by 0xDDE3A5E: _ecore_idle_enterer_call (ecore_idle_enterer.c:174)
==30989==    by 0xDDE836B: _ecore_main_loop_iterate_internal (ecore_main.c:2261)
==30989==    by 0xDDE67B8: ecore_main_loop_begin (ecore_main.c:1284)
==30989==    by 0x4407B6: main (e_main.c:1087)
2016-03-11 16:08:43 -05:00
Mike Blumenkrantz 1bf0bbfae9 gl_common: remove incorrect EINA_UNUSED for evas_gl_common_texture_free 2016-03-11 16:08:43 -05:00
Tom Hacohen f24210caac Revert "Automatic migration to the new eo_add syntax."
This reverts commit 4f949a2757.
2016-03-11 12:29:03 +00:00
Chris Michael bb24aab001 evas-gl: Fix dereference after null check
Coverity reports that 'ctx' may be NULL here and we should check it
before usage (as is done above).

Coverity CID1339785

@fix

Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
2016-03-10 12:20:34 -05:00
Tom Hacohen 4f949a2757 Automatic migration to the new eo_add syntax. 2016-03-09 16:09:14 +00:00
Tom Hacohen b60db90ddc Fix more wrong migration to Eo4.
The if wasn't using {} so one of the statements was out of the scope
of the condition.
There was some misindented code.
2016-03-03 12:58:26 +00:00
Tom Hacohen 23a6b12183 Fix migration script mistakes and compilation warnings.
Mostly unused vars following the removal of eo_do_ret().
However, there are some cases where the migration script got some things
wrong, and I had to manually fix them.
2016-03-03 09:58:08 +00:00
Tom Hacohen f21ade6123 Automatic migration to Eo4.
I just ran my script (email to follow) to migrate all of the EFL
automatically. This commit is *only* the automatic conversion, so it can
be easily reverted and re-run.
2016-03-03 09:58:08 +00:00
Jean Guyomarc'h deb553d55e ecore_cocoa: remove Ecore_Cocoa_Event_Window
Create specific structures for each event:
- Ecore_Cocoa_Event_Window_Focused
- Ecore_Cocoa_Event_Window_Unfocused
- Ecore_Cocoa_Event_Window_Destroy

They are currently hold the same data, but this will allow not to break
the event protocol when future extensions will be needed.

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2016-03-02 13:56:28 -08:00
Jean Guyomarc'h 3b61c2e07c ecore_cocoa: better naming of events
Lost and got focused have been renamed FOCUSED and UNFOCUSED to mirror
the focus API in Elementary.

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2016-03-02 13:56:20 -08:00
Jean Guyomarc'h 84bbe500c5 ecore_cocoa: replace Ecore_Cocoa_Window_Id by Ecore_Cocoa_Object
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2016-03-02 13:56:16 -08:00
Tom Hacohen e71e6561ee Eo callbacks: Migrate all of the EFL to the new event cb signatures. 2016-02-29 11:33:27 +00:00
Carsten Haitzler 59d32121d6 ecore evas: remove printfs
forgot i still had them (wa stestign wayland with no printfs in it)
2016-02-20 23:12:17 +09:00
Carsten Haitzler ab31424ea6 ecore evas: fix configure request queue count to only count changes
we counted more requests outstanding than actually existed for x11 as
we sometimes sized to the SAME size or position. this keeps that
number more correct only incremeting outstanding count if we change.

@fix
2016-02-20 23:09:03 +09:00
Derek Foreman d53e1d6748 ecore_evas_drm: enable pointer warping
Use ecore_drm_device_pointer_warp() to warp the pointer
2016-02-18 15:50:16 -05:00
Derek Foreman 4e953ecc4d gl-drm: Some misc clean-ups
Remove unused stuff from structs, cut out the EVAS_GL_DRM_BUFFERS env
var - it can't work anyway, gbm decides how many buffers it wants.
2016-02-18 15:50:16 -05:00
Derek Foreman 6e1c7065d7 gl-drm: revise page flip logic
We can't really drive this buffer unlocking from the page flip handler for
a lot of ugly reasons.  This will be better in the future when evas
supports multiple target buffers.  For now let's cut this down and keep
2 buffers locked at all times.

This gets drm-gl to work without massive tearing artifacts.

@fix
2016-02-18 15:50:15 -05:00
Derek Foreman f10b3f79a2 gl_drm: stop trying to figure out buffer age if gl extension isn't present
If we don't have the right extension for age we probably don't have
partial updates either.  The code to get the age calculations right is
actually much nastier than this anyway since gbm can hand back buffers
in arbitrary order, and as many as it feels like.
2016-02-18 15:50:15 -05:00
Derek Foreman 4bdc9d4d07 gl_drm: remove frame_count
It was a write only variable, kill it.
2016-02-18 15:50:15 -05:00
Derek Foreman 5d7271683b ecore_drm: Change page flipping logic so we can't tear
Summary:
Previously if we ever tried to queue up two page flips in less than a
retrace interval (which can easily happen since the evas clock isn't
based on vblank) we'd give up on ever using page flips again, and tear
on every screen update.

This fixes that by using a vblank callback for custom ticks and using
page flips whenever possible.

If a page flip fails it means a page flip raced with the vblank ticker,
so we need to queue up that frame when the current page flip completes.
This ensures that while we might drop interim frames, we will never
lose the most recent.

Now it should only be possible to tear if two ticks fire during the
wait for a page flip to complete.  This would result in rendering
taking place in the front buffer.  I don't think this can happen,
but an error is logged if it does.

Reviewers: zmike, devilhorns

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D3594
2016-02-18 15:50:15 -05:00
Jihoon Kim f6e019565f evas/gl_x11: fix build warning related to the uninitialized value 2016-02-17 17:49:40 +09:00
se.osadchy 780ec5d029 evas: Update evas_3d_utils, replace Evas_Vec.
Summary: Change Evas_Vec2(3) to Eina_Vector2(3).

Reviewers: cedric, Hermet, jpeg

Subscribers: jpeg

Differential Revision: https://phab.enlightenment.org/D3686
2016-02-17 16:12:35 +09:00
Jihoon Kim 662389f39b ecore_imf/wayland: send cursor position before requesting to show 2016-02-12 10:18:05 +09:00
Jihoon Kim af8bf0ddbc ecore_imf/wayland: Fix not to show IME in touching entry after hiding IME 2016-02-12 09:36:41 +09:00
Florent Revest 1d99c5b907 evas: include Eet.h where it's needed.
This patch is applied by OpenEmbedded project to let evas build
correctly in crosscompilation environnement.
cf: https://github.com/openembedded/meta-oe/blob/master/meta-efl/recipes-efl/efl/efl/0002-evas_3d-Add-Eet.h-includes.patch

@fix

Signed-off-by: Nicolas Aguirre <aguirre.nicolas@gmail.com>
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2016-02-10 10:46:45 -08:00
Chris Michael fecdb54674 evas-wayland-shm: Fix compiler warning about incompatible pointer type
This patch fixes some compiler warnings about assignment from
incompatible pointer type when getting image data from evas_cache. The
simple fix is to cast the return value to RGBA_Image.

Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
2016-02-05 08:41:35 -05:00
Wonsik Jung 02d724e716 evas: add native surface with TBM Surface for wayland_shm engine
Summary: @feature  add evas object image's native surface with TBM surface for wayland_shm

Test Plan: Making tbm test sample and testing on Tizen Device/Emulator

Reviewers: raster, cedric, spacegrapher, jpeg

Reviewed By: spacegrapher

Subscribers: mer.kim, JoogabYun, scholb.kim, dkdk

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2016-02-05 07:50:25 +01:00
Youngbok Shin 33ea565347 Evas: Use proper language for harfbuzz shaping
Summary:
Evas Text, Textblock, Textgrid keeps own language information.
This language information could be vary from the result of setlocale().
Especially, Evas Textblock supports <lang> tag. The language could be
changed in the middle of text. All of these language has to be used
for harfbuzz shaping.
@fix

Test Plan: N/A

Reviewers: herdsman, raster, woohyun, tasn

Reviewed By: tasn

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D3628
2016-02-04 10:07:08 +00:00
Haifeng Deng 4b777ec184 ecore_imf/wayland: Fix IME hide -> show issue in case of focus-out and then focus-in
Change-Id: I1d3d7023dbd10b78f510380ff3c46087228f9180
2016-02-04 14:28:29 +09:00
Jihoon Kim a57d301f2a ecore_imf/wayland: do not check input panel enable in show or hide
Input panel enable is already being checked in ecore_imf API.
2016-02-04 13:59:09 +09:00
Jihoon Kim 584a5a32a2 ecore_imf/wayland: support to set prediction allow mode 2016-02-04 12:00:45 +09:00
Jihoon Kim b1336a27c1 ecore_imf/wayland: notify language changed 2016-02-04 11:58:03 +09:00
Jihoon Kim 7564d49a83 ecore_imf/wayland: Add support to get input panel language locale 2016-02-04 11:56:13 +09:00
Jihoon Kim 478433f0cf ecore_imf/ibus: fix indentation 2016-02-04 08:44:49 +09:00
Jean-Philippe Andre 2405c93f2c Evas engines: Add missing initializers in Ecore_Evas_Engine_Func 2016-02-03 14:51:57 +09:00
Cedric BAIL bb1a1eef65 ecore_evas: introduce support for per window animator trigger.
This code is currently only using the older fallback code and not any
new event source, so all animator on all window are still triggered
whatever the case are.
2016-02-02 10:47:25 -08:00
Jihoon Kim 5b30f95e62 ecore_imf/scim: fix uninitiazed value issue detected by valgrind 2016-01-27 18:31:26 +09:00
Jean-Philippe Andre 4d4e6fd4b1 ecore_evas_extn: Add safety checks, fixing a crash in elm_test
See T2835 (my crash was different from the one reported).

The buffer may be initialized after the first render_pre, due to
whatever timing issue. Check in elm_test "Window Socket" and then
open several "Window Plug".

@fix
2016-01-25 16:02:49 +09:00
Davide Andreoli cca830832a Ethumb: make the emotion plugin correctly use the edje frame if requested.
The emotion plugin was lacking the ability to use the edje frame as expected,
this patch add this ability, so now video thumbnail works like the normal ones.

This commit is a bit of a new feature, but I consider this a @fix as now
the ethumb_frame_set() API works as expected, also the implementation
is so simple that I think it can go in without any problems.
2016-01-24 23:00:31 +01:00
Chris Michael 479bf37aec ecore-evas-drm: Cleanup drm outputs during shutdown
As we no longer cleanup outputs inside the ecore_drm_device_free
function (see previous commit), we should be cleaning up outputs here
as they are created during the _ecore_evas_drm_init function.

@fix

Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
2016-01-21 09:24:06 -05:00
Jean-Philippe Andre 9d76a44b78 Eo: Replace deprecated EO_EV_ by EO_BASE_EVENT_ 2016-01-21 13:10:05 +09:00
Jean-Philippe Andre 4caad3f4ea Evas GL: Actually save the checksum inside the file
This would be cleaner than adding it as a suffix to the filename.
Use simple write and read_direct for simplicity.

This is an improvement on 3dcd903a53 and should make sure
everyone is actually using the latest version of the shaders even
if they track master or the alpha/beta releases.
2016-01-21 11:11:24 +09:00
Jean-Philippe Andre 3dcd903a53 Evas: Avoid saving the shaders cache at every shutdown
Check the right flag.
2016-01-20 20:33:55 +09:00
Jean-Philippe Andre ebc3b88d09 Evas: Discard shaders cache when the code changed
Since we now have only two shader strings, this is trivial to do:
hash the strings and add them to the cache filename.

This will allow people using 1.17.0-alpha, etc... to discard their
old shaders cache automagically and use the latest version of the
shaders (because alpha is not in the filename).

If we end up adding more runtime generated shaders, we might need
a better strategy, but this should be good enough for now.
2016-01-20 20:24:20 +09:00
Jean-Philippe Andre bee4e5f476 Evas: Actually fix this 'afill' thing
This mostly reverts 448720fed4

After my previous patch, semi-transparent windows would render incorrectly
in E. The AFILL flag should make sure the source texture is "opaque" (ie.
if it's not marked as having an alpha channel), and masking or color
multiply should then be applied later on.

Sorry for the mess...
2016-01-20 17:37:51 +09:00
Jean-Philippe Andre 448720fed4 Evas: Fix shader flag 'afill' (forcing alpha to 255)
Apparently the shaders refactor broke the afill select logic, and it
no longer applied to objects where it should have (eg. opaque windows
in E).
2016-01-20 16:07:29 +09:00
Jean-Philippe Andre a2ef5f7cc5 Evas GL: Also fix surface cap cache
This follows the fix in eina_file_mkstemp. Not sure how it could
even work before.

@fix
2016-01-19 18:18:29 +09:00
Jean-Philippe Andre c8baf41149 Evas GL: Fix shader binaries cache
It was completetly broken due to a misuse of mkstemp.
2016-01-19 18:18:29 +09:00
Vincent Torri 3117b8ca5a win32: Fix compilation due to recent changes in Evil
Summary:
dlfcn.h is not available anymore on Windows, Evil provides all the
necessary declarations.

Reviewers: cedric, jpeg

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

@fix
2016-01-18 13:54:52 +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
Dongyeon Kim d7c2acfa7a Evas GL: Reset current surface for all contexts to null when surface is destroyed
When evas gl surface is destroyed, not only the current surface for the current context
should be set to NULL, but current surface for all contexts should be reset.
2016-01-13 09:05:56 +09:00
Chris Michael 99ac0763ab ecore-evas: Rename ecore_evas_wayland_window_get2 function
This renames the ecore_evas_wayland_window_get2 function to be
ecore_evas_wayland2_window_get before the 1.17 roll out.

Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
2016-01-07 15:02:13 -05:00
Daniel Kolesa 03bce14908 eina mp: also include malloc_np.h on FreeBSD 2016-01-07 15:43:26 +00:00
Daniel Kolesa dadc350507 eina mp: only include malloc.h on linux
Elsewhere, everything is in stdlib.h.

@fix
2016-01-07 15:31:59 +00:00
Jean Guyomarc'h b9cd3ac82d evas_gl_cocoa: update function parameters
Commit fd4e133cc1 changed the internal
API, but it was not reflected in evas_gl_cocoa.

This commit fix a compiling warning and possible undetermined behaviour.

@fix
2016-01-07 12:03:04 +01: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
Chris Michael a957f5a57f evas-wayland-egl: Remove unused variables and unused function
Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
2016-01-06 12:11:53 -05:00
Jean-Philippe Andre 8884ce59b3 Evas: Fix compilation for GLX
Sorry, I forgot to check that :)
2016-01-05 18:46:21 +09:00
Jean-Philippe Andre a706397381 waylang-egl: Remove trailing spaces 2016-01-05 17:08:22 +09:00
Jean-Philippe Andre 3593186a60 wayland: Add support for TBM buffers
This is a follow up on the previous commits.
The original patch on Phab was split in 3 parts (factorization,
fix & this one).

Adds support to both SHM and EGL.

See D3501.
2016-01-05 17:08:22 +09:00
Jean-Philippe Andre d7903e40b3 evas tbm: Fix compilation warnings
Previous patch used a wrong type... harmless but warned.
2016-01-05 17:08:21 +09: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
Jean-Philippe Andre c1b4728487 Evas filters: Final fix after the ector refactor
This implements a generic way of scaling buffers, using fake
RGBA_Image wrapping ector buffer maps. The underlying algo is
still the good old linear sw scaler.

Now the filters *should* be back to their previous level of
usability. Performance will probably be even worse than it was
before, for GL, as more glReadPixels may be involved. Optimization
now consists in actually implementing the filters with GL shaders.
2016-01-05 16:02:27 +09:00
Jean-Philippe Andre 13f66f8887 Evas filters: Complete basic repairs for GL engine
Now the filters should work with the GL engine, again, but with
a potentially crazy performance. Indeed, the input buffer is now
backed by an FBO, that needs to be glReadPixel'ed everytime it is
accessed by the filters (mapped).
2016-01-05 15:43:44 +09:00
Jean-Philippe Andre 0d5b42e6bb Evas filters: Move evas image creation to the engine
Evas filters is now more and more unaware of evas images (RGBA_Image)
and the engine + ector take care of everything.

Still left to do:
- map / unmap an FBO buffer into RO or RW memory
2016-01-05 15:43:44 +09:00
Jean-Philippe Andre 6696112691 Evas filters: Add GL buffer backed by RGBA_Image
Dumb implementation of a "smart" buffer capable of wrapping an
RGBA_Image but that can still be rendered on screen (ie, an
Evas_GL_Image is attached to it).
2016-01-05 15:43:44 +09:00
Jean-Philippe Andre 9e0670a705 Evas filters & Ector GL: Prepare ground work for GL buffers
This fixes crashes, adds safety, and notes a couple of things that
are not yet implemented:
- Make an Evas_GL_Image from an RGBA_Image so we can draw it on the
  canvas. This means Evas.Ector.GL.RGBA_Image.Buffer
- Readable Evas_GL_Image objects with gl_read_pixels
  --> Implement proper map() & unmap() for GL buffers
2016-01-05 15:43:44 +09:00
Jean-Philippe Andre dc4790e08b Ector GL: Add skeletton for Evas.Ector.GL.Image.Buffer
This is an ector buffer backed by an existing Evas_GL_Image
2016-01-05 15:43:44 +09:00
Jean-Philippe Andre 57902fffd3 Evas filters: Use Ector.Buffer instead of RGBA_Image
This is a major refactoring of the evas filters submodule.

Use Ector.Buffer and the map/unmap methods instead of directly
accessing image buffers with RGBA_Image. RGBA_Image is still
used under the hood, for two reasons:
 - Required for the final output (blend onto Evas itself)
 - Required for the scaling routines

FIXME:
 - Breaks proxy support (ie. all kind of texturing).
 - This breaks filters support for the GL engine.
2016-01-05 15:43:44 +09:00
Cedric BAIL c461c10ff8 evas: add a way to tests Ector_GL.
This is completely not supported/working/useful yet. Please do not
complain about it ruinning your life.
2016-01-05 15:43:44 +09:00
Cedric BAIL 116fe3c65c ector: initial implementation of our own Ector GL backend. 2016-01-05 15:43:44 +09:00
Jean-Philippe Andre 7a8879ba8b ector: add engine-specific evas image buffer wrapper
Since Evas still relies entirely on Image_Entry and Evas_GL_Image,
we will need an engine-specific wrapper object creating a Buffer
around an existing cached image.

Currently only SW support is implemented. GL will be more fun to
do (with glReadPixels and whatnot).
2016-01-05 15:43:43 +09:00
Cedric BAIL 34a892dbab evas: provide ector with a way to get GL symbol. 2016-01-05 15:43:43 +09:00
Jean-Philippe Andre e7ae084270 Evas: Replace abort() by ERR 2016-01-05 14:54:04 +09:00
Vincent Torri 47ed848a87 Evil: integrate the dlfcn code into Evil
This will remove some incompatibilities with other packages,
especially for win-builds
2015-12-29 22:13:58 +09:00
Jean-Philippe Andre 2ac9e788c6 Evas: Implement ARGY88 and GRY8 conversion to ARGB8888
This is adding support for a deprecated function, but apparently
it is used.

Also, remove crazy abort() inside the data_put function.

Fixes T2991
2015-12-29 22:05:50 +09:00
Jean-Philippe Andre 3059859e28 Ecore Eldbus: Work around circular dependencies
eldbus initializes ecore that may then init eldbus again,
since one of the systemd modules is for eldbus.
eldbus_shutdown() is then no longer functional, as there are
two refs on eldbus.

This patch solves this problem by removing the extra ref on
eldbus from the module if it was already initialized.

This patch now introduces really bad issues since there are now
EO classes that fail to work after module load-unload-reload.
2015-12-29 17:06:53 +09:00
Jean-Philippe Andre b13502f20a Evas 3d: Fix some potential crashes
Those were happening before the previous patches.
2015-12-29 16:18:36 +09:00
Jean-Philippe Andre 92f17399a7 Evas 3d: Improve error messages in model load & save
See make check's evas_suite ouput
2015-12-29 16:08:05 +09:00
Jean-Philippe Andre f64e195844 Evas: Fix potential crash with extraneous eet_shutdown
Shutdown eet only if it was actually initialized.

This fixes make check (for me) after applying the previous patch.
It seems on my machine, the gl cache files are not saved properly
from within the make check environment.
2015-12-29 14:43:48 +09:00
perepelits.m e6bba4d91c [Evas] Refactor model's savers and loaders.
Summary:
Move common part to a separated document.
Make code more readable using smaller functions. (from Task T2713)

Everything is OK with make check.

Reviewers: cedric, raster, Hermet, stefan_schmidt

Reviewed By: stefan_schmidt

Subscribers: jpeg, artem.popov

Differential Revision: https://phab.enlightenment.org/D3430
2015-12-29 13:28:56 +09:00
Derek Foreman ddae80af1d wayland: use wl_surface.damage_buffer if available
Summary:
wl_surface.damage_buffer() takes surface damage in buffer co-ordinates.

Right now since we don't use wayland's scaling, transforms, or viewports
it's exactly the same as wl_surface.damage().  In the future if we start
using those features it's much easier to do so with damage_buffer().

Reviewers: zmike, devilhorns

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D3457
2015-12-28 09:09:04 -05:00
se.osadchy 861165c49d evas: Fix wrong display texture on object.
Summary:
Fix siquence in multiply of matrices. Need multiply position on scale,
otherwise we have wrong texture.

Reviewers: cedric, Hermet, raster

Subscribers: jpeg

Differential Revision: https://phab.enlightenment.org/D3477
2015-12-24 13:18:38 +09:00
Carsten Haitzler 9626acdb4d emotion - fix gst back-end to report title and other meta changes
gst1 back-end didnt report changes in title or other metadata to the
frontend and thusapps never knew it was changing. this fixes that.

@fix
2015-12-21 14:40:41 +09:00
Minkyoung Kim 25ebd91555 evas/gl : Do not re-preload image data if texture is successfully uploaded with image data.
Summary:
'cached' flag is not enough to check whethere data is loaded and texture is uploaded.
so check more options for prevent re-preload image data on gl-backend.

Test Plan: Local Test (elementary_test : elm images)

Reviewers: jpeg, eunue

Reviewed By: jpeg

Subscribers: cedric, jiin.moon, wonsik, spacegrapher

Differential Revision: https://phab.enlightenment.org/D3446
2015-12-18 16:49:17 +09:00
Jean-Philippe Andre 4a538ec246 Evas GL: Fix shaders for bigendian
Fixes T2918
2015-12-16 15:55:10 +09:00
Mike Blumenkrantz 54df1d9c6a ecore-evas wayland: move frame sending to pre-flush callback
it was possible to deadlock rendering if a pre-render occurred but
the resulting render had no updated regions

@fix
2015-12-15 17:24:52 -05:00
Jean-Philippe Andre 4943fe3a0d Evas GL: Fix clang warnings
Use pragma diagnostic like with GCC since we want to set the function
pointer even though we deprecate the function.
2015-12-15 14:35:38 +09:00