path: root/src/lib/evas/canvas/evas_map.c (follow)
AgeCommit message (Collapse)Author
2019-08-14evas_map: draw what map did not draw before.Shinwoo Kim
Summary: When a map property is changed, map draws it. Before drawing, evas_object_map_update updates map->spans which is data for actual drawing. But if changed_map is false, then evas_object_map_update does not update map->spans. Usually mapped object has following step. (1) change map data (evas_map_point_coord_set) (2) render_pre (3) evas_object_map_update updates map->spans if changed_map is true. (4) render (5) render_post -> evas_object_cur_prev -> "map->prev = map->cur" But if mapped object hides at step(1), then step(3),(4) does not happen. But step(4) map->prev keeps changed map data. After this point, If same map data comes, then map does not draw it. Because the new data is same with map->prev. The issue occurs with following step. (A) point_coord_set with point A. (B) (2)(3)(4)(5) works. (C) point_coord_set with point B. And hide. (D) (2)(5) wokrs. (E) point_coord_set with point A. still hide, so none of (2)(3)(4)(5) work. (F) point_coord_set with point B. And show. (G) (2)(3)(4)(5) works. BUT step(3) does not update map->spans because changed_map is false. So you can see image of point A. The changed_map is changed to false after updating map->spans at step(3). So usually changed_map is false before deciding changed_map of next render. In case of not rendering (but render_pre/post) after map data is changed, the changed_map keeps true. So this patch was suppose to make changed_map false if changed_map is already ture before _evas_map_calc_map_geometry decides changed_map which occurs step(1). true changed_map indicates that you need to draw even though new map data is same with previous map data. Test Plan: {F3739770} Reviewers: Hermet, jsuya Reviewed By: Hermet Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision:
2019-07-19evas/map: permit evas_map_free(NULL)Mike Blumenkrantz
free functions in efl should always handle null pointers gracefully @fix Reviewed-by: Cedric BAIL <> Differential Revision:
2019-04-18canvas map: remove the workaround code.Hermet Park
Summary: the perspective could be handled in the gl backend, Here map coordinates don't need to get perspective ones but local coordinates instead as it does same to integer coordinates. I have no idea origin issues exactly, but this changed fx, fy values are working correctly in client side. Reviewers: devilhorns, #committers Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision:
2018-04-24evas_map: Fix a bug about wrong map point colorsMyoungwoon Roy, Kim
Summary: evas_map_point_color_get returns wrong rgbs values always because of error label. Test Plan: Execute test suite Reviewers: raster, Hermet, cedric, jpeg, stefan_schmidt, Jaehyun_Cho Reviewed By: Jaehyun_Cho Differential Revision:
2017-10-19evas: propagate object data to evas_object_inform_call_resize instead of ↵Cedric BAIL
fetching it again.
2017-06-30evas: expose evas_map_coords_get.Cedric BAIL
2017-06-09map: Fix renderJean-Philippe Andre
Internally the call to map_reset was setting the count to 0 rendering the map data invalid and useless.
2017-06-09map: add more checking on input and memory allocationThiep Ha
More checking on input parameter and memory allocation when set number of map points. Thanks jp.
2017-06-08evas_map: support map with number of points as multiples of 4Thiep Ha
Currently, in evas map, we only support map with 4 points. This patch adds support for map with number of points as multiples of 4. @feature
2017-05-30evas: Fix don't redraw map_sufarce issuejiin.moon
Summary: map_surface does not redraw in below case. 1) parent and child are smart object and has map. 3) drawing objects. 4) apply new map to child object. Test Plan: sample code Reviewers: jpeg, cedric, jypark Differential Revision:
2017-05-17evas map: Fix uninitialized fieldsJean-Philippe Andre
This fixes a "jump on uninitialized value" as reported by valgrind. See evas_map.c:85: if (obj->map->>normal_geometry.x != x1) ch = 1;
2017-05-11evas map: Reach feature parity with legacy APIJean-Philippe Andre
I've done this by translating "Flip Page" to this new set of EO APIs. In particular, absolute coordinates need to be used in some calls, and the map needs to be calculated between get and set operations. This required an adjustment of the raw_coord API as the flip_page code does some math after reading and then writing to the map. Same for color. Those two properties now act like commands (ie. like the other gfx map functions). This also introduces a duplicate set of APIs to handle absolute coordinates. Other solutions included: - Use an enum to specify the type of coordinates (but then the unit of cx,cy varies between non-unit relative position and pixel position. Also this adds an extra argument to all those function calls. - Pass a special value (an empty eo object) as the argument for pivot. Same remark about the unit as above. This way was deemed too confusing because of the weird object. Those two options have been discarded after asking the opinion of a few developers I could reach. @feature
2017-05-11evas map: Introduce new API for maps (Efl.Gfx.Map)Jean-Philippe Andre
This implements an entirely new API model for Evas Map by relying on high-level transformations on the object rather than an external Evas_Map structure that needs to be constantly updated manually. The implementation relies on Evas_Map. To rotate an object all you need to do now is efl_gfx_map_rotate(obj, 45.0, NULL, 0.5, 0.5); Or with a C++ syntax: obj.rotate(45.0, NULL, 0.5, 0.5); Or even simply (with default arguments): obj.rotate(45.0); The map transformation functions are: - rotate - rotate_3d - rotate_quat - zoom - translate (new!) - perspective_3d - lightning_3d @feature
2017-05-11evas map: Replace EO APIs for populate with resetJean-Philippe Andre
Manual points population will eventually be useless as the map API will become more like a transformation API, where the current object geometry doesn't matter as much as which transformation is applied to it.
2017-05-11evas map: Move Efl.Gfx.Map mixin to its own C fileJean-Philippe Andre
2017-04-24evas: remove BAIL
This is the first step toward handling multi output. This patch remove from Evas structure and use an Eina_List for it instead. It also start moving code around to fetch an output or an engine context (which are the same at the moment, but will be split in a later patch).
2017-04-10evas map: Fix test case "Flip Page"Jean-Philippe Andre
Since 9b7ac51943ba0d6391b75cf evas map tries to avoid recalculating stuff when the map parameters have not changed. Unfortunately the code in elementary_test -to "Flip Page" was badly written. It was modifying a constant's internal value (after ugly cast). So the memcmp() and all other checks would return successfully, as the exact same pointer was being compared to itself. So, I've fixed the comparison by adding some forgotten parameters (perspective) but most importantly I fixed the map API usage in the test case.
2017-01-06eina: rename EINA_{FLT,DBL}_CMP to EINA_{FLT,DBL}_EQ.Cedric BAIL
2016-12-20evas: remove float comparison warnings for evas_mapChris Michael
Signed-off-by: Chris Michael <>
2016-12-02Evas: Add support for per mouse pointer mode/properties.Guilherme Iscaro
This patch introduces the possibility to set the pointer mode and query other properties like current position per pointer device. The old API will still works, however it will only act on the default seat.
2016-10-17evas/map: do nothing when same map is set againSubhransu Mohanty
Reviewers: cedric, Hermet, jpeg Reviewed By: jpeg Subscribers: cedric, jpeg Differential Revision:
2016-08-26evas events: Switch wheel event to the new typeJean-Philippe Andre
For now this covers only the wheel event. Note: This patch also modifies evas map to use double in an internal function, rather than ints.
2016-08-15Eo: Finish the renaming of Eo to the EFL.Tom Hacohen
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-07-08evas: Fix warning about unused functionJean-Philippe Andre
I kept it here for the record. It was useful, could be useful again.
2016-07-08evas event handling4- fix more corner cases where bounding is badCarsten Haitzler (Rasterman)
so smart object bounding box wasnt updated properly in several other cases. fix those other cases too by dirtying bounding box region. this continues on from: f6b3c31561276a6c7afc8fb56ae2e5363772782c 25d77bc1d24d9fd539c681fa58db976c1ca65051 9f0fd66ab818d212fa88faef316ac17625f1a2f5 this fixes T4017 @fix
2016-06-29evas: Implement evas map support in eo as a mixinJean-Philippe Andre
It relies a bit on evas legacy APIs and will only work on evas objects (Efl.Canvas.Object) for now. The main difference with Evas_Map is that there is no separate map object, as the functions apply directly to any canvas object. For convenience, most functions will automatically populate the map if there was no previous map info. While this may be convenient, the object's size changes still need to be tracked to update the map info.
2016-06-29evas: Move map to a separate mixinJean-Philippe Andre
Evas map is not translated to proper eo apis yet. Efl.Canvas.Map will be a mixin implementing the evas map API in a bindable API.
2016-06-21evas: Rename Evas.Object to Efl.Canvas.ObjectJean-Philippe Andre
One step closer to make the EO inheritance tree look like it's all Efl.
2016-05-06evas: let's reuse what we know when possible to avoid more useless ↵Cedric BAIL
2015-07-02Evas: Replace image_map_surface_free by common image_freeJean-Philippe Andre
Those two functions were doing exactly the same thing[1], which is free an image, so this commit only attempts to simplify the code a little bit. [1] Actually image_map_surface_free() might even not have worked properly with cserve2 sw (calling unload instead of close).
2015-05-29eina: beginning of a generic quaternion API.Cedric BAIL
2015-02-12evas - render - have lock point to allow for async obj walk + update addCarsten Haitzler (Rasterman)
this adds a lock for when walking all the objects to generate render commands for an async render. this allows even the object tree walk plus update area caluclation to be moved off into async if every oject that can change canvas state actually does so correctly. this change adds all those lock block calls to synchronise with an async object tree walk.
2015-01-23evas/map: make an internal function to static.ChunEon Park
no need this function set external.
2014-11-28evas/map: remove old comments.ChunEon Park
It's been so long. even SLP is not a valid name anymore. No idea whether the problem still exist or not. If it is then it should be reported and fixed.
2014-11-28evas_map: Remove unnecessary check for current mapJaehyun Cho
Summary: Remove unnecessary check for current map @fix Reviewers: Hermet Subscribers: cedric Differential Revision:
2014-11-28evas_object_main: Keep map effect after evas object moveJaehyun Cho
Summary: Keep map effect after evas object move @feature Reviewers: raster, cedric, Hermet Subscribers: raster, cedric Differential Revision:
2014-10-20evas: evas_map - fix cast from double to int with using lround()artem.popov
Summary: All points in map are double, when try to get point coordinates, there are issues with rounding. @fix Reviewers: Hermet, raster, seoz, cedric Reviewed By: cedric Subscribers: cedric Differential Revision: Signed-off-by: Cedric BAIL <>
2014-06-22Evas map: Add missing EINA_MAGIC checkJean-Philippe ANDRE
2014-06-03Efl: Update code to use the new class names generated by eolian.Tom Hacohen
2014-03-13evas: let's not access a potential NULL object when looping on a corrupted ↵Cedric BAIL
object list. This fix CID 1191920.
2014-03-12Eolian: Integration of Evas Object.Daniel Zaoui
const have been added in object parameter of two legacy APIs to fit Eolian generated files. Since these functions retrieve information from object, it is logic that the object would be const.
2014-02-05evas/map - added comment to do.ChunEon Park
2014-01-06evas - fixed side effect caused by f4d24e962dba33bef8f990ce3359c06eed8771d0ChunEon Park
since the map_changed is reset right after the map is updated, it could not decide to redraw the map surface properly. now map_update() returns the value to redraw the map surface properly.
2013-12-19evas/map - ensure map updation.ChunEon Park
for more gurantee to update map properly, we should reset the map changed flag after the map updation is performed. this will fix a mapbuf bug that map is not updated. when the map is changed without rendering but it's in the active object list, the map updation couldn't be happened later that map is rendered. (if the map is not updated at this frame)
2013-12-19Revert "evas/map - commeted out insane compare."ChunEon Park
This reverts commit b259cfafe5a758b219f0e80256653358a6a6d62b. my fault. the compare is reasonable.
2013-12-19evas/map - commeted out insane compare.ChunEon Park
cedric, is it just typo?
2013-09-17Fix formattingChris Michael
Signed-off-by: Chris Michael <>
2013-09-17Remove extra blank spaceChris Michael
Signed-off-by: Chris Michael <>
2013-06-20efl: formattingSebastian Dransfeld
2013-06-20evas: Keep sane name for public headerSebastian Dransfeld
Evas_Common.h should be used for the public header, and rather rename evas_common.h internal header to another name. Sa: Evas_Common_Header.h -> Evas_Common.h evas_common.h -> evas_common_private.h Shouldn't have both Evas_Common.h and evas_common.h because of case insensitive filesystems.