I recently added an undef EAPI which wasn't in fact the best idea ever.
The EAPI needs to remain defined as is for elementary modules and
edje_externals.
Ping @vtorri
See ad6e3ce3df
This removes an argument that was false only for a single widget:
naviframe. Hopefully this logic is now simpler, even though it involves
a small hack within naviframe itself.
Ref T5363
Small patch to add a handler for catching Window Iconify State Change
events
'#divergence'
@feature
Signed-off-by: Chris Michael <cp.michael@samsung.com>
one if condition is always true by virtual of previous if statements
and drop-through so can remove. not actually any bug but analysers
don't like it
found by PVS studio
only the else changes finfo so reset inside there. not really any bug
at all byt style-wise a bit better and analysers don't like it
found by PVS studio
so a type we handle earlir inan if we re-handle as invalid later. this
wouldnt lead to a crash or bugs as the if's would ned to be evaluated
in order normally, but it's good to get it right.
found by PVS studio
So vmware's graphics driver reports the MONOTONIC drm cap, yet uses
CLOCK_REALTIME instead. This leaves us with a gigantic offset between the
gpu timestamp and the times ecore_time_get() gets from CLOCK_MONOTONIC.
Since ticking screws directly with loop time this results in some long
distance clock jumping.
This commit fixes drm/gl_drm operation under vmware.
This lets us do a blocking wait for a vsync. Something we should try to
do as infrequently as possible, but in some cases we need it one time at
startup to catch graphics driver bugs.
usecase:
show -> rotation -> hide -> show
ecore_evas_wayland didn't check the rotation.
when ee is landscapemode, it cannot update the right area of evas.
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
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
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
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.
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.
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.
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.
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
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
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
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
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
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
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
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
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.
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.
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>
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>
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
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>
1. The word "class" is a pain point with many languages where
it's a keyword. Type is a little better. Also, the property
was already named "device_type" and not "device_class".
2. Remove Efl.Input.Device.Sub_Class
It's not used inside EFL upstream codebase, and unlikely to
be used anywhere else (even in Tizen).
Hopefully no one used the Efl_ enum types. So far only the Evas_
types should be in used.
Ref T5540
As we will now use static_libs/libdrm for building ecore_evas_drm, we
no longer need to include this bit of borrowed four_cc code from libdrm
Signed-off-by: Chris Michael <cp.michael@samsung.com>
This patch adds support to Ecore_Evas_Wayland for Window Manager
Rotations so that window managers which do support rotations are able
to rotate an EFL wayland application.
@feature
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2 more. /etc/X11/rgb.txt /usr/share/vim/vim80/rgb.txt ...what i do notice
is that this file seems to have vanished from modern systems... so we'll have
lots of un-fun loading old xpm's with colornames if we cant figure out what
color names map to what colors...
If/When we exit _evas_outbuf_egl_setup function, we should be freeing
the allocated cfgs variable else we leak it.
@fix
Signed-off-by: Chris Michael <cp.michael@samsung.com>
As we won't get a request from a server to raise a window which is not
visible anyway, this check is useless.
@fix
Signed-off-by: Chris Michael <cp.michael@samsung.com>
Summary:
_ecore_evas_wl_common_new_internal() creates both wayland_egl and
wayland_shm backed windows, so reporting that the failure was in looking
up "Wayland_Shm" could be misleading.
Also, this routine can be called with any arbitrary string as
engine_name, so including what was received in the error message might
be helpful for diagnosing bugs.
Reviewers: cedric
Reviewed By: cedric
Subscribers: jpeg
Differential Revision: https://phab.enlightenment.org/D4897
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
Summary:
Coverity reports an error "Calling "xkb_keysym_to_utf8" without checking
return value (as is done elsewhere 4 out of 5 times)."
fixes: cid1375673
Reviewers: zmike
Subscribers: cedric, jpeg
Differential Revision: https://phab.enlightenment.org/D4936
This is a quick and harmless hack to make sure we don't come back to a
dead compositor on a vc switch.
A proper fix will follow eventually, I promise.
Really. Would I lie?
Set this env var to "300 es" to test GLSL 300 ES as shader
version. This is for brokenshakles.
Example:
export EVAS_GL_GET_PROGRAM_BINARY=0
export EVAS_GL_SHADER_GLSL_VERSION="300 es"
export ELM_ACCEL=gl
elementary_test
this is still semi-broken if a seat has many pointer-ish type devices since
pointer devices in ecore-evas were never correctly implemented to be 1:1 with
seat:cursor relationships
@feature
windows do not have pointers or cursors under wayland, seats do. due to
lack of multiseat support, most components simply use the "default" seat
with these functions, but this should make the corresponding code more
easily adaptable
the current (v6) xdg-shell spec reads as follows:
Client window decorations should be painted as if the window is
active. Do not assume this means that the window actually has
keyboard or pointer focus.
so this is not equivalent to receiving/losing input focus and should not
be propagated as such
@fix
Removes the previous "busy" flag, as now we might have an fb attached to
multiple outputs at once, and need to be careful to destroy them only
after they've been removed from all outputs.
Removed the old "busy_set" API which nothing used, and renames fb_destroy
to fb_discard to make it more clear that it's not immediately destroyed.
It's all beta api, so I can do this.
Omg... Thanks Daekwang Ryu for pointing me to my error. I remember
struggling a lot with this OpenGL API and libGLdispatch (glvnd) when
in fact this was all just a typo in the code.
GLES 3.1 and the upcoming 3.2 support need a proper test case...
See c68a409874
@fix
Somehow this long standing bug wasn't obvious until wayland 1.13.0 made
some additions to an opaque structure.
This changed the frequency that new buffers came to us with the exact
same pointer value of a buffer that had just been freed.
This shortcut in eng_image_native_set has always been wrong - we need to
proceed to the end to make sure we pick up new dmabuf attributes.
This fixes fullscreen feature in Elm on Windows as the geometry of the desktop
was not known.
In case of multiple displays, the desktop, where the window is displayed, is used for fullscreen.
@fix
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
Summary:
Evas can't open tiff file because of no implement in client read api.
I wrote codes simply for open.
Test Plan: self
Reviewers: jpeg, cedric, jypark
Subscribers: stefan_schmidt
Differential Revision: https://phab.enlightenment.org/D4857
This is the first step toward handling multi output. This patch
remove engine.data.output from Evas structure and use an Eina_List
for it instead. It also start moving code around to fetch an output
or an engine context (which are the same at the moment, but will be
split in a later patch).
so our yuv import funcs for gstreamer 1.x engine were ignoring the
plane offsets and strides provided by gstreamer. though this nicely
shows that these numbers provided are actually wrong - at least in the
testing with vaapi back-ends with gst.
so this fixes emotions' badness but there is still badness in gst
apparently. the numbers provided if used are just simply wrong for teh
image data. commented code in the src to show how to "Fix it up" by
forcing some alignment of content to get it to work.
@fix
This might not be used as over two consecutive runs all the
same buffers should be used. But it could happen if some
parameters in the filter change (eg. blur radius).
Fixes major (GPU) memory leaks. Reuse mode is still leaking.
An odd-sized image scaled down by 2 was losing 1 pixel during the
downscale, and it was not restored after scaling up. The same
happened with downscaling by 4 except the effect was even more
visible.
This meant that a moving snapshot with a large blur would trigger
some really ugly sampling issues if the content below was precise
(such a text).
This dramatically improves the performance and now seems
to give acceptable results. Eventually we need a quality flag
in order to enable this or not. Alternatively, "gaussian" blur
mode would skip this optimization, while "default" would trigger
it.
This can help with performance when a large region of the
filtered image (eg. snapshot) is fully hidden by an opaque
object. For instance the window border is hidden by the
opaque window content.
This make save() work on snapshot objects, provided the call
is done from inside render_post.
Also, this saves the filtered output of an image, rather than
its source pixels. Any call to save() on a filtered image must
be done from post-render as well.
Fixes T2102
@feature
If we delete the image that was the target surface for gl
rendering, a crash would occur on the next render cycle.
Unlikely but not impossible to trigger from app side.
@fix
This was a poor attempt at improving the performance but
obviously the root cause isn't fixed (too many texel fetches).
Uniform should (theoretically) work better than an attribute
the for loop. Just a guess here.
This also makes GL blur use a float value as radius, allowing
future extension to non-integer blur radii, as well as using
linear scaling as a fast blur approximation.
This optimizes the GL blur algorithm by reducing the number of
texel fetches (roughly half the number of before this patch). This
works by exploiting GL's interpolation capabilities.
By simply splitting X and Y blurs in two passes we can improve
the performance of the blur filter a lot.
There is still much to be done to make it really fast and nice
looking:
- implement true gaussian blur (not sine-based approximation,
right now the actual blurs look different in SW and GL)
- exploit linear interpolation for R tap instead of R*2+1 taps
(a tap being a texel fetch)
- downscale & upscale large images with large blur radii
Wait a second though, this implementation is not only incomplete
(no support for box vs. gaussian blur), it's also insanely bad in
terms of performance. Small radii may work fine, but at least blurs
render properly in GL with this patch (no more glReadPixels!).
The shader needs a lot of love, including in particular:
- support for 1D box blur single pass
- support for 1D gaussian (or sine) blur
- use linear interpolation and N-tap filters
- separation of 2D blur in two passes (high-level logic)
- potentially separation of large 1D blurs in 2 or more passes
knowing that 2sigma == sigma + sigma when it comes to the gaussian
bell curve.
This one was a bit more... "fun". I had to add a new vertex
attribute and obviously using a VertexAttribPointer led to
incomprehensible crashes. But a simple glVertexAttrib2fv makes
it work like a charm!
A rare option is not handled yet.
This reuses the existing mask infrastructure, but adds a color
flag to use the whole RGBA range, rather than just the Alpha
channel.
Filters are still very slow (glReadPixels and non-optimized use of
GL buffers...), but this is progress :)
This corrects two things:
- the blur filter high-level logic, that lead to reusing some
temporary buffers which contained garbage;
- the versatile gl buffer implementation so that it now properly
switches between the RGBA_Image and the FBO content (yes, this
is insanely slow and inefficient... but it works and that was
the only point).
Alright, so this is a massive patch that is the result of
trying to get rid of unused or poorly implemented classes in
ector. Originally ector was meant to support VG but extend to
things like filters as well. At the moment, ector's design
makes it quite hard to plug in the filters.
For now I think it's easier to implement the GL support for
the filters directly in the engine, where I hope to interfere
as little as possible.
This massive patch keeps only the required minimum to support
a versatile gl buffer that can be mapped, drawn or rendered to (FBO).
It's extremely inefficient as it relies on glReadPixels and lots
of texture uploads, as well as conversions between ARGB and Alpha.
Another type of GL buffer is a wrap around an existing GL image,
but that one is read-only (map or draw: no write map, no FBO).
No, all the filters run fine, and the high-level implementation
(evas_filters.c) does not need to know whether the underlying engine
is SW or GL. One problem though appears with the blending or blurring
of some Alpha buffers, the colors are wrong.
This patch removes more lines than it adds so it must be good ;)
This is an attempt at refactoring the filters code so I can
later implement GL support. This patch adds a few extra changes
to remove avoid calling functions of libevas from the software
engine: use the draw functions from static_libs/draw rather
than evas_common APIs.
Summary:
Before, rsc->current_ctx is always same with ctx.
So checking context change was meaningless.
From now, it has meaning.
Test Plan: App call evas_gl_make_current more than twice in pixels callback. Those surfaces are indirect rendering surface.
Reviewers: jpeg, dkdk, wonsik
Reviewed By: jpeg
Subscribers: cedric
Differential Revision: https://phab.enlightenment.org/D4773
Summary:
If the last item before ellipsis item has bigger width than its advance,
evas_common_font_query_last_up_to_pos() function can find wrong ellipsis position.
When Evas finds a position for non last item, Evas must care about additionally
available space for glyph's width of the given x position.
ex) the last item's glyph before ellipsis item has a tail to draw above the ellipsis item.
@fix
Test Plan:
Test case will added as comment.
(Becasue of font license problem.)
Reviewers: herdsman, raster, jpeg, woohyun
Subscribers: cedric, Blackmole
Differential Revision: https://phab.enlightenment.org/D4727
Summary:
eina_file_virtualize is causing issues.
memfile_set is better but see attached bt.
What to do???
Reviewers: raster, cedric
Subscribers: jpeg
Differential Revision: https://phab.enlightenment.org/D4743
the code added by minkyoung has a definite security flaw here trusting
e->response to be within a small range when all it is is an int -
range is not limited other than that... so fix the code to check for
range like further code below does.
this commit went in 2 days ago... so not an existing bug fix.
The things you learn to love...
The situation was:
- An object is mapped (naviframe in an animation)
- One of its children has a mask
- The window is rotated by 90 or 270 degrees (landscape)
The mask glsl code to invert the x,y coordinate depends on the
screen rotation and this somehow was wrong.
Tested on Tizen and in elm_test "Masking", made with @jiin.moon.
@fix
Summary:
This prevent invalid shared memory access.
Invalid access occur when server is resized sequentially from now to A-size
to B-size, and client receive A resize message after resizing B.
Then client try to render plug image with A-size, but shared memory is B-size
buffer. Size are mismatch. This makes segmentation fault when uploading texture(gl)
or rendering image(sw).
Test Plan: Indicator rendering on Tizen3.0 platform.
Reviewers: jypark, wonsik, dkdk, scholb.kim, jiin.moon, jpeg, cedric
Reviewed By: cedric
Subscribers: cedric, jpeg
Differential Revision: https://phab.enlightenment.org/D4711
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>