Commit Graph

34 Commits

Author SHA1 Message Date
Christopher Michael cf2071744c evas_test_mesh: Fix memory leak
Summary:
Coverity reports that we leak file_mask variable here (storage
returned from strdup), so lets free the variable before we exit the test

Fixes CID1401009

@fix

Depends on D8763

Reviewers: raster, cedric, zmike, bu5hm4n, segfaultxavi

Reviewed By: segfaultxavi

Subscribers: segfaultxavi, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8764
2019-05-02 13:43:57 +02:00
Mike Blumenkrantz 6326e18b3f efl.file: improve api a bit
Summary:
the previous implementation/api had a number of issues:
* "file" property contained both "file" and "key" values
  - also performed file loading operation
* "load_error" property which was specific to image objects
* no methods for controlling file loading/unloading

this patch attempts the following changes:
* split "file" property into "file" and "key" properties
  - also remove "key" from existing "mmap" property
* remove "load_error"
* directly return error codes from operations
* add "load" and "unload" methods for directly controlling load state
* add implicit file loading if file/mmap is set during construction
* rewrite all efl.file implementations to move file loading into load() method
* rewrite all usage of efl.file api based on these changes
* add C extension functions to mimic previous behavior

ref T7577

Reviewers: segfaultxavi, bu5hm4n, cedric

Reviewed By: segfaultxavi

Subscribers: vitor.sousa, #reviewers, #committers

Tags: #efl_api

Maniphest Tasks: T7577

Differential Revision: https://phab.enlightenment.org/D8018
2019-02-27 13:17:10 -05:00
Mike Blumenkrantz 956a66c748 evas_canvas3d_mesh: implement get methods for efl.file file and mmap props
also add unit tests for new methods

ref T5719

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Reviewed-by: Marcel Hollerbach <marcel-hollerbach@t-online.de>
Differential Revision: https://phab.enlightenment.org/D7785
2019-01-26 11:42:14 +01:00
Mike Blumenkrantz 35a600c2d0 tests: parallelize evas mesh tests
Summary:
ref T6857
Depends on D5912

Reviewers: stefan_schmidt

Subscribers: cedric

Maniphest Tasks: T6857

Differential Revision: https://phab.enlightenment.org/D5913
2018-05-03 15:04:57 +02:00
Mike Blumenkrantz 224ff7c86a tests: fix iterator leak in evas mesh tests
Summary: Depends on D5911

Reviewers: stefan_schmidt

Reviewed By: stefan_schmidt

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D5912
2018-04-13 13:53:39 +02:00
Mike Blumenkrantz 624925fe6e tests: move to using checked fixtures for all test suites
individual tests should not need to explicitly call init/shutdown functions
in most cases, and many did not properly do this anyway

see followup commit which resolves some issues with eina tests

ref T6813
ref T6811

Reviewed-by: Stefan Schmidt <stefan@osg.samsung.com>
2018-04-05 11:10:26 +02:00
Mike Blumenkrantz adc601aca2 tests: add instrumentation to existing tests to find slow tests
efl_check.h must be included and the EFL_START/END_TEST macros must be
used in place of normal START/END_TEST macros

timing is enabled when TIMING_ENABLED is set
https://phab.enlightenment.org/w/improve_tests/

Reviewed-by: Stefan Schmidt <stefan@osg.samsung.com>
2018-04-05 11:10:25 +02:00
Cedric BAIL de667f889e tests: fix misuse of eina_file in evas mesh tests
Signed-off-by: Mike Blumenkrantz <zmike@osg.samsung.com>
2018-03-20 17:20:57 -07:00
Carsten Haitzler e30fb6945e fix evas test suite to now init both ecore and evas.... correctly.
see c8dcc4327b803e9b8ad2a0985e756c924946c442 - basicall evas depends
on ecore these days... thus requires ecore be initted THEN evas. ...
which in theory is an abi break for those using evas and ONLY evas
long ago from when efl was separate... but it''s how we're building
these days.

@fix
2018-01-05 02:34:16 +09:00
Jean-Philippe Andre db71d94173 evas: Fix make check (evas_suite compilation)
This fixes issues where Evas_Object_Intercept_Cb_Type was not
defined, as this is defined in Evas_Legacy.h (unfortunately...
as it's used by elementary), but the private headers defining
EFL_CANVAS_OBJECT_PROTECTED were included after Evas_Legacy.h.
2017-02-21 15:15:10 +09:00
Tom Hacohen e65aae994e Eo: Finish the renaming of Eo to the EFL.
This renames all the rest of the API to the EFL namespace except for
Eo_Event that will follow soon.

Obviously breaks both API and ABI.
2016-08-15 15:07:42 +01:00
Tom Hacohen c662934be8 Change the EFL to follow the new Eo rename. 2016-08-11 17:04:43 +01:00
Jean-Philippe Andre 0d3f5c9661 tests: Add ifdef clang to avoid warning on GCC and elsewhere
Avoids warning about unsupported pragma
2016-07-19 17:55:07 +09:00
Tom Hacohen a6a2338962 Revert "Eo: Remove eo_del() and make eo_unref() the replacement."
This reverts commit 546ff7bbba.

It seems that eo_del() is useful and removing it was creating bugs.
The issue is that the way we defined parents in eo, both the parent and
the programmer share a reference to the object. When we eo_unref() that
reference as the programmer, eo has no way to know it's this specific
reference we are freeing, and not a general one, so in some
circumstances, for example:
eo_ref(child);
eo_unref(child); // trying to delete here
eo_unref(container); // container is deleted here
eo_unref(child); // child already has 0 refs before this point.

We would have an issue with references and objects being freed too soon
and in general, issue with the references.

Having eo_del() solves that, because this one explicitly unparents if
there is a parent, meaning the reference ownership is explicitly taken
by the programmer.

eo_del() is essentially a convenience function around "check if has
parent, and if so unparent, otherwise, unref". Which should be used when
you want to delete an object although it has a parent, and is equivalent
to eo_unref() when it doesn't have one.
2016-06-01 13:33:21 +01:00
Tom Hacohen 546ff7bbba Eo: Remove eo_del() and make eo_unref() the replacement.
We used to have eo_del() as the mirrored action to eo_add(). No longer,
now you just always eo_unref() to delete an object. This change makes it
so the reference of the parent is shared with the reference the
programmer has. So eo_parent_set(obj, NULL) can free an object, and so
does eo_unref() (even if there is a parent).

This means Eo no longer complains if you have a parent during deletion.
2016-05-17 16:23:23 +01:00
Jean-Philippe Andre 015554e57e Evas 3d: Hide warning with clang
An otherwise good looking macro triggers a warning with clang,
because of self comparison of constants (always true or always
false). Let's just silence the warning in this specific spot
with a pragma.
2016-03-28 15:53:15 +09:00
Tom Hacohen f24210caac Revert "Automatic migration to the new eo_add syntax."
This reverts commit 4f949a2757.
2016-03-11 12:29:03 +00:00
Tom Hacohen 4f949a2757 Automatic migration to the new eo_add syntax. 2016-03-09 16:09:14 +00:00
Tom Hacohen f21ade6123 Automatic migration to Eo4.
I just ran my script (email to follow) to migrate all of the EFL
automatically. This commit is *only* the automatic conversion, so it can
be easily reverted and re-run.
2016-03-03 09:58:08 +00:00
Vincent Torri 71f0fb98f0 Test rework #20: Evas 2016-02-16 12:41:06 +00:00
Jean-Philippe Andre 60e6030f36 Evas 3d: Fix some issues in model test case
Fix some errors, check that file_set and file_save actually work
(rather than have them both fail and pass the test since 0 == 0),
fix temp paths and cleanup unused file.
2015-12-29 16:14:41 +09:00
perepelits.m e6bba4d91c [Evas] Refactor model's savers and loaders.
Summary:
Move common part to a separated document.
Make code more readable using smaller functions. (from Task T2713)

Everything is OK with make check.

Reviewers: cedric, raster, Hermet, stefan_schmidt

Reviewed By: stefan_schmidt

Subscribers: jpeg, artem.popov

Differential Revision: https://phab.enlightenment.org/D3430
2015-12-29 13:28:56 +09:00
Oleksandr Shcherbina 60b16be772 Evas canvas3d: Move evas 3d types to evas_types.eot
Summary:
Move evas_canvas3d types from Evas_Eo.h to evas_types.eot
Change enum constatnt for vertex_arrtib, material_attrib, blend_func
Correct namespace for Evas.Real type

Reviewers: cedric, tasn

Reviewed By: tasn

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D2734
2015-08-04 10:57:14 +01:00
Daniel Kolesa 06e3a330fe evas_test_mesh: 3d -> canvas3d (fixes broken test compile) 2015-06-17 17:30:05 +01:00
Cedric BAIL c2e75544e1 efl: move mmap API to be part of Efl_File class. 2015-04-03 16:23:13 +02:00
Stefan Schmidt 7415a5fc36 tests/evas: Enable evas 3d mesh test case again after the code got fixed.
The problem have been in the new evas block/unblock code which did not work
for evas 3d. Thanks to Bogdan for spotting it and raster for reverting the
3d part for now to keep the code working.

Fixes T2104
2015-02-12 14:45:53 +01:00
Stefan Schmidt 8c7c48a3f7 tests/evas: Disable segfaulting evas_object_mesh_loader_saver
This test case segfault on jenkins as well as on my devel machine.
Disable until fixed.

ref T2104
2015-02-12 10:23:50 +01:00
Jean-Philippe Andre a86f799542 tests: Remove file after Evas 3D save test
This should remove src/.eet and maybe src/.ply

make distcheck would fail on my machine because src/.eet
was not removed.
2015-01-07 15:05:04 +09:00
Bogdan Devichev c471665ac8 evas: make Evas 3d mesh is inherited from Efl.File (functions file_set and save) 2014-12-23 21:20:21 +01:00
Bogdan Devichev dd60525798 evas: a _mmap version of the file_set is added. 2014-12-23 21:20:21 +01:00
Bogdan Devichev 4acbae6947 evas: test cases are changed according to changes of API in step 4. Specific logic in obj_saver is removed for standardization of API. 2014-12-23 21:16:19 +01:00
Bogdan Devichev d896dfb342 evas: Evas_3D - add .ply export/import.
Summary:
.ply format is important for relation blender and EFl, because in blender exist only two mesh export API: bpy.ops.import_mesh.ply and bpy.ops.import_mesh.stl. One of them is necessary for .edc 3D generator. Which I writing now.
Sorry, it isn't like image loader. Refactoring of import/export will be soon.

Reviewers: Oleksander, artem.popov, Hermet, raster, cedric

Reviewed By: cedric

Subscribers: cedric

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2014-11-14 07:11:15 +01:00
Daniel Zaoui 31f2e6e88a Evas-3D Tests: fix Eo usage.
There are still Valgrind (invalid read) issues but at least, it doesn't
segfault more.
2014-10-21 11:09:51 +03:00
Bogdan Devichev 5d004c80f7 evas: Evas_3D - add .eet export/import
Summary: The first version of .eet format is added. All changes due to discussion in D1307 are done.

Reviewers: artem.popov, se.osadchy, reutskiy.v.v, Hermet, raster, cedric, Oleksander

@feature

Subscribers: cedric

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

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2014-10-06 16:47:25 +02:00