Commit Graph

32174 Commits

Author SHA1 Message Date
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
Vivek Ellur 6bf43179cd eina: add test cases for eina list move functions
Summary:
Added test cases for eina_list_move and eina_list_move_list functions

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

Reviewers: cedric

Subscribers: cedric

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-11-09 16:19:02 -08:00
Vivek Ellur fec6bd3fef eina: add test case for list demote function
Summary:
Added test case for eina_list_demote_list function

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

Reviewers: cedric

Subscribers: cedric

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-11-09 16:18:07 -08:00
Vivek Ellur f06eedf3c3 eina: add test case for eina list reverse iterator
Summary:
Added test case for eina_list_iterator_reversed_new function

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

Reviewers: cedric

Subscribers: cedric

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-11-09 16:17:26 -08:00
Vivek Ellur b5e672aad8 eina: added test case for matrix4 transpose function
Summary:
Added test case for eina_matrix4_transpose function

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

Reviewers: cedric

Subscribers: cedric

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-11-09 16:16:07 -08:00
Yeshwanth Reddivari a605bd8498 evil: avoid SIGSEV while using strlen function
Summary: Assertion of (fp!=NULL) should be done before passing fp to strlen funcion

Reviewers: singh.amitesh, Hermet, alok25, mvsovani, vtorri

Subscribers: sachin.dev, cedric

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-11-09 16:11:01 -08:00
Srivardhan Hebbar 0cf357c029 eet: add check for realloc fail.
Summary:
Thought, if realloc fails, its better to fail the test case than
continue.

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

Reviewers: cedric

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-11-09 16:10:17 -08:00
Srivardhan Hebbar 04260b446b evas: preventing unlikely memory leak.
Summary:
Returning from default would result in memory leak of f. Now the memory
is not leaked.

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

Reviewers: cedric

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-11-09 16:09:18 -08:00
Srivardhan Hebbar 445f56741c evas: preventing possible NULL dereference in evas xcb backend.
Summary: Signed-off-by: Srivardhan Hebbar <sri.hebbar@samsung.com>

Reviewers: cedric

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-11-09 16:08:01 -08:00
Srivardhan Hebbar e5a9c7844f ecore_con: add http_parser static lib.
Summary:
This lib would be used in efl_network_websocket.

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

Reviewers: cedric

Reviewed By: cedric

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-11-09 15:52:15 -08:00
Cedric BAIL b9913d52e8 eina: fix wrong API since documentation. 2015-11-09 15:46:25 -08:00
Srivardhan Hebbar 4af4867748 eina: add an API for base64 encoding.
Summary: Signed-off-by: Srivardhan Hebbar <sri.hebbar@samsung.com>

Reviewers: cedric

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-11-09 15:44:09 -08:00
Subodh Kumar 3f0d0daf0d evas: fix some indentation and formatting in textblock.
Summary: Fix some indentation and formatting.

Reviewers: herdsman, tasn

Subscribers: cedric

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-11-09 15:39:13 -08:00
Oleksandr Shcherbina 3af65dd4e2 evas: unification of color pick mechanism.
Summary:
Use same way using color pick under GLES and not:
 Use GL_RGBA texture insted of GL_RED
 Generate and pass to engine 3 components color of mesh
See T2761

Reviewers: cedric, Hermet

Subscribers: cedric

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-11-09 15:27:26 -08:00
indefini fb75f6df5a ecore_x: don't add a x selection clear event if the time is the same as when selection was made.
Summary:
Without this, selection can get cleared when changing focus.
For example, if we have 2 entries:
The first entry is focused and has a selection.
When we focus the second entry, we want to select all the text.
But the old selection gets unfocused and sends a clear signal
to the new focused entry and it gets unselected.

This should fix T2739.

Reviewers: raster, tasn, devilhorns

Subscribers: herdsman, thiepha, cedric

Maniphest Tasks: T2739

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-11-09 15:27:26 -08:00
Bogdan Devichev 8ab190daec evas: add common part of savers and loaders.
Summary:
Common part will make savers and loaders shorter and easier for understanding and refactoring.
https://phab.enlightenment.org/T2713 - due to this task.
Should be merged after https://phab.enlightenment.org/D3030

Should be merged to start adding refactored savers and loaders.

Reviewers: Hermet, raster, Oleksander, cedric

Subscribers: cedric

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-11-09 15:27:26 -08:00
Bogdan Devichev f416f5adde evas: move model save/load from common to common3d.
Summary:
Move model save/load to common3d.
Here also will be common algorithms  and structures which will be used in all loaders and savers.
See task https://phab.enlightenment.org/T2713.

Reviewers: cedric, Hermet, raster, Oleksander

Subscribers: cedric

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-11-09 15:27:26 -08:00
se.osadchy 3d77f55f91 evas: refactor duplicated data structure with eina_matrix.
Summary: Move data structure and functionality to eina_matrix from evas_mat.

Reviewers: raster, Hermet, cedric

Subscribers: Oleksander, cedric

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-11-09 15:27:26 -08:00
perepelits.m 3031a4a5c6 evas: API for Convex Hull in Evas.Canvas3d
Summary: This API builds vertex and index data of convex hull around the given mesh.

Reviewers: raster, perepelits.m, Hermet, cedric

Reviewed By: cedric

Subscribers: cedric, artem.popov

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-11-09 14:29:46 -08:00
Shilpa Singh 0c1bb7d7b3 eina: add API eina_strftime
Summary:
Add new API eina_strftime API in eina_str

@feature

Test Plan: test case and example also updated

Reviewers: tasn, cedric

Reviewed By: cedric

Subscribers: cedric

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-11-09 12:42:50 -08:00
Cedric BAIL 599141a96b ector: move freetype rasterizer library to itw own directory. 2015-11-09 10:42:35 -08:00
Shilpa Singh 297ea39a5c eina: add eina_tmpstr_manage_new, eina_tmpstr_manage_new_length APIs
Summary:
Add eina_tmpstr_manage_new, eina_tmpstr_manage_new_length APIs, these APIs create new tmpstr but reuse the input string memory.

@feature

Test Plan: Test case and example updated

Reviewers: tasn, cedric

Reviewed By: cedric

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-11-09 10:42:35 -08:00
Cedric BAIL e45b801577 eina: fix computation of sqrt near 1.
This is still not so good below 1.

@fix
2015-11-09 10:42:35 -08:00
Srivardhan Hebbar 01eaa7a9cc eina: add test case for eina_strbuf_tolower API.
Summary:
Depends on D3200
Signed-off-by: Srivardhan Hebbar <sri.hebbar@samsung.com>

Reviewers: cedric

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-11-09 10:42:35 -08:00
Srivardhan Hebbar 02d78670d4 eina: updated example to add eina_strbuf_tolower.
Summary:
Depends on D3200
Signed-off-by: Srivardhan Hebbar <sri.hebbar@samsung.com>

Reviewers: cedric

Reviewed By: cedric

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-11-09 10:42:35 -08:00