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
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
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
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.
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
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.
so removing eglSwapInterval() is a very poor idea as then... who knwos
what it is? this broke at least nouveau (under weston AND under
enlightenment). a very skillful b0rk here than i luckily caught
quickly! :)
We have some "vsync" variable cargo culted from somewhere that is never
properly set, so is always 0 because it's in a calloced structure.
It's then used to set eglSwapInterval() to 0 always, which results
in mesa using wl_display_sync() instead of wl_surface_frame() for
its frame ready callback mechanism.
Remove it entirely and use the sensible default swapinterval.
There's actually an array of 2 in gl_x11, but it appears we only use the
first 1, except in an #if 0 block.
I gather this is legacy for some reason - it sure doesn't seem to make
any sense now, so I'm chopping off all the extra array indexes.
Note: I've not changed gl_sdl - it looks like it doesn't use the context
or surface at all and they could just be removed, but I don't build that
one here and don't want to touch it.
A previous patch to refactor setup stage and reduce complexity
actually introduced several build breaks. This patch fixes the build
break for wayland-egl.
ref 73b308fb66
BAD CEDRIC !!!!!
Signed-off-by: Chris Michael <cp.michael@samsung.com>
this technically isn't needed. it does help in some cases hide driver
or other buffer swap bugs, but in and of itself is not needed, so
remove. at least the drm egl bugs still happen on my pi3 so its
something else...
so i was just about to add buffer age debugging evlogs to everywhere
doing buffer age and i found... drm gl and wayland gl engines DONT
HANDLE age change like gl_x11! they dont reset to a "full render" for
that frame. well well. this explains bugs i am seeing for sure. very
very bag! i thought this was handled properly. this does lend some
credence to my thoughts about somehow having a single universal buffer
swapping/update calculating and "applying" api inside efl somewhere...
anyway - this fixes this issue for these 2 engines which is a real
necessary fix to be correct.
@fix
These engines are incredibly similar - by sharing the same engine info
structure we'll be able to simplify the wayland ecore_evas bits and
make them much more maintainable.
There's no reason why we'd need a full redraw if the buffer age for
this buffer isn't the same as the buffer age for the last buffer, so
let's cut out this thing.
Some engines should using sending surface damage, until now we'd only ever
provided them with buffer damage.
The difference is that surface damage is the damage to the surface the
compositor is displaying, and the buffer damage is the damage to the
buffer the client has rendered. These are different when the client
is using multiple buffers of different ages to render into.
Anything that calls eglSwapBuffersWithDamage, wl_surface_damage() or
wl_surface_damage_buffer() should be using surface damage, and not
buffer damage.
This patch is intended to make no functional change - any flush cb that
used buffer damage before still should. Actual fixes to follow.
Apologies if I broke any engines - it's a bit of a copy and wasteland
out here.
If buffer age isn't present we really want to return MODE_FULL, but we were
previously returning MODE_AUTO.
On recent mali drivers this resulted in accidental partial updates leading
to incorrect rendering.
So ok. haha. Amusing. But this is inappropriate.
1. It's not an INTENDED effect in theme so unless the theme ius doing
it - it shouldn't happen.
2. There are places to do this and it's NOT inside an engine. There
are high level filter and other mechanisms.
3. Actually this shouldn't be even done client-side. It should be done
compositor-side when moving a window around. Knowing velocity vector
etc. is useful to a client so the protocol can stay but doing the
animation client-side is "wrong". Some windows wobble and others do
not based on toolkit? really? sure we have to live with the CSD
difference but this? The compositor can do this JUYST fine. leave it
to compositor... OR do this properly with filters client-side. e.g. a
2d displacement map with evas filters would do the job as long as it
interpolates. If you want a way of forcing ALL objects in the canvas
to redirect to an intermediate buffer then do it up there at the
canvas level. It then works in GL and software, as opposed to only GL.
Also.... this is now causing issues for users:
<memeka> hi, from
https://git.enlightenment.org/core/efl.git/commit/?id=fb76fe55a52ac212b6870f1d74470a79ea5c5246
i run EFL_WAYLAND_DISABLE_WWW=1 terminology -> but it crashes in
wayland_egl/www.c in the setup_shaders function .... HELP?
so the fun was fune until we do a release (now) and until this causes
problems for users. Back to tried and tested code.
If you want to do this... do it right at the portable layers above.
...
Revert "wayland-egl: Fix use after free"
Revert "wayland_egl: Fix redirect to texture"
Revert "evas-wayland-egl: Add www protocol handling to wayland-egl engine"
Revert "gl_common: Add API for redirecting render to texture"
This reverts commit 2760afbb0e.
This reverts commit c937248eac.
This reverts commit c67f50b40a.
This reverts commit 0f7f4b6de0.
eng_window_use() uses outbuf->redirect, so the clever code in
eng_outbuf_reconfigure that avoided setting it to NULL to check
if we needed to recreate the redirect was not very clever at all.
Previous redirect to texture approach broke multiple window applications
by having only a single redirect per context. This approach allows
multiple redirections.
Use the new post-processing API and www extension to implement
CSS effects for wayland-egl applications.
Signed-off-by: Derek Foreman <derekf@osg.samsung.com>
Signed-off-by: Mike Blumenkrantz <zmike@osg.samsung.com>
Summary:
if eglGetError sequencially called, second eglGetError() doesn't give
the information of real Error.
Reviewers: jpeg, spacegrapher, cedric
Reviewed By: cedric
Subscribers: wonsik, scholb.kim, cedric, dkdk
Differential Revision: https://phab.enlightenment.org/D3305
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
Summary: if EGL_KHR_partial_update extension is implemented in the
driver, set damage region. This is done before the draw calls.
Signed-off-by: Chris Michael <cp.michael@samsung.com>
Summary:
This fixes broken rendering of the main surface when new surface is created.
Rendering on main surface can be broken due to invalid size of common gl context.
Since common gl context is shared between surfaces, if new surface has been changed
size of common gl context, then rendering on main surface can be broken.
In order to fix problem, engine has to change size of common gl context after egl
make current according to size of current Outbuf.
@fix
Test Plan:
run elementary_test with wayland_egl engine under wayland and click any
button to create new surface. watch the main surface of elementary_test.
Reviewers: devilhorns, raster, stefan_schmidt, cedric
Reviewed By: cedric
Subscribers: cedric
Differential Revision: https://phab.enlightenment.org/D1346
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
Summary:
use eng_output_resize of software_generic engine and move wl_egl_window_resize to
eng_outbuf_reconfigure. and remove eng_output_resize of wayland_egl.
@fix
Test Plan: run elementary_test with wayland_egl engine under wayland
Reviewers: devilhorns, raster, stefan_schmidt, cedric
Reviewed By: cedric
Subscribers: cedric
Differential Revision: https://phab.enlightenment.org/D1343
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>