Commit Graph

11390 Commits

Author SHA1 Message Date
Dongyeon Kim 74e556febc evas/gl_common: Enable dynamic hint set using tbm surface only when egl extension is supported
Summary:
Dynamic hint set using tbm surface can only be used when EGL_TIZEN_image_native_surface
extension is supported by the driver. So check for both tbm surface and egl extension.
2015-11-12 08:56:29 +09:00
Dongyeon Kim 3d97c4c5a8 Revert "Evas GL: Fix crash with dynamic hint set using tbm surface"
Upcoming patch will fix this crash issue in a more proper way, so I revert this patch here.

This reverts commit 8b1b8d5cf0.
2015-11-12 08:56:29 +09:00
Vincent Torri 93f45eedcf ecore_con: remove last occurence of EMILE_SSLv3
This fixes compilation on Windows

@fix

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-11-11 14:36:23 -08:00
Vincent Torri 9070e067bc evil: remove useless vc++ code
vc++ is not supported anymore

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-11-11 14:36:17 -08:00
Vincent Torri 26ed6638ae evil: fix warnings when mingw-w64 4.* is installed
mingw-w64 4.* adds several macros and functions compared to the 3.* version,
so make sure that Evil does not redeclare them

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-11-11 14:36:09 -08:00
Daniel Kolesa b5042ff669 eo generator: better output whitespace handling with pointers 2015-11-11 15:15:08 +00:00
Daniel Zaoui 10d5768ef7 Evas: import Evas types inside canvas Eo file 2015-11-11 15:40:56 +02:00
Dongyeon Kim 65b2a43639 Evas GL: Minimize internal resource creation
Summary:
Evas GL maintains internal resource (XWindow, EGL Window Surface, EGL Context)
per thread to be used for make current when indirect rendering is used.
Currently this internal resource is created regardless of current rendering mode,
and always created when a new Evas GL thread is created by the application.
Internal resource created in a new thread is not freed until evas shuts down
in the main thread, so this causes memory/fd leak.
This can be fixed by creating internal resource only in necessary cases (ie. indirect rendering),
and adding tls resource destructor to be called when thread exits.
2015-11-11 15:59:52 +09:00
Carsten Haitzler 80ebf5b453 edje - signal match code - clean up function readablity and fix crash
this just clens up the _edje_signal_callback_push() to be simpler and
less wordy with the same actual logic, just pointless things like
return; at end of func removed, use tmp instead of gp->matches
everywhere and not just in one section etc.

also set hashed bool to eina true/false i as opposed to sometimes 0,
sometimes eina true/false and also track it religiously as well as
matches array when freed - hunting bug

for whatever reason after these cleanups i can't reproduce a signal
crash i had which seemed to find freed matches in the hash that should
not have been there. (a hash find walking a bucket found freed memory
for the match in the hash entry - should not have been though reading
the code).

@fix
2015-11-11 14:57:52 +09:00
Joogab Yun 8b1b8d5cf0 Evas GL: Fix crash with dynamic hint set using tbm surface
Summary:
if device support sec_tbm_surface, but doesn't support the EGL_NATIVE_SURFACE_TIZEN
then below api called cause crash!
evas_object_image_content_hint_set(o, EVAS_IMAGE_CONTENT_HINT_DYNAMIC);
evas_object_image_alpha_set(o, 0);

1. evas_object_image_content_hint_set(o, EVAS_IMAGE_CONTENT_HINT_DYNAMIC);

 [evas_gl_image.c]
        if (im->im)
          {
             if (evas_cache2_image_cached(&im->im->cache_entry))
               evas_cache2_image_close(&im->im->cache_entry);
             else
               evas_cache_image_drop(&im->im->cache_entry);
             im->im = NULL;  // im->im now NULL!!!
          }

        im->tex = evas_gl_common_texture_dynamic_new(im->gc, im); // im->tex also NULL!!

im->text also NULL!! because If driver does not support the EGL_NATIVE_SURFACE_TIZEN
then below code return NULL at _pool_tex_dynamic_new();

  pt->dyn.img = secsym_eglCreateImage(egldisplay,
                                      EGL_NO_CONTEXT,
                                      EGL_NATIVE_SURFACE_TIZEN,
                                      pt->dyn.buffer, attr);

2. evas_object_image_alpha_set(o, 0);

 [gl_generic/evas_engine.c]
static void * eng_image_alpha_set()
{
  now im->im and im->tex are null so crash happend at eng_image_alpha_set()
}

bug fixed in case of the tbm surface create fails so device cannot support the dynamic hit set,

Test Plan: experdite

Reviewers: jpeg, cedric, spacegrapher

Subscribers: dkdk, scholb.kim, wonsik

Differential Revision: https://phab.enlightenment.org/D3318
2015-11-11 14:38:07 +09:00
Joogab Yun 8f52b2d877 Evas software_x11: add DRI2-x11 support at image_native_set()
Summary: add DRI2-x11 feature at image_native_set() on Software-x11

This is based on TBM, which means Tizen platform.

Reviewers: spacegrapher, wonsik, raster, jpeg

Subscribers: scholb.kim, dkdk, cedric

Differential Revision: https://phab.enlightenment.org/D3291
2015-11-11 14:37:28 +09:00
Wonsik Jung 84cb06784e Evas sw_generic/x11: Fix calls to native_bind_cb/unbind_cb
Summary:
In Evas-SW-Generic/X11, native_unbind_cb is not called sometimes, although
native_bind_cb was called.
Some native surface's cases, both native_bind_cb and native_unbind_cb should
be called for mapping and unmapping, eg. with tbm_surface.

@fix

Test Plan:
Evas Native Surface with pixmap sample.
Evas Native Surface with tbm(this sample can work in Tize Device)
elementary_test

Reviewers: raster, jpeg, cedric, spacegrapher

Subscribers: JoogabYun, scholb.kim, dkdk

Differential Revision: https://phab.enlightenment.org/D3317
2015-11-11 14:36:20 +09:00
Wonsik Jung 64890d260f EvasGL: Add error handling for GL_OES_EGL_image/EGL_Image_KHR
Summary:
Add code for exception case for GL_OES_EGL_image/EGL_Image_KHR
These EvasGL's extension functions does not have the code for exception case.
e.g. EvasGLImage is NULL.

Test Plan: Native Pixmap surface's example is created and changed EvasGLImage's value(e.g. valid data or NULL)

Reviewers: raster, spacegrapher, jpeg

Subscribers: scholb.kim, JoogabYun, dkdk, cedric

Differential Revision: https://phab.enlightenment.org/D3284
2015-11-11 14:35:56 +09:00
DaeKwang Ryu 5ccd783069 Evas GL: implement GLES2/GLES3 wrapper functions
Summary:
I found some bugs in EvasGL with OpenGL ES conformance test.

6 wrapper functions are added for GLES2,
(glDeleteFramebuffers, glFramebufferRenderbuffer
glFramebufferTexture2D, glGetError
glGetFloatv, glGetFramebufferAttachmentParameteriv)

3 wrapper fucntions are added for GLES3.
(glDrawbuffers, glGetStringi, glReadBuffer)

Test Plan:
GLES3 sample app,
EvasGL(OpenGL ES CTS) for 2.0 is passed.
For 3.0, 10 TCs are failed (Total : 2994TCs).

Reviewers: wonsik, spacegrapher, jpeg

Subscribers: cedric, JoogabYun, scholb.kim

Maniphest Tasks: T2621

Differential Revision: https://phab.enlightenment.org/D3301
2015-11-11 14:35:50 +09:00
Joogab Yun 25bcf4c64f Evas: Fix bug in evas_cache_image_dirty()
Summary: Code which shouldn't be removed was removed by '800279c23bdb0e925f112c96516dcc96a5487684'

Reviewers: spacegrapher, cedric, jpeg

Reviewed By: jpeg

Subscribers: scholb.kim, dkdk, wonsik, cedric

Differential Revision: https://phab.enlightenment.org/D3278
2015-11-11 14:35:24 +09:00
Oleksandr Shcherbina 13b1756394 evas: add possibility to render current 3D scene to texture in Evas.Canvas3d
Summary:
Refactoring code of functions e3d_drawable_scene_render,
e3d_drawable_scene_render_to_texture,_shadowmap_render to have possibility
render in scene to additional texture
See T2761

Reviewers: Hermet, cedric

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D3142

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-11-10 15:10:13 -08:00
Srivardhan Hebbar 705b08ed74 eina: updated example to include eina_strbuf_substr_get.
Summary:
Depends on D3224

Signed-off-by: Srivardhan Hebbar <sri.hebbar@samsung.com>

Reviewers: cedric

Differential Revision: https://phab.enlightenment.org/D3226

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-11-10 15:04:24 -08:00
Srivardhan Hebbar 95117bc515 eina: Added API to get substring from Eina_Strbuf.
Summary:
This API is analogous to c++ substr. It returns a Eina_Strbuf with
substring of passed buf.

Signed-off-by: Srivardhan Hebbar <sri.hebbar@samsung.com>

Reviewers: cedric

Reviewed By: cedric

Differential Revision: https://phab.enlightenment.org/D3224
2015-11-10 15:04:17 -08:00
Srivardhan Hebbar 252e703e2a eina: add test case for eina_strbuf_substr_get.
Summary:
Depends on D3224

Signed-off-by: Srivardhan Hebbar <sri.hebbar@samsung.com>

Reviewers: cedric

Differential Revision: https://phab.enlightenment.org/D3225

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-11-10 15:01:17 -08:00
Youngbok Shin 1ff131841b edje: initialize map.zoom values to fix old *.edj compatibility issues.
Summary:
The initial values for map.zoom.x(y) should be [1.0]: it means 100%.
The values from newly builded edj has been set properly.
But, if a part from old *.edj turns on map feature, map.zoom.x(y) will be set [0.0]: it means 0%.
So, the part will be invisible. We need to initialize these values.
@fix

Test Plan:
1. Build a *.edc file which has a part with [description.map.on: 1;] in EFL 1.13.
2. See it works well in EFL 1.13.
3. Install EFL 1.14 or laters.
4. See the part is disappear.

Reviewers: Hermet, jpeg, cedric

Reviewed By: cedric

Subscribers: jiin.moon

Differential Revision: https://phab.enlightenment.org/D3302

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-11-10 14:53:00 -08:00
Vivek Ellur 46777274fe eina: add test case for binbuf append function
Summary:
Added test case for eina_binbuf_append_buffer function

Signed-off-by: Vivek Ellur <vivek.ellur@samsung.com>

Reviewers: cedric

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D3304

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-11-10 14:44:17 -08:00
Joogab Yun c20457e33d evas: fix error checking of eglBindAPI.
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>
2015-11-10 14:43:02 -08:00
se.osadchy 33809c969c evas: fix bug in evas_canvas3d_camera.
Summary: Change Eina_Quaternion to Evas_Vec4.

Reviewers: cedric, Hermet, raster

Differential Revision: https://phab.enlightenment.org/D3313

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-11-10 14:10:43 -08:00
Srivardhan Hebbar 4f24deac44 ecore_con: Moving dns.c and dns.h to static_libs.
Summary:
Took the license file from https://github.com/wahern/dns
The dns.c and dns.h are taken from here.

Signed-off-by: Srivardhan Hebbar <sri.hebbar@samsung.com>

Reviewers: cedric

Differential Revision: https://phab.enlightenment.org/D3314
2015-11-10 14:10:02 -08:00
Shinwoo Kim 163b50d0f1 ecore: thread - need to null check of function pointer
Summary: you can meet a segmentation fault without this patch

Test Plan:
please use the following snippet
   Ecore_Thread  *th;
   th = ecore_thread_feedback_run(_heavy_cb, _notify_cb, NULL, NULL, obj, EINA_TRUE);
   ecore_thread_wait(th, 1.0);

Reviewers: raster, Hermet, jaehwan, woohyun, cedric

Reviewed By: cedric

Subscribers: seoz

Differential Revision: https://phab.enlightenment.org/D3315

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-11-10 14:10:02 -08:00
Daniel Kolesa f6de200c46 eolian generator: fix test reference files 2015-11-10 16:08:03 +00:00
Stefan Schmidt 8d19716865 ecore_drm: pass NULL to mmap() instead 0 for address
The second find of these. The other one was in evas generic loaders.
mmap() expects a void * as address here. If we want to let the kernel
choose the address we should really pass in NULL instead of the
integer 0.

Thanks goes to the sparse semantic parser for pointing this out.
2015-11-10 16:34:13 +01:00
Daniel Kolesa 7cb444b601 eo generator: remove unneeded/harmful code 2015-11-10 11:53:35 +00:00
Jean-Philippe Andre 9f7fc377ea Evas GL: Fix oopsie in the shaders selection
Thanks @raster
2015-11-10 20:08:36 +09:00
Jean-Philippe Andre d99ca361de Eina: Micro-optimize eina_main_loop_is
This is useful when Eo calls it to get the current frame stack.
This improves the performance of this function by ~50% which meant
from ~3% total CPU time to ~1.5% CPU time (if called at each eo_do).

Now this patch is a bit irrelevant since eo uses __thread instead.

This optimization is still useful for evas_eglGetCurrentXXX.
2015-11-10 16:12:21 +09:00
Jean-Philippe Andre 3505650046 Efl.h: Add minor comment (doc) 2015-11-10 16:12:21 +09:00
Jean-Philippe Andre 6ad565a6af edje_cc: Allow LOSSY compression without quality param
LOSSY quality will then default to 90.
2015-11-10 16:12:21 +09:00
Jean-Philippe Andre 7974f674aa Evas: Allow edje_decc to work with ETC images
This reuses the internal function data_get, data_put, image_save
respecting the border information and adding support for ETC
formats.

@fix
2015-11-10 16:12:21 +09:00
Jean-Philippe Andre a5d0284820 Edje: Directly embed TGV files inside EDJ when possible
This checks that the ETC format is the same, and then proceeds
to simply stuff in the TGV file inside the EDJ as an "edje/image/n"

This will save a huge amount of time since now you just need
to encode an image once to TGV (ETC1 or ETC2) and you can reuse it
directly without re-encoding.

To use this, convert images with ecore_evas_convert and then
add them to EDC with the ".tgv" extension and the proper LOSSY format.
The quality argument will then be ignored.

@feature
2015-11-10 16:12:21 +09:00
Jean-Philippe Andre 64de2f6ce5 Evas: Add some internal engine APIs
- image_file_colorspace_get
   This will be used to determine the best loading format, especially
   targeted at edje_cc / edje_decc so we can avoid ETC re-encoding.

- image_data_has
   Checks whether the image is currently loaded in (CPU) memory,
   and also returns the current colorspace.
2015-11-10 16:12:21 +09:00
Jean-Philippe Andre c55c7c0a0d Evas GL: Optimize out calls to eglGetCurrent from the main loop
This is an optimization for EGL only and for the main loop only.

eglGetCurrent{Display,Context,Surface} are expensive calls (they
shouldn't be, but they are). eglMakeCurrent is also very expensive,
so we want as much as possible to avoid calling those functions.
Store the pointers for the main loop as static variables.

Valgrind stats for a quick scrolling session in elm_test:

Before this patch:
 - eglGetCurrentContext ~ 0.4%
 - eglGetCurrentDisplay ~ 0.4%

After this patch:
 - evas_eglGetCurrentContext ~ 0.02%
 - evas_eglGetCurrentDisplay ~ 0.02%
2015-11-10 16:12:21 +09:00
Jean-Philippe Andre c70ba9e13b Evas GL: Save all binary shaders during idle_flush 2015-11-10 16:12:21 +09:00
Jean-Philippe Andre 0ba13ae7a2 Evas GL: Precompile common shaders
The whole list contains 238 shaders. That's a bit too many, but they
really just take up only ~270K on disk (24Mb of uncompressed data).
2015-11-10 16:12:21 +09:00
Jean-Philippe Andre 31b8fd1649 Evas GL: Delete shaders after linking programs
The shaders eat up some memory and we don't need them after linking
the shader program.
2015-11-10 16:12:21 +09:00
Jean-Philippe Andre b80d7fa302 Evas GL: Fix linking to 'context_restore_set'
There was a terribly complex mechanism to call this function
from the gl_x11 engine to gl_common (evas gl core)... and it
simply didn't work because the function pointer would be NULL.
2015-11-10 16:12:20 +09:00
Jean-Philippe Andre c22c25c9ef Evas GL: Release shader compiler during evas_render_idle_flush
It is safe to release the compiler at any time since the next
call to glCompileShader will restore it. This may even be a no-op
for all we know (this is driver-dependent).
2015-11-10 16:12:20 +09:00
Jean-Philippe Andre 38ad8fda8d Evas GL: Implement runtime generation and load of shaders
Instead of generating the shaders at compile-time, do this at
runtime. Also load only the required shaders in memory.

This saves 25000 LOC, lots of strings inside the .so files
and save a non negligible amount of memory since those shader
binaries can weigh a few megabytes in total.

The current shader selection mechanism is a bit complex and
uses eina_hash_int32 but this can be optimized later if it's
deemed too slow.
2015-11-10 16:12:20 +09:00
Carsten Haitzler 43ef6152ed efl - fix eina after misnaming of piblic api
this fixes 3d77f55f91 which added
eina_normal3_matrix_get in the headers as the api, but the actual func
was eina_normal_matrix3_get.
2015-11-10 11:56:01 +09:00
Gustavo Lima Chaves f74ab7f7d2 efl: fix build out of tree
@fix
2015-11-10 00:34:37 -02:00
Oleksandr Shcherbina 35d942829a evas: fix inverted texture coordinate in Evas.Canvas3d.
Summary: Fix T2820

Reviewers: cedric, raster, Hermet

Maniphest Tasks: T2820

Differential Revision: https://phab.enlightenment.org/D3294

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-11-09 16:26:59 -08:00
Vivek Ellur 873562608e eina: add test case for file statat function.
Summary:
Added test case for eina_file_statat function

Signed-off-by: Vivek Ellur <vivek.ellur@samsung.com>

Reviewers: cedric

Reviewed By: cedric

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D3293

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-11-09 16:26:23 -08:00
Vivek Ellur 7fa841236b eina: add test case for eina list search function.
Summary:
Added test case for eina_list_search_sorted function

Signed-off-by: Vivek Ellur <vivek.ellur@samsung.com>

Reviewers: cedric

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D3290

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-11-09 16:22:24 -08:00
Srivardhan Hebbar c99d50e00b ecore_con: adding test case for ecore_con_url_status_code_get.
Summary: Signed-off-by: Srivardhan Hebbar <sri.hebbar@samsung.com>

Reviewers: cedric

Differential Revision: https://phab.enlightenment.org/D3289

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-11-09 16:21:44 -08:00
Srivardhan Hebbar 38bc948eff ecore_con: updating example with ecore_con_url_status_code_get function.
Summary: Signed-off-by: Srivardhan Hebbar <sri.hebbar@samsung.com>

Reviewers: cedric

Differential Revision: https://phab.enlightenment.org/D3288

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-11-09 16:21:02 -08:00
Vivek Ellur 4f6e158c13 eina: add test case for list data idx function.
Summary:
Added test case for eina_list_data_idx function

Signed-off-by: Vivek Ellur <vivek.ellur@samsung.com>

Reviewers: cedric

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D3287
2015-11-09 16:20:23 -08:00