Summary: This fixes an issue for windows which do not set a min or max
size in the properties. This was discovered when running Enlightenment
in a Wayland-Only scenario, and trying to bring up the settings panel
which would cause an endless loop in calculating the proper window
size due to min/max not being set.
@fix
NB: Thanks to Mike for the help in tracing this ! :)
Signed-off-by: Chris Michael <cp.michael@samsung.com>
Work done by Jaeun Choi, rebased & squashed by jpeg.
This commit introduces changes to the low-level draw functions
of the SW engine considering the existence of an alpha mask image.
Features:
- Font masking (TEXT, TEXTBLOCK),
- Rectangle masking,
- Image masking (all image scaling functions should be handled).
The mask image itself is not yet set in the draw context (see
following commits).
@feature
Signed-off-by: Jean-Philippe Andre <jp.andre@samsung.com>
Summary: This fixes an incorrect order with shutdown of drm library.
Sprites are created (during init) before inputs, so they should be
shutdown After inputs are.
@fix
Signed-off-by: Chris Michael <cp.michael@samsung.com>
Summary:
Without EGL_PLATFORM environment variable, eglInitialize() can be
failed because egl tried to load DRM platform instead of X11 platform and it
tried to handle XDisplay pointer as a gbm_device pointer as well.
The failure seems to be occured especially if the egl was built
with DRM platform as native platform.
This revision can prevent the failure by indicating proper egl platform using
EGL_PLATFORM environment variable.
@fix
Reviewers: gwanglim, jaehwan, seoz
Reviewed By: seoz
Subscribers: cedric
Differential Revision: https://phab.enlightenment.org/D1828
If MSAA was requested, it is very likely that no config was
found (depending on the driver), so we'll try again without
MSAA. Yeah, this might not look very smooth but it should be
better that failing at eglMakeCurrent.
We should use GLESv1 functions in a GLESv1 context to scan for
GLESv1 extensions. Makes sense yeah?
This should expose the proper list... especially enabling FBO
extension when it's supported by the driver.
Summary:
fix possible string overflow on decoders.
this commit is based on commit 3c5412f728
that fixes CID 1039580.
Reviewers: raster
Reviewed By: raster
Subscribers: cedric
Differential Revision: https://phab.enlightenment.org/D1783
Summary:
From UPower 0.99.0, a property "OnLowBattery" was removed and
upower have recommended to use "WarningLevel" instead.
This revision provides "WarningLevel" using the property "DaemonVersion"
and it keeps dealing with "OnLowBattery" as well for old system.
Fixes T1909
Reviewers: gwanglim, barbieri, zmike, stefan_schmidt
Reviewed By: barbieri
Subscribers: zmike, stefan_schmidt, cedric
Differential Revision: https://phab.enlightenment.org/D1717
Summary: This fixes Coverity CID1257606 and CID1257607: Dereferencing
null return value. _evgl_tls_resource_get Can return NULL so we should
be checking that returned value before trying to use it
@fix
Signed-off-by: Chris Michael <cp.michael@samsung.com>
Summary: Due to the change of order in creating outputs & inputs, we
need an additional goto error for destroying inputs if output_create
fails
@fix
Signed-off-by: Chris Michael <cp.michael@samsung.com>
Summary: Call function to create drm input devices Before we create
outputs. This is done so that when outputs Do get created, it will
update the input's known size of output for device coordinate
transformation
@fix
Signed-off-by: Chris Michael <cp.michael@samsung.com>
There was a problem when checking whether the current surface
is compatible with direct rendering. In case of client-side
rotation (it's a flag set on the surface by the app), a surface
can be directly rendered even if the rotation is not 0.
But, before this patch, it was assumed that the surface was
current. Which doesn't make sense because make_current is
called by the pixel callback, from the application, and this
happens *after* we check for direct rendering.
As a consequence, it was not possible to mix directly rendered
surfaces with FBO-based ones, and use client-side rotation.
This patch should solve that issue.
Summary:
- allow to launch drm backend without systemd-logind with root privilege.
- allow to open drm device node via logind, not directly open it, in case exist systemd-logind.
- fixes issue that couldn't switch session, because ecore-drm couldn't drop master to drm device with no permission. (allow to switch session appropriate.)
Reviewers: gwanglim, devilhorns
Subscribers: torori, cedric
Differential Revision: https://phab.enlightenment.org/D1704
Summary: This fixes a leak in the xcb engine where the Outbuf_Region
was not being freed.
@fix
Signed-off-by: kabeer khan <kabeer.khan@samsung.com>
Reviewers: devilhorns
Subscribers: cedric
Differential Revision: https://phab.enlightenment.org/D1750
If an app calls glDisable(SCISSORS) and uses direct rendering,
then the DR scissors were dropped and so glClear would erase
the contents of the entire canvas, instead of being restricted
to the image object.
Example scenario:
- Create a direct rendered Evas GL 'sfc' 'ctx'
- Create a PBuffer dummy surface, make it current
- Do some stuff
- Make current (NULL, NULL) to go back to no target
- Make current (sfc, ctx)
--> glClear() will not render anything on screen
Reason:
The current FBO binding is still set to the implicit FBO
bound to the PBuffer surface (it could be any surface, really).
0.99.0 removed the OnLowBattery property and added the per-device WarningLevel property. this requires what will effectively be a full rewrite of the module to track all the power levels of all the attached batteries and set the ecore power level somehow based on a combination of their levels
since I have no desire to spend any more hours working on and debugging this module which is based on a known-unstable api, I'm making it disable itself if it detects a version >= 0.99.0. hopefully someone will decide to maintain both this and eldbus in the future so that we can more accurately track upstream when they make changes to these things
ref T1908
ref T1909
showing up correctly.
Summary: If elm config profile is set to Mobile, then the
auto_norender_withdrawn is set to 1, which was causing Elm windows to
not draw properly due to the ee->withdrawn property not being updated.
It was not getting updated due to these checks for override.
NB: Tested this with all elm profiles, tested in weston, and tested in
Enlightenment (Wayland).
@fix
Signed-off-by: Chris Michael <cp.michael@samsung.com>
If the node is not visible, it is not rendered, which improves performance.
@feature.
Reviewers: raster, Hermet, cedric
Reviewed By: cedric
Subscribers: cedric
Differential Revision: https://phab.enlightenment.org/D1722
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
Summary:
A little fix of copy-paste, there were problems while changing texture coordinates of indices.
@fix
Reviewers: raster, Hermet, cedric
Reviewed By: cedric
Subscribers: cedric
Differential Revision: https://phab.enlightenment.org/D1725
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
Since this struct is likely to grow in size over time, client apps
built against future versions of EFL might start indexing fields
that are not present in the current form.
Also, don't reset the struct memory as this would break
multithreaded GL applications.
While this is not exactly a fix, I'll backport this.
@fix
Summary: Evas compilation was broken for --with-opengl=es due to the
use of GL_R16 (which is not defined for EGL).
NB: This may Not be the Proper fix, but at least it compiles now.
@fix
Signed-off-by: Chris Michael <cp.michael@samsung.com>
Reviewers: raster, Hermet, cedric
Reviewed By: cedric
Subscribers: cedric
The texture used to store the depth map should be a single-channel texture.
@fix
Differential Revision: https://phab.enlightenment.org/D1713
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
Summary:
To satisfy this condition, ee->visible will be EINA_FALSE. But when iconify is requested, ee->visible is usually EINA_TRUE.
@fix
Reviewers: raster, Hermet, seoz
Reviewed By: seoz
Subscribers: cedric
Differential Revision: https://phab.enlightenment.org/D1710
Fixes Coverity reports:
- CID 1256183
Coverity was a bit stupid there. It knows the size of both
strings and complained about unsafe strcpy. It should have
complained about unsafe strcat instead.
OpenGL 1.2 already supports some of the features that
GLESv2 has as extensions:
- GL_EXT_read_format_bgra
- GL_EXT_texture_format_BGRA8888
- GL_EXT_texture_type_2_10_10_10_REV
Also, we need to check the proper ARB name of some extensions when
running on desktop, instead of their OES/IMG/EXT equivalent:
- GL_ARB_texture_float
- GL_ARB_texture_half_float
- GL_ARB_texture_non_power_of_two
- GL_ARB_half_float_vertex
- GL_EXT_packed_depth_stencil
The extension name is GL_ARB_texture_non_power_of_two
for desktop GL, but GL_OES_texture_npot for GLES.
We will consider the extensions compatible, I believe
the GLES version is a subset of the desktop one. Not sure
if that's 100% true.
Carefully select the requested EGL config and match it with
the available visual from X, including the following options:
- Stencil
- Depth
- MSAA
TODO: The same thing for GLX. And fix direct rendering as well.
Summary:
This patch set adds the necessary code to expose device axis state to applications. This was primarily written with graphics tablets in mind, which -- in addition to acting like a mouse -- also provide information about pen pressure, tilt, etc. Other devices could potentially benefit from this API as well: touchscreens, joysticks, knob controllers, "spaceballs", etc.
Whenever an update to the device state is recieved, an "Axis update" event is synthesized. This event contains the updated information, typically scaled and normalized to a particular logical range (e.g. zero to one for pressure, -pi to pi radians for angles, etc.). Information about the tool which generated the event is also stored so that applications can disambiguate events from multiple devices (or in the case of multitouch screens, individual fingers).
This API is only wired up for use with X11 at the moment. Support for other backends (e.g. Wayland) should be easy to add for those familiar them.
**Note**: The following is a list of changes from the "v2" patches originally sent to the mailinglist
//Define and implement new Ecore_Event_Axis_Update events//
* Harcode axis labels instead of including xserver-properties.h
* Use C89-style comments
* Use doxygen comments
* Update comment text to note axes with unbounded/undefined ranges/units
* Create "Ecore_Axis" and "Ecore_Axis_Label" typedefs
* Reference typedef'd instead of raw types
* Adjust how we count through valuators to support tilt/az
* Add support for tilt and azimuth
* Tweak memory management in case number of valuators differ
* Expand TWIST axis normalization to declared range
* Only normalize TWIST axis if resolution == 1 (wacom bug)
* Cache label atoms on first use to minimize round-trips
//Implement EVAS_CALLBACK_AXIS_UPDATE event and friends//
* Update to doxygen comments
* Update comment text to note axes with unbounded/undefined ranges/units
* Typedef 'Evas_Axis_Label', 'Evas_Axis'
* Move typedef for 'Evas_Event_Axis_Update'
* Reference typedef'd instead of raw types
//Wire the Ecore and Evas implementations of axis update events together//
* Expose ecore_event_evas_axis_update in Ecore_Input_Evas.h
* Move ecore_event_evas_axis_update to more logical position
//DEBUG: Add axis update logging to evas-multi-touch.c//
* Removed from patch set
//Make evas-multi-touch demo use new axis functionality//
* Have pressure adjust rectangle brightness instead of size
* Use more available axis data when rendering rectangle (azimuth, tilt, twist)
Test Plan: The evas-multi-touch demo was updated to support axis update events. A graphics tablet was then used to verify that the pressure, azimuth, tilt, and twist data was coming through correctly.
Reviewers: cedric, raster
Subscribers: cedric
Differential Revision: https://phab.enlightenment.org/D1514
Conflicts:
src/lib/ecore_input/Ecore_Input.h
Carsten Haitzler -
** fixed forward enum typedefs (make things unhappy)
** fixed conflict above
** fixed wrong param type for _evas_canvas_event_feed_axis_update()
** fixed @sinces to be 1.13
** fixed formatting/indeting
** fixed order of operation reliance in if's with ()'s to be clear
** fixed functions to be static that should have been
this fixes focus skip being set if someone else sets skip
pager/taskbar. it's a one-way prop. if focus skip is set THEN skip
pager/taskbar is set. not the other way.
This is a new attempt at avoiding reload of an image
that failed to load during async preload.
See 42d2f8a12b (reverted).
I still can't figure out why setting load_error does not
work as expected (E pager becomes blank).
- glGetString(GL_VERSION) should not return "OpenGL ES 3.0" because
GLESv3 is not supported yet.
- GL_EXTENSIONS should return only the list of supported extensions
--> disabled for now as the whitelist of safe extensions is way
too small.
Apps would crash if they call make current without creating
a surface in the same thread. I don't see a good reason why
we should have this a limitation.
It will be triggered when EVAS_GL_API_DEBUG is set.
Yeah, that's abusing the variable a bit, as it was intended for
GL calls only, but this is pretty harmless.
Also add string "GL_DEPTH_STENCIL".
NOTE: The draw_buffers extension might need to be checked more and
wrapped, if it can have adverse effects on how Evas works (could
it replace the default render target?).
This adds support for the following extensions:
- disjoint_timer_query
- occlusion_query_boolean
- alpha_test
- draw_buffers
- read_buffer
- read_buffer_front
- framebuffer_blit
This will mark some extension functions as "safe", which means
we don't need to wrap them in order to expose them.
All the known extensions from Evas_GL_API have been marked as safe
for now.
In the future, we may encounter extensions that are not safe
out of the box, but can be wrapped. At that time, we will have
to mark them as safe but return the pointer to the wrapper instead.
Until then, only whitelisted extensions will be supported.
@feature
The idea is that normal opengl applications might very well want to
check for an extension using the usual string and not have to do
something special just because they're using evas_gl and not egl.
Some shader files (shd) were not included in EXTRA_DIST. This didn't break
the build because the .x file was correctly generated.
I guess the missing files in previous releases also had no impact because
the .h files would be generated and shipped.
Also generate the enum automagically. New shaders need to be added
to Makefile_Evas.am.
All shaders will be in a single .x (C) file.
There shall be no more useless .h files.
This also removes the need for awk (replaced by sed and bash stuff)
this cleans oyt a few bits o9f old glx context handling code that are
no longer used as well as avoids causing server-side to crash on
tryng to set a "none" glxwindow as current. this is what cases the
nvidia server-side crashes.
Summary: Wayland windows should follow X11 windows fairly closely,
thus only set withdrawn property if they are override windows. If not,
internal dialogs do not show up in Enlightenment (wayland-only).
@fix
Signed-off-by: Chris Michael <cp.michael@samsung.com>
Summary: This commit fixes compiler warning:
modules/evas/engines/gl_common/evas_gl_3d.c:1322:48: warning: 'ld' may
be used uninitialized in this function [-Wmaybe-uninitialized]. We
declare 'ld' as NULL now, and check it is valid before using it.
@fix
Signed-off-by: Chris Michael <cp.michael@samsung.com>
Summary: glsym_evas_gl_common_error_set used here leads to an implicit
declaration in compiler warnings. Remove the call to that function and
just print out an error message. This is a cleanup function anyway.
@fix
Signed-off-by: Chris Michael <cp.michael@samsung.com>
Summary: In fixing a Coverity issue, I copy/pasted a call to
evas_gl_common_error_set without compiling :( Bad me !! This commit
fixes the issue (data was undefined). Since evas_gl_common_error_set can
take NULL as the data parameter, lets use that.
@fix
Signed-off-by: Chris Michael <cp.michael@samsung.com>
evas gl window was freed before new one was created getting shared ctx
to 0 refcount thus freeing everything there - BAD. fix. new issue in
git, not from release
so this is a re-try at the evas gl destination alpha fix. this is what
cedric tried, but done RIGHT. it required adding an ecore_x call to
create a window with correct visual/colormap. it requires doing
visuals totally correctly all the way from ecore_evas to the evas
gl_x11 core. nvidia drivers are very picky about visuals. i also had
to vid the egl/gles code too to do the same thing. nvidia gles/egl
drivers are also picky, mesa is not. this all requires a lot of code
changes. it's far from trivial
this isn't backported for a few reasons:
1. verify this fix doesn't break for anyone.
i tested:
nvidia glx + egl/gles
intel glx + egl/gles
radeon glx
it needs wider testing. nouveau, fglrx for starters and maybe
some other gles/egl drivers.
2. have some review time
3. time to settle before blasting to stable branches
@fix
Summary: The function prototype for eng_context_create has recently
changed in gl_common, however nobody thought it wise to update all
engines using it, so this commit fixes the function for the gl_drm
engine.
@fix
Signed-off-by: Chris Michael <cp.michael@samsung.com>
Not sure if this is very relevant, since GLX does not support
GL-ES as such, anyways... We should be using the extension
GLX_EXT_create_context_es_profile to create proper contexts.
Note: GLX + OpenGL-ES 1.1 crashes at any function call on my
machine (binary bloc driver), while EGL + GLES1.1 is fine.
Summary: Apparently, somewhere down the line, the function prototype
for eng_context_create was changed in the EVGL_Interface, but nobody
decided to fix All engines. This commit fixes the function prototype
for evgl_eng_context_create
@fix
Signed-off-by: Chris Michael <cp.michael@samsung.com>
Forgot to set the TLS value after creating a new context.
No problem would show up in most cases, even in my test app.
But elementary_test GLView would just not work at all, spitting
incomplete FBO errors at me. Damn this one line was hard to find.
But introduced in df66916cd22ec6c4.
This introduces XPixmap usage for indirect rendering.
Of course this works only for the gl_x11 engine... and for
now only when using EGL... and only on some drivers...
damn limitations.
Direct rendering should work on more platforms (eg. some desktop
nvidia cards with the EGL drivers).
Add version param to context_create.
Add support for 1.1 contexts in the GL_X11 engine, and checks
for version in all other engines (return NULL).
Add API wrappers for all OpenGL-ES 1.1 APIs (normal and debug
modes).
Welp, glGetString() crashes if called before eglInit... And this
piece of code is now useless because "safe native" mode is not
used anymore (safe_native is never read).
Remove all safe native-related code.
When using EGL, this function should return the properties of
a surface. Limited to a subset of known attributes.
Right now, this function will only work fine with EGL.
GLX support or any other engine is not implemented.
@feature
This should add support for the following EGL extensions:
- EGL_KHR_fence_sync
- EGL_KHR_reusable_sync (eglSignalSyncKHR)
- EGL_KHR_wait_sync (eglWaitSyncKHR)
@feature
evas gl CreateImage function was assuming the current context
should be used to create an image, while the equivalent EGL function
specifically requires the context to be specified.
This also imports some definitions for CreateImage.
And fixes typo in glEGLImageTargetRenderbufferStorageOES.
This adds new functions in Evas_GL_API struct. The version
number will be bumped to 2 in a later commit.
@feature
This is a new feature allowing direct rendering even when
the view is rotated. In that case, the application is responsible
for rotating its view and rendering it properly given the object
geometry.
This implements support for the flag
EVAS_GL_OPTIONS_CLIENT_SIDE_ROTATION
@feature