Commit Graph

4344 Commits

Author SHA1 Message Date
Felipe Magno de Almeida 2ab6aac74d eina-cxx: Added malloc_clone_allocator to use with POD's when wrapping Eina C structures
Summary:
Added efl::eina::malloc_clone_allocator to be used with ptr_* data
structures for wrapping structures allocated by EFL in C.

This allows for example:

  void foo(Eina_List* l)
  {
    efl::eina::ptr_list<int, efl::eina::malloc_clone_allocator> list(l);
  }

If the standard efl::eina::heap_no_clone_allocator is used, the
deallocation code uses C++ delete operator, which causes undefined
behavior because the allocation was originally done with malloc.

Reviewers: cedric

CC: savio, cedric

Differential Revision: https://phab.enlightenment.org/D614
2014-03-10 12:35:00 +09:00
Felipe Magno de Almeida 416376e03c eina-cxx: Added eina_log support for C++, using IOStreams syntax
Summary:
Added eina_log support for C++ using the following macros:

For logging into a domain:

EINA_CXX_DOM_LOG
EINA_CXX_DOM_LOG_CRIT
EINA_CXX_DOM_LOG_ERR
EINA_CXX_DOM_LOG_INFO
EINA_CXX_DOM_LOG_DBG
EINA_CXX_DOM_LOG_WARN

And for logging into the default domain:

EINA_CXX_LOG
EINA_CXX_LOG_CRIT
EINA_CXX_LOG_ERR
EINA_CXX_LOG_INFO
EINA_CXX_LOG_DBG
EINA_CXX_LOG_WARN

The usage is simple as can be seen in the tests:

  efl::eina::log_domain domain("error_domain_name");
  domain.set_level(efl::eina::log_level::critical);
  EINA_CXX_DOM_LOG_CRIT(domain, "something went wrong with the following error: " << error);

@feature

Reviewers: cedric

CC: raster, savio, cedric, sanjeev

Differential Revision: https://phab.enlightenment.org/D605
2014-03-10 12:35:00 +09:00
Felipe Magno de Almeida 5942207b25 eina-cxx: Added range types for containers
Summary:
Added inarray, inlist, ptr_array and ptr_list's range types named: range_inarray, range_inlist, range_ptr_array and range_ptr_list.

Each has two "flavours": mutable and not mutable. The const versions are parameterized by a const parameter. For example: range_ptr_list<int const> and the mutable doesn't have the const, so: range_ptr_list<int>.

The difference between the two is that the const versions can't modify the elements from the sequence, while the mutable allows so. Also, the const receives a Eina_Array const* while the mutable must have a Eina_Array*.

Reviewers: cedric

CC: savio, cedric

Differential Revision: https://phab.enlightenment.org/D613
2014-03-10 12:35:00 +09:00
Daniel Zaoui 4be9526cc2 Eolian/Generator: more fixes related to stars to add to params. 2014-03-09 13:19:30 +02:00
Daniel Zaoui b013815bfd Eolian/Lexer: error handling
Print and return error if no class has been parsed in the given file.
2014-03-09 13:19:07 +02:00
Daniel Zaoui e5be817b7f Eolian: Fix path to .eo 2014-03-09 13:19:07 +02:00
Daniel Zaoui 9b8f036beb Eolian: Integration of Evas Text 2014-03-09 13:18:57 +02:00
Daniel Zaoui b545750bee Eolian: Integration of Evas Rectangle 2014-03-09 13:18:41 +02:00
Daniel Zaoui 1de10ce9fe Eolian: Integration of Evas Polygon 2014-03-09 13:18:17 +02:00
Tom Hacohen 561ea66dec Eet vieet: Fixed to work on non-bash compat shells.
Thanks to Davide Andreoli for reporting and suggesting fixes.
2014-03-08 10:55:37 +00:00
Daniel Zaoui a660bbe966 Eolian: fix warnings 2014-03-07 18:02:44 +02:00
Daniel Zaoui a78f779486 Eolian: Fixes into generated files.
- Added Doxygen description to parameters and return
- Added default description for parameters
- Return type needs to be after all the other parameters
- Better handling of stars for pointers: try to figure if a space is
needed between the type and the variable (e.g int *a / int a)
2014-03-07 17:42:41 +02:00
Daniel Zaoui bb8af681f9 Eolian: Coverity fixes 2014-03-07 17:42:41 +02:00
Daniel Zaoui 445059e706 Eolian/Lexer: parse from memory 2014-03-07 17:42:13 +02:00
Tom Hacohen e63a5cc903 Eet: Added vieet a tool to edit eet files.
This tool lets you just open an eet file for editing directly,
by wrapping around 'eet' and the preferred editor defined in the env var
'EDITOR'.

@feature
2014-03-07 15:11:30 +00:00
Tom Hacohen 84e9eba24f Evas line: Don't include generated headers in make dist.
This fixes make distcheck.
2014-03-07 13:48:13 +00:00
Tom Hacohen 1079446676 Eolian Helper file: Fixed generation of legacy headers. 2014-03-07 12:11:24 +00:00
Tom Hacohen 426e95b214 Eolian gen: Have a more useful error message when failing to write file. 2014-03-07 12:01:52 +00:00
Tom Hacohen 1d79ce75ff Evas line: Fix out of source builds.
The build system only adds top lib dir to include path, so we have to
specifically put the path there.

This should probably be fixed, so we can drop the canvas dir prefix in
our includes altogether, but until then, this is needed.
2014-03-07 09:50:17 +00:00
Jean-Philippe Andre a6950567a3 Evas filters: Use GL_FRAMEBUFFER instead of GL_READ_FRAMEBUFFER
GL_READ_FRAMEBUFFER isn't defined when compiling for Wayland
Thanks Stefan for the report.

Also, import GL_FRAMEBUFFER overrides from other GL files, so
that it points to the proper extension (_OES or _EXT if applicable).
2014-03-07 17:48:23 +09:00
Jeff Grimshaw 99a17f85c0 efl/eo: Fix Doxygen markup to prevent a warning
Summary:
The closing @} for the main Eo group is inside the #ifdef
EFL_BETA_API_SUPPORT block, so it gets removed by the preprocessor
unless the project is configured with EFL_BETA_API_SUPPORT.  Moved the
@} outside the #ifdef so it will always be there and Doxygen won't
complain.

Test Plan: make doc 2> doxyerr.log

Reviewers: raster

Reviewed By: raster

CC: cedric

Differential Revision: https://phab.enlightenment.org/D609
2014-03-07 17:01:22 +09:00
Cedric BAIL 20d95413c3 eio: check if we need to wake up thread when the memory limit is changed. 2014-03-07 16:49:14 +09:00
Cedric BAIL 1b1e0450a2 edje: do not leak in case of error.
@fix CID 1191310 and CID 1191311
2014-03-07 15:01:36 +09:00
Youngbok Shin 72c8b04e59 edje/entry: fix to not emit "changed" signal in unnecessary cases of password mode.
Summary:
When text is hidden by password character, "changed" signal should be emitted.
But, even if there is no visible text, the signal was emitted.

@fix

Reviewers: woohyun, tasn, cedric

Reviewed By: cedric

CC: cedric

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

Signed-off-by: Cedric BAIL <cedric.bail@samsung.com>
2014-03-07 14:43:27 +09:00
Felipe Magno de Almeida 4105c002b3 ecore-cxx: add support for exceptions.
Summary:
Added support for exceptions on ecore_main_loop_thread_safe_call_async and
ecore_main_loop_thread_safe_call_sync. Also optimized the transport of the
return value through a parameter on ecore_main_loop_thread_safe_call_sync.

ecore-cxx: Changed uses of alignas for aligned_storage in C++11

Reviewers: cedric, raster

CC: savio, cedric

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

Signed-off-by: Cedric BAIL <cedric.bail@samsung.com>
2014-03-07 14:37:03 +09:00
Felipe Magno de Almeida bc0a54c57c eina-cxx: renamed efl::eina::eina_value to efl::eina::value
Reviewers: cedric

CC: savio, cedric

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

Signed-off-by: Cedric BAIL <cedric.bail@samsung.com>
2014-03-07 14:32:42 +09:00
Sylvain Laperche 53e0a2d6bd eina: Fix bug in eina_convert_itoa
The current implementation of eina_convert_itoa cannot convert INT_MIN.

When the input number is negative, the function negates it and this is
an undefined behavior for INT_MIN since -INT_MIN cannot be represented
in a signed int.

@fix T1062

Signed-off-by: Cedric BAIL <cedric.bail@samsung.com>
2014-03-07 14:17:28 +09:00
Cedric BAIL e6faf98868 eina: indent test to up to date standard. 2014-03-07 14:17:28 +09:00
Gustavo Sverzut Barbieri 856b7bdf44 evas/fb: use stride instead of width.
While most framebuffes use stride = width, some may have stride bigger
than width to provide better alignment. Then we must always use stride.

Thanks to Arjan van de Ven, the one that spotted the issue.

@fix
2014-03-07 02:00:11 -03:00
Jean-Philippe Andre 182eaad43d Evas: Reduce verbosity of alpha functions
And remove commented-out code.
2014-03-07 11:07:15 +09:00
Jean-Philippe Andre 5a77d1aae0 Evas filters: Reduce verbosity (INF --> DBG) 2014-03-07 11:07:15 +09:00
Jean-Philippe Andre 887585129b Evas filters: Improve detection of the GL engine
According to cedric's horrified comment :)

And add a comment in the code. Yes, this IS a temporary solution,
but the GL engineS being what they are (tons of duplicated code),
I think it's still better for now to just make things work.
2014-03-07 11:07:15 +09:00
Jean-Philippe Andre a97844d415 Evas filters: Complete GL support with scaling function
Directly use the scale functions from scalecache when
running the GL engine.

With this, and glReadPixels support, the GL engine support is now
100% complete. It will be DAMN SLOW, but ALL filters should work
in both OpenGL and Software rendering.
2014-03-07 11:07:15 +09:00
Jean-Philippe Andre 7690e33b49 Evas filters: Implement proxy rendering for GL
Make use of glReadPixel to access the source's pixel data.
Use all classic CPU functions to blend and use that data.
Save pointer to the GL image and update it with the latest data
during target render.

Use ENFN's surface_lock, read_pixels, unlock.

Also, add some more error checks to make sure the images are valid,
or return an error at runtime.
2014-03-07 11:07:15 +09:00
Jean-Philippe Andre 2225587e5e Evas filters: Allow image copy with the GL engine
For now, this simply uses memcpy.
The SW engine equivalent uses image_draw, which wouldn't work
under the GL engine.
2014-03-07 11:07:15 +09:00
Jean-Philippe Andre 59f5216391 Evas gl_x11: Add support for glReadPixels
This will be needed by the filters for proxy rendering,
for textures and maps (displacement).

Add new engine functions to unleash the (sluggish) power of glReadPixels.
The idea is to be able to bypass glReadPixels later, so 3 new APIs are
added:
- surface_lock
- surface_read_pixels
- surface_unlock
They must be called in that order.

Note (for history):
glReadPixels was always getting the wrong data during first draw,
but the right data during a redraw...
Why? Well simply because for OpenGL itself, the image had never
been drawn in teh first place! Only the Evas GL context knew
about the image drawing, as it was queued somewhere in the pipe.

One line solution: Call evas_gl_common_context_flush before
doing anything else.
2014-03-07 11:07:09 +09:00
Jean-Philippe Andre 688c9c3676 Evas filters: Minor change (type is void*) 2014-03-07 10:39:55 +09:00
Cedric BAIL f01a5a6265 git: ignore generated file. 2014-03-07 09:36:52 +09:00
Cedric BAIL 34b9c51976 evas: let's still compile when we have no hw accel for DRM. 2014-03-07 09:35:16 +09:00
Gustavo Sverzut Barbieri 05331160cb evas/fb: implement evas_fb_outbuf_fb_reconfigure()
refactor code used in evas_fb_outbuf_fb_setup_fb() so it can be used
in evas_fb_outbuf_fb_reconfigure().
2014-03-06 11:19:14 -03:00
Gustavo Sverzut Barbieri 4db31af9f0 evas/fb: use a copy of fb_var since ioctl() modifies it and we consider it const 2014-03-06 11:19:13 -03:00
Gustavo Sverzut Barbieri 3eddfa9366 evas/fb: make sure FB_Mode attributes are zeroed.
We may read only geometry or timings, then make sure memory is fully
zeroed by doing a memset on the new array item.
2014-03-06 11:19:13 -03:00
Gustavo Sverzut Barbieri 78a9830a40 ecore_fb: @fix use of uninitialized values reported by valgrind. 2014-03-06 11:19:13 -03:00
Gustavo Sverzut Barbieri 8ddb826378 evas/fb: extensive logs to help solve bugs.
FrameBuffer can be tricky with all combinations and it's hard to tell
users to send useful information, then print the information we use so
we can get useful bug reports.
2014-03-06 11:19:12 -03:00
Gustavo Sverzut Barbieri 587a171061 evas/fb: expose and call fb_freemode() and fb_cleanup()
properly clean memory and restore framebuffer on error conditions.

@fix
2014-03-06 11:19:12 -03:00
Gustavo Sverzut Barbieri b0aa7325ae evas/fb: handle fds using -1 for unset/error.
clean evas_fb_main.c so it returns -1 to indicate invalid fds, same as
open() and what is written in evas_fb.h example.

call fb_cleanup() in all error conditions and always return -1 in
fb_postinit() if we did call fb_cleanup().
2014-03-06 11:19:12 -03:00
Gustavo Sverzut Barbieri e4c5d75993 evas: @fix convert to 24bits so dst_jump is used properly.
in all other convert functions, dst_jump is provided in pixesl and
multiplied by the number of bytes-per-pixel either explicitly or
implicitly by using a different type for dst pointer (DATA16,
DATA32...).

As in 24 bits we use DATA8 we must explicitly multiply dst_jump by 3.
2014-03-06 11:19:12 -03:00
Gustavo Sverzut Barbieri bf2abf12b4 evas/fb: avoid crashing it outbuf setup failed.
if fb setup fails, then we shouldn't use re->ob as it's NULL.

@fix
2014-03-06 11:19:11 -03:00
Tom Hacohen 9110d490e3 Fix evas compilation and installation. 2014-03-06 15:12:51 +02:00
Daniel Zaoui a3e38d7884 Eolian: generation of the first Eo file.
The first object that we generate with Eolian is Evas_Line, as it is a
simple one.
Two files are generated during build:
- the .eo.c contains the APIs definitions invoking Eo, the Eo functions
extracting the parameters and calling the hand written functions and
Eo structures to define the objects. These hand written functions are
located in e.g evas_object_line.c.
- the .eo.h contains the APIs and Eo prototyes.

We will continue with the other objects. If you note something wrong,
please update us asap:
daniel.zaoui@samsung.com
yossi.kantor@samsung.com
2014-03-06 15:12:51 +02:00