When rebasing the commits, I have been lazy and did a git add src/ that
actually added the files that were not ignored. My bad, sorry about that.
The original patch was fine.
Thanks sung.
Summary:
Change function and variable names to more suitable ones.
Remove FBO_FUNC macros.
Little tidying up from previous commit.
Test Plan: Local Evas GL tests for 1.1, 2.0, and 3.0
Reviewers: jpeg
Subscribers: cedric, mer.kim, mythri, wonsik
Differential Revision: https://phab.enlightenment.org/D2126
Signed-off-by: Jean-Philippe Andre <jp.andre@samsung.com>
Summary:
Fix build errors for glx backend made from previous commit
Revert parameter naming
Test Plan: Local Evas GL tests for 1.1, 2.0, and 3.0
Reviewers: jpeg
Subscribers: mythri, wonsik, cedric, mer.kim
Differential Revision: https://phab.enlightenment.org/D2117
Summary:
When the context version between Evas GL and GL backend differs,
we cannot share texture between them.
So, when the driver has support for KHR_gl_texture_2D_image extension,
use EGL image to share between Evas GL and GL backend
Test Plan: Local Evas GL tests for 1.1, 2.0 and 3.0
Reviewers: jpeg
Subscribers: mythri, mer.kim, wonsik, cedric
Differential Revision: https://phab.enlightenment.org/D2115
Summary:
Remove gles1 prefixes for functions that are also used by gles3.
Refactor evgl_make_current a little bit.
Destroy indirect context properly.
Some log message changes and typo fixes.
Test Plan: Local tests on desktop PC
Reviewers: jpeg
Subscribers: mythri, mer.kim, wonsik, cedric
Differential Revision: https://phab.enlightenment.org/D2104
Summary:
This should enable applications to use GLES 3.0 through evas gl.
Todo: Fix indirect rendering issue occuring because texture objects
cannot be shared between different version of GLES contexts.
Todo: extension pointers need to be updated for GLES 3.0
Reviewers: wonsik, spacegrapher, jpeg
Subscribers: cedric
Differential Revision: https://phab.enlightenment.org/D2017
@feature
- Check debug flag before warning that a surface is not direct
- Remove notes about surface reconfigure, as this will not be implemented
(see previous commit).
Summary:
When Evas GL runs with direct rendering, it can not set depth, stencil and msaa to Window surface.
This patch is possible to use "option" input paramater of ecore_evas_gl_x11_options_new.
So, new API is not needed.
The other patch is in elementary. The elementary patch will be used this patch.
Test Plan: Test elm gl veiw in elementary_test and JP's test app.
Reviewers: spacegrapher, cedric, raster, jpeg
Reviewed By: jpeg
Subscribers: cedric, mer.kim
Differential Revision: https://phab.enlightenment.org/D2144
Signed-off-by: Jean-Philippe Andre <jp.andre@samsung.com>
Note: jpeg changed the original patch a bit (fix style and depth value)
Summary:
Current definition of transpose and transverse was wrong. Corrected it by
interchanging both definitions.
Signed-off-by: kabeer khan <kabeer.khan@samsung.com>
Reviewers: cedric
Subscribers: cedric
Differential Revision: https://phab.enlightenment.org/D2143
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
Evas GL backend uses a global OpenGL context for all windows inside
an application. Each window has its own texture to render its
content. We use a singleton NSOpenGLContext shared between all
NSOpenGLView, it solves rendering issues for multiple windows.
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
Each new Ecore_Evas was already stored into the evases container, however only
the first one was returned and used from events handler, which is not correct if
the application uses multiple windows. This commit adds support to handle
Ecore_Event_Cocoa_Window event type from event handlers and modify
_ecore_evas_cocoa_match() to find the right Ecore_Evas associated with the window
indentifier passed throught Ecore_Event_Cocoa_Window.
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
The pixel on the top-right of a texture was set using an invalid offset.
"luckily" this never crashed but probably could have with wide
single-row images.
Also, the output was not perfectly correct.
Summary:
Previously: Each allocation happened in the first chain after any free.
Now: All allocation will happen in one chain until all buckets are full, this can reduce
fragmentation to some extent.
Reviewers: seoz, govi, shilpasingh, raster, cedric
Reviewed By: cedric
Subscribers: cedric, rajeshps
Differential Revision: https://phab.enlightenment.org/D2071
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
Automatically fallback to OpenGL ES 2.0 if OpenGL ES 3 is not supported.
This is a first step in trying to support GLES 3 for Evas GL.
This commit is also a wild test to see whether using GLES 3 contexts
by default will break anything. The theory says that GLES 3 is
backwards compatible with GLESv2.
So, if anything GL breaks for you... scream loudly!
But before reporting any bugs, please set the env variable:
- export EVAS_GL_DISABLE_GLES3=1
This does not add any requirement for GLESv3 support.
Just a simple log domain issue (EvasGL was not initialized, so
ERR() would trigger a fatal error). EvasGL is now initialized
on demand when a new GL surface is requested.
engine
Summary: This changes the ecore_evas_pointer_xy_get function call (on
drm engine) to use the new ecore_drm_device_pointer_xy_get so we can
center mouse pointer on an output at startup.
@fix
Signed-off-by: Chris Michael <cp.michael@samsung.com>
Unfortunately, this "feature" has many problems and does not really
fix those it was supposed to address:
- Elm Photocam becomes horrible to use (the transition from
low-res to high-res tiles triggers this miniature path).
- Evas async preload callback is called before the full image
is ready (ie. the texture is not uploaded yet), when really
the preload callback should be triggered only once the image
is 100% ready. (TODO)
- Sometimes the miniature image keeps being used even though the
main image has been uploaded (eg. with E background). Maybe the
object image is not redrawn when it should.
- This uses a separate thread for the upload, which is both a good
and bad idea because we need to do a make current. Also, this does
not upload the full-res image tile by tile, but only in one pass,
thus blocking the render loop until finished.
This patch changes the env var from "EVAS_GL_NOPRELOAD" to
"EVAS_GL_PRELOAD" (and only "1" will enable).
Sorry Cedric, we can talk later about how to improve this.
Sample in the middle of the "macro pixels" and fool around with the
borders (usually used to limit linear sampling artifacts) to improve
image quality on the edges.
Those miniatures are still 16x16 but MAAAYYYYYBE they will look a bit
less awful.
NOTE: The first row still doesn't scale properly (interpolates with
garbage above y=0).
When evas GL uploads textures, it will first upload a 16x16 miniature
image, and then wait for some idle time in the main loop to upload the
high-res image.
Some images may not have smooth scaling enabled which results in the
miniature scaled with GL_NEAREST, showing big ugly squares. Let's
force smooth scaling instead, for a blur image rather than a
checkerboard.
The previous commit modifies the concept of direct rendering
vs. indirect rendering, so some runtime checks (in debug mode
only) will fail.
This commit introduces two new engine functions:
- gl_get_pixels_pre
- gl_get_pixels_post
The latter will be used in a later patch for optimization.
not changed.
Automatically fallback to indirect rendering on FBO or X11 Pixmap
if the Evas Object Image is not marked as dirty. This should
improve the performance and/or power consumption in those
rare cases where this area of the canvas needs to be redrawn
but the GL content has not changed.
@feature
The usage of strcat/strncat was not safe, and even Coverity reported
about it.
Fixes CID 1256197:
CID 1256197 (#1 of 2): Buffer not null terminated (BUFFER_SIZE_WARNING)
1. buffer_size_warning: Calling strncpy with a maximum size argument
of 10240 bytes on destination array _gl_ext_string of size 10240 bytes
might leave the destination string unterminated.
Summary:
gl_get_pixels_set is called in evas_object_image_render
even when evas gl is not used.
As gl_get_pixels_set does not actually call evas gl functions,
we can safely remove evgl_init macro here.
Reviewers: raster, cedric, jpeg, Hermet
Subscribers: cedric, mer.kim, wonsik
Differential Revision: https://phab.enlightenment.org/D2063
Signed-off-by: Jean-Philippe Andre <jp.andre@samsung.com>
Summary:
Currently dynamic hint set is implemented using eglMapImageSEC extension,
which is no longer supported by any drivers (should be deprecated)
This patch implements dynamic hint set using Khronos extension EGL_TIZEN_image_native_surface.
Since tbm surface library is required for this, libtbm.so is queried at context new.
Test Plan: Local tests
Reviewers: raster, Hermet, cedric, jpeg
Subscribers: mer.kim, wonsik, cedric
Differential Revision: https://phab.enlightenment.org/D2027
Signed-off-by: Jean-Philippe Andre <jp.andre@samsung.com>
jpeg: I also fixed a few minor style issues and two warnings (bad function
names, glsym instead of secsym).
Remove last traces of the uniforms stuff for shaders, that was
removed in the following commits: 6b48c106d3 and cfd337a758.
Don't use uniforms in the evas GL pipeline, at least not like that.
Summary: This fixes compile for the gl_drm engine if
--with-opengl=full is passed on the cmd line. These changes are
based on the diff provided by spotrh in the above ticket.
@fix
Signed-off-by: Chris Michael <cp.michael@samsung.com>
Summary: This commit compiles out the debug messages that were
generating compiler warnings during build. You can reenable these
messages if you uncomment GL_DRM_DBG in evas_engine.h
@fix
Signed-off-by: Chris Michael <cp.michael@samsung.com>
Summary: This adds support for native surfaces in xcb. Previously when
the TBM Native Surface support was added, it broke the xcb build.
These commits fix that issue.
@fix
Signed-off-by: Chris Michael <cp.michael@samsung.com>
Summary: In the _native_bind_cb function, the data parameter is
actually used inside here, so having EINA_UNUSED on the function
parameter is incorrect.
@fix
Signed-off-by: Chris Michael <cp.michael@samsung.com>
The function image_scaled_update() frees() the old scaled image
passed as input if it doesn't match the old dimensions. This commit
will avoid double frees.
Edje may not set the filled flag on an image even if its fill
properties make it fill the whole object. For masking, it can
then be considered as a filled image.
Call object's function to get the private engine_data (here, the
image object). Thanks Dongyeon for your patch which inspired me to
do that instead of forcing pre_render.
This will currently optimize most of the masks when using the
GL engine[1].
This is a very special case that adds a highly optimized path
for masking in GL. It works by creating a virtual image, containing
a pointer to the original image and a new geometry[2].
Instead of creating a new FBO-based surface (image_map_surface),
we refer to the original image and adjust the mask geometry on
the fly.
KNOWN BUGS:
- masking a map with such a scaled image is now broken.
[1] Right now all masks are simple Evas Object Image, so that means
all cases of masking, except masks of masks, or masks of maps,
will be optimized with this new method.
[2] This virtual image mechanism is still quite hackish and may
be improved (for memory usage, refcounting, etc...)