Commit Graph

2740 Commits

Author SHA1 Message Date
Carsten Haitzler 2c736adc87 ecore_evas x - dont set withdrawn to fals on show but wait for wm state
so we handled override cases and set withdrawn to false on show, but
when normally managed it might be nicer to wait for a state change via
the wm state property to know we are "normal"

this should fix T4699
2016-10-06 08:40:27 +09:00
Chris Michael 7b049ab7ac evas-software-x11: Remove unused variable and mark unused parameters
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2016-10-04 09:41:53 -04:00
Guilherme Iscaro 50f5704cc6 Evas_Device: Fix API name.
Summary:
It should be evas_device_add_full() in order to follow the EFL
name pattern.

Reviewers: DaveMDS, bdilly

Reviewed By: DaveMDS, bdilly

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D4325
2016-09-29 17:51:15 -03:00
Subhransu Mohanty d54b5fba6c ector: make the ector objects as shared object after eo changes.
As ector objects are acessed by draw thread we need to create it as
 shared object in order to access it from other thread.
 Note: there is some performance lag...

Summary: make ector object as shared eo object to acess from other thread.

Reviewers: cedric, jpeg, raster

Reviewed By: jpeg, raster

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D4319
2016-09-28 16:02:12 +09:00
Youngbok Shin ceb0eab402 ecore_evas_wayland: Add NULL checking for surface
Summary: Need to NULL check before using surface like other cases.

Test Plan: N/A

Reviewers: jpeg, raster, ManMower, devilhorns

Reviewed By: devilhorns

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D4301
2016-09-27 08:50:05 -04:00
Carsten Haitzler c88c74de1b evas sw x11 - disable the loop begin/end that deadlocks evas
this is quick to get evas working again. this disables part of
7e2d700d06 that creates deadlocks. this
thread waits on mainloop. mainloop waits on this render thread. BOOM.
deadlock.
2016-09-27 16:14:31 +09:00
Guilherme Iscaro 491fda4796 Ecore_Evas_X: Dispatch Ecore_Events for VNC clients.
This patch adds the support for Ecore events from a remove
VNC client. Every time it happens a VNC mouse move/click/wheel or a
VNC keyboard event an Ecore event event will be created and dispatched.
2016-09-26 22:06:59 -03:00
Guilherme Iscaro bc6e8d2692 Ecore_Evas_X: Add VNC draw support.
This patch adds the support to draw the X11 screen contents to
all remove VNC clients.
2016-09-26 22:06:59 -03:00
Guilherme Iscaro 7e2d700d06 Evas Software X11: Add a callback that informs the current screen content pixels.
This is necessary in order to implement a VNC server. Using this
callback the VNC server will be able to draw the current screen to the
VNC clients.
2016-09-26 22:06:59 -03:00
Jean-Philippe Andre d7b9db44f0 evas_fb: Avoid invalid dereference
If buf->priv.fb.fb was NULL the function would have crashed. So
buf->priv.fb.fb can't be NULL. I'm keeping the if(buf->priv.fb.fb)
anyway, but not sure the else case is valid.

Thanks @jiin.moon for the report.
2016-09-23 17:32:38 +09:00
Stefan Schmidt 903dbde84a modules: emotion: fix event name after EFL Canvas Video convert
In commit 7b90e11474 the event name changed but
this module was not updated. Luckily we are building it on Jenkins or it would
have gone unnoticed for a long time.
2016-09-22 11:44:59 +02:00
Yeshwanth Reddivari 7b90e11474 emotion: convert Emotion_Object into Efl.Canvas.Video
Reviewers: singh.amitesh, raster, jpeg, cedric

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2016-09-21 11:04:34 -07:00
Stefan Schmidt 9079d2b575 evas: model_save: remove unused label after error handling change
In commit 8272d14927 the error handling was
moved upwards and the need for the goto label removed. Catching up here and
removing the label as well.
2016-09-21 10:45:12 +02:00
Hermet Park c998fd5ee7 evas software_engine: ++safety code. 2016-09-21 16:24:42 +09:00
Hermet Park ff7511ae12 evas engine: correct null check
check null first, before access it.
2016-09-21 13:16:36 +09:00
Hermet Park 545161d954 Revert "evas engine: return as soon as possible if the surface or context is not valid."
This reverts commit 2f158ebe65.

misunderstood ^ operator.
pinged by jpeg.

previous code was correct.
2016-09-21 13:06:18 +09:00
Hermet Park 2f158ebe65 evas engine: return as soon as possible if the surface or context is not valid.
And later, the surface and context are accessed.
So both of arguments should be valid necessarily.
2016-09-21 12:24:49 +09:00
jiin.moon 8272d14927 eet: fix memory leak
Summary:
If ef is null, have to return before _set_material_to_eet_file_from_mesh api.
New momory will be allocated in the api.

Subscribers: cedric, jpeg

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2016-09-20 15:01:48 -07:00
Derek Foreman a4fa556925 evas-drm: update drm engine recovery from all buffers used
Use the relatively new buffer release API to free up buffers instead
of immediately going nuclear and blowing away all buffer ages.
2016-09-16 16:12:22 -05:00
Oleksandr Shcherbina ce1f1c9ebe evas: Fix possible crash in evas_model_save_eet.c
Summary: @fix

Reviewers: cedric, raster, Hermet

Reviewed By: Hermet

Subscribers: artem.popov, jpeg

Differential Revision: https://phab.enlightenment.org/D4293
2016-09-13 15:17:53 +09:00
Chris Michael 45ce4c8008 ecore-drm2: Rename output_fb_release to just fb_release
As this function releases FBOs on a given output, lets just shorten
the API function name so it can stay grouped into the ecore_drm2_fb.c
file ... leaving it as ecore_drm2_output_fb_release reads like it
should have gone into the ecore_drm2_output.c file...

NB: No real function changes here, just an API rename.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2016-09-09 15:10:47 -04:00
Derek Foreman 95bb942aa7 gl_drm_ee: Remove repulsive hack and do proper gbm buffer accounting
We no longer need this hack as we now have a way to properly handle the
buffer locking in the engine, and don't currently deal with multi-head.
2016-09-09 13:39:05 -05:00
Derek Foreman 0722eae960 ecore_drm2: Store gbm_bo for Fbs and add a getter function for it
This will aid with proper locking in gl_drm later
2016-09-09 13:39:05 -05:00
Carsten Haitzler b07cc74107 evas drm engine - fix build if gl not enabled for drm engine build
this fixes the build after a derek b0rk :)
2016-09-09 19:21:53 +09:00
Derek Foreman 088c9675ef ee_gl_drm: Stop calling fb_dirty
So yeah, fb_dirty is for marking dirty regions when rendering
directly into the front buffer attached for scanout on a manually
updated display.  Absolutely none of those things apply here, so
let's stop doing it.
2016-09-08 13:55:25 -05:00
Derek Foreman ace55231a3 ee_drm: simplify flipping
We no longer have to track draw and display buffers - the display buffer
is completely handled by ecore_evas_drm's busy tracking.
2016-09-08 13:55:24 -05:00
Derek Foreman 0f534dc3bd ecore_evas_drm: Use pageflips, not vblanks, to drive animation
This should sort some timing problems.
2016-09-08 13:55:24 -05:00
Derek Foreman b4cbf860b9 ecore_drm2: Add a page flip completion call
Add a function for ecore_evas_drm to call after a page flip happens so
ecore_drm2 can track busy status for fbs itself (including for the fb
that's currently being flipped to scanout)

Also, call the completion function from ecore_evas_drm
2016-09-08 13:55:24 -05:00
Derek Foreman 95a00b8e49 ee_drm: Get page flips out of the render thread
Now that we have redraws_clear exposed through software generic, we can
use that to do the final buffer swap from the main thread instead of doing
it in outbuf_flush which runs from the render thread.

This becomes more important later when other call sites in the main thread
will perform buffer flips.
2016-09-08 13:55:24 -05:00
Derek Foreman 79409757c6 ee_drm: Improve next buffer selection algorithm
When triple buffering it's possible that we'll only need two buffers at
a time for long durations.  When we finally call upon a third buffer it
hasn't been used recently enough to do a partial redraw.

By picking the oldest available buffer when multiple buffers are free we
can increase the likelihood of doing partial redraws.
2016-09-08 13:55:24 -05:00
Derek Foreman 5eec34812e evas_engines: Add a redraws_clear callback
This gives us a callback from the main thread after outbuf_flush occurs -
this is useful to get timing right on the drm and wayland engines.
2016-09-08 13:55:24 -05:00
Derek Foreman ce7991b993 ecore_drm2: Implicitly set buffer busy status when flipping
This simplifies other code that shouldn't need to deal with this.
2016-09-08 13:55:23 -05:00
Derek Foreman 794798f559 ee_drm: Move all ticking into ecore_evas_drm and use new tick system
Combines all the gl_drm and drm ticking code into one set in
ecore_evas_drm and uses the new evas tick register/unregister callbacks
to set it up.
2016-09-08 13:55:23 -05:00
Derek Foreman 3d39c1e9b8 ecore_drm2: Add a function to set the pageflip callback data once
Instead of passing the user data for the page flip callback every time,
set it just once.

This will make it easier to push tick logic into ecore_evas_drm, as there
will be a transitional period where page flips are driven in two places
that don't have access to the same pointers.
2016-09-08 13:55:23 -05:00
Derek Foreman cfd172c64b ee_drm: use the ecore_drm2_fb busy bit
Use the new busy getter/setter on the fb instead of keeping state in the
outbuf
2016-09-08 13:55:23 -05:00
Derek Foreman 316ca09b0d ecore_evas_drm: Refactor common code
ecore_evas_gl_drm_new_internal and ecore_Evas_drm_new_internal are huge
functions differing in very few lines.  Combined them.
2016-09-08 13:55:23 -05:00
Derek Foreman 31de16d408 ecore_evas_drm: check for libglapi presence first
Minor refactor
2016-09-08 13:55:23 -05:00
Derek Foreman 398771bf8a evas_engines: Add fn_evas_changed callback
To allow using the pageflip completion event to drive timing in the DRM
engine we need to know as soon as possible that a render has been after
a render has been considered if it will cause a page flip or not.

The fn_evas_changed callback sends this information.
2016-09-08 13:55:23 -05:00
Derek Foreman 1591e095d5 ee_drm: Fix max buffer age
The highest possible buffer age should actually be 4, not the number of
available buffers.
2016-09-08 13:55:23 -05:00
Chris Michael 578099f915 evas: Remove set but unused variables
Gcc reports that these variables are set but not used, so remove them

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2016-09-07 08:28:08 -04:00
Jean-Philippe Andre b2d92f2626 evas: Implement support for external buffers
This brings support for the eo api for external buffers (like
the old data_set / data_get). The new API now works with slices
and planes.

The internal code still relies on the old cs.data array for
YUV color conversion. This makes the code a little bit too
complex to my taste.

Tested with expedite for RGBA and YUV 422 601 planar, both
SW and GL engines (x11).
2016-09-06 16:55:00 +09:00
Jean-Philippe Andre 2f737e8f3b evas: Change internal function image_data_direct 2016-09-06 16:54:54 +09:00
Jean-Philippe Andre 8ee431572d evas: Switch EO APIs to Eina_Slice for gfx buffers (map)
This adds a plane and eina slice argument to the map/unmap
functions, instead of void_ptr + length.
2016-09-06 16:54:53 +09:00
Jean-Philippe Andre 1773ba5d82 evas: Internally switch to Eina_Slice for buffers
This will be used for the gfx buffer map/unmap eo apis.
2016-09-06 16:54:53 +09:00
Tom Hacohen 9c779dca90 Rename efl_self to efl_added
It has been discussed on the ML (thread: "[RFC] rename efl_self") and
IRC, and has been decided we should rename it to this in order to avoid
confusion with the already established meaning of self which is very
similar to what we were using it for, but didn't have complete overlap.

Kudos to Marcel Hollerbach for initiating the discussion and
fighting for it until he convinced a significant mass. :)

This commit breaks API, and depending on compiler potentially ABI.

@feature
2016-09-05 16:59:56 +01:00
Amitesh Singh d88f08f7e9 eina: module - Add macros for adding module informations
Summary:
These macros allow you to define module informations like
author/description/version/license

e.g.
// Use "Name <email id>" or just "Name"
EINA_MODULE_AUTHOR("Enlightenment Community");
// Mention license
EINA_MODULE_LICENSE("GPL v2");
// What your module does
EINA_MODULE_DESCRIPTION("This is what this module does");
// Module version
EINA_MODULE_VERSION("0.1");

Now eina_modinfo can show these informations to users

$ eina_modinfo module.so
 version: 0.1
 description:   Entry test
 license: GPLv2
 author:  Enlightenment Community

@feature

Reviewers: cedric, tasn, raster, jpeg

Subscribers: seoz

Differential Revision: https://phab.enlightenment.org/D4257
2016-08-31 16:17:53 +05:30
Vitor Sousa f02ff462e7 efl callbacks: update some events calls to no longer trigger legacy callbacks 2016-08-30 13:59:59 -03:00
Tom Hacohen 45707a7bb6 Evas engine drm: Fix style (and thus compilation warning).
Double parenthesis in ifs, such as "if ((x = 5))" should only be used
iff using assignment inside of conditions (like the example above). This
explicitly conveys the intention to both the compiler and other
programmers and essentially eliminates the class of bugs that result
from accidental assignment when a comparison was intended and vise-versa
in conditions.
2016-08-30 13:39:39 +01:00
Tom Hacohen d5e321466e Efl object: Rename Eo_Event -> Efl_Event.
This is the last step of the Eo renaming efforts.
2016-08-30 13:34:10 +01:00
Vitor Sousa 8356b16a49 Efl Object: remove legacy callback calls from event_callback_call
Efl.Object.event_callback_call no longer calls legacy smart callbacks;
calling only event callbacks registered with the given event description
pointer.

Create the method Efl.Object.event_callback_legacy_call to inherit the old
behavior from Efl.Object.event_callback_call, calling both Efl.Object events
and legacy smart callbacks.

Update all other files accordingly in order to still supply legacy
callbacks while they are necessary.
2016-08-26 15:45:07 -03:00
Jean Guyomarc'h 60215a5c53 evas-gl_cocoa: migrate to gl_generic infrastructure
It has been a long journey, but here we are at last...
The infamous gl_cocoa engine has been migrated to the
gl_generic infrastructure. This should provide great
improvements and hopefully reduce side-channels b0rkage.

Fonts seems better, scrolling is smoother, expedite
does not segfault anymore... I haven't found a
regression with elementary_test, elementary_config,
terminology, expedite.
2016-08-25 23:29:27 +02:00
Jean Guyomarc'h d8e488b1c8 evas-gl_cocoa: start refactoring for gl_generic 2016-08-25 21:41:17 +02:00
Jean Guyomarc'h c2856b040a evas-gl_cocoa: remove unused code 2016-08-25 21:41:17 +02:00
Jean Guyomarc'h 54b417fa30 evas-gl_cocoa: cleanup eng_setup 2016-08-25 21:41:17 +02:00
Jean Guyomarc'h f4f94a9f79 evas-gl_cocoa: cleanup eng_info 2016-08-25 21:41:17 +02:00
Jean Guyomarc'h 62c342c4e3 evas-gl_cocoa: init/shutdown cleanup 2016-08-25 21:41:17 +02:00
Derek Foreman ae83b96030 wayland_egl: Destroy gl context if engine info updated with NULL wl_surface
We set the wayland surface to NULL in engine info, then destroy the wayland
surface later.  The GL stack tries to render to the destroyed surface and
dies.

If we destroy the GL surface when we set the engine info (before we destroy
the wayland surface)it stops the GL stack from doing bad wayland calls.

This fixes a crash on exit, or when any window closes when using mali GL
drivers.  Surprisingly, Mesa was tolerant of this.
2016-08-23 15:27:06 -05:00
Jean Guyomarc'h 84679d3173 evas-gl_cocoa: fix crashes at engine startup
Recently, the gl_cocoa engine started to crash at
startup. glGetIntegerv() in gl_common was called
without any gl context, and therefore segfaulted.

We now make sure it is called after a gl context
has been created and used.

Thanks jpeg for troubleshooting.

Fixes T4402
2016-08-22 19:56:08 +02:00
Derek Foreman a71b688b10 evas_engines: Update remaining enges for damage_region_set callback
I missed several engines when I changed this.

Make sure they all build.
2016-08-22 08:39:44 -05:00
Jean Guyomarc'h 52295607e5 evas-engines: fix compiling of the fb engine
Build was broken after commit 0c21a926a3
which changed an internal API.
2016-08-20 14:06:27 +02:00
Derek Foreman 0774088c90 wayland_egl: Fix EGL_KHR_Partial_Update usage
Use the new damage region set callback to do partial updates that actually
work.  Fixes gl rendering on mali.

@fix
2016-08-19 16:26:32 -05:00
Derek Foreman 0c21a926a3 engines: Add a damage_region_set callback
To properly implement EGL_KHR_partial_update we need to know the buffer
damage before any drawing operations take place.  Add a new callback to
software_generic that takes place after combining of surface damage and
swap mode when we actually have this available.

Note: This means the three copy pasta implementations of
EGL_KHR_partial_update scattered around the tree are all wrong.  bummer.
2016-08-19 16:26:20 -05:00
Derek Foreman 20f9acdf19 wayland_shm: Fix dmabuf orientation
So apparently when dmabuf support went into weston it went in with a
Y axis inversion that has since been corrected.

This updates our code to match.
2016-08-19 14:51:55 -05:00
Derek Foreman 7828d0e072 wayland_egl: Fix rendering on systems without buffer age
If buffer age isn't present we really want to return MODE_FULL, but we were
previously returning MODE_AUTO.

On recent mali drivers this resulted in accidental partial updates leading
to incorrect rendering.
2016-08-17 16:24:05 -05:00
Derek Foreman 6ce113791e wayland_egl: Remove swap_mode from engine info
This was never set anywhere and always defaulted to 0, or AUTO
2016-08-17 16:21:29 -05:00
Minkyoung Kim 042e94f10d evas/gl_x11 : Add multiple_buffer member in native surface x11 type union.
Summary:
If native surface is multiple buffer pixmap such as named pixmap, Evas should recreate eglImage everyframe.
Because DDK get the buffer ID once at eglImageCreate time.
So if internal buffer ID is changed, should recreate eglImage.

Test Plan: Wearable Tizen.

Reviewers: wonsik, raster, cedric, jpeg

Reviewed By: jpeg

Subscribers: spacegrapher, dkdk, cedric

Differential Revision: https://phab.enlightenment.org/D4211
2016-08-17 17:56:17 +09:00
Jean-Philippe Andre be5381960b evas: Fix BMP load with region set and scale down
This fixes usage of photocam on large BMP images.
Follows previous commits by @jiin.moon.
2016-08-17 17:28:53 +09:00
Jean-Philippe Andre 0193e40d8c evas: Fix region test in jpeg load with region + zoom
The previous commit exposed an issue with the region test
does not take into account the scale down factor.

Not a @fix in itself, as it depends on the previous patch.
2016-08-17 17:28:53 +09:00
jiin.moon 922a1bcd9e evas: Add support for region load with PNG files
Summary:
PNG loader support  region_set when decoding
@feature

Reviewers: cedric, jpeg, jypark, raster

Subscribers: raster

Differential Revision: https://phab.enlightenment.org/D4165
2016-08-17 17:28:53 +09:00
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 Guyomarc'h be67c1553a elementary: fix memory leaks when using elm_prefs
"regex" is heap-allocated and is not handled by regfree().
We must explicitely call free() after a regfree() to remove
the regex_t from memory.
2016-08-12 16:36:12 +02:00
Jean Guyomarc'h b6b8289636 elementary: fix segmentation faults when using elm_prefs
There are several cases of failure:
- if regex is NULL, regfree(regex) may lead to segmentation fault
  (undefined behaviour, as specified in POSIX.1)
- if regex is not NULL, there are cases of use-after-free.

@fix
2016-08-12 16:28:32 +02: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 b29847e0da wayland_egl: Fix double free in case of failure
When trying to create a window, the WL EGL engine creates
an ecore_evas and connects to the wayland display. But if
EGL is not supported (in weston with nvidia for instance),
the egl initialization fails and the window must be detroyed
in order to fallback to wayland_shm.

This led to a double disconnect from the wayland display
as both the ecore_evas del and the error handling code
were trying to disconnect.

Also, use ref == 0 in two places rather than ref <= 0, as
it can prevent double frees in bad situations (ref < 0).
And reset a global variable to NULL on shutdown.
2016-08-11 11:37:41 +09: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
Carsten Haitzler 67246cddcb ecore imf - ibus - fix destroy/disconnect handling that crashes
restart e or have ibus input get destroyed and come back... the ibus
module will do bad things to its pants... because the wrong things
were passed to the signal callbacks... this fixers that along with
ensuring a freed string ptr is NULL.

@fix
2016-07-30 01:42:15 +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
Carsten Haitzler b94a7b5cb4 ecore-imf - remove usueless checks for context - CID 1351451
useless checks for ic in code. fix
2016-07-24 18:44:15 +09:00
Davide Andreoli 3a726037fa Gstreamer1: implement subtitles mute/unmute ability
This seems the only way to disable subtitles embedded in the video file.

WIthout this patch calling em_spu_mute_set/get do not work, thus I consider this a @fix
2016-07-24 11:07:23 +02: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 1733b09e1b ecore_evas_extn: Check whether server_data sender is client's server.
Summary:
Sometimes, In ipc_server_data, extn->ipc.server's data is different with e->server's data.

The case is as follows.

Process'A' has a server.
Process'B' has 'A's client(ee address : 0xB0).
Process'B's client die, and 'B's server created. and server's ee address is same with destroyed client's ee(0xB0).
At the same time, 'A's server send the message to 'B's client.
but 'B's client is died! so _ipc_server_data would manipulate 'B's server data.

Test Plan: Tizen Mobile Text.

Reviewers: raster, spacegrapher, jpeg, wonsik, dkdk

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D4158
2016-07-13 21:00:07 +09: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 eb1650d5f2 emotion xine module - silence coverity
silence CID 1357140 as its harmless to not check fcntl here, but dont
confuse coverity.
2016-07-08 19:15:10 +09:00
Carsten Haitzler a510349d00 emotion vlc module - fix potential divide by 0
fix CID 1357146
2016-07-08 19:12:41 +09:00
Carsten Haitzler 4354712ccb emotion xine module - silence coverity complaint
getting the fd from a valid fd handler wont return < 0 but in theory
it can, so just be silent coverity

silence CID 1357155
2016-07-08 19:06:57 +09:00
Carsten Haitzler fe9fb7bcf2 emotion xine module - fix minor complaints but not bugs
silence CID 1357156 , 1357172
2016-07-08 19:02:50 +09: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
Carsten Haitzler 38735806c6 emotion libvlc module - fix possible argv init issue with tokens
fixes CID 1357170
2016-07-08 11:45:07 +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 aeeda1f77d efl - threads and signals - make efl work on "insane" os's with signals
so. on linux signals are delivered to the main process thread/loop.
thats' where signal handlers are set up and always run. this is sane.
it's predicatble. but of course this is not the same in bsd land.
there "just send the signal to any old thread and call the signal
handler there" seems to tbe the order of the day. this explains why
wer are losing sigchld signals in edje_cc - it's heavily threaded and
bsd is just randombly picking a thread to call it on.

this fixes that. in theory. i hope. i can't test, but putting it in to
share

@fix
2016-07-04 23:47:25 +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 0da58a8d78 ecore-evas-wayland: Fix issue of passing wrong values to resize
Coverity detected that the same code was being passed to resize
regardless of canvas orientation. This patch fixes the issue by
passing the proper values to window_resize.

Fixes Coverity CID1357150

@fix

Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
2016-06-30 11:03:07 -04: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
Chris Michael 1fb3c33286 ecore-evas: Fix error handling issues in wayland_shm engine
This patch fixes 2 Coverity issues where engine_info_set was being
called, but the return was never being checked.

Fixes Coverity CID1357141 and CID1357142

@fix

Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
2016-06-30 10:51:29 -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
Chris Michael 3186f3a5fd evas-drm: Reset current buffer state when pageflip completes
When an fbo pageflip finishes, we should be marking the current fbo
(one just sent) as no longer busy since it's already been pixel
blasted to the screen. Also, if we fail to flip to a given fbo during
buffer swap, then don't leave that fbo marked as busy since it is
technically not in use

Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
2016-06-21 12:59:30 -04:00
Chris Michael c39e8e7555 evas-drm: Remove improper EINA_UNUSED for function parameter
'fd' is actually used in the call to WaitVBlank, so do not mark it as
EINA_UNUSED

Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
2016-06-21 12:07:54 -04:00
Tom Hacohen 6202cc7485 Adjust the code according to the eo event stop changes.
This was changed in the previous commit.
2016-06-20 18:02:00 +01:00
Stefan Schmidt 19ebcc02b4 evas: native-tbm: remove unused variable
The variable was set but never used in this function.
2016-06-20 16:07:20 +02:00
Jean-Philippe Andre 4ca91c4881 evas gl: Fix invalid argument
GCC didn't warn where it should have :(
Luckily the previous code worked just as well as the value
of EINA_TRUE and EVAS_GL_GLES_1_X are the same (1).
2016-06-20 21:08:58 +09:00
Jean-Philippe Andre c0dcb30c61 evas 3d: Fix shader compilation with EGL
This fixes the following error:
 error C1059: non constant expression in initialization

It happened with the hedgehog example: evas_canvas3d_aabb
2016-06-20 15:35:01 +09:00
Jean-Philippe Andre 5964c33567 evas: Improve debug logs (print shader code) 2016-06-20 14:19:30 +09:00
Jean-Philippe Andre 52f9220b3f Evas: Rename smart object into Efl.Canvas.Group 2016-06-17 19:32:43 +09:00
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