Commit Graph

3804 Commits

Author SHA1 Message Date
Hermet Park 093e32a0fb evas vg: code refactoring.
keep internal variable and structre names consisteny.
no logical changes.
2018-12-07 17:14:15 +09:00
Marcel Hollerbach 5b98ebab4a meson: abstract edje_cc exec lines
the array is calling the shell etc. this makes cross building easier.

Differential Revision: https://phab.enlightenment.org/D7413
2018-12-06 15:13:34 +01:00
Hermet Park c435cdf173 evas ector: use proper prefix name 2018-12-04 13:55:29 +09:00
Marcel Hollerbach c1dd57d210 meson: use eolian_gen with -S
this ensures that eolian does not parse installed .eo files

Differential Revision: https://phab.enlightenment.org/D7405
2018-12-03 19:00:26 +01:00
Hermet Park 8453b06bf8 evas gl: Remove single-line pipe code of gl commands.
Summary:
GLPIPES is proved to use since it's been used for many years as the default.
On the other hand, single-line routine hans't, acutally it's not maintained properly.
Even this single-line routine doesn't compileable right moment.

This patch is one refactoring to clean up code that's not valuable to maintain.

Reviewers: #committers, raster, cedric, ManMower

Reviewed By: #committers, ManMower

Subscribers: ManMower, cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D7328
2018-11-30 13:30:15 +09:00
Hermet Park c71a561997 evas gl: recover current program state.
Summary:
When we meets a new shader program in shape_context_push(),
it loads a shader binary, if it is necessary, create a new program for the shader.

In this step, the current program state could changed to this new one.
But still our gl context by shader_flush() could keep the previous program for next shader flush.

But it doens't know current program was changed by dropping by.

Here is a simple scenario:

1. evas_gl_common_context_image_push():
This image requires Program A. it calls evas_gl_common_context_push() internally.
then shader_array_flush() instantly.
It stores the current context including shader program(Program A)

2. evas_gl_common_context_xxx_push():
call evas_gl_common_shader_program_get().
xxx draws first time, it loads a new shader program.
Now this changed the current program to a new instant one.

...

3. shader_array_flush():
draw image which requires Prorgam A (No.1).
Unfortunately, stored context is same to this.
So, it skips some gl context setting including shader program.

@fix

Reviewers: #committers

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D7309
2018-11-27 11:25:13 +09:00
Chris Michael a4bc0188eb emotion: Reduce EO calls by using geometry_set
This patch reduces EO calls by using evas_object_geometry_set rather
than calling move & resize.
2018-11-21 10:00:09 -05:00
Derek Foreman 1f709470c5 ee_wayland: Set opaque region for alphaless surfaces
Theoretically this shouldn't be necessary, but it may be possible for
a backend to give us a visual with translucency even if we didn't ask
for one.

also better comments.

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

Signed-off-by: Derek Foreman <derek.foreman.samsung@gmail.com>
2018-11-19 10:11:29 -06:00
Carsten Haitzler 9d3e0000b2 meson - fix ecore imf scim build to detect scim fully and work again 2018-11-17 11:45:03 +00:00
Cedric BAIL af59a63c47 meson: fix VNC server build to not override the last module.
The module name and installation directory where previously picked from
the last engine being processed instead of being unique to the VNC Server
module. This patch ensure that we do not write over another engine and
break everything when the VNC Server support is turned on.

Reviewed-by: Marcel Hollerbach <marcel-hollerbach@t-online.de>
Differential Revision: https://phab.enlightenment.org/D7290
2018-11-16 10:20:24 -08:00
Carsten Haitzler ce8e11764c ecore imf - xim module - use proper prorotypes and returns for xim 2018-11-09 11:44:00 +00:00
Carsten Haitzler 391955627c ecore imf - ibus - fill all struct fields 2018-11-09 11:44:00 +00:00
Carsten Haitzler c18d45816d ecore imf - wl - fill all stgruct fields with something... 2018-11-09 11:44:00 +00:00
Carsten Haitzler 0bec6826b1 ecore evas extn - warn - ensure all fields in ecore evas func struct set 2018-11-09 11:44:00 +00:00
Carsten Haitzler 91184f7324 evas gl - shader cache - warn - use bigger buffer to avoid trunc warn 2018-11-09 11:44:00 +00:00
Carsten Haitzler df5702a609 evas sw x11 - warn - use void ptr for error handler
warnings now are being super picky with:

../src/modules/evas/engines/software_x11/evas_xlib_buffer.c: In
function ‘evas_software_xlib_x_output_buffer_new’:
../src/modules/evas/engines/software_x11/evas_xlib_buffer.c:306:56:
warning: cast between incompatible function types from ‘void
(*)(Display *, XErrorEvent *)’ {aka ‘void (*)(struct _XDisplay *,
struct <anonymous> *)’} to ‘int (*)(Display *, XErrorEvent *)’ {aka
‘int (*)(struct _XDisplay *, struct <anonymous> *)’}
[-Wcast-function-type]
                                  ph = XSetErrorHandler((XErrorHandler)

can we really match a struct <anonymous> somehow? i don't think so...
so... void to the rescue.
2018-11-09 11:44:00 +00:00
Carsten Haitzler 143bef348f evas gl extn sym finding - warn - use void catss for no more warns
so gcc now is being very picky about types. since we'r ereallyjast
throwing void *'s around for pointers to funcs and looking them up by
hand - use void *'s to avoid warnings.
2018-11-09 11:44:00 +00:00
Carsten Haitzler a447bbd489 evas blur filter - fix warnigns about unused labels
if no asm is defined.. then you hit this.
2018-11-09 11:43:59 +00:00
Carsten Haitzler b279ff77cc ecore imf modules - check ecore x display state beofre doing x things
using an uninitted x display is not good/useful so ... don't do it.
leads to crashes.
2018-11-09 11:43:59 +00:00
Carsten Haitzler e7771438a2 evas gl engines - avoid getting context if possible
so getting context at least on some dviers is expensive. it may really
impact cpu usage a lot (in this cate getpid() was being called by the
nouveau drivers and that can be expensive. it is on ARM as it's a full
syscall and 1-2% of cpu time was just getting pid all the time thanks
to this...

@opt
2018-11-09 11:43:58 +00:00
Daniel Kolesa 5a3d79d383 meson: add eolian custom dependencies support
This uses the meson/ninja depfile functionality + eolian to make
sure proper dependencies between generated files and .eo files
are managed, to ensure consistent re-generation of all generated
files that are affected upon .eo file modification.

For custom rules with multiple outputs, Ninja currently does not
support depfiles. Therefore, split those into two custom rules
so that the depfiles functionality can be enabled. While this
is ugly and slows down the process a little by having to invoke
Eolian twice instead of once, it has to be done and it's still
better than what we had in Autotools anyway.

Differential revision: D7187

Fixes T6700.
2018-10-24 12:02:55 +02:00
Marcel Hollerbach d3122474d4 meson: link gl_drm to gdm
gl_drm uses that - this was forgotten. Sorry.

Reported by ApBBB.
2018-10-13 12:10:39 +02:00
Carsten Haitzler 01109a8c7b glx extns - check client and server extns
in case... client should be a superset...
2018-10-11 16:25:06 +01:00
Carsten Haitzler 76725b2d3b evas gl x11 - add working measure funcs for debugging performance 2018-10-11 16:25:06 +01:00
Marcel Hollerbach 46d464e5bf here comes meson
a new shiny buildtool that currently completes in the total of ~ 4 min..
1 min. conf time
2:30 min. build time
Where autotools takes:
1:50 min. conf time
3:40 min. build time.

meson was taken because it went quite good for enlightenment, and is a traction gaining system that is also used by other mayor projects. Additionally, the DSL that is defined my meson makes the configuration of the builds a lot easier to read.

Further informations can be gathered from the README.meson

Right now, bindings & windows support are missing.

It is highly recommented to use meson 0.48 due to optimizations in meson
that reduced the time the meson call would need.

Co-authored-by: Mike Blumenkrantz <zmike@samsung.com>

Differential Revision: https://phab.enlightenment.org/D7012
Depends on D7011
2018-10-02 17:22:50 +02:00
Hermet Park 431c8cc090 evas gl: fix invalid image size.
Summary:
When we reset of texture for a valid object,
this object cache size become -1 x -1 with null texture.

Later, we reset a new texture of the object,
Its texture size could be -1 x -1.
That brings to incorrect result drawing.

Can't see any points of using cache size there.

This bug was introduced by 9e01cf2698

@fix

Reviewers: #committers, raster

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D7077
2018-10-01 21:07:07 +09:00
Derek Foreman 66bacbde96 emotion: Convert to new animators
Summary:
Use more efficient animator mechanism.
Depends on D7051

Reviewers: devilhorns

Reviewed By: devilhorns

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D7052
2018-09-18 09:43:22 -05:00
Derek Foreman b5b7e6a0e6 wayland_egl: Fix drop shadows on radeon
Summary:
We're doing this all wrong.

We've asking for "at least 1 bit" of A, R, G, B color depth.

ARGB2101010 fits that nicely, so mesa on radeon gives it to us.

This only fixes the drop shadows though, it's entirely possible that
a fullscreen window without alpha would get ARGB2101010 instead of
XRGB8888, so this code probably needs a rethink for multiple engines.

Reviewers: devilhorns

Reviewed By: devilhorns

Subscribers: devilhorns, cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D7022
2018-09-11 12:22:06 -04:00
Derek Foreman b43033e393 ecore_wl2: Move surface module file to modules directory
It is now similar to how other modules are handled.

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

Signed-off-by: Derek Foreman <derek.foreman.samsung@gmail.com>
2018-09-11 09:54:49 +02:00
Hermet Park 423d8a2296 evas image: fix a bug in image preloading.
Summary:
Current preloading is too buggy since it's on thread-based.
This is a fundamental improvement to fix a bug.

The critical issue here is,
When preloading img object suddenly cancel its preloading,
the object possibly cannot render image next then because
renderer doesn't have any idea when async cancelling is
finished. Renderer just tries to render regardless of
image loading status, and this could occur no-texture(in gl case)
image object.

So, here improvement is, adding a notification for async cancelled
so that putting img objects to redraw images properly after their preloading is
cancelled.

The best scenario to reproduce this bug is this one.

Evas_Object *img2 = evas_object_image_filled_add(evas);
evas_object_image_file_set(img2, "test.jpg", NULL);
evas_object_image_preload(img2, EINA_FALSE);
evas_object_resize(img2, 200, 200);
evas_object_show(img2);

Evas_Object *img = evas_object_image_filled_add(evas);
evas_object_image_file_set(img, "test.jpg", NULL);
evas_object_image_preload(img, EINA_FALSE);
evas_object_move(img, 200, 200);
evas_object_resize(img, 200, 200);
evas_object_show(img);

evas_object_image_preload(img2, EINA_TRUE);
If you run this on gl backend, occasionally happens rendering fail.

Yet there other bugs on preloading feature....

@fix

Reviewers: #committers, raster

Subscribers: cedric, #reviewers, #committers, zmike

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6919
2018-09-03 17:12:55 +09:00
Chris Michael d05ddaba62 evas-eglfs: Remove cserve2 support
Summary:
ref T7226

Depends on D6932

Reviewers: raster, cedric, zmike, Hermet

Reviewed By: Hermet

Subscribers: #reviewers, #committers

Tags: #efl

Maniphest Tasks: T7226

Differential Revision: https://phab.enlightenment.org/D6933
2018-08-30 13:45:01 +09:00
Chris Michael 96a46ea944 evas-gl-drm: Remove cserve2 support
Summary:
ref T7226

Depends on D6931

Reviewers: raster, cedric, zmike, Hermet

Reviewed By: Hermet

Subscribers: #reviewers, #committers

Tags: #efl

Maniphest Tasks: T7226

Differential Revision: https://phab.enlightenment.org/D6932
2018-08-30 13:44:30 +09:00
Chris Michael d3eaf330f6 evas-gl-x11: Remove cserve2 support
Summary:
ref T7226

Depends on D6930

Reviewers: raster, cedric, zmike, Hermet

Reviewed By: Hermet

Subscribers: #reviewers, #committers

Tags: #efl

Maniphest Tasks: T7226

Differential Revision: https://phab.enlightenment.org/D6931
2018-08-30 13:43:49 +09:00
Chris Michael 38ee4167bc evas-software-genereric: Remove cserve2 support
ref T7226

Depends on D6929
2018-08-30 13:42:55 +09:00
Chris Michael 4e2287ecaf evas-gl-common: Remove cserve2 support
ref T7226

Depends on D6927
2018-08-30 13:39:31 +09:00
Chris Micheal e800139953 evas-gl-generic: Remove cserve2 support
ref T7226

Depends on D6925
2018-08-30 13:34:57 +09:00
Hermet Park 54f2a554da evas cache: refactor internal logic.
Summary:
Adding cache targets in other modules are inproper.
This can't be managed by cache module inside.

One representive scenario is,
when preload cancel is triggered, preload canceling sequence
can't be performed properly because cache targets implicitly were
increased by backend modules.

And then, Cache itself couldn't get notified it.
see this condition.

if ((!ie->targets) && (ie->preload) && (!ie->flags.pending))
in _evas_cache_image_entry_preload_remove()

Consequently, I move preloaded callbacks to sync with adding cache targets,
not to add by backed engines themselves.

This will bring Cache to manage cache targets properly.

Reviewers: #committers, raster

Subscribers: cedric, #reviewers, #committers, zmike

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6912
2018-08-30 13:26:06 +09:00
Chris Michael ad9e13ea56 evas-software-x11: Remove cserve2 support
Summary:
ref T7226

Depends on D6928

Reviewers: raster, cedric, zmike, Hermet

Reviewed By: Hermet

Subscribers: #reviewers, #committers

Tags: #efl

Maniphest Tasks: T7226

Differential Revision: https://phab.enlightenment.org/D6929
2018-08-30 13:25:05 +09:00
Chris Michael 65a36bee2b evas-buffer: Remove cserve2 support
Summary:
ref T7226

Depends on D6926

Reviewers: raster, cedric, zmike, Hermet

Reviewed By: Hermet

Subscribers: #reviewers, #committers

Tags: #efl

Maniphest Tasks: T7226

Differential Revision: https://phab.enlightenment.org/D6927
2018-08-30 13:23:23 +09:00
Chris Michael 2d9168e956 evas-wayland-egl: Remove cserve2 support
Summary:
ref T7226

Depends on D6924

Reviewers: raster, cedric, zmike, Hermet

Reviewed By: Hermet

Subscribers: #reviewers, #committers

Tags: #efl

Maniphest Tasks: T7226

Differential Revision: https://phab.enlightenment.org/D6925
2018-08-30 13:22:34 +09:00
Chris Michael ea857a500f evas-wayland-shm: Remove cserve2 support
Summary:
ref T7226

Depends on D6923

Reviewers: raster, cedric, zmike, Hermet

Reviewed By: Hermet

Subscribers: #reviewers, #committers

Tags: #efl

Maniphest Tasks: T7226

Differential Revision: https://phab.enlightenment.org/D6924
2018-08-30 13:21:27 +09:00
Chris Michael 7313e6973e evas_drm: Remove cserve2 support
Summary: ref T7226

Reviewers: raster, cedric, zmike, Hermet

Subscribers: #reviewers, #committers

Tags: #efl

Maniphest Tasks: T7226

Differential Revision: https://phab.enlightenment.org/D6923
2018-08-30 13:19:41 +09:00
Hermet Park 4e1553905c evas cache: remove unused custom task in preload.
Summary:
That redundant code just made code complex.

This is one of intermediate patches for preload

Reviewers: raster, #committers

Subscribers: cedric, #reviewers, #committers, zmike

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6907
2018-08-30 13:17:44 +09:00
Hermet Park 43d8c853aa evas gl: skip twice texture upload.
Summary:
While debugging a problem,
found a hole that upload texture twice unnecessary.

Here is the scenario.

Set up two objects with same image resource plus both preloading - obj1, obj2;

After image preloading,
_evas_cache_image_async_end() will be triggered.
=> ie->flags.update_data = true;

then first obj1 is gonna drawing,
Since it doesn't have any texture uploaded yet,
it will create a texture and upload texture data as well.
along with below sequence.
=> else if (!im->tex && !ie->load_error)

After it, second obj2 is gonna drawing.
But actually its texture is already readied after obj1,
it doesn't need to upload texture agin.

But still ie->flag.update_data == true, it will do dumbly.

Reviewers: #committers, devilhorns, raster

Subscribers: cedric, #reviewers, #committers, zmike

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6902
2018-08-30 13:14:13 +09:00
Hermet Park 78fb9cf124 evas gl: remove redundant code.
Reviewers: devilhorns, #committers, raster

Subscribers: cedric, #reviewers, #committers, zmike

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6901
2018-08-29 13:57:45 +09:00
Hermet Park 43fcca4acd evas cache: code refactoring.
rename to proper internal variables.
Differential Revision: https://phab.enlightenment.org/D6911
2018-08-27 21:25:29 +02:00
Mike Blumenkrantz 69fae8c7bf evas: remove render2
Summary:
this is more or less a dead project, having not been actively developed
in over 2 years and instead forcing people to expend more time and energy
to keep it compiling across refactors

fix T7227

Reviewers: stefan_schmidt, Hermet, ManMower, devilhorns

Reviewed By: Hermet, devilhorns

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T7227

Differential Revision: https://phab.enlightenment.org/D6878
2018-08-21 10:36:55 -04:00
Hermet Park 6010d3e8c5 ecore wayland: fix a regression bug of wayland_transparent_get().
Summary:
wayland transparent func was replaced with alpha's.

By this, transparent common attribute is no more valid,
ecore_evas_transparent_get() doesn't work.

This is a regression bug by 5af84afced

Reviewers: ManMower, devilhorns

Reviewed By: ManMower, devilhorns

Subscribers: cedric, #reviewers, #committers, zmike

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6856
2018-08-17 11:30:20 -04:00
Hermet Park c8ddf93707 evas gl: fix missing map texture target.
Summary:
Map context missed setting texture target.
I guess this is one of regression bugs in gl backend.

When shader is flushed, it sets invalid texture target with map texture.
That caused blank map rendering, this could be observed temporary
because gl pipe contexts are reusable and missing texture target means,
it could use previous texture target values that mostly have GL_TEXTURE_2D.

@fix

Reviewers: #committers, ManMower

Reviewed By: #committers, ManMower

Subscribers: ManMower, cedric, #reviewers, #committers, zmike

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6818
2018-08-14 17:13:24 -04:00
Mike Blumenkrantz 631fd714c3 ecore-evas/x: rework draw_block unsetting from ConfigureNotify
Summary:
draw_block should only be unset if the event is triggered by the wm
or the window is an override, otherwise it prematurely begins rendering
the window at a size which may or may not be accurate

ref T7008

Reviewers: devilhorns, ManMower

Reviewed By: ManMower

Subscribers: ManMower, cedric, #reviewers, #committers

Tags: #efl_display_system

Maniphest Tasks: T7008

Differential Revision: https://phab.enlightenment.org/D6793
2018-08-14 17:11:32 -04:00
Hermet Park 6e88cc5942 evas gl_common: code refactoring.
Summary: use boolean instead int, no logic changes.

Reviewers: #committers, zmike

Reviewed By: #committers, zmike

Subscribers: cedric, #reviewers, #committers, zmike

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6807
2018-08-10 12:06:42 -04:00
Derek Foreman 4e07f505c3 ee_wayland: Remove spurious manual_render
Summary:
The line prior to this damages the canvas and should result in a render
anyway.

Forcing a manual render here (without regard to the manual_render_set
state) will cause a post render callback to fire for clients that
think they've disabled automatic rendering.

fix T7275

Reviewers: devilhorns

Reviewed By: devilhorns

Subscribers: devilhorns, cedric, #reviewers, #committers, zmike

Tags: #efl

Maniphest Tasks: T7275

Differential Revision: https://phab.enlightenment.org/D6809
2018-08-10 11:38:25 -04:00
Derek Foreman 91a4bcd10e ee_drm: Fix tick job timestamps for funny GPU clocks
Summary:
The animator timestamps were only getting the offset applied when they
came from page flips.  The "early tick" logic failed to apply the offset.

This likely only changes behaviour on vmware's graphics stack, and
only the env var ECORE_EVAS_DRM_GPU_CLOCK_WRONG is set.

Reviewers: devilhorns

Reviewed By: devilhorns

Subscribers: bu5hm4n, cedric, #reviewers, #committers, zmike

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6792
2018-08-08 16:58:33 -04:00
Derek Foreman 7bb0c661bd ee_wayland: Update configured state on short-circuit ack-configure
Summary:
When we BAIL from the configure callback with an immediate ack we don't
properly update state, commit the ack, or allow ecore_wl2 to process
a deferred ack_configure that happened during async rendering.

Using a commit here instead should update internal state properly.

ref T7243
Depends on D6783

Reviewers: zmike

Reviewed By: zmike

Subscribers: cedric, #reviewers, #committers, zmike

Tags: #efl

Maniphest Tasks: T7243

Differential Revision: https://phab.enlightenment.org/D6784
2018-08-08 14:58:47 -04:00
Derek Foreman c45348770c Revert "ee_wayland: Remove pointless ack_configure"
Summary:
This reverts commit a61f254f19.
and a follow up commit that removed some warnings

Apparently this is instrumental in enlightenment's window maximize
animation processing.

The removed bits would force an ack configure when an inbound
configure didn't result in a change that would cause a re-render.
Since this calculation needs knowledge of state ecore_wl2 doesn't
track, it does need to happen here.

ref T7243

Reviewers: zmike

Reviewed By: zmike

Subscribers: cedric, #reviewers, #committers, zmike

Tags: #efl

Maniphest Tasks: T7243

Differential Revision: https://phab.enlightenment.org/D6783
2018-08-08 14:58:44 -04:00
Derek Foreman e382bac1a0 wayland: Fix elementary setting window parents at creation time
Summary:
We need to pass the entire pointer, not just 32-bits of it.

Fixes a crash with enlightenment sandbox gadgets where
ecore_wl2_window_alpha_get() is called with an invalid pointer while
trying to display a pop-up.

Reviewers: zmike, devilhorns

Reviewed By: zmike, devilhorns

Subscribers: devilhorns, cedric, #reviewers, #committers, zmike

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6775
2018-08-08 09:37:30 -04:00
Mike Blumenkrantz c54b7a4ab3 ecore-evas/wayland: fix parent setting on canvas creation
Summary:
use the correct pointer when applying the passed parent object in order to
successfully set the parent

ref 78f27a3eff

Reviewers: devilhorns

Reviewed By: devilhorns

Subscribers: cedric, #committers

Tags: #efl_display_system

Differential Revision: https://phab.enlightenment.org/D6757
2018-08-06 15:18:14 -04:00
Hermet Park 323c87c215 evas sdl: don't make confusing, we only use one-indexed egl handles.
Reviewers: ManMower

Subscribers: devilhorns, cedric, #committers, zmike

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6693
2018-08-02 12:20:27 +09:00
Derek Foreman 24e5aa668a ee_wayland: Update maximize and fullscreen state after configure
Summary:
If the compositor drops fullscreen or maximize for us the CSD to change
that state would become broken, as ecore_wl2 thought the window state
was whatever we last set it to from the client side.

Update that state on configure event.

fix T7211

Reviewers: devilhorns, zmike, eagleeye

Reviewed By: devilhorns, zmike

Subscribers: cedric, #committers, zmike

Tags: #efl

Maniphest Tasks: T7211

Differential Revision: https://phab.enlightenment.org/D6684
2018-07-25 15:53:39 -05:00
Umesh Tanwar 67684dec73 ecore_evas: when window resized in ecore_evas, check evas rotate state.
Summary:
when ecore_evas is resized, get evas' size,
but angle not checked, so put a check.

@fix

Signed-off-by: Umesh Tanwar <umesh.tanwar@samsung.com>

Reviewers: Hermet, devilhorns

Reviewed By: devilhorns

Subscribers: cedric, #committers, zmike

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6627
2018-07-18 08:10:22 -04:00
Hermet Park e7bb795aba canvas vg_loader: close opened file after using it.
Summary:
Here opened eina file is just leaked.
close it properly.

@fix.

Reviewers: devilhorns, #committers, zmike

Reviewed By: #committers, zmike

Subscribers: cedric, #committers, zmike

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6549
2018-07-11 16:09:31 +09:00
Derek Foreman 8cd3860d00 evas_drm: Trim the queue of buffers if we've had extra for too long
Summary:
In fixing T7099 I've also allowed the buffer queue to grow quite large,
so now we should prune it back if it's bigger than it needs to be for
a long time.

ref T7099
Depends on D6565

Reviewers: devilhorns

Reviewed By: devilhorns

Subscribers: cedric, #committers, zmike

Tags: #efl

Maniphest Tasks: T7099

Differential Revision: https://phab.enlightenment.org/D6566
2018-07-10 16:53:12 -04:00
Derek Foreman 2668f6196e evas_drm: Move MAX_BUFFERS macro from header to source file
Summary:
It's no longer needed in the header because it doesn't change
the size of the structures there anymore.
Depends on D6564

Reviewers: devilhorns

Reviewed By: devilhorns

Subscribers: cedric, #committers, zmike

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6565
2018-07-10 16:53:00 -04:00
Derek Foreman f7fc06bf86 evas_drm: Allocate buffers on demand
Summary:
Instead of allocating a fixed number of buffers immediately, allocate
buffers if needed to render to.

Normally we only need 2 buffers, but we've been allocating 3 to handle
worse case behaviour.  As T7099 shows, this is not always enough.  We
now cap at a max of 10.

For the normal case where we always use 2 this results in a slight
memory reduction (1 buffer) and a slight renering load reduction
because we pick the oldest buffer to render into.

A future patch will trim the buffer queue if it's been too large for
a long time.

fix T7099
Depends on D6563

Reviewers: devilhorns

Reviewed By: devilhorns

Subscribers: cedric, #committers, zmike

Tags: #efl

Maniphest Tasks: T7099

Differential Revision: https://phab.enlightenment.org/D6564
2018-07-10 16:52:46 -04:00
Derek Foreman 5d30f2b0b3 evas_drm: replace outbuf fb array with a list
Summary:
This is just a step towards making it a variable length.

ref T7099
Depends on D6562

Reviewers: devilhorns

Reviewed By: devilhorns

Subscribers: cedric, #committers, zmike

Tags: #efl

Maniphest Tasks: T7099

Differential Revision: https://phab.enlightenment.org/D6563
2018-07-10 16:13:52 -04:00
Derek Foreman f783163ca5 evas_drm: Make the fbs an array of pointers
Summary:
Use pointers instead of an array of structures, since we're going to
replace the array with a list shortly.

ref T7099

Reviewers: devilhorns

Reviewed By: devilhorns

Subscribers: cedric, #committers, zmike

Tags: #efl

Maniphest Tasks: T7099

Differential Revision: https://phab.enlightenment.org/D6562
2018-07-10 16:13:18 -04:00
Carsten Haitzler cb9dc80fdf evas gl-x11 engine - nvidia driver - fix performance drop
this has been going on for a while. on nvidia drivers in gles mode on
x11 there is a massive perf drop to like a few fps with enough windows
if we build for egl/gles instead of opengl. it was the re-creating of
eglimages every frame. put a vendor specific workaround for this and
avoid it. it's not needed there anyway. framerate back to 60fps
smoothness afterwards.

@fix
2018-07-10 16:08:19 +09:00
Derek Foreman 0fe553cf06 ecore_wl2: Remove ecore_wl2_display_window_find
Summary:
This is now totally trivial and needs not exist.
Depends on D6522

Reviewers: devilhorns

Reviewed By: devilhorns

Subscribers: cedric, #committers, zmike

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6523
2018-07-06 10:16:36 -04:00
Derek Foreman 78f27a3eff ecore_wl2: Replace window ids with pointers
Summary:
There's no benefit to generating ids instead of just using the
Ecore_Wl2_Window pointer in events.

This has the added benefit of working around a really nasty hash collision
bug when multiple ecore_evas engines are used at once.

ref T7053
ref T6222

@beta_break
Depends on D6521

Reviewers: devilhorns

Reviewed By: devilhorns

Subscribers: cedric, #committers, zmike

Tags: #efl

Maniphest Tasks: T7053, T6222

Differential Revision: https://phab.enlightenment.org/D6522
2018-07-06 10:16:21 -04:00
Derek Foreman acb125419f ee_wayland: Remove extraneous unregister
Summary:
ecore_event_window_unregister(ee->prop.window) is actually *exactly*
the same as ecore_evas_input_event_unregister(ee)

So this sequence just uselessly tries to remove something from an empty
hash table.

Reviewers: devilhorns

Reviewed By: devilhorns

Subscribers: cedric, #committers, zmike

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6521
2018-07-06 10:15:40 -04:00
Mike Blumenkrantz f23344733f eina/mempool: remove debug thread check to verify mempool deletion thread
Summary:
a common use case for mempools is that they get created by a thread but then
exist for the duration of the app's lifetime until shutdown() occurs in the
main thread. there is no reason to have an assert here which blocks that
use case
Depends on D6434

Reviewers: ManMower, bu5hm4n, devilhorns

Reviewed By: devilhorns

Subscribers: cedric, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6435
2018-06-27 06:18:14 -04:00
Mike Blumenkrantz 4aad39ce03 ecore-evas-x: set draw_block until the window receives a configure event (#2)
Summary:
drawing a non-override window before receiving a configure event results
in an unsized window, breaking spec. it also prevents ecore-evas resize
callbacks from triggering, yielding undefined returns from functions which
attempt to get the geometry of the ecore-evas

this patch improves upon the previous version by handling the case of windows
which are created with the correct initial size, bypassing an initial configure
event

there is still a lot of work to be done in this engine to improve/consolidate
resize-related code and ensure protocol correctness

ref T7008
fix T6907

Reviewers: devilhorns, ManMower

Subscribers: cedric, #committers

Tags: #efl

Maniphest Tasks: T7008, T6907

Differential Revision: https://phab.enlightenment.org/D6275
2018-06-27 13:49:57 +09:00
Daniel Kolesa 1bcdc8af7b efl: include sys/types.h where ssize_t is used
This include is necessary according to POSIX. Without it, build
fails on certain platforms (QNX). It may already be included
implicitly in some of those files, but declare intent.

Fixes T6667.
2018-06-21 14:09:59 +02:00
Mike Blumenkrantz 90cb995ac9 emotion_generic: clean up event handlers on fork failure
Summary:
this case would guarantee a crash if the module was ever unloaded
and the event handlers were called, and it leaks otherwise

@fix

Reviewers: ManMower, devilhorns, bu5hm4n

Reviewed By: ManMower, bu5hm4n

Subscribers: cedric, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6296
2018-06-19 13:29:16 -04:00
Derek Foreman a310667bec ecore_wl2: Add a purge option to surface flush
Summary:
We need to be able to forcibly destroy all surface buffers to make
session recovery work safely for software rendering.

@betabreak
Depends on D6278

Reviewers: devilhorns, zmike

Reviewed By: zmike

Subscribers: cedric, #committers, zmike

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6279
2018-06-15 13:18:30 -05:00
Derek Foreman dc75d6b5d3 ee_wayland: Don't offer a raise callback
Summary: This isn't possible under wayland.

Reviewers: devilhorns, zmike

Reviewed By: zmike

Subscribers: cedric, #committers, zmike

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6276
2018-06-15 13:17:39 -05:00
Mike Blumenkrantz a6731320f5 evas engines: do not immediately free native surface when unsetting it
Summary:
this is a longstanding issue which was exposed by recent patches to standardize
object lifecycles. when a native surface is used by multiple images, unsetting
the surface from one image must not destroy the native surface or else the
remaining images

fix T6970

@fix

Reviewers: ManMower

Reviewed By: ManMower

Subscribers: cedric, #committers

Tags: #efl

Maniphest Tasks: T6970

Differential Revision: https://phab.enlightenment.org/D6235
2018-06-05 12:14:30 -05:00
YeongJong Lee 420128903a ee_wayland: remove needless variable
Reviewers: ManMower, zmike

Reviewed By: ManMower

Subscribers: cedric, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6239
2018-06-01 09:13:14 -05:00
Mike Blumenkrantz 5b043be1db gl_common: fix invalid memory access
Summary:
code was added which ignores the comment explicitly warning not to
do what was done here

ref 9e01cf2698

ref T6970

==4829== Invalid read of size 1
==4829==    at 0x246D8F06: evas_gl_common_image_update (evas_gl_image.c:907)
==4829==    by 0x246DAA7B: evas_gl_common_image_draw (evas_gl_image.c:1417)
==4829==    by 0x246A2AB6: eng_image_draw (evas_engine.c:1240)
==4829==    by 0x6A87842: _draw_image (evas_object_image.c:1403)
==4829==    by 0x6A8A1BF: _evas_image_render (evas_object_image.c:2171)
==4829==    by 0x6A890C1: evas_object_image_render (evas_object_image.c:1868)
==4829==    by 0x6B09C82: evas_render_mapped (evas_render.c:2292)
==4829==    by 0x6B0CE90: evas_render_updates_internal_loop (evas_render.c:3079)
==4829==    by 0x6B0EACA: evas_render_updates_internal (evas_render.c:3522)
==4829==    by 0x6B1087C: evas_render_updates_internal_wait (evas_render.c:3946)
==4829==    by 0x6B10A4D: _evas_canvas_render_updates (evas_render.c:3971)
==4829==    by 0x6A7A234: evas_canvas_render_updates (evas_canvas.eo.c:212)
==4829==    by 0x6A7BBD4: evas_render_updates (evas_canvas.eo.c:758)
==4829==    by 0x808A7D8: ecore_evas_render (ecore_evas.c:177)
==4829==    by 0x808AA58: _ecore_evas_idle_enter (ecore_evas.c:284)
==4829==    by 0x5CC1E46: _ecore_call_task_cb (ecore_private.h:442)
==4829==    by 0x5CC1EAE: _ecore_factorized_idle_process (ecore_idler.c:35)
==4829==    by 0xBFA4DD4: _event_callback_call (eo_base_class.c:1663)
==4829==    by 0xBFA50A6: _efl_object_event_callback_call (eo_base_class.c:1747)
==4829==    by 0xBFA514C: efl_event_callback_call (eo_base_class.c:1750)
==4829==    by 0x5CC661B: _ecore_main_loop_iterate_internal (ecore_main.c:2352)
==4829==    by 0x5CC3F65: _ecore_main_loop_begin (ecore_main.c:1175)
==4829==    by 0x5CCC856: _efl_loop_begin (efl_loop.c:83)
==4829==    by 0x5CCEF6D: efl_loop_begin (efl_loop.eo.c:28)
==4829==    by 0x5CC40DF: ecore_main_loop_begin (ecore_main.c:1248)
==4829==    by 0x5480EE: main (e_main.c:1090)
==4829==  Address 0x2bfc30f8 is 328 bytes inside a block of size 560 free'd
==4829==    at 0x4C30D18: free (vg_replace_malloc.c:530)
==4829==    by 0x540AE91: _eina_freeq_free_do (eina_freeq.c:118)
==4829==    by 0x540B7B0: eina_freeq_ptr_add (eina_freeq.c:372)
==4829==    by 0x6BCD23C: _evas_common_rgba_image_delete (evas_image_main.c:555)
==4829==    by 0x6B41538: _evas_cache_image_entry_delete (evas_cache_image.c:205)
==4829==    by 0x6B43503: evas_cache_image_drop (evas_cache_image.c:945)
==4829==    by 0x6B43F4F: evas_cache_image_size_set (evas_cache_image.c:1166)
==4829==    by 0x246D6548: evas_gl_common_image_alloc_ensure (evas_gl_image.c:17)
==4829==    by 0x246D8EA8: evas_gl_common_image_update (evas_gl_image.c:869)
==4829==    by 0x246DAA7B: evas_gl_common_image_draw (evas_gl_image.c:1417)
==4829==    by 0x246A2AB6: eng_image_draw (evas_engine.c:1240)
==4829==    by 0x6A87842: _draw_image (evas_object_image.c:1403)
==4829==    by 0x6A8A1BF: _evas_image_render (evas_object_image.c:2171)
==4829==    by 0x6A890C1: evas_object_image_render (evas_object_image.c:1868)
==4829==    by 0x6B09C82: evas_render_mapped (evas_render.c:2292)
==4829==    by 0x6B0CE90: evas_render_updates_internal_loop (evas_render.c:3079)
==4829==    by 0x6B0EACA: evas_render_updates_internal (evas_render.c:3522)
==4829==    by 0x6B1087C: evas_render_updates_internal_wait (evas_render.c:3946)
==4829==    by 0x6B10A4D: _evas_canvas_render_updates (evas_render.c:3971)
==4829==    by 0x6A7A234: evas_canvas_render_updates (evas_canvas.eo.c:212)
==4829==    by 0x6A7BBD4: evas_render_updates (evas_canvas.eo.c:758)
==4829==    by 0x808A7D8: ecore_evas_render (ecore_evas.c:177)
==4829==    by 0x808AA58: _ecore_evas_idle_enter (ecore_evas.c:284)
==4829==    by 0x5CC1E46: _ecore_call_task_cb (ecore_private.h:442)
==4829==    by 0x5CC1EAE: _ecore_factorized_idle_process (ecore_idler.c:35)
==4829==    by 0xBFA4DD4: _event_callback_call (eo_base_class.c:1663)
==4829==    by 0xBFA50A6: _efl_object_event_callback_call (eo_base_class.c:1747)
==4829==    by 0xBFA514C: efl_event_callback_call (eo_base_class.c:1750)
==4829==    by 0x5CC661B: _ecore_main_loop_iterate_internal (ecore_main.c:2352)
==4829==    by 0x5CC3F65: _ecore_main_loop_begin (ecore_main.c:1175)
==4829==    by 0x5CCC856: _efl_loop_begin (efl_loop.c:83)
==4829==    by 0x5CCEF6D: efl_loop_begin (efl_loop.eo.c:28)
==4829==    by 0x5CC40DF: ecore_main_loop_begin (ecore_main.c:1248)
==4829==    by 0x5480EE: main (e_main.c:1090)
==4829==  Block was alloc'd at
==4829==    at 0x4C31A1E: calloc (vg_replace_malloc.c:711)
==4829==    by 0x6BCCF2F: _evas_common_rgba_image_new (evas_image_main.c:509)
==4829==    by 0x6B41588: _evas_cache_image_entry_new (evas_cache_image.c:261)
==4829==    by 0x6B44861: evas_cache_image_empty (evas_cache_image.c:1447)
==4829==    by 0x246D845B: evas_gl_common_image_native_disable (evas_gl_image.c:624)
==4829==    by 0x253F3C09: eng_image_native_set (evas_engine.c:1234)
==4829==    by 0x6A86204: _evas_image_native_surface_set (evas_object_image.c:1021)
==4829==    by 0x6A7E110: evas_object_image_native_surface_set (evas_image_legacy.c:509)
==4829==    by 0x6A8609A: _on_image_native_surface_del (evas_object_image.c:998)
==4829==    by 0x6A55190: _eo_evas_object_cb (evas_callbacks.c:184)
==4829==    by 0xBFA4EB7: _event_callback_call (eo_base_class.c:1686)
==4829==    by 0xBFA51F8: _efl_object_event_callback_legacy_call (eo_base_class.c:1759)
==4829==    by 0xBFA529E: efl_event_callback_legacy_call (eo_base_class.c:1762)
==4829==    by 0x6A968ED: _efl_canvas_object_efl_object_event_callback_legacy_call (evas_object_main.c:1229)
==4829==    by 0xBFA529E: efl_event_callback_legacy_call (eo_base_class.c:1762)
==4829==    by 0x6A55C3D: evas_object_event_callback_call (evas_callbacks.c:413)
==4829==    by 0x6A96D3E: _efl_canvas_object_efl_object_invalidate (evas_object_main.c:1279)
==4829==    by 0xBFA7BAB: efl_invalidate (efl_object.eo.c:72)
==4829==    by 0xBFA0A09: _efl_invalidate (eo_base_class.c:170)
==4829==    by 0xBFA2737: _efl_object_parent_set (eo_base_class.c:734)
==4829==    by 0xBFA6BDA: efl_parent_set (efl_object.eo.c:12)
==4829==    by 0xBFA2537: efl_del (eo_base_class.c:686)
==4829==    by 0x6A96082: evas_object_del (evas_object_main.c:1041)
==4829==    by 0x2C9D519F: _bar_icon_preview_del (bar.c:762)
==4829==    by 0x6A55190: _eo_evas_object_cb (evas_callbacks.c:184)
==4829==    by 0xBFA4EB7: _event_callback_call (eo_base_class.c:1686)
==4829==    by 0xBFA51F8: _efl_object_event_callback_legacy_call (eo_base_class.c:1759)
==4829==    by 0xBFA529E: efl_event_callback_legacy_call (eo_base_class.c:1762)
==4829==    by 0x6A968ED: _efl_canvas_object_efl_object_event_callback_legacy_call (evas_object_main.c:1229)
==4829==    by 0xBFA529E: efl_event_callback_legacy_call (eo_base_class.c:1762)
==4829==    by 0x6A55C3D: evas_object_event_callback_call (evas_callbacks.c:413)
==4829==    by 0x6A96D3E: _efl_canvas_object_efl_object_invalidate (evas_object_main.c:1279)
==4829==    by 0xBFA7BAB: efl_invalidate (efl_object.eo.c:72)
==4829==    by 0x7BE9326: _efl_access_object_efl_object_invalidate (efl_access_object.c:634)
==4829==    by 0xBFA7BAB: efl_invalidate (efl_object.eo.c:72)
==4829==    by 0xBFA0A09: _efl_invalidate (eo_base_class.c:170)
==4829==    by 0xBFA2737: _efl_object_parent_set (eo_base_class.c:734)
==4829==    by 0xBFA6BDA: efl_parent_set (efl_object.eo.c:12)
==4829==    by 0xBFA2537: efl_del (eo_base_class.c:686)
==4829==    by 0x6A96082: evas_object_del (evas_object_main.c:1041)
==4829==    by 0x7CD5F2C: _efl_ui_widget_efl_canvas_group_group_del (efl_ui_widget.c:855)
==4829==    by 0x6AAD303: efl_canvas_group_del (evas_object_smart.c:1862)
==4829==    by 0x7AFF104: _elm_box_efl_canvas_group_group_del (elm_box.c:362)
==4829==    by 0x6AAD303: efl_canvas_group_del (evas_object_smart.c:1862)
==4829==    by 0x6AABB79: evas_object_smart_del (evas_object_smart.c:1288)
==4829==    by 0x6A97179: _efl_canvas_object_efl_object_invalidate (evas_object_main.c:1336)
==4829==    by 0xBFA7BAB: efl_invalidate (efl_object.eo.c:72)
==4829==    by 0x7BE9326: _efl_access_object_efl_object_invalidate (efl_access_object.c:634)
==4829==    by 0xBFA7BAB: efl_invalidate (efl_object.eo.c:72)
==4829==    by 0xBFA0A09: _efl_invalidate (eo_base_class.c:170)
==4829==    by 0xBFA2737: _efl_object_parent_set (eo_base_class.c:734)
==4829==    by 0xBFA6BDA: efl_parent_set (efl_object.eo.c:12)
==4829==    by 0xBFA2537: efl_del (eo_base_class.c:686)
==4829==    by 0x6A96082: evas_object_del (evas_object_main.c:1041)
==4829==    by 0x2C9D41DA: _bar_icon_preview_hide (bar.c:450)
==4829==    by 0x5CFE14C: _ecore_call_task_cb (ecore_private.h:442)
==4829==    by 0x5CFE5C4: _ecore_timer_legacy_tick (ecore_timer.c:160)
==4829==    by 0xBFA4DD4: _event_callback_call (eo_base_class.c:1663)
==4829==    by 0xBFA50A6: _efl_object_event_callback_call (eo_base_class.c:1747)
==4829==    by 0xBFA514C: efl_event_callback_call (eo_base_class.c:1750)
==4829==    by 0x5CFF880: _efl_loop_timer_expired_call (ecore_timer.c:634)
==4829==    by 0x5CFF6AF: _efl_loop_timer_expired_timers_call (ecore_timer.c:587)
==4829==    by 0x5CC6522: _ecore_main_loop_iterate_internal (ecore_main.c:2317)
==4829==    by 0x5CC3F65: _ecore_main_loop_begin (ecore_main.c:1175)
==4829==    by 0x5CCC856: _efl_loop_begin (efl_loop.c:83)
==4829==    by 0x5CCEF6D: efl_loop_begin (efl_loop.eo.c:28)
==4829==    by 0x5CC40DF: ecore_main_loop_begin (ecore_main.c:1248)
==4829==    by 0x5480EE: main (e_main.c:1090)

Reviewers: ManMower

Reviewed By: ManMower

Subscribers: cedric, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6234
2018-05-31 13:12:18 -05:00
Carsten Haitzler 4715c099ec Revert "ecore-evas-x: set draw_block until the window receives a configure event"
This reverts commit 7b80038fa7.

JackDanielz asked nicely, but this hasn't been reverted. As this
totally breaks enlightenment (it's black) and this happens on
everythng I've tested (1 laptop, desktop and Xephyr) I'm calling this
patch a dud.

Now... what kind of review is going on here? This hasn't been tested.
What kind of review doesn't build + run things?

for the reasons of poor review and massive horribler fully complete
desktop like breakage ... this gets reverted as master should not be
broken like this.
2018-05-27 04:52:03 +09:00
Mike Blumenkrantz 7b80038fa7 ecore-evas-x: set draw_block until the window receives a configure event
Summary:
drawing a non-override window before receiving a configure event results
in an unsized window, breaking spec. it also prevents ecore-evas resize
callbacks from triggering, yielding undefined returns from functions which
attempt to get the geometry of the ecore-evas

fix T6907

Reviewers: cedric, raster

Reviewed By: cedric

Subscribers: #committers, vtorri

Tags: #efl

Maniphest Tasks: T6907

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

Reviewed-by: Cedric BAIL <cedric@osg.samsung.com>
2018-05-25 10:28:32 -07:00
Cedric Bail bff5c37c1b ecore_evas: we shouldn't do anything when we are deleted. 2018-05-24 16:02:19 -07:00
Derek Foreman 27316746f5 ee_wayland: Fix device leak on disconnect
Summary:
A reference was taken on these when they were added, so by passing NULL
here we're not allowing that reference to be dropped.  This results in
not only leaking the device forever, but also potentially leaving it as
a default device after it's removed so that no new attach will replace it.

Under weston all devices are removed on a VT switch, and when you switch
back the default device is wrong, which leads to problems with events
like "mouse in" which, for legacy reasons, don't take a seat, but
instead look up the default seat.

This allows the delete callback to be fired for the first time ever,
and while I've tried to fix some bugs this has revealed, I'm not
actually sure I've caught them all.
Depends on D6182

Reviewers: zmike

Reviewed By: zmike

Subscribers: cedric, zmike

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6183
2018-05-18 13:46:47 -04:00
Wonki Kim f1c03000c9 Modify initial visibility of a extn_socket
Summary:
extn socket should be rendered even if it is not visible to answer client's requests

extn_socket was rendered even if it's not visible for the first render.
however, it's not rendered as expected because there has been changes for ecore evas idle enterer.
so that this patch changes visibility of extn_socket to answer client's requests immediately.

ref D6054

Reviewers: zmike, jypark

Subscribers: cedric

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6167
2018-05-16 11:41:27 -04:00
Wonki Kim d92b195fe2 ecore_evas_extn: Remove aka latch logic on fn_prepare function
Summary:
current extn_socket_prepare function logic could run into dead-end
because extnbuf_lock return null on failure of taking a lock.

this patch removes aka latch logic that guide the function to dead-end.

Reviewers: cedric, raster, zmike, jypark

Subscribers: zmike

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6054
2018-05-16 11:41:19 -04:00
Andy Williams 114873c545 remove potential double free 2018-05-15 14:49:41 +01:00
Wonki Kim fef2a12ef6 ecore_evas_extn: Modify not to send a message if there is nothing to draw
Summary:
Seding ipc messages on ews_update_image(which is invoked as a callback of EVAS_RENDER_POST)
can makes ecore main loop awake, because sending ipc messages makes message_queue not empty.

so that this patch prevent seding ipc logic if there is nothing to draw.

Reviewers: cedric, raster

Reviewed By: raster

Subscribers: zmike

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6055
2018-05-09 23:58:48 +09:00
Derek Foreman 1e2626a70c ee_wayland: retain seat names when creating a new canvas
Summary:
We were creating seats with silly arbitray names like seat-11 when
creating a new canvas.
Depends on D6130

Reviewers: zmike, cedric

Reviewed By: zmike

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6131
2018-05-08 13:26:57 -05:00
Derek Foreman abe295735a ee_wayland: clean up warnings
Summary:
Pretty sure these are my fault.
Depends on D6122

Reviewers: zmike, cedric

Reviewed By: zmike

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6123
2018-05-08 13:26:25 -05:00
Derek Foreman 684d6a69d6 ee_wayland: remove edges flag
Summary:
Nothing needs this anymore.
Depends on D6121

Reviewers: zmike, cedric

Reviewed By: zmike

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6122
2018-05-08 13:26:22 -05:00
Derek Foreman af9ae04eda ee_wayland_shm: Remove resize flag
Summary:
This hasn't been useful in a very long time.
Depends on D6120

Reviewers: zmike, cedric

Reviewed By: zmike

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6121
2018-05-08 13:26:18 -05:00
Derek Foreman cadf0728fd ee_wayland_egl: Remove some amazing weirdness
Summary:
I don't even know what to put here, but I'll try.

wl_egl_window_resize()'s final two parameters indicate new attachment
points for a buffer relative to the previous top left corner.  When the
compositor is resizing a window it already handles the corner placement.
Fortunately, compositors seem to ignore the new attach co-ords during
resize, so this code hasn't broken anything.  It's just a complicated
NOP.

The new attachment points are intended for use in spontaneous resize,
not drag resize, but the only time these functions are called is for
drag resize.
Depends on D6119

Reviewers: zmike, cedric

Reviewed By: zmike

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6120
2018-05-08 13:26:12 -05:00
Mike Blumenkrantz 4d62d59978 ecore-evas-win32: set draw_block until the window receives a configure event
Summary:
drawing a window before receiving a configure event results
in an unsized window, breaking spec. it also prevents ecore-evas resize
callbacks from triggering, yielding undefined returns from functions which
attempt to get the geometry of the ecore-evas

ref T6907

@fix

Depends on D6033

Reviewers: vtorri

Reviewed By: vtorri

Subscribers: cedric

Maniphest Tasks: T6907

Differential Revision: https://phab.enlightenment.org/D6034
2018-05-02 15:57:26 -04:00
Cedric BAIL c51a425ee5 ecore_evas: fix vnc_server build. 2018-05-01 10:39:01 -07:00
Derek Foreman a61f254f19 ee_wayland: Remove pointless ack_configure
If we don't ack_configure here, it'll just automatically happen in
ecore_wl2_commit() next time we render anyway.

If we do ack_configure here, we can totally screw up E's internal window
handling.

Removing it seems like a win.
2018-04-24 15:44:09 -05:00
Xavi Artigas 5697f6e94b Efl.Gfx.Image* (From Efl.Image*)
Ref https://phab.enlightenment.org/T6847

Reviewed-by: Cedric Bail <cedric@osg.samsung.com>
2018-04-24 09:03:40 -07:00
Derek Foreman a297f17ac3 ee_wayland: Add some NULL checks
These just protect against caller stupidity.  Double register or double
unregister shouldn't happen anyway.
2018-04-20 13:00:28 -05:00
Derek Foreman dbf65eb96a ecore_evas_wayland: Handle region updates and alpha setting in engine
Instead of having elm handle all this stuff, handle it in ee.  This fixes
a loooong standing bug where we would always use an alpha enabled surface
because CSD needs shadows - even if we aren't drawing CSD.
2018-04-20 13:00:28 -05:00
Derek Foreman 5af84afced ecore_evas_wayland: Replace transparent_set with alpha_set
transparent_set is a legacy path that should do exactly what alpha_set
does these days, so squash them into the same function.
2018-04-20 13:00:27 -05:00
Derek Foreman d20c0bf964 ecore_evas_wayland: Remove content rectangle from engine data
It's no longer used.
2018-04-20 13:00:27 -05:00
Derek Foreman 541ab76e45 ecore_evas_wayland: Calculate content size from shadow and framespace
Instead of using wdata->content, calculate these values.
2018-04-20 13:00:27 -05:00
Derek Foreman 6da0933d60 ecore_wl2: Add alpha to reconfigure
Currently we only ever make wayland windows with alpha, this is a step
towards changing that.
2018-04-20 13:00:27 -05:00
Derek Foreman d85e960060 wayland_egl: Fix color depth when not using alpha
Since we don't actually set the color depth at all we can end up with
an RGB565 buffer.  We don't ask for depths because apparently the N900
had a problem with this under X.

I'm not aware of any efforts to bring wayland to the N900, so let's do
this normally.
2018-04-20 13:00:27 -05:00
Bowon Ryu f176aece65 evas_engine: remove logically dead code
Summary:
"plane" exception value is already filtered at line 1791.
execution cannot reach this statement.

Reviewers: cedric, Jaehyun_Cho

Reviewed By: Jaehyun_Cho

Differential Revision: https://phab.enlightenment.org/D5973
2018-04-20 19:07:39 +09:00
Daniel Kolesa fcae7cab27 eolian gen: enable constness generation on property getter impls
This changes a lot of things all across the EFL. Previously,
methods tagged @const had both their external prototype and
internal impl generated with const on object, while property
getters only had const on the external API. This is now changed
and it all has const everywhere.

Ref T6859.
2018-04-17 20:31:55 +02:00
Derek Foreman a252c3445d ee_wayland: Stop using manual_render_set
Now we use draw_block instead, so we don't accidentally stomp on other
code's usage of manual_render_set

fix T6834
2018-04-12 15:59:39 -05:00
Derek Foreman 380a58a9d9 ee_x: Rename draw_ok to draw_block and invert logic
I want to use this in other engines, but no other engine initializes this
properly, so draw_ok would be EINA_FALSE everywhere.  This way draw_block
is EINA_FALSE after calloc in all engines that don't know about it.

ref T6834
2018-04-12 15:59:39 -05:00
Derek Foreman b8e58eb4b2 ee_wayland: Remove use of draw_ok
This appears vestigial, as the evas render path we use has no custom
draw_ok handling, so nothing ever reads this variable.

ref T6834
2018-04-12 15:59:39 -05:00
Derek Foreman 4343a95e27 ee_cocoa: Remove draw_ok sets
draw_ok isn't currently used by anything but the X custom render function,
so it's doing absolutely nothing here.

ref T6834
2018-04-12 15:59:39 -05:00
Shinwoo Kim b27949dafb ecore_evas_wayland: handle 0x0 content problem
Someone could NOT use elementary and use ecore_evas only. In this case, content
size which is defined by elementary is 0x0. If content size is 0x0, then frame
size is equal to window size. But the frame size is defined by elementary as
well. So if there is not a content, then the frame size should be 0.
2018-04-10 20:38:47 +09:00
junsu choi d21d51a4a9 evas: fix typo written twice
Summary: disp is written twice with the same value.

Test Plan: N/A

Reviewers: woohyun, kimcinoo, cedric

Reviewed By: cedric

Subscribers: cedric

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

Reviewed-by: Cedric Bail <cedric@osg.samsung.com>
2018-04-06 11:32:07 -07:00
WooHyun Jung 07f7fee2d0 evas_gl_image: add null check 2018-04-05 11:10:43 +09:00
Cedric Bail a44697c37a ecore_evas: refactor logic for creating Ecore_Evas. 2018-04-02 15:12:31 -07:00
Derek Foreman e9b7844bb8 ecore_drm2: Improve early tick logic
We should only have to actually force a tick if we can't set up
the tick job, as the evas changed callback or a following render
from the tick job's tick will cause a flip.

Should remove a potential for a missed tick near the start of
ticking.
2018-03-23 16:13:39 -05:00
Cedric BAIL 4c4177ac20 efl: use efl_add_ref to create objects which have no parent
Signed-off-by: Mike Blumenkrantz <zmike@osg.samsung.com>
2018-03-20 17:20:56 -07:00
Derek Foreman f0a96ec53c ee_drm: prevent extra flips
Similarly to commit 8b962d24ac prevent
extra flips in the drm engine.

These are potentially more harmful to DRM as they can cause frame
drops and missed render opportunities.
2018-03-15 14:49:56 -05:00
Derek Foreman 8b962d24ac ee_wayland: Prevent extra commits
It's possible that we unregister then reregister an animator so quickly
that the ecore_evas idle enter/exiters haven't had a chance to run yet.
In this case a render will come shortly anyway and we shouldn't use a
'false' commit to kick off a frame callback.

Silences an ERR and unmeasurably improves protocol utilization.
2018-03-15 14:41:15 -05:00
Derek Foreman 812ab64413 ee_wayland: Set window visible before trying to render it
if we try to render before setting ee->visible the results aren't
likely to be... visible.
2018-03-14 16:08:07 -05:00
Derek Foreman cdc33f5874 gl_drm: Use gl extension string helper instead of strstr 2018-03-08 14:33:05 -06:00
Derek Foreman 05d7c1c9a2 gl_common: Make extension string checks more robust
strstr() can give false positives if the extension name is a subset of
a string in the extension list, for example EGL_EXT_image_dma_buf_import
would match EGL_EXT_image_dma_buf_import_modifiers.

I've opted for a mildly badgered copy of epoxy's test, which should be
robust in the face of subsets.
2018-03-08 14:27:07 -06:00
Derek Foreman 464d0ca9bb gl_common: Replace strstr() for extension checks with a helper function
The helper incorporates NULL checks, and we love those, so it's better.
2018-03-08 14:27:04 -06:00
Derek Foreman 3fc6eea24f gl_drm: Don't NULL init a variable we're about to set
minor clean up with no functional change.
2018-03-08 11:33:34 -06:00
Derek Foreman 37b9a246ba gl_drm: Check EGL client extensions before using platform_base
The comment here was right, we shouldn't just trust these without testing
if we should trust these.
2018-03-08 11:33:31 -06:00
Derek Foreman 3a15195088 gl_drm: Rename eng_gl_symbols to eng_egl_symbols
It now only deals with egl.  gl extensions must be queried later, so it
was previously a bit weird/confusing.
2018-03-08 11:16:01 -06:00
Derek Foreman 609c86903f gl_drm: Move some extension queries to after context creation
Anything non-EGL we might query would have to be queried here, so
I'm moving the call here to protect us in the event that we need GL
extensions in the future.

I'm still a bit confused as to what string I should be passing to
evas_gl_symbols, though.
2018-03-08 11:15:57 -06:00
Derek Foreman 329e9c0b4b gl_drm: use EGL_IMG_context_priority if available
This is a hint that we want a high priority context.  Since gl_drm is
likely a compositor or a full screen app, it makes sense that it try to
use this (but other engines probably shouldn't)

Based loosely on Chris Wilson's weston patch to do the same thing.
(weston commit b678befb6ed055e6c66466505d9195a3cebf8073)

As this extension appears to have been around for years, I haven't
added fallback defines for:
EGL_CONTEXT_PRIORITY_LEVEL_IMG  0x3100
EGL_CONTEXT_PRIORITY_HIGH_IMG   0x3101
2018-03-07 15:24:37 -06:00
Derek Foreman f8658d25fa gl_drm: Move the gl symbol check to immediately after display init
We don't actually need a context first, just an initialized display.
2018-03-07 15:24:37 -06:00
Youngbok Shin 255e9c788a evas: increase offset by 4 to do work for next map points
Summary:
Increasing offset as 2 for next map points is wrong.
If evas tries to draw for wrong combination of map points,
it can cause wrong results. Actually, every drawing code for
map points use and increase offset as 4.

@fix

Test Plan:
A test case for textpach is modified for testing this issue.
1. Run elementary_test with sync render mode.
   ex) ECORE_EVAS_FORCE_SYNC_RENDER=1 elementary_test
2. Open textpath test.
3. Set a short text by clicking newly added check box.
4. (It will show another issues... So,) change slice number to update textpath properly.
5. See some noises at top-left side of text.
   It is drawn from the two of end map points to the two of empty(not used) map points.

Reviewers: raster, cedric, jpeg, jypark

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

Signed-off-by: Cedric Bail <cedric@osg.samsung.com>
2018-03-06 19:05:57 -08:00
Carsten Haitzler cc1e1a5b56 ecore evas - drm engine - fix focus set on show to work correctly 2018-02-26 00:36:17 +09:00
Marcel Hollerbach c4f33c67a8 move from efl.vpath to eina_vpath
The usages from efl.vpath are moved to to eina_vpath
2018-02-22 09:26:55 +01:00
Derek Foreman 0a66978041 ee_wayland: Fix ecore_wl2 refcounting breakage on some failures
If we have a blacklisted gl implementation then we'll create a canvas,
it'll fail to be useful, and we'll free it - which calls
ecore_wl2_shutdown(), but then we'll also call ecore_wl2_shutdown()
a second time further down the failure path.

Take a bonus reference before freeing the failed canvas to keep refcounts
sane.
2018-02-21 16:42:08 -06:00
Myoungwoon Roy, Kim 1308fe5338 ecore-evas: Replace ecore_wl_dpi_get with ecore_wl2_output_dpi_get
Summary: This patch replaces ecore_wl_dpi_get with ecore_wl2_output_dpi_get using Ecore_Wl2_Output

Test Plan: Execute test suite

Reviewers: cedric, raster, jpeg, stefan_schmidt, Jaehyun_Cho, devilhorns

Reviewed By: devilhorns

Differential Revision: https://phab.enlightenment.org/D5804
2018-02-19 06:40:03 -05:00
Marcel Hollerbach 8aa4df37c3 elm: fix test case for elm_web
This is a funny story:
elm_web loads modules for getting a actual elm.web object. However, when
elementary was merged into EFL someone (... :)) forgot to change the
path that is used to load intree modules, so elm.web.none was never
actaully tested ... :)

But thx to the wonderfull legacy patch its super simple to fix this :)
2018-02-17 21:17:59 +01:00
Mike Blumenkrantz 0a5b034977 elm_web: use Efl.Ui.Zoom 2018-02-15 13:11:01 -05:00
Derek Foreman c9ac2338d4 gl_drm: NULL check img
If we set native surface on a new object we can get here with NULL
engine_info from the caller.  We should still create a native surface.
2018-02-14 14:56:48 -06:00
Chris Michael af2960df0b evas drm engines: Fix variable type for output
We already include the Ecore_Drm2 header for these engines, so there
is no need for the 'output' field to be a void pointer here.

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2018-02-13 11:44:36 -05:00
Chris Michael 32d32d402f ecore-evas-drm: Use output viewport in ecore_evas_animator_tick calls
@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2018-02-13 11:44:23 -05:00
Derek Foreman 38d8ae0217 wayland_imf: Clear hide timer when deleting context
Otherwise the callback can fire after the module is unloaded leading to some
very entertaining to debug crashes at shutdown.
2018-02-09 11:12:07 -06:00
subhransu mohanty 48433efc43 ector: Updated the ector_buffer_pixels_set() api with stride info
Reviewers: jypark, jpeg

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D5795
2018-02-08 14:44:29 +09:00
Mike Blumenkrantz 49e47ac310 ecore-imf: do ecore-x init during ctx creation instead of module init
this avoids a number of issues with efl under wayland, msot notably the
automatic triggering of xwayland during every app startup

@fix
2018-02-07 12:12:22 -05:00
Vincent Torri d54f0f66cf Evas: remove depth usage in GDI and DirectDraw engines
Test Plan: compilation and elementary_test

Reviewers: raster

Reviewed By: raster

Subscribers: cedric, raster

Differential Revision: https://phab.enlightenment.org/D5792
2018-02-07 22:20:20 +09:00
Carsten Haitzler 8a296cb90f disable async mode (use sync mode) for ibus when keymap changes
so scenario:

1. use ibus
2. have at least english input and japanese input (or korean etc.)
3. have 2 kbd layouts (english and greek).
4. enable "use system keyboard layout" in ibus advanced settings
5. switch to english input mode
6. switch to greek key layout
7. type and get english, not greek input as you should

@fix for both terminology and elm/efl entry/ytext input.
2018-02-07 01:16:59 +09:00
Mike Blumenkrantz edd0d75e03 ecore: make dbus-using modules fork-safe
reset dbus connections to ensure continued functionality
2018-02-02 16:59:44 -05:00
Derek Foreman e4122da211 ecore_wl2: Remove force from surface reconfigure
It no longer has any users or need to exist.
2018-01-26 15:53:59 -06:00
Derek Foreman 3ef4671085 wayland_shm: remove dirty bit entirely
Now that we're not using it for session recovery we can strip it out
entirely.
2018-01-26 15:53:59 -06:00
Derek Foreman 26a718b07e wayland_shm: Use surface flush instead of setting dirty
The dirty bit was a dirty hack to let session recovery force reconfigures
on startup.

Now that we have a surface flush we can achieve the same thing by just
discarding all buffers immediately.
2018-01-26 15:53:59 -06:00
Derek Foreman 79f3eaa68b wayland_shm: Clean up duplicate prototypes
These were supposed to be removed when I moved the associated functions
into ecore_wl2.
2018-01-19 12:37:10 -06:00
Vincent Torri f5b01ac5ce all: Simplify definition of EAPI
This will help in the transition from Autotools to Meson. This has been
tested on Windows for which EFL_XXX_BUILD were first introduced.
2018-01-18 18:04:03 +09:00
Jean-Philippe Andre 24447641d3 evas gl: Properly verify that Evas GL works
For SW engine we need to verify that OSMesa is present. The patch
fb048e7312 broke the logic.

Tested by temporarily removing OSMesa from my system.

Fixes T6617 (again)
2018-01-17 15:22:46 +09:00
Sungtaek Hong fe346d2ee2 elm_datetime: use legacy elm_button
Summary:
elm_datetime and Efl.Ui.Clock uses same module: clock_input_ctxpopup.
The module creates internal field object.
Use legay button for field object until Efl.Clock and datetime module
policy is fixed.

Reviewers: jpeg, CHAN, woohyun

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D5725
2018-01-17 13:49:49 +09:00
Vincent Torri 4916973a60 efl: remove inclusion of dirent.h where it is not used
Test Plan: compilation

Reviewers: cedric

Subscribers: jpeg

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2018-01-12 11:06:12 -08:00
Carsten Haitzler fb048e7312 evas sw generic - don't dlopen osmesa until first needed.
osmesa needs llvm. llvm apparently just by dlopening or linking to the
lib (libLLVM...) gets you 3.5mb of dirty pages just in this lib. that's
a whole lib entirely dirty pages. odd and horrible. in fact once i
stoppd dlopening OSMesa all the time on engine init (and only when gl
is needed)... the amount of dirty pages went from 17208 to 8860.
that's a whopping drop of 8mb! 8mb saved! in fact just dlopening
osmesa and doing the other gl init stuff led to more anonymuse
mappings with dirty pages. 2 of them (2072k and 2076k) which baffled
me as that didn't seem like heap or efl's own data. these disappeared
along with libLLVM-5.0.so (3520k + 60k dirty pages). we stopped
linking/loading libedit (12k dirty), libglapi (20k dirty),
libLLVM-5.0 (3580k dirty), libncursesw (72k dirty),
libOSMesa.so (260k dirty), libtinfo (20k dirty). ... or at least
stopped until absolutely needed. total 17208k of dirty pages went down
to 8860.

my test case was just launching terminology (and doing nothing with it).

@fix memory bloating
2018-01-12 03:02:43 +09:00
Mike Blumenkrantz ffa276fce3 wayland: add xdg-shell vfinal support for client-side
@feature
2018-01-10 11:39:52 -05:00
subhransu mohanty d838220d56 evas/vg: Use always blending op while drawing the vector.
Summary:
The default backend overrides this operation depending on the fill color
but the cairo backend dosen't hence cairo will always use bled mode while drwaing the vector.

Reviewers: jpeg

Subscribers: vtorri, cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D5724
2018-01-08 19:16:59 +09:00
Carsten Haitzler 2fb80270ba efl thread signal masks - fix up for various threads manually created
so xine module plus 2 eina dbug threads didnt set up signal
blocking/masks correctly. xine use ssigprocmask not pthread_sigmask
and the other 2 didnt even bother at all. fix this so these threads
all block most of these commnly caught signals so these threads never
get them
2018-01-06 18:20:23 +09:00
Marcel Hollerbach 01df8b7f78 evas: make tbm_surface api fields static
When building statically this breaks build, since both symbols would be
defined globally.
2018-01-04 14:31:22 +01:00
Marcel Hollerbach 0609c68e34 eina: only execute that code if HAVE_MALLOC_USABLE_SIZE is defined
thats why we check that ...
2017-12-20 18:11:09 +00:00
Carsten Haitzler 9c88bc4933 elm build for osx - try another dotting of i's and crossing of t's
try this and fix T6448 ...
2017-12-20 19:07:01 +09:00
Carsten Haitzler 26acc9bea2 osx build - try again
try fix T6448 again
2017-12-20 18:04:43 +09:00
Carsten Haitzler 5436908d7b try and fix osx build with symbols missing...
try and fix T6448 last comment. not sure if it does...
2017-12-20 17:26:32 +09:00
Jean-Philippe Andre 88bfba1fdd evas filters: Add "alphaonly" flag for blend and blur
This is very useful to specify precisely which kind of RGBA -> Alpha
conversion you want. If all you wanted was the alpha layer to use as a
mask, set this flag to true.

@feature
2017-12-14 18:03:49 +09:00
Ross Vandegrift 71e5c74eb6 efl: drop deprecated Encoding key from desktop files
Summary:
The Encoding key is no longer required, all desktop files are assumed to
be UTF-8 encoded.  See details at:
https://standards.freedesktop.org/desktop-entry-spec/1.1/apc.html

Fix various typos and misspellings

lintian, Debian's package checker, uses strings to check for common typos
in compiled binaries.  This change fixes the ones it identified in 1.20.6.

Reviewers: cedric

Reviewed By: cedric

Subscribers: cedric, jpeg

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2017-12-13 10:27:48 -08:00
Chris Michael e4d5528e34 evas-gl-drm: Don't pass invalid surface or bo to gbm function
This small patch just checks that we have a valid surface and bo that
we can pass to gbm_surface_release_buffer. If they are not valid, this
causes a hard crash.

NB: This does not actually Fix the ticket issue....

ref T6483

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2017-12-12 11:28:36 -05:00
Pawel Aksiutowicz 5e3c641438 evas: removed "clobbered" warnings from image_savers/png/evas_image_save_png
Reviewers: stanluk, lukasz.stanislawski, cedric, jpeg

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D5536
2017-12-11 17:18:55 +09:00
Sungtaek Hong fc8cc4a9b3 efl_ui_widget: find theme just once in layout inherited widget
When a widget inherits layout in tries to set theme in group_add or in
constructor. When another widget inherits the previous widget, it sets
layout again with new klass name. This sets klass in the widget and
sets layout in super class, so that it can set layout only once.

Test Plan: Run efl_ui_widget related elementary test.

Reviewers: jpeg, cedric, woohyun, singh.amitesh

Differential Revision: https://phab.enlightenment.org/D5473
2017-12-08 16:02:22 +09:00
Chris Michael 1711363725 ecore-evas-drm: Check for XDG_SEAT existence
Small patch to allow specifying a different seat via XDG_SEAT env
variable. If no seat name is passed as ecore_evas options, then we
would always default to 'seat0'. As this may not be desirable in all
situations, allow for an override via XDG_SEAT env var.

ref T6455

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2017-12-01 15:32:35 -05:00
Derek Foreman 8a3b983c53 ecore_wl2 wayland_shm: Move surface functions into ecore_wl2
Finish pushing these all into ecore_wl2
2017-12-01 10:58:44 -06:00
Derek Foreman dd5edfae03 wayland_shm: Rename all the evas_dmabuf functions
These are going to find a home in ecore_wl2, and this is the last
step before moving them all over there.
2017-12-01 10:58:44 -06:00
Derek Foreman 4e3016070a wayland_shm: No longer include dmabuf header in engine.h
There's no longer any need for code outside of evas_dmabuf.c to
know anything about dmabuf.
2017-12-01 10:58:44 -06:00
Derek Foreman e1031f5249 wayland_shm: move surface structure to evas_dmabuf.c
This is no longer needed by the outbuf code.
2017-12-01 10:58:44 -06:00
Derek Foreman 57622713de wayland_shm: Use wrapper functions instead of function pointers
switch to the new "API"
2017-12-01 10:58:44 -06:00
Derek Foreman 594fef7dd3 wayland_shm: Wrap function pointers for surface
This is going to be an API soon.
2017-12-01 10:58:44 -06:00
Derek Foreman dd8d60ad28 wayland_shm: Move surface free into surface_destroy
The caller shouldn't have to free this.
2017-12-01 10:58:44 -06:00
Derek Foreman 5b4b18836a wayland_shm: Remove struct _Dmabuf_Surface
It's all piled into Surface now.
2017-12-01 10:58:44 -06:00
Derek Foreman 8a6c4fe5ff wayland_shm: Stop using outbuf and engine info in surface code
The surface stuff now no longer needs knowledge of those structures.
2017-12-01 10:58:44 -06:00
Derek Foreman 7eb0af45d6 wayland_shm: Pass alpha to surface_create
Stop extracting it from other structures, pass it directly.
2017-12-01 10:58:44 -06:00
Derek Foreman 2b3654c1fd wayland_shm: pass the ecore_wl2_window to surface create
No longer extract this from the engine info.
2017-12-01 10:58:44 -06:00
Derek Foreman d1a4f38a96 wayland_shm: Store width and height in surface struct
No longer query these from the outbuf.
2017-12-01 10:58:44 -06:00
Derek Foreman 6a48d56dca wayland ee: Don't clear the window pointer during session recovery
The same pointer is valid post recovery, and anything that used to
check this for NULL now checks that the window's display is NULL
which is handled in ecore_wl2 now.
2017-12-01 10:58:44 -06:00
Derek Foreman 15fdbca653 wayland evas: Remove Ecore_Wl2_Display from engine info
We've got the Ecore_Wl2_Window so we can always get the display from
that.
2017-12-01 10:58:44 -06:00
Derek Foreman 73d1ab0cd5 wayland_shm: Remove Shm_Surface
only Dmabuf_Surface is used, so let's remove this and lose the union.
2017-12-01 10:58:44 -06:00
Derek Foreman e3d6626c0d wayland_shm: Move surface create into dmabuf code
These functions can be combined since there's now only the dmabuf
path.
2017-12-01 10:58:44 -06:00
Derek Foreman d1bb026195 wayland_shm: remove useless wrapper function
This no longer has multiple call sites.  Goodbye.
2017-12-01 10:58:44 -06:00
Pawel Aksiutowicz 56abebf236 evas: remove warning from image_loaders/png/evas_image_load_png
Reviewers: stanluk, lukasz.stanislawski, cedric

Reviewed By: cedric

Subscribers: cedric, jpeg

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

Signed-off-by: Cedric Bail <cedric@osg.samsung.com>
2017-11-23 15:43:38 -08:00
Derek Foreman 2c559a1ee9 wayland_shm: Fix partial redraws
I accidentally the age tracking.
2017-11-21 16:48:30 -06:00
Marcel Hollerbach a8fb3f30d9 prefs elm_entry: change to the new event 2017-11-21 20:37:21 +01:00
Derek Foreman cbbac076f4 gl_drm: Use the same gbm_device for multiple instances
If we want to share a gl context (we do) between multiple instances of
gl_drm, we need to make sure they all use the same gbm_device.

This resolves a blocker for multi-output on the gl_drm backend.
2017-11-21 12:28:52 -06:00
Derek Foreman ea1f76f980 drm ee: Allow more than 4 buffers
Multi-head is hitting corner cases where there are lots of locked buffers
and it looks like right now 5 is the magic number that makes the problem
go away.

Make it possible to set 5 or more (via env var) for testing, make a macro
for MAX_BUFFERS instead of just a number.
2017-11-20 16:54:00 -06:00
Derek Foreman 796de8cb86 wayland_shm: Don't use a fixed number of buffers
We no longer allocate 3 buffers at startup, we now allocate only as needed.

Trimming the queue will come later, as there are some situations where we
might need 3 buffers and later drop down to 2 (when on a hardware plane)

Most clients will only ever need 2 buffers, so this is a reasonable RAM
savings.
2017-11-17 14:33:36 -06:00
Derek Foreman 04cebba623 ecore_wl2: Filter buffer types by compositor capabilities
It does us no good to be able to allocate dmabuf capable memory if the
compositor can't handle it.  This should fix failures on systems where
allocation is possible but the compositor doesn't advertise dmabuf.
2017-11-15 11:54:37 -06:00
Derek Foreman 9fdcf7d0eb wayland_shm/ecore_wl2: Move buffer allocation into ecore_wl2
This moves all the platform specific buffer allocation into ecore_wl2
instead of the engine.

Note that this makes an internal struct available in the header.  This
will be removed shortly.
2017-11-15 11:54:37 -06:00
Derek Foreman f6ec5b961b wayland_shm: Move wl_buffer creation function further up file
It just looks nicer when it's here and doesn't require a prototype.
2017-11-15 11:54:37 -06:00
Derek Foreman 46539ce26d wayland_shm: Make the buffer_manager static
Should always have been, oops.
2017-11-15 11:54:37 -06:00
Derek Foreman 66f85dd06c wayland_shm: Become unhoseable
Now that shm is handled through these paths the dmabuf_totally_hosed state
is nonsense.
2017-11-15 11:54:37 -06:00
Derek Foreman 2071122f01 wayland_shm: rename Surface_Type to Ecore_Wl2_Buffer_Type 2017-11-15 11:54:37 -06:00
Derek Foreman f9ff2e4fa5 wayland_shm: Remove surface_type from surface
This has become not only a write-only variable, but also incorrectly set.

Just remove it.
2017-11-15 11:54:37 -06:00
Derek Foreman c6b0328150 wayland_shm: Pass ecore_wl2_display instead of surface to buffer_create
The display was the only thing we used through the surface.  Pass just
the display to break the dependency between surface and buffer.
2017-11-15 11:54:37 -06:00
Derek Foreman 2042e4bc21 wayland_shm: Remove surface from buffer struct
All users are now removed so we no longer need this.
2017-11-15 11:54:36 -06:00
Derek Foreman 36f0a9a814 wayland_shm: Stop looking up alpha on surface
We've got it in the buffer now.
2017-11-15 11:54:36 -06:00
Derek Foreman 15173c3436 wayland_shm: Store alpha in buffer
Currently the buffer code looks up the alpha stats from the surface code.
This won't be possible when we move the buffer code into a library, so
prepare for it now.
2017-11-15 11:54:36 -06:00
Derek Foreman 8c7086dc31 wayland_shm: Make ecore_wl2_buffer_init return bool
Nothing uses the returned pointer, and nothing will.
2017-11-15 11:54:36 -06:00
Derek Foreman 7c3fb6ae74 wayland_shm: Rename types and functions
We're going to move this into ecore_wl2, so I'll start by renaming it all
here before moving large chunks with minimal change.

No functional changes.
2017-11-15 11:54:36 -06:00
Derek Foreman c1a9dacbad wayland_shm: Remove extra display flush
Since we're using create_immed now we shouldn't need to force a flush here
anymore.
2017-11-15 11:54:36 -06:00
Cedric Bail 663e31413a Revert "Revert series of patches from cedric (due to dependencies and conflicts)"
This reverts commit 2cea85db38.

Their was a typo that I made during cleanup of the patch before pushing that I didn't
notice broke some stuff. But also you may have an old efl_general.h in your elementary
directory that is now being picked instead of the one provided by the tree.
2017-11-14 20:08:09 -08:00
Carsten Haitzler 2cea85db38 Revert series of patches from cedric (due to dependencies and conflicts)
Revert "elementary: currently double declare elm_init/shutdown."
This reverts commit 44bb0c1848.
Revert "elementary: fix efl_ui_multibutton installed headers."
This reverts commit 32a213dc72.
Revert "elementary: introduce Efl_Ui.h."
This reverts commit df3d3f7334.
Revert "ecore: do not display error message on cancel."
This reverts commit 99654b7cd2.
Revert "efl: and don't forget to install the new dependencies."
This reverts commit 814ffb9b6b.
Revert "ecore: remove EFL_OBJECT_BETA as Efl_Core.h is for Efl new inerfaces."
This reverts commit 619d0f3cff.
Revert "ecore: move EAPI_MAIN from elementary to ecore."
This reverts commit e5d84da864.

as such commit e5d84da864 starts the
breaking. enlightenment, terminologya and other apps can't compile
against that efl anymore. 619d0f3cff
then makes this even worse with even more header errors and undefined
types. on top of this df3d3f7334 then
starts making elementary_test segfault when it runs. it wont even
start up.

asu such of these 7 commits in the first 4 (that are then relied on
later) 3 of these first 4 cause serious breakage. this simply is a
complete lack of testing changes, so i've rolled fl back to before
these things so it builds and works again and you can build against it.

PLEASE test these things. this looks ot me to be obviously a lack of
any testing... :(
2017-11-15 11:48:55 +09:00
Cedric BAIL 99654b7cd2 ecore: do not display error message on cancel. 2017-11-14 14:40:22 -08:00
Derek Foreman 8cf0bfc9ef wayland: stop tracking compositor_version in engine
We don't need it anymore now that damage is posted from inside ecore_wl2.
2017-11-10 13:43:45 -06:00
Derek Foreman 6ea82f9f7e wayland_shm: Remove surface damage function
This is now in ecore_wl2
2017-11-10 13:43:45 -06:00
Derek Foreman fe41727bc3 wayland_shm: cosmetic code simplification
We already have this value in a temp, so use it.
2017-11-10 13:43:45 -06:00
Derek Foreman 77212021f3 waylamd_shm: Use ecore_wl2_window_damage
The new library function provides the same functionality and will allow
us to stop tracking things in the engine that the library already knows
about windows (compositor_version)
2017-11-10 13:43:45 -06:00
Derek Foreman cf345cff74 wayland_shm: Respect the alpha
The dmabuf code has been creating ARGB buffers all the time.  The old
wl_shm code correctly respected the alpha field, but that was lost in
the new version.

I'm not sure we ever create non-alpha wayland buffers, since CSD has
to have alpha to do shadows, but if there's any way to do it it'll
work now.
2017-11-10 09:55:58 -06:00
subhransu mohanty 41062cb15d evas/vg: use surface cache for efl vg canvas 2017-11-10 11:20:38 +09:00
subhransu mohanty f0b8c37d80 evas/vg: refactor ector engine api and backend . 2017-11-10 11:20:38 +09:00
subhransu mohanty befb7701a7 evas/engine: added new engine api for ector 2017-11-10 11:20:38 +09:00
subhransu mohanty aacf277c3a evas/vg: added support for engine surface cache. 2017-11-10 11:20:38 +09:00
Derek Foreman ba2abb2eb9 wayland_shm: Don't require dmabuf support to use wl_shm
Unintended side effect of my merging of the two code paths.  We should
still try to use wl_shm if we can't use dmabuf here.
2017-11-09 16:08:30 -06:00
Derek Foreman c2fe37a46d wayland_shm: Remove old shm code
The new shm code should be equally capable - minus one surface resize
optimization that probably didn't buy us much performance at the cost
of memory.
2017-11-08 15:12:51 -06:00
Derek Foreman a5c7fbd006 wayland_shm: Return oldest buffer for new renders
This is what the old shm code has been doing, and it's probably better
than what the dmabuf code was doing.

We currently allocate 3 buffers.  The usual case has us swapping between
two of those buffers and saving that third buffer for emergencies - if
we ever need that third buffer it'll require a full redraw.

If we return the oldest available buffer the usual case requires a little
more damage but we should never hit the full redraw case, which can cause
a frame drop on slow hardware.
2017-11-08 15:12:51 -06:00
Derek Foreman 4adf87ae91 wayland_shm: Simplify surface commits
We no longer have the concept of a "pre" buffer (allocated but not yet
registered as a wayland buffer)
2017-11-08 15:12:51 -06:00
Derek Foreman b5674b7885 wayland_shm: Remove useless function
This serves no purpose anymore.
2017-11-08 15:12:51 -06:00
Derek Foreman 566c3f328a wayland_shm: Remove dmabuf fallback
Now that we're dependent on create_immed there's no possibility of falling
back to non dmabuf allocation.

The only failing case we really need to handle is failing the first
allocation, which is currently broken and I'll be adding an advance test
for it shortly.
2017-11-08 15:12:51 -06:00
Derek Foreman 73bddb4471 wayland_shm: Make EVAS_WAYLAND_SHM_DISABLE_DMABUF use new code
Use the new wl_shm allocation functions making the old wl_shm code
unreachable even with the use of the disable env var.
2017-11-08 15:12:51 -06:00
Derek Foreman c54a12aca6 wayland_shm: Add wl_shm to dmabuf
wl_shm and dmabuf only really need to differ in how they allocate a buffer,
but right now we've got them in separate files.  This dramatically
reduces the complexity of the wl_shm code and shares much more
implementation with the dmabuf code.

This throws away at least one "optimization" wl_shm used - over-allocating
buffers so that window resizing doesn't always require a new buffer
allocation.  If people feel that window resizing has become too slow now
this can be added to the dmabuf code to the benefit of both allocators.

Disabling dmabuf by env var still uses the old wl_shm implementation for
now, but soon that code will be removed entirely and the env var disable
will use this path.
2017-11-08 15:12:47 -06:00
Derek Foreman d346ac7b2e wayland_shm: Track size of buffer 2017-11-08 15:12:44 -06:00
Derek Foreman 381bb0e798 wayland_shm: move buffer release callback to top of file
Code motion with no functional changes.
2017-11-08 15:12:42 -06:00
Derek Foreman ef1279465f wayland_shm: make creating a wayland buffer back end specific
This way we can have shm and dmabuf share the same framework.
2017-11-08 15:12:37 -06:00
Derek Foreman 7e1805ada1 wayland_shm: Factor out wl_buffer creation code 2017-11-08 15:12:34 -06:00
Carsten Haitzler 6a47c2243e efl ui win - make win centering work with multiple screens
this should fix T6323
@fix
2017-11-07 13:53:27 +09:00
Vitalii Vorobiov ee93543799 evas_vg_load_svg: get rid of static Evas_SVG_Parsing
Summary:
Refactoring.
It is good to store values from that struct in a parsing/loading context

static variable is a big NO NO:
1. Ugly code design,
2. Might not work when trying to load more than one SVG file.

@fix

Reviewers: jpeg, smohanty

Subscribers: jenkins, cedric

Differential Revision: https://phab.enlightenment.org/D5399
2017-11-07 11:54:09 +09:00
Vitalii Vorobiov 66e0caccb7 evas_vg_load_svg: default stop opacity color should be 255, not 0
@fix
2017-11-07 11:54:09 +09:00
Vitalii Vorobiov d98e2323ad vg_common: property apply "objectBoundingBox" morphings to radial gradient
When objectBoundingBox flag is set up, all gradients should morphed into
multiple gradients for every entity that has gradient to be applied on
2017-11-07 11:54:09 +09:00
Vitalii Vorobiov 6bf5d9d96e svg_parse: parse correct values for radialGradient
Especially Radius calculation which was a huge pain to find formula
within SVG documentations!
2017-11-07 11:54:09 +09:00
Vitalii Vorobiov 405e56ac55 svg_parse: parse linear gradient variables accroding to gradientUnits
There are difficult cases according to
https://www.w3.org/TR/2000/CR-SVG-20000802/pservers.html
2017-11-07 11:54:09 +09:00
Vitalii Vorobiov 6139aa78d5 svg_parse: implement <length> parse
Accodring to https://www.w3.org/TR/SVG/types.html#Length
length ::= number ("em" | "ex" | "px" | "in" | "cm" | "mm" | "pt" | "pc" | "%")
This is still work in progress since some of lengths should be treated
differently, for example gradient lengths
2017-11-07 11:54:09 +09:00
Vitalii Vorobiov 1354c1c8ab svg_parse: save global size variable to use when gradient size recalc
For example while userSpaceOnUse it uses not figure's x,y,w,h
but entire canvas, so we need to save it publically and recalc while
parsing (or after)
2017-11-07 11:54:09 +09:00
Vitalii Vorobiov fac649c7f4 vg_common: parse and store userSpaceOnUse (for gradient) when it is set
So it can be calculated during the draw later on
2017-11-07 11:54:09 +09:00
Vitalii Vorobiov 532557cabd vg_loaders/svg: set up default focal values for radialGradient
Since when not specified, focal values same as center points
fx = cx, fy = cy by default

@fix
2017-11-07 11:54:09 +09:00
Vitalii Vorobiov 78bc406640 saver/svg: parse loaded tree data into svg XML file and save it
Just base source code which will parse all structures of svg tree into
xml text to save current vector image into file

@feature
2017-11-07 11:54:09 +09:00
Vitalii Vorobiov 7d9c1256a3 vg_savers/svg: empty (for now) module that will save svg in original file
Just as a starter to make a working background that, later on, will go
through Svg_Node's and build a certain source code to be saved in SVG
picture as a file
2017-11-07 11:54:09 +09:00
Jean-Philippe Andre a75b3dcdfb elm: Try to fix compilation (link) for OSX 2017-11-07 10:43:07 +09:00
Chris Michael 01920b996a emotion: Fix data race condition
Coverity reports that we access vfmapped here without holding a lock.
This patch implements eina_lock_take/release while accessing
priv->vfmapped.

Fixes Coverity CID1381624

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2017-11-06 10:07:48 -05:00
Chris Michael fd79e32dbd evas-wayland-shm: Do not dereference a potentially freed pointer
Coverity reports that _evas_dmabuf_buffer_init function here can
potentially free the surface that was passed into it. If that happens,
we should not be calling the _fallback function with surface as the
parameter as that will directly dereference the freed pointer.

Fixes Coverity CID1381707

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2017-11-06 10:02:35 -05:00
Chris Michael de1e18ef7d evas-gl-cocoa: Remove need for useless region_free function
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2017-11-06 09:28:53 -05:00
Chris Michael 3ae469e648 evas-gl-drm: Remove need for useless region_free function
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2017-11-06 09:27:39 -05:00
Chris Michael 85a9716c8f evas-gl-sdl: Remove need for useless free_region function
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2017-11-06 09:26:13 -05:00
Chris Michael c8e5614830 evas-gl-x11: Remove need for useless free_region function
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2017-11-06 09:25:19 -05:00
Chris Michael e04ad61ab4 evas-wayland-egl: Remove need for useless free_region function
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2017-11-06 09:23:13 -05:00
Chris Michael 39184e78af evas-wayland-shm: Remove need for useless free_region function
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2017-11-06 09:21:59 -05:00
Chris Michael 31a7963196 evas-software-x11: Remove need for useless free_region function
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2017-11-06 09:19:20 -05:00
Chris Michael 5edae8b9c1 evas-software-gdi: Remove need for useless free_region function
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2017-11-06 09:17:02 -05:00
Chris Michael f32c1ece7e evas-software-ddraw: Remove need for useless free_region function
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2017-11-06 09:15:54 -05:00
Chris Michael 9f5555a887 evas-eglfs: Remove need for useless free_region function
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2017-11-06 09:14:14 -05:00
Chris Michael 5f897542aa evas-drm: Remove need for useless free_region function
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2017-11-06 09:13:12 -05:00
Chris Michael 6016ce8133 evas-software-generic: Check for render engine function before calling
In most engines which inherit from software_generic, they do not
implement the outbuf_free_region_for_update function. Most engines
have it as an unused function. If we simply add a check here, then we
can reduce the need for having useless function in multiple engines.

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2017-11-06 09:10:28 -05:00
Chris Michael 0a25543ed5 evas-wayland-shm: Fix formatting
Make this line readable in 80 columns

NB: No functional changes

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2017-11-01 12:39:09 -04:00
Chris Michael 945764eb7c evas-drm: Fix formatting
NB: No functional changes

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2017-11-01 12:38:44 -04:00
Jean-Philippe Andre 824792f09d elm: Major cleanup of EO files
This prevents legacy EO classes from being exposed through .eo.h headers
or .eo in share/eolian/includes. Also removes a slew of useless xxx_eo.h
intermediate headers.

Notes:
 - elm_systray has no proper API: it's not clear if the EO API should be
   released (in which case it needs to be renamed to efl_something) and
   there is no legacy API to create a systray object.
 - Some files have been placed in a "FIXME" section, as I believe they
   are necessary within EO land, but at the same time still don't
   conform to the interfaces (eg. name starts with elm_).
 - elm_interface_scrollable is required by photocam. This means photocam
   needs to be adapted to fit the EO scroller API (still to be
   completed, I believe).

Bugs:
 - This breaks most C++ examples. I KNOW. And I'm working on it.

Ref T5301
2017-11-01 21:23:31 +09:00
Jean-Philippe Andre 9cec14918c evas: Move evas_canvas.eo to legacy-only
This isn't meant to be installed. The canvas API in EO is based around
the interfaces Efl.Canvas and the widget Efl.Ui.Win. Anything else is
not EO (eg: ecore_evas, evas, ...)

Note: evas_canvas3d is the last remaining thing that is installed along
EO files, but those are all beta APIs.
2017-11-01 11:22:33 +09:00
Derek Foreman 059613222a ecore_evas_wayland: Fix session recovery
Turns out when apps reconnect to the compositor they don't always
realize they need to redraw themselves.  Force a manual render
at startup if we end up in a state where an update is needed but
has probably been dropped on the floor.
2017-10-30 14:23:07 -05:00
Subhransu Mohanty bf79ec359d vg_savers/eet: Added implementaion of vg saver to eet file 2017-10-27 14:58:38 +09:00
Subhransu Mohanty 24ac2d6516 vg_loaders/svg: Copied svg loading implementation from edje_cc 2017-10-27 14:58:38 +09:00
Subhransu Mohanty 079838e926 vg_loaders/eet: Added implementaion for loading from eet file 2017-10-27 14:58:38 +09:00
Cedric BAIL abd41c93ea evas: image_native_set actually receive a context, not an output. 2017-10-26 13:01:56 -07:00
Mike Blumenkrantz f375661e0b wayland: use eina array for ecore-evas event handlers
thx to @jpeg for reporting how dumb this was
2017-10-25 10:44:16 -04:00
Mike Blumenkrantz ffac7fc539 wayland: fix window stack implementation
ref T5350
2017-10-25 10:44:16 -04:00
WooHyun Jung c1094da0f4 efl_ui_clock: changed property name from value to time 2017-10-25 16:44:25 +09:00
Jean-Philippe Andre 1b481f0ae8 widget: Rename events to EFL_UI_WIDGET_EVENT_XXX
This only affects the events (and the data type has an alias).

Ref T5363
2017-10-24 14:37:45 +09:00
Jean-Philippe Andre 98622623a0 evas: Prevent crash with image_data_get
If the image has no data, it may get an allocated surface of 1x1 but it
is not sane to return the pointer to that data, as the user would expect
a normally sized image (in my case, 1920x1080).

I do not fully understand what is going on with this image. But at least
this transforms a crash into a simple ERR in ~/.xessions-errors

Two similar crashes happened:
 - SIGSEGV by writing data outside of the image data
 - abort() in free() because the malloc metadata has been overridden
   when writing outside of the image data (newly allocated 1x1).

Fixes T5957

@fix
2017-10-18 22:12:57 +09:00
Derek Foreman 3dd90f61a9 ee_wayland: Don't use wrong window size
Borderless windows, such as internal windows, need to be the exact size
they're passed by a configure event.
2017-10-16 16:17:29 -05:00
Carsten Haitzler 6cd3d4026c jp2k module - dont print ERR on llading if format wrong
this is normal - brute force trying loaders until one succeeds is
normal is etn doesnt help identify it or it fails the first
guess-by-extension. printing errors is not good as this is an ok and
EXPECTED error. slience!

@fix
2017-10-16 08:42:13 +09:00
Cedric Bail 7e00ab4222 evas: mark parameter unused now that it is not necessary anymore. 2017-10-13 12:58:01 -07:00
Prince Kumar Dubey df5f404f09 evas: to avoid warning unused variable and unnecessary assignment is removed.
Reviewers: raster, cedric

Subscribers: rajeshps, jpeg

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

Signed-off-by: Cedric Bail <cedric@osg.samsung.com>
2017-10-13 12:14:26 -07:00
Prince Kumar Dubey 41197981ab efl: unsigned int/long never be less than zero. Fixed.
Reviewers: raster, cedric

Subscribers: rajeshps, jpeg

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

Signed-off-by: Cedric Bail <cedric@osg.samsung.com>
2017-10-13 12:07:28 -07:00
Prince Kumar Dubey cb4a17ab22 ecore_evas: preprocessor flag "BUILD_ECORE_EVAS_SOFTWARE_GDI" is not closed properly, if not defined, leads to build break.
Reviewers: raster, cedric

Reviewed By: cedric

Subscribers: rajeshps, jpeg

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

Signed-off-by: Cedric Bail <cedric@osg.samsung.com>
2017-10-13 12:05:43 -07:00
Derek Foreman 10b6383640 ecore_wl2: Synchronize state with surface commits
This is really several inseparable commits mashed together, as doing this
a piece at a time would introduce broken intermediate revisions.

Double buffer incoming "configure" state from the compositor so it's held
back during asynchronous render and processed at frame completion.

Hold off on certain requests if their API has been invoked during async
render.

This should fix a lot of races, cosmetic issues, issues where weston can
kill our clients for acking configure (or not) at bad times, etc.
2017-10-12 12:24:03 -05:00
Derek Foreman 159a5beb27 wayland_dmabuf: Clean up unused variable
Pending is useless now that we use immediate buffer creation.
2017-10-12 12:24:03 -05:00
Derek Foreman b93319b10e wayland_dmabuf: Use create_immed
We've really always needed to do immediate creates.  On a surface resize
there's no place to wait for the round trip for the new buffers to exist.

We've gotten away with this until now by good luck because we dispatch
wayland events during asynchronous render.  However, with async render off
or if schedule happens in an unfortunate order, we can end up with
tearing.
2017-10-12 12:24:03 -05:00
Derek Foreman 64b36c6767 ecore_evas_wayland: Use ecore_wl2_false_commit to trigger frame callbacks
This will allow us to receive a tick without changing any other state.
2017-10-12 12:24:03 -05:00
Derek Foreman 0a185d3efd ecore_wl2: Add new API to latch window state for updates
Add an API to call at the beginning of render to latch state at
that moment, and use it for the wayland engine.
2017-10-12 12:24:03 -05:00
Derek Foreman 0badc0522b ecore_wl2: Split configurations into client set and compositor requested
This should lead to clearer and more maintainable code than having one
pile of state that's asynchronously fiddled with by both client and
compositor.
2017-10-12 12:24:03 -05:00
Derek Foreman 10b3a41ab0 ecore_wl2: Move some state into its own struct
These need to be double buffered, and that will be done in a follow up
patch.
2017-10-12 12:24:03 -05:00
Derek Foreman a3ac6043ab ecore_wayland: Use ecore_wl2_window_resizing_get() to get resizing
Use the getter instead of directly accessing the structs.
2017-10-12 12:24:03 -05:00
Derek Foreman 7f27237171 wayland_shm: Make some function static
Only used in this file.
2017-10-12 12:24:03 -05:00
Derek Foreman 46146caa43 wayland_shm: Kill stale comment
This comment doesn't make sense now, as all the frame callback stuff
is in ecore_wl2.
2017-10-12 12:24:03 -05:00
Derek Foreman 9bcc24dbb8 wayland_dmabuf: make dlsym queried symbols static
We only need these in this file.
2017-10-12 12:24:03 -05:00
Derek Foreman e207e05067 wayland_shm: Remove hidden from the outbuf
Outbuf shouldn't have to track its hidden status, that should be ecore_evas
problem.  Until now we were doing this because our kludgey wayland
ticking made things difficult, but I think it's safe to remove now.
2017-10-12 12:24:03 -05:00
Derek Foreman 656d892581 wayland_shm: Remove hidden from surface posting calls
Now that we tick based on frame callbacks it should be impossible to post
an update while hidden.
2017-10-12 12:24:03 -05:00
Derek Foreman c72b0b44ad wayland_shm: stop storing wl_display in dmabuf_surface
Query it through the engine info's ecore_wl2_display instead.
2017-10-12 12:24:03 -05:00
Derek Foreman ceb90779ff evas_shm: Remove wl_dmabuf and wl_shm from engine info
All queries for these are now on the ecore_wl2_display
2017-10-12 12:24:03 -05:00
Derek Foreman 4a23e69bcc wayland_shm: Remove surface_set function
Now that we use the display's shm and dmabuf pointers we don't need to
update them.
2017-10-12 12:24:03 -05:00
Derek Foreman 2b9a22e3a9 wayland_dmabuf: Query zwp_linux_dmabuf_v1 from display
Get it from the display instead of using our stored copy.
2017-10-12 12:24:03 -05:00
Derek Foreman f421521bed evas_shm: query wl_shm from ecore_wl2_display
Stop using the internally stored copy, always query from active display.

This fixes session recovery.
2017-10-12 12:24:03 -05:00
Derek Foreman 3f576e8436 wayland_shm: Add Outbuf to Surface struct
We're going to need that soon.
2017-10-12 12:24:03 -05:00
Derek Foreman 5fa7263440 wayland_shm: Pass Surface instead of Shm_Surface
Surface has some variables we'll need later.
2017-10-12 12:24:03 -05:00
Derek Foreman 7faa20f3c8 wayland_shm: Handle dirty bit outside of the backends
We don't have to query that deeply to know whether we need to redraw the
buffer or not, we can make that decision in more generic code.
2017-10-12 12:24:03 -05:00
Derek Foreman 2a15d7b730 wayland_shm: Store the ecore_wl2_display in the Outbuf
We'll need it soon.
2017-10-12 12:24:03 -05:00
Chris Michael 5a93b22d50 ecore-evas-drm: Reduce code duplication
Minor code cleanup to reduce duplicated function calls.

NB: No functional changes

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2017-10-11 13:07:09 -04:00
Chris Michael 6701bd162d emotion: Properly unmap video frame
Calls to gst_video_frame_unmap should take a GstVideoFrame as a
parameter (not a buffer). I believe this was the intended function
here (to unmap the video frame), so fix the call to not pass a
GstBuffer.

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2017-10-11 09:21:48 -04:00
Carsten Haitzler 0d7b967f45 emotion gst1 - handle null imagwe data returrn and dont crash
fix crash i spotted thanks to getting img obbj data returning null.
@fix
2017-10-07 18:25:19 +09:00
Cedric BAIL fc7e244e99 evas: remove unused fonction evas_gl_common_image_load. 2017-10-05 09:36:45 -07:00
Chris Michael 7b7161ea13 evas-gl-image: Fix dereference after null check
Coverity reports passing a null pointer 'im->gc' to
evas_gl_common_context_flush which directly dereferences it, so lets
be sure that 'im->gc' is valid before passing it to context_flush

Fixes CID1374273

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2017-10-05 09:54:03 -04:00
Chris Michael cec6793db4 evas-gl-common: Fix dereference after null check
Coverity reports that there may be a null pointer dereference here so
check that 'error' exists before trying to set it.

Fixes CID1374272

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2017-10-05 09:51:00 -04:00
Cedric Bail 867d826395 evas: remove image_load from the engine. 2017-10-04 21:48:26 -07:00
Chris Michael 5e36b1c7c1 ecore-evas-drm: Implement support for hardware output rotations
This patch adds support for doing output rotations via hardware. This
is implemented inside the Ecore_Evas engine so that it is transparent
to the caller of ecore_evas_rotation_set.

ref T5999

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2017-10-04 11:41:59 -04:00
Carsten Haitzler 246d8dbda5 evas ector gl - fix leak of image data on data put
@fix

fix coverity found leak CID 1374645
2017-09-29 12:26:57 +09:00
Carsten Haitzler 9f91d0d284 evas ector gl - make coverity happy about leaks on data put
fix CID 1374646
2017-09-29 12:26:57 +09:00
Carsten Haitzler 92e8935fa6 ecore evas - wayland - avoid divide by 0 if height is 0
fixes CID 1379247
2017-09-28 15:28:00 +09:00
Youngbok Shin 1750410650 evas: Add scale feature for embedded bitmap fonts.
Summary:
When evas selects a strike of embedded bitmap font,
calculate ratio and use it for scaling embedded bitmap.
@feature

Reviewers: jpeg, tasn, woohyun, raster, herdsman

Reviewed By: raster

Subscribers: charlesmilette, Francesco149, cedric

Differential Revision: https://phab.enlightenment.org/D2713
2017-09-26 11:31:31 +09:00
Vincent Torri 0cdd501246 EFL For WIN32: Replace HAVE_EVIL define with _WIN32 2017-09-22 05:06:10 -05:00
Chris Michael b1d831c552 evas-drm: Fix uninitialized variables
Small patch to fix Coverity reported issues of uninitialized variables

Fixes CID1381306, CID1381305, CID1381304, CID1381303

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2017-09-20 06:26:05 -04:00
Chris Michael 9efac538cc ecore-evas-drm: Implement actual evas engine rotations in drm
This patch implements handling of evas output rotation for the
ecore_evas drm engine.

ref T5999

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2017-09-19 13:10:33 -04:00
Chris Michael 7198fe568b evas-drm: Support rotations other than 0
This patch adds support for software rotation in the evas drm engine.
This is a fallback codepath in case hardware rotation is not supported
for a given rotation amount. This patch also fixes a leak of and
pending updates during output buffer free.

ref T5999

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2017-09-19 13:10:33 -04:00
Chris Michael 8a516c4d4f evas-drm: Override eng_output_resize function
This patch provides an override in the evas drm engine for the output
resize function. We override this function so that we can reconfigure
the output buffer.

ref T5999

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2017-09-19 13:10:27 -04:00
Chris Michael 7bbafe034b ecore-evas-drm: Formatting
NB: No functional changes

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2017-09-19 09:04:34 -04:00
Jean Guyomarc'h 96ab58fb8e eina: prevent memory corruption in chained mempool
The chained mempool uses eina trash to dispose and retrieve memory
blobs. Problem is that eina trash requires the memory blobs to be at
least of the size of a pointer. If the size of an element in the mempool
is less than the size of a pointer, which _is_ possible as no minimal
size is enforced, eina_trash will silently corrupt the memory pool.

To prevent memory corruption while still allowing small elements, the
size of an element defaults to the size of a pointer if it was smaller.
This comes at the cost of consuming slightly more memory in these cases,
but at least the memory pool can be safely be used.

@fix
2017-09-16 14:28:39 +02:00
Amitesh Singh 3984148b8e efl.ui.clock: correct value_set/get & value_min/max APIs signature.
We could just pass Efl_Time value as copy by value to set time in setter APIs
and return Efl_Time value in getter APIs.

Thanks to @JackDanielZ for the report.

Fixes T6008
2017-09-13 20:38:52 +09:00
Jean-Philippe Andre 4b10cf2e40 filters: Fix GL support aka. cedric's bork 2017-09-06 09:12:28 +09:00
Cedric Bail 743c80ad8b eina: properly mark memory for valgrind before accessing it in one_big mempool. 2017-09-05 17:01:03 -07:00
Amitesh Singh 373e6a0918 eina: fix compilation after b0rking in c9a0237770
Ref T5966
2017-09-05 16:22:33 +09:00
Cedric Bail c9a0237770 eina: properly track valgrind use of the mempool.
T5966
2017-09-04 03:12:57 -07:00
Carsten Haitzler d42ec53154 wayland_shm - clean out ptrs after free - seeing invalid mem/ptr access
enlightenment internal windows insta segv e on rpi. after much hunting
it seems a fallback is happening and bunk ptrs are being used. this at
least will make the problems more reliable with null ptrs.
2017-09-02 21:53:23 +09:00
Derek Foreman 6e30535a3c wayland_shm: Try a little harder to verify exynos dmabuf capabilities
Turns out the "device_open" function pretty much just tests calloc
functionality, and doesn't open any device.  So let's allocate a
tiny bo and discard it to make sure we're actually on exynos.
2017-09-01 14:50:40 -05:00
Mykyta Biliavskyi 8c4e4811fd Software gdi: fix build on Windows.
Summary:
Function argument was renamed, but in function body still uses old
variable name.

Test Plan: Build on Windows host

Reviewers: cedric, vtorri

Reviewed By: vtorri

Subscribers: jpeg

Tags: #windows, #efl

Differential Revision: https://phab.enlightenment.org/D5152
2017-09-01 13:50:34 +03:00
Derek Foreman f886a76dae wayland: Force a display flush when committing surfaces
We had a hack in place to flush the display from an idle enterer instead
of after a surface commit.  This led to a problem where the idle
enterer dispatch order was:

renderer for main canvas
wayland dispatch idle enterer
renderer for mouse cursor canvas

The surface commit for the mouse cursor was never dispatched, so the mouse
cursor animation would only update at the rate other events occurred.

By flushing at the appropriate times instead we ensure a proper update.

ref T5850
2017-08-30 14:11:47 -05:00
Derek Foreman 388f8c41c8 wayland: Store Ecore_Wl2_Display instead of wl_display in engines
We'll need to call ecore_wl2 functions on it soon, and anything that
really needs the wl_display can query it.
2017-08-30 14:11:47 -05:00
Derek Foreman f2756f92e8 walyand_shm: Remove unused variable
Nothing in here actually cares about the wl_display anymore.
2017-08-30 14:11:47 -05:00
Reynaldo H. Verdejo Pinochet 2cf1fd3be9 emotion: gst: use proper GStreamer time-unit macros
Summary:
Do not harcode numbers that make no immediate sense.

Additionally: add some wont-hurt doc note and fix
two related typos.

Subscribers: cedric, jpeg

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2017-08-29 17:08:05 -07:00
Reynaldo H. Verdejo Pinochet 835fd7a485 emotion: gst: drop Frenglish from English messages
Subscribers: cedric, jpeg

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2017-08-29 17:03:11 -07:00
Jean-Philippe Andre fc0d2cb6a7 access: Fix crash in ecore
We use a temporary file for espeak (the accessibility text-to-speech
engine we use), and then we remove and close the file. But the fd was
not reset to -1 which meant that later on the previous fd was closed
again (this is kinda weird), but that fd was now invalid. Or rather it
was reused by ecore animator, closing the read-end of the pipe
(timer_fd_read). This caused SIGPIPE in the animator code.

Thanks strace and gdb for helping me figure out this. :)

@fix
2017-08-29 13:33:49 +09:00
Cedric Bail 5e935a8ca9 evas: handle new API use correctly for gl_drm backend. 2017-08-28 11:32:13 -07:00
Cedric Bail 2ac0a755e1 evas: fixup warning. 2017-08-28 11:13:40 -07:00
Cedric BAIL 6d1d47d50d evas: fix build with egl. 2017-08-25 15:55:26 -07:00
Cedric BAIL 7453980ccf evas gl: fix glview by avoiding make current
gl_generic_context_find() returns the gl shared context struct but
this is not just a read-only operation. It in turn calls window_use
which may call make_current. This can invalidate the work of evas gl
when the API tried to switch to a specific context.

This fixes evas gl with multiple outputs.

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2017-08-25 10:54:55 -07:00
Cedric BAIL 545c1a70f4 evas: make Evas_GL work with multi output. 2017-08-25 10:54:19 -07:00
Cedric BAIL 84c6d3332e evas: remove unused engine data from error set/get code. 2017-08-25 10:52:26 -07:00
Cedric BAIL e682f64193 evas: make vector graphic support multi output. 2017-08-25 10:52:14 -07:00
Cedric BAIL a0c58276c3 evas: do not use default output or any other during render pre. 2017-08-25 10:52:10 -07:00
Cedric BAIL 68b846c1f4 evas: remove unecessary use of output in filter code. 2017-08-25 10:52:07 -07:00
Cedric BAIL cc4d41c890 evas: make image_native_set use engine context not output. 2017-08-25 10:52:03 -07:00
Cedric BAIL 39d4e343b0 evas: make all window GLES3 or none. 2017-08-25 10:51:59 -07:00
Cedric BAIL 89c34cda21 evas: make function to find evas gl context from engine shared across backend. 2017-08-25 10:51:56 -07:00
Cedric BAIL f3f6a7e535 evas: make Evas_GL start to use engine and output separately. 2017-08-25 10:51:47 -07:00
Cedric BAIL bf0ad88144 evas: convert Evas3D use of output to engine when meaningful. 2017-08-25 10:51:44 -07:00
Cedric BAIL e9cd3e4c7c evas: remove image_content_hint_get from backend as it is unused. 2017-08-25 10:51:27 -07:00
Cedric BAIL ef55155e0e evas: switch font backend function to rely on engine instead of output. 2017-08-25 10:51:24 -07:00
Cedric BAIL d8871109d3 evas: convert evas backend cache function call to use Engine context. 2017-08-25 10:51:17 -07:00
Cedric BAIL fc603df8d1 evas: remove image_surface_noscale_region_get from engine backend as it is unused. 2017-08-25 10:51:13 -07:00
Cedric BAIL 1d57cb2627 evas: move all image object related function to use the engine instead of the output. 2017-08-25 10:51:10 -07:00
Cedric BAIL c436cf6931 evas: gl_common should not segv on freeing a NULL gl_image. 2017-08-25 10:50:59 -07:00
Cedric BAIL b6296c6fb4 evas: add infrastructure to find a gl_context from a GL_Engine. 2017-08-25 10:50:45 -07:00