Commit Graph

3071 Commits

Author SHA1 Message Date
Mike Blumenkrantz 337f3796d6 ecore-evas-wayland: destroy frame callback on hide
ensure cursor surfaces can render again after being hidden

 #TheDisappointer

@fix
2017-07-21 16:17:54 -04:00
Mike Blumenkrantz 93bac8ce4a wayland: stop creating 1x1 surfaces on init
fix T5226

 #IGot99TicketsBut1x1AintOne
2017-07-21 16:17:54 -04:00
Mike Blumenkrantz 9a56b267cd evas sw x11: formatting 2017-07-21 16:17:53 -04:00
Derek Foreman 736c63be34 gl_drm: half fix eglGetPlatformDisplayEXT usage
Just because the #define is present doesn't mean the extension is, so we're
BAILing on egl completely on some systems for no good reason at all. (saw
this on an SGX stack)

This is still wrong.  I don't want to try too hard until after the upcoming
release, though.

We should actually be testing for the presence of client extensions before
attempting to do any of this.  It's entirely possible that a gl stack will
return bogus functions for these from eglGetProcAddress
2017-07-21 14:34:50 -05:00
Carsten Haitzler 97c3eedbab evas xpm loader - don't error print for files that cant be mmaped
no point complaining because we can't mmap... it'd be an unloadable
file.
2017-07-21 16:35:21 +09:00
Jean-Philippe Andre 7bb14727af evas: Fix a crash in emotion with GL
Ooops! When mapping for writing we can't use the same code
path as when tofree is true. This restores the path for image
writing. This basically fixes rage with GL engine.

See also 45c8e5e983
2017-07-20 16:43:52 +09:00
Jean-Philippe Andre d6c95d1e4b evas gl: Rename secsym_ to eglsym_
eglDestroyImage has nothing to do with SEC...
This is a cosmetic change.
2017-07-20 13:31:34 +09:00
Jean-Philippe Andre 0c78783045 evas gl: Check EGL version before using dlsym
A recent commit broke texture_from_pixmap for NVIDIA EGL
(again), because eglCreateImage is a symbol in libEGL.so
but isn't in fact implemented by the driver.

That's because eglCreateImage() is exposed by libglvnd but
the underlying EGL implementation is NVIDIA and its version
is only 1.4, not 1.5 (where the API was introduced as core).

Instead of reverting the patch, it's better to cover our
bases properly and use dlsym() only if the version is right.

Note that GetProcAddress() may return garbage function
pointers for ALL functions as dynamic virtual functions may
be created on the fly by libglvnd. So it is absolutely
necessary to check the extension string as well.

See 0255f14dc2
2017-07-20 13:31:15 +09:00
Derek Foreman ef9bd41831 gl_common: extsn is no longer unused
Also, we should throw an error when it's NULL, since it's important
for finding symbols for extended egl/gl.
2017-07-19 13:05:53 -05:00
Derek Foreman 0255f14dc2 gl_common: Prefer unextended eglCreateImage
eglCreateImage is objectively better than eglCreateImageKHR - it allows
attributes large enough to hold pointer values.  We should use it when
available and only use the older extension version as fallback.

Also, eglCreateImage is core EGL functionality so don't depend on extensions
to be present to use it.  Theoretically we should be testing for
EGL version >= 1.5 but it's probably safe not to.
2017-07-19 12:24:19 -05:00
Derek Foreman d31f5038e2 gl_common: Remove fallback hack for wayland
This was only necessary due to bugs in the wayland_egl and gl_drm engine
that have been corrected.

Wayland has no bizarre requirements making this necessary.
2017-07-19 12:09:33 -05:00
Derek Foreman eda81c6dff gl_drm: Defer gl symbol lookups until they're possible
See previous commit for details.
2017-07-19 12:02:03 -05:00
Derek Foreman c7fe083a57 wayland_egl: Defer gl symbol lookups until they're possible
Commit 2e6587a14b adds a gl extension string to glsym_evas_gl_symbols()
to prevent using functions that are provided by extensions that aren't
available in the current gl context.

However, we can't query the extension strings until after we create an egl
context.

Split the regular symbol lookup stuff from the gl symbol lookup stuff so
we can query at the appropriate time.
2017-07-19 12:00:07 -05:00
Derek Foreman 86377caa0e wayland_egl: de-wtf the eglGetProcAddress prototype 2017-07-19 11:44:00 -05:00
Derek Foreman 7fd66e84d9 gl_drm: de-wtf the eglGetProcAddress prototype
This doesn't seem to serve any purpose other than rigorous proof that
typecasts can make literally anything compile.
2017-07-19 11:43:25 -05:00
Derek Foreman 855f59da8d gl_common: Stop looking for eglCreate/DestroyImageOES
These aren't a thing.  the GL_OES_EGL_image_base extension doesn't exist
and the GL_OES_EGL_image extension doesn't extend egl, because it's a gl
extension.

So let's stop being the only google match for these nonsense strings.
2017-07-19 10:33:06 -05:00
Jean-Philippe Andre 897d81acb1 evas engine gl: Add missing image unlock
This is a rare error path. Unlikely and not very important as
the lock/unlock doesn't actually perform any meaningful operation.
2017-07-19 13:59:42 +09:00
Carsten Haitzler 1a16a4f10b emtoion gst1 - workaround gst break between 1.10 and 1.12
so emotion was using a much older (pre 1.0) buffer map mechanism for
getting video data. a new frame map api was added to gst in 1.0 but we
didnt use it. gst broke the old buffer direct mapping for some codecs
paths between 1.10 and 1.12. since we were using a very old method/api
this broke us. this also happens to fix some vaapi issues (except
where the buffer is simply never mappable ever). so this is kind of a
fix (updating us to as more modern api) and a workaround.

@fix
2017-07-19 11:07:47 +09:00
Jean Guyomarc'h 2f9cbb3a35 evas-gl_cocoa: fix compilation
Booo for commit 2e6587a14b.
2017-07-16 17:26:41 +02:00
Carsten Haitzler 2e6587a14b evas gl - fix compositing/native surface with egl/gles after glvnd
this fixes an issue that has cropped up in the past few months - only
nvidia drivers with egl/gles in x11... and compositing won't work
(native surface) and the introduction of libglvnd

it's a combination of libglvnd lying that it has symbols it can't
later find, new features to get core functions via procaddress that we
hadn't migrated to use AND use preferring core functions that libglvnd
will expose, so switching to KHR extensions by preference. we also
need to symmetrically use destroy image khr too...

oddly enough using procaddress purely for create/destroy image makes
wayland fail ... sofor now i'm taking advantage of the fact that
wayland has no extensions string passed in at the moment and still
doing dlsym... this is odd though.

@fix
2017-07-16 15:56:02 +09:00
Carsten Haitzler ff67dd25e3 evas mesh save - use alloca for tmp strings instead of heap
this reduces code and means we dont have to handle NULL exceptions as
alloca always "works".

@fix
2017-07-16 15:56:02 +09:00
Derek Foreman e53b0c262a ecore_evas_drm: Provide a last_tick_get callback
Allow the drm engine to provide a tick timestamp for the previous vblank
interval.

ref T5462
2017-07-13 18:07:42 -05:00
Derek Foreman aa8d9c1829 ecore_evas: Add a function pointer for last_tick_get
Engines that provide their own tickers may need to be able to provide the
time of the last tick even if they weren't sending ticks to EFL at the
time.

This is a feature added during freeze as it's necessary to resolve a bug.

ref T5462
2017-07-13 18:07:42 -05:00
Derek Foreman e69cc0f552 ecore_evas engines: Add some nulls to the func arrays
Purely cosmetic, but gets the comments back in sync with reality.
2017-07-13 18:07:41 -05:00
Derek Foreman d3c10fb1eb ecore_evas_drm: Partially revert "Refuse to start a ticker for a manually rendered canvas"
BAILing here can break animators permanently, so best to just log the
issue and move on (and potentially allow the ticker to wake us from DPMS).

ref T5462

Partially reverts a795629e8c
2017-07-11 16:50:23 -05:00
Derek Foreman a795629e8c ecore_evas_drm: Refuse to start a ticker for a manually rendered canvas
With atomic mode setting this has the hilarious side effect of waking
up the display from dpms.

Attempting to tick when manual render is set is likely a bug, so
log an ERR.

fix T5462
2017-07-10 16:25:59 -05:00
Vincent Torri 937a0d6411 Ecore_Evas win32 module: fix memory leak 2017-07-09 13:34:19 +02:00
Vincent Torri bdb62b6bbe Add ecore_win32_cursor_show() API and ecore_evas_win32_cursor_(un)set() functions
This fixes double mouse cursor in elm entries on Windows (for example)

@feature
@fix
2017-07-09 13:34:09 +02:00
Uma Devika d4ab6ff90a Evas and Eolian : Freed string buffer
Summary:
Summary : String buffer returned by eina_strbuf_new() is not freed in some cases

@Fix

Signed-off-by: Uma Devika <u.bodapati@samsung.com>

Reviewers: cedric, tasn, jpeg, raster, singh.amitesh

Subscribers: tanwar.umesh07, yashu21985, cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D5000
2017-07-07 13:22:53 +09:00
Jean-Philippe Andre 76a668f022 ecore_evas_x: Track changes in framespace size
If the framespace size has changed and by accident (or in fact, by
design) the evas size + framespace size is equal to the size sent
by the X server, ecore_evas_x was skipping the resize event. This
patch adds a tracking of the framespace size so that we redraw the
canvas if it changed.

This will fix issues with the main menu (since it's in the framespace,
23 pixels tall with the default theme & scale).

Note that all this is partly because the ecore evas size is the size
without the framespace, so weird calculations are made during resize...

Ref T5482
2017-07-05 17:43:59 +09:00
Uma Devika 19df2cd34f Emotion: freed allocated string.
Summary:
GStreamer API gst_caps_to_string returns allocated memory which needs to be freed with g_free() after use.

@fix

Signed-off-by: Uma Devika <u.bodapati@samsung.com>

Reviewers: cedric, tasn, singh.amitesh, raster, jpeg

Subscribers: tanwar.umesh07, yashu21985, cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D4996
2017-07-04 11:33:11 +09:00
Jean-Philippe Andre b0caec04fb drm: Fix compilation warnings 2017-07-03 16:23:41 +09:00
Derek Foreman 81420d76e0 software_generic: Improve dmabuf validity tests
Now that upper layers set load errors this can be less gruesome.

Also, add some checks that were in E here where they belong.
2017-06-30 14:54:12 -05:00
Derek Foreman b8165098dc gl_drm: Improve dmabuf validity test
Now that higher layers are setting load errors this can be less gruesome.
2017-06-30 14:52:54 -05:00
Derek Foreman fbb676584e drm: Implement hardware plane support
Adds the ability for drm to place native surfaces on harware planes.

ref 33b50238d2
2017-06-29 17:20:23 -05:00
Derek Foreman dc3873c8db software_generic: fix eng_image_native_get
This has been a stub for a long time, but now we have a native_set, so
we should have a native_get too.

This is required for hw plane usage on the software engine.
2017-06-29 17:20:23 -05:00
Derek Foreman 944a4065e8 gl_drm: Check dmabuf attribute version before trusting attributes
We shouldn't do anything with a dmabuf structure until confirming the
version matches the one we know.
2017-06-29 16:12:35 -05:00
Derek Foreman 2e0e017b87 software_generic: Check dmabuf attribute version during set
We should check here instead of only at time of usage.
2017-06-29 16:11:45 -05:00
Derek Foreman 892bfe7c98 dmabuf: Make a define for the version of the dmabuf attribute struct
I should've done this in the first place, and the version checks are
starting to spread out a bit.
2017-06-29 13:51:07 -05:00
Jean-Philippe Andre 1ef1c04f42 gl_drm: Fix a few compilation warnings
warning: expression which evaluates to zero treated as a null
pointer constant of type 'void *' [-Wnon-literal-null-conversion]
2017-06-29 16:02:36 +09:00
Derek Foreman 33b50238d2 gl_drm: Implement hardware plane support
Adds the ability for gl_drm to place native surfaces on hardware planes.
2017-06-23 08:15:42 -05:00
Derek Foreman 7e2c8c1cbd software_generic: Add plane assign/release function pointers
Functions to assign a plane for a native surface, and release a plane
that's been assigned to a native surface.

These are empty for now as they'll need to be overridden in any backend
that can handle planes.
2017-06-23 08:15:42 -05:00
Derek Foreman 4d058ad323 gl_drm ee: Move to new per fb status callbacks
Switch over to the per fb status callbacks as the old per output api is
about to be removed.
2017-06-23 08:15:40 -05:00
Derek Foreman bd0774206f gl_drm ee: move release fb callback
No functional change, just code motion.
2017-06-23 08:15:40 -05:00
Chris Michael 09375bf5b5 Revert "ecore-evas-wayland: Add support for setting window stack mode"
This commit reverts support for setting window stacking mode from
ecore_evas_wayland as per IRC dicussion with cedric

This reverts commit a3cf0d3a54.
2017-06-15 13:08:39 -04:00
Chris Michael a3cf0d3a54 ecore-evas-wayland: Add support for setting window stack mode
This patch adds support for updating ecore_wl2_window stack mode when
the ecore_evas_layer_set is called.

"#divergence"

@feature

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2017-06-15 11:39:27 -04:00
Chris Michael 8b29ae7609 ecore-evas-wayland: Add support for focus_skip_set
This patch adds support for ecore_evas_focus_skip_set in the wayland
engine.

"#divergence"

@feature

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2017-06-15 10:42:28 -04:00
Carsten Haitzler 205ef8a756 evas xpm loader - remove tabs and clean up formatting
just non-code changes here...
2017-06-14 17:15:49 +09:00
Carsten Haitzler 4a9f28a677 evas xpm loader - remove the rgb txt file db loading and compile in
so modern systems seem to have abandoned rgb.txt files. this leads to
us breaking the loading of xpm files tha use color names ... i added
the rgbt.txt from vim but that didn't seem to help... odd... so to just
stop adding path after path to load... ship our own. we could ship the
file... but then we'd still have to load and parse it... every time we
look up a color. so i munged the data with awk and now we compile it
in. it should consume the same space the rgb.txt does in the shared lib
binary. if not read it shouldn't be paged in. it should end up cheaper
than our floaing of the file and mmaping it when xpm module is
loaded/initted... so either way more efficient, uses a little less ram
(12306 bytes vs 17780 for the rgb.txt) ... and bonus - dont have
an extenral out-of-code data blob to find, manage install etc...

this means we should load xpms with colornames correctly again on
systems without an rgb.txt provided by x11 ... which seems to be the
common case now. :(

@fix
2017-06-14 17:04:43 +09:00
Chris Michael 522ee10b45 ecore-evas-wayland: Add support for setting auxiliary hints
This patch adds function pointers to the Wayland Interface that can be
used for supporting auxiliary hints on a given window

@feature

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2017-06-13 12:57:29 -04:00