Commit Graph

2648 Commits

Author SHA1 Message Date
Carsten Haitzler 4ed2e01591 remove xcb support in ecore_x and evas engines as per mailing list
as per mailing list discussion about dropping xcb support now. it
hasn't been complete for a long time, thus not recommented for being
turned on. as we are moving to a wayland world xcbmakes even less
sense. as agreed, time to clean up a bit and remove a distraction as
well as not well tested code. this also updates po's too.

@feature
2016-11-03 22:22:54 +09:00
Jean-Philippe Andre 7f57e23670 ecore_evas/x: Minor code simplification 2016-11-03 17:22:15 +09:00
Jean-Philippe Andre 562528d28c evas: Simplify GL masking and fix window rotation
The original solution was really complex and relied on
transforming the current gl_Position into the screen
coordinate in pixels, and map that to the pixel position
in the mask.

This new solution simply pushes the required vertices for
the mask, based on its geometry. This fixes masks when used
in a rotated window.

Why was it so hard to get right? :(

@fix
2016-11-03 17:22:14 +09:00
Jean-Philippe Andre eb8d9387c1 wayland: Remove support for "draw_frame"
draw_frame is a legacy feature that draws a very ugly window border
with a white rect and a black text as title bar. This could be
used in wayland when using only the ecore_evas APIs, rather than
elm_win.

Note that the API ecore_evas_draw_frame_set() can not possibly work
as the flag is checked when the ecore_evas is created, so changing
the flag has no effect on existing windows.
2016-11-03 17:22:14 +09:00
Amitesh Singh b0d2e987f3 Efl.Ui.Clock: Add elm module & theme
Summary: depends on D3938

Reviewers: yashu21985, bu5hm4n, woohyun, Hermet, raster, jpeg

Subscribers: gohwoon.jeong, cedric, seoz, jpeg

Differential Revision: https://phab.enlightenment.org/D3939
2016-11-03 11:59:32 +05:30
Derek Foreman c425140a67 ecore_evas_wayland: Minimize differences between shm and egl
Finally bring these together as much as possible to avoid future
diversions when bugs are only fixed in one or the other.

There are functional changes - state tracking for client side effects is
now added to the shm engine, some bug fixes for the egl engine have been
brought to the shm engine.
2016-11-02 13:37:02 -05:00
Derek Foreman 4260d5d3a2 ecore_evas_wayland: Make resize code common
Brings resize code into the common implementation - there is a functional
change.  There appears to have been a bug in the egl resize where it
used the same w, h order for portrait evases as for landscape.  This was
fixed in shm.  I've used the shm variant for the common code.
2016-11-02 13:37:02 -05:00
Derek Foreman b23797c55a ecore_evas_wayland: Make rotation_set common
Rotation set can be moved into common now - should be no functional
change.
2016-11-02 13:37:01 -05:00
Derek Foreman 5d2a25a01d ecore_evas_wayland: Make transparent_set common
Moves transparent set into the common implementation - there is a
functional change here - the egl engine now calls transparent_set in
render_updates like the shm engine.

It is probable the this was the intended behaviour all along.
2016-11-02 13:37:01 -05:00
Derek Foreman 9ca6e274a4 ecore_evas_wayland: Make alpha set common
Moves alpha set into the common implementation - there is a functional
change here - the egl engine now calls alpha_do in render_updates like
the shm engine.

It is probable that this was the intended behaviour all along.
2016-11-02 13:37:01 -05:00
Derek Foreman 82277ae6b3 ecore_evas_wayland: Move more functions into the common implementation
Show and hide can be made common with almost no functional changes.
2016-11-02 13:37:01 -05:00
Derek Foreman af4a71bcf0 wayland evas engines: share engine info structure
These engines are incredibly similar - by sharing the same engine info
structure we'll be able to simplify the wayland ecore_evas bits and
make them much more maintainable.
2016-11-02 13:37:01 -05:00
Derek Foreman 55de5c61cd ecore_evas_wayland: Don't include Evas_Engine_Wayland_Egl.h
There doesn't seem to be any need for this.
2016-11-02 13:37:01 -05:00
Derek Foreman 0b9f77ac96 wayland_egl: Remove unused wl_egl_window variables 2016-11-02 13:37:01 -05:00
Derek Foreman 54cf6dac4a wayland evas engines: rename wayland display to wl_display
Continuing to make the shm and egl engines closer to eachother.
2016-11-02 13:37:00 -05:00
Derek Foreman 3f75c45122 wayland_egl: Rename surface to wl_surface
Making this code more closely match the wayland_shm engine
2016-11-02 13:37:00 -05:00
Derek Foreman 9e43a15526 wayland_egl: Remove pre_post_swap_callback_set
This stuff seems copied from gl_x11 which actually has API to use it.

In this engine nothing can actually set it, so it's just all dead code.
2016-11-02 13:37:00 -05:00
Derek Foreman 96aba5021c wayland_egl: Remove Evas_Engine_Info_Wayland_Egl_Swap_Mode enum
Nothing uses this.
2016-11-02 13:37:00 -05:00
Derek Foreman 47718ae3ea wayland_egl: Remove screen from engine info
Doesn't appear to actually be used for anything.
2016-11-02 13:37:00 -05:00
Derek Foreman b898d3f929 wayland ecore evas: move move_resize to common
It's identical in both shm and egl variants, share it.
2016-11-02 13:37:00 -05:00
Derek Foreman d960adee72 wayland_egl: Remove some leftovers from www
The render post callback and "wobbling" variable were only required for
the client side effect.
2016-11-02 13:37:00 -05:00
Bruno Dilly 8bf74da7bc ecore_wl2: associate evas devices to input ecore events
So users would be able to differentiate between source
seats.
2016-11-01 16:06:19 -02:00
Bruno Dilly 7aab35961f ecore_wl2: add ecore event for seat capabilities change
So when mouse / keyboard are present or not it will
generate events.

ecore_evas/wayland will handle that creating or
deleting evas devices for each one (seat device
will be used as parent).
2016-11-01 16:06:19 -02:00
Bruno Dilly d7b1a5dfeb ecore_wl2: add ecore event for seat name change
And handle it on ecore_evas/wayland, properly
setting the evas device names.
2016-11-01 16:06:19 -02:00
Bruno Dilly 44fc1c6ecc ecore_evas/wayland: handle added / removed seats
Create or delete evas_devices with class EVAS_DEVICE_CLASS_SEAT
for seats on each ecore_evas created so far.

Initially it's named considering its Wayland id.
2016-11-01 16:06:19 -02:00
Bruno Dilly 26c1a564d9 ecore_evas/wayland: remove unnecessary NULL attributions
When freeing wdata there is no reason to set each
freed field to NULL.
2016-11-01 16:06:19 -02:00
Carsten Haitzler 163affda37 emotion gst1 module - disable subtitles by default as that should be
there are spu apis to turn subtitles on and off and this should be off
until turned on by api. you really have to be able to choose the
subtitles to display - eg language etc. to use them effectively.

this fixes T4795

@fix
2016-10-31 19:53:34 +09:00
Guilherme Iscaro 4bffa7bfa7 ecore_evas: refactor VNC as an Eina Module.
Summary:
This change removes the necessity to link EFL against the libvncserver

Please ignore the first three commits, they're being reviewed here:

https://phab.enlightenment.org/D4323

Reviewers: bdilly, cedric

Reviewed By: cedric

Subscribers: cedric, jpeg

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

Signed-off-by: Cedric Bail <cedric@osg.samsung.com>
2016-10-28 09:56:47 -07:00
Chris Michael 21a8fbde7e evas-wayland-shm: Don't post updates to surface if no surface
In the event that an ecore_evas (using wayland_shm) gets hidden then
the corresponding wl_surface gets destroyed. If evas_norender is
called after that, the outbuf_redraws_clear function follows.
Outbuf_redraw_clear function ends up trying to post updates to the
wl_surface however if that wl_surface is gone, then we end up crashing.

This patch addresses that issue by checking for a valid wl_surface
inside the engine before trying to post updates to that wl_surface.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2016-10-28 09:55:27 -04:00
Chris Michael 2c09a35b6c evas-wayland-shm: Fix formatting
NB: No functional changes

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2016-10-28 09:55:27 -04:00
Chris Michael 001d8255b8 evas-wayland-shm: Remove unused varible
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2016-10-26 12:18:30 -04:00
Chris Michael 0fa7abae7b evas-wayland-shm: 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.

Based on 95a00b8e49 by Derek Foreman

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2016-10-26 12:00:39 -04:00
Chris Michael f3d1b2d7da evas-wayland-shm: 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.

Based on 79409757c6 by Derek Foreman.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2016-10-26 11:53:49 -04:00
Chris Michael bb2a55ead6 evas-wayland-shm: Default to triple buffering
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2016-10-26 11:33:07 -04:00
Chris Michael d8600a4f25 evas-wayland-shm: Fix max buffer age
Highest possible buffer age should actually be 4, not the number of
available buffers.

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2016-10-26 11:19:28 -04:00
Chris Michael 2ceb37e14d evas-wayland-shm: Fix formatting
NB: No functional changes, just formatting

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2016-10-26 11:19:06 -04:00
Guilherme Iscaro 8040d20f90 This series fixes two problems in the VNC implementation.
One deadlock and one segfault.

Patch 1:

Software X11 Evas Engine: Fix deadlock

Summary:
The patch bc6e8d2692 introduced a callback responsible to notify the pixels
that were sent to the X server. Since all EFL rendering is done by another
thread, the callback should be called from the main thread context.
To achieve this behaviour evas_software_x11_region_push_hook_call()
was using ecore_thread_main_loop_begin(), which may cause deadlocks, since
evas mainloop waits for the render thread and the render thread waits
the mainloop.

In order to fix this problem, the function
ecore_main_loop_thread_safe_call_async() will be used to
schedule the callback to run in the main loop context.

Since a callback is schedule to run in async manner, the pixels that
were sent to the X server must not be deleted until the user is informed.
In order to avoid more mallocs(), this patch adds the support for refcounts to the
X_Output_Buffer and Xcb_Output_Buffer.

Patch 2:

Ecore_Evas VNC: Use the image size to create the buffer.

In same cases they may differ and may lead to a segfault, since
memcpy() causes a buffer overrun.

Reviewers: bdilly, raster

Reviewed By: raster

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D4323
2016-10-21 13:56:00 +09:00
Derek Foreman 1809b3b959 gl_x11: Do KHR Partial Damage properly
KHR partial damage must be set once at the beginning of rendering with
buffer damage for the entire scene to be rendered.  Doing otherwise can
result in graphical anomalies on some GL implementations.
2016-10-20 14:30:00 -05:00
Derek Foreman 6a65253f68 wayland_egl: Remove weirdo buffer age kludge cargo culted from gl_x11
There's no reason why we'd need a full redraw if the buffer age for
this buffer isn't the same as the buffer age for the last buffer, so
let's cut out this thing.
2016-10-19 16:29:05 -05:00
Derek Foreman a44352a10f wayland_egl: Use surface damage instead of buffer damage
We should always pass surface damage to eglSwapBuffersWithDamage.
2016-10-19 16:29:05 -05:00
Derek Foreman c3a31ff213 gl_drm: Use surface damage instead of buffer damage
We should always pass surface damage to eglSwapBuffersWithDamage.
2016-10-19 16:29:05 -05:00
Derek Foreman 7a978fe58c evas_engines: Send both surface and buffer damage to outbuf_flush callback
Some engines should using sending surface damage, until now we'd only ever
provided them with buffer damage.

The difference is that surface damage is the damage to the surface the
compositor is displaying, and the buffer damage is the damage to the
buffer the client has rendered.  These are different when the client
is using multiple buffers of different ages to render into.

Anything that calls eglSwapBuffersWithDamage, wl_surface_damage() or
wl_surface_damage_buffer() should be using surface damage, and not
buffer damage.

This patch is intended to make no functional change - any flush cb that
used buffer damage before still should.  Actual fixes to follow.

Apologies if I broke any engines - it's a bit of a copy and wasteland
out here.
2016-10-19 16:29:05 -05:00
Derek Foreman 455afb707f Revert "wayland_shm: Add swap mode fallback when buffer age changes"
This reverts commit 62ca4486ea.

Honestly, I think the gl_x11 code doesn't make sense either. :)

There's no logical reason that we have to do that, though it may be
hiding some other bug?  If that's the case, the bug should be fixed
properly.
2016-10-19 16:29:05 -05:00
Jean-Philippe Andre b88093c847 evas: Last fix... now it builds 2016-10-19 14:05:31 +09:00
Jean-Philippe Andre e67d9c4e1c evas: More compilation fixup with EGLImage
This is what happens when you can't test a patch yourself ^^
2016-10-19 13:40:08 +09:00
Jean-Philippe Andre 5fd4875ad4 evas: Fix compilation with older EGL (maybe <1.5)
EGLImage was not introduced until very recently. EGLImageKHR was
the proper type. Thanks Roy for the report.
2016-10-19 13:35:12 +09:00
Jean-Philippe Andre 62ca4486ea wayland_shm: Add swap mode fallback when buffer age changes
This copies the behaviour in opengl_x11 engine, where the buffer
age needs to be continuously the same to be taken into account.
If the age varies, then we fallback to a full redraw.

Apparently this fixes issues on actual devices. I tested this
patch in weston (I didn't have issues before and buffer age is 1).
2016-10-18 17:40:01 +09:00
Derek Foreman 3d6aae4633 evas gl x11 engine - Wrap eglCreateImage
eglCreateImage and eglCreateImageKHR have different parameters - the
attribute list is EGLint for one and EGLAttrib for the other.  Since
EGLAttrib is long, on a 64-bit system it's a different size than EGLint.

This was causing a crash in Enlightenment's wl_x11 on 64-bit machines when
trying to use a gl client.

Add a thin wrapper to use whichever is available and pass the appropriate
sized data.
2016-10-14 16:07:08 -05:00
Derek Foreman 54582858d8 ecore_evas_wayland: Don't use frame callbacks on windows with no shell surface
If we set a frame callback on a window with no shell surface (ie: and unmapped
window), the frame callback will never fire.  This was preventing some
applications like rage from ever posting a frame.
2016-10-14 16:07:08 -05:00
Subhransu Mohanty 8b7f060946 evas/module: add a new module in vg_saver for eet
Reviewers: cedric, jpeg

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D4350
2016-10-14 15:52:51 +09:00