Commit Graph

450 Commits

Author SHA1 Message Date
Shinwoo Kim c3c9fed7d9 evas_object_image: save EVAS_IMAGE_CONTENT_HINT_DYNAMIC image
Summary:
evas_gl_common_image_content_hint_set makes RGBA_Image NULL if content hint
is EVAS_IMAGE_CONTENT_HINT_DYNAMIC with 'sec_tbm_surface' and 'egl_tbm_ext'.

efl_file_save(_efl_canvas_image_internal_efl_file_save_save) does not work
in this case because ENFN->image_data_direct_get returns FALSE.

This patch makes ENFN->image_data_direct_get work but you need to free its
returned data after using it.

Reviewers: Hermet, jsuya

Reviewed By: Hermet

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8516
2019-05-02 20:50:24 +09:00
Hermet Park d45e3df689 evas vg: replace to eina_file instance caching by vg.
Here is a replacement to use eina_file from a vg obj instance
to map file data by vg loaders.

This brings a benefit that integrated access to load data
between vg object and vg loaders.
2019-03-12 12:58:31 +09:00
Mike Blumenkrantz 5bfe2e89d2 evas: remove all legacy usage from eo files
this takes the current generated output from eolian for legacy code in
evas and adds it to the tree, then removes legacy references from the
corresponding eo files. in the case where the entire eo file was for
a legacy object, that eo file has been removed from the tree

ref T7724

Reviewed-by: Marcel Hollerbach <marcel-hollerbach@t-online.de>
Differential Revision: https://phab.enlightenment.org/D8107
2019-03-06 19:05:48 +01:00
Mike Blumenkrantz 6b046ec845 efl.gfx: remove Efl.Gfx.Image_Load_Error
Summary:
this is now implemented through Eina.Error

ref T7718

Depends on D8066

Reviewers: cedric

Reviewed By: cedric

Subscribers: cedric, #reviewers, #committers

Tags: #efl_api

Maniphest Tasks: T7718

Differential Revision: https://phab.enlightenment.org/D8067
2019-03-04 13:36:57 -05:00
Mike Blumenkrantz a5e183ad5d efl.canvas.object: clip -> clipper && clipees -> clipped_objects
Summary:
also clipees_has -> clipped_objects_count

ref T7555

Depends on D8039

Reviewers: segfaultxavi

Reviewed By: segfaultxavi

Subscribers: segfaultxavi, cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T7555

Differential Revision: https://phab.enlightenment.org/D8040
2019-02-27 13:17:37 -05:00
Mike Blumenkrantz 5da43b2aa7 efl.gfx.entity: combine show/hide events into visibility,changed
Summary:
this requires some internal hackery to preserve legacy compatibility
and correctly translate the single new event into two legacy events

ref T7558

Depends on D8018

Reviewers: segfaultxavi, bu5hm4n

Reviewed By: segfaultxavi

Subscribers: bu5hm4n, segfaultxavi, cedric, #reviewers, #committers

Tags: #efl_api

Maniphest Tasks: T7558

Differential Revision: https://phab.enlightenment.org/D8019
2019-02-25 14:00:14 -05:00
Marcel Hollerbach 422ee8d323 efl_canvas_object: get rid of event_animation set/get
the API is a little bit problematic. The API takes events as an
parameter. However, only the hide and show events can be used, because
move for example is not intercepted, which leads to a situation that you
cannot attach a translation animation to the event. Further more,
handling the animations directory instead of pipeing them through events
seems to be a little bit easier as the case study of the previous events
have shown. Further more, we should never ever overwrite the
callback_call function of a eo base object, those methods are an
incredible hotpath, by the time we would have 1-2 animations on a
object, the event submission would be significetly slowned down.

ref T7555

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Differential Revision: https://phab.enlightenment.org/D8009
2019-02-25 10:37:40 +01:00
Xavi Artigas 220f17ee8d Rename Efl.Gfx.Map -> Efl.Gfx.Mapping
Summary:
For clarity, since there are all kinds of maps, including a navigation map
widget.
Also, corrected some misspellings.

Test Plan: make && make check && make examples all work

Reviewers: cedric, zmike, bu5hm4n

Reviewed By: cedric

Subscribers: Jaehyun_Cho, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T7564

Differential Revision: https://phab.enlightenment.org/D7974
2019-02-21 19:20:09 +01:00
Marcel Hollerbach 3b2a5a429b efl_input: remove the API of efl_input_instance_get
there is basically no reason for this API. You can only use the API when
you know the class, when you know the class you can also just know the
function to call to get this API.
The reason this API needs to go is that we don't want to use
polymorphism on class-functions.

ref T7675

Reviewed-by: Xavi Artigas <xavierartigas@yahoo.es>
Differential Revision: https://phab.enlightenment.org/D7900
2019-02-13 16:59:57 +01:00
Derek Foreman 03ca3c37e0 evas_private: Fix typo
Summary: Depends on D7853

Reviewers: devilhorns

Reviewed By: devilhorns

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D7854
2019-01-31 15:10:44 -05:00
Derek Foreman d47688ba27 gesture_manager: Filter events we add hooks for
Gesture manager doesn't care about focus manager events, animation events,
and various other things it's currently hooking.

We can save a lot of pointer indirection nonsense by only paying attention
to events it can actually do something with.

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

Signed-off-by: Derek Foreman <derek.foreman.samsung@gmail.com>
2019-01-25 13:00:43 -06:00
Derek Foreman 41a9e1c873 gesture_manager: Use private data getter to save some lookups
We frequently process an array of several events at once, so we can now
look up the gesture manager private data once for the entire array.

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

Signed-off-by: Derek Foreman <derek.foreman.samsung@gmail.com>
2019-01-25 13:00:43 -06:00
Derek Foreman 955c4bd4a0 gesture_manager: Add a call to get private data
We end up looking this up multiple times, having a getter will sometimes
allow us to get it and use it multiple times.

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

Signed-off-by: Derek Foreman <derek.foreman.samsung@gmail.com>
2019-01-25 13:00:43 -06:00
Yeongjong Lee 78ae9c0ae0 gfx: Add size hint fill (EO)
Summary:
If widget use both hint_align(HINT_FILL) and hint_max together, there is no way
to set to hint_align. See, elementary_test -to 'efl.ui.box' -
"Button with a quite long text." button. you can control button position
using "Box align" slider, but this is not proper implementation. When there are
two widget which have hint_align(HINT_FILL) and hint_max, those positions are
determined by box_align rather than hint_align. it means widget align cannot be
set individually.
To solve this problem, this patch add hint_fill property. in order to avoid
conflict with legacy API named evas_object_size_hint_fill_set(), it only works
for EO widgets(made by efl_add).
Also, EFL_GFX_SIZE_HINT_FILL is removed.

@feature

Test Plan:
elementary_test -to 'efl.ui.box'
elementary_test -to 'efl.ui.table'

Reviewers: jpeg, Hermet, Jaehyun_Cho, raster, barbieri

Reviewed By: Jaehyun_Cho

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T3912

Differential Revision: https://phab.enlightenment.org/D7409
2019-01-16 16:47:51 +09:00
Derek Foreman 0aa73f5365 evas_render: Remove some list walks
Not that these deletes ever walk long lists, but it's trivial to stop
doing it entirely.

Signed-off-by: Derek Foreman <derek.foreman.samsung@gmail.com>
Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Reviewed-by: Chris Michael <cp.michael@samsung.com>
Differential Revision: https://phab.enlightenment.org/D7611
2019-01-15 13:47:18 -06:00
Derek Foreman ac065749a6 evas_object: Add function to test if hardware plane status changed
This is used to check if an object has been put on or removed from a
hardware plane between calls.

Signed-off-by: Derek Foreman <derek.foreman.samsung@gmail.com>
Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D7192
2018-12-14 09:52:03 -06:00
Derek Foreman 73e5bb84a1 evas_object: Add function to test if an object is on a hardware plane
Signed-off-by: Derek Foreman <derek.foreman.samsung@gmail.com>
Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D7190
2018-12-14 09:52:01 -06:00
Hermet Park fbe92aa67f evas ector: add software implmentation for masking feature.
This implementation uses Ector_Buffer to generate mask image from vg container,
and pass it to Ector engine. Ector renderer could blend this image as a mask.
Yet only vg container works as a mask, we could extend shape to support masking later.

Still vector gl drawing is not completed, We use software ector buffer to draw on it.
This is on progessing.
2018-12-07 19:50:08 +09:00
Hermet Park 950059ce9a evas vg: revise basic vg cache logic.
There was a big trouble that vg cache didn't free cached data properly.
Plus, there was a unnecessary copy of vg tree data.

This revised version is a improvement of our evas vg cache
in stable and optmization.
2018-12-07 19:08:34 +09:00
Hermet Park 093e32a0fb evas vg: code refactoring.
keep internal variable and structre names consisteny.
no logical changes.
2018-12-07 17:14:15 +09:00
Marcel Hollerbach 47e6bbb397 evas - fix pending object set tracking to not multi-add the same object
flag if obj in pending array and don't add if already there. fixes
run-away slowness in rendering in some cases
2018-10-31 11:43:55 +00:00
Carsten Haitzler 2098f55ba2 evas - remove excess data scope lookup during render when getting changed
getting smart changed meant another scope data get when we already had
the protected data in the caller. don't do that and just pass down.
saves a lot of overhead...

@optimize
2018-10-26 15:35:00 +01:00
Derek Foreman e3a2d0be45 evas_object: Refactor pixels get hack
Summary:
Refactor this so it can be used by another call site in a later commit.

Also, reduce its complexity, as we only need the callback to fire, we
don't care about any of the other machinery in _evas_image_pixels_get.

Depends on D7188

Reviewers: Hermet

Reviewed By: Hermet

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D7189
2018-10-26 20:15:00 +09:00
Hermet Park 27fd6a2eab evas: remove redundant internal functions.
Summary:
Since efl object is introduced, magic check is no more used.
Plus, remove redundant object functions interfaces
 - type_id,
 - visual_id,
 - store
 - unstore

Reviewers: #committers, bu5hm4n

Reviewed By: #committers, bu5hm4n

Subscribers: bu5hm4n, raster, cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D7153
2018-10-11 13:46:37 +09:00
Hermet Park 423d8a2296 evas image: fix a bug in image preloading.
Summary:
Current preloading is too buggy since it's on thread-based.
This is a fundamental improvement to fix a bug.

The critical issue here is,
When preloading img object suddenly cancel its preloading,
the object possibly cannot render image next then because
renderer doesn't have any idea when async cancelling is
finished. Renderer just tries to render regardless of
image loading status, and this could occur no-texture(in gl case)
image object.

So, here improvement is, adding a notification for async cancelled
so that putting img objects to redraw images properly after their preloading is
cancelled.

The best scenario to reproduce this bug is this one.

Evas_Object *img2 = evas_object_image_filled_add(evas);
evas_object_image_file_set(img2, "test.jpg", NULL);
evas_object_image_preload(img2, EINA_FALSE);
evas_object_resize(img2, 200, 200);
evas_object_show(img2);

Evas_Object *img = evas_object_image_filled_add(evas);
evas_object_image_file_set(img, "test.jpg", NULL);
evas_object_image_preload(img, EINA_FALSE);
evas_object_move(img, 200, 200);
evas_object_resize(img, 200, 200);
evas_object_show(img);

evas_object_image_preload(img2, EINA_TRUE);
If you run this on gl backend, occasionally happens rendering fail.

Yet there other bugs on preloading feature....

@fix

Reviewers: #committers, raster

Subscribers: cedric, #reviewers, #committers, zmike

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6919
2018-09-03 17:12:55 +09:00
Mike Blumenkrantz 69fae8c7bf evas: remove render2
Summary:
this is more or less a dead project, having not been actively developed
in over 2 years and instead forcing people to expend more time and energy
to keep it compiling across refactors

fix T7227

Reviewers: stefan_schmidt, Hermet, ManMower, devilhorns

Reviewed By: Hermet, devilhorns

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T7227

Differential Revision: https://phab.enlightenment.org/D6878
2018-08-21 10:36:55 -04:00
Shinwoo Kim 9666f288ae Efl.Canvas.Group: use desired function
Summary:
If a smart class overrides Evas_Smart_Class.move as below,
then original behavior must not be used for the smart class.

   Evas_Smart_Class sc = EVAS_SMART_CLASS_INIT_NAME_VERSION("MyClass");
   evas_object_smart_clipped_smart_set(&sc);
   sc.move = &myMove;

But current implementation makes original behavior work.
So before using the original method, this patch is checking if the original
method is changed or not.

Reviewers: zmike, devilhorns

Reviewed By: zmike

Subscribers: woohyun, jypark, cedric, raster, jpeg, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6468
2018-08-02 09:10:41 -04:00
Derek Foreman e7bcf0e690 evas: Defer render post callbacks added during async render
Summary:
To take screenshots, Enlightenment makes a new snapshot object, performs
a manual render, and uses the snapshot results.

Turns out if this happens while an async render is in progress, the
async render's completion triggers a render post callback on the snapshot
object even though it's never been involved in a render.

We need to defer new render post callbacks until any currently running
render completes, then add them during that render's post.

Fix T7156

Reviewers: devilhorns, zmike

Reviewed By: devilhorns, zmike

Subscribers: devilhorns, cedric, #committers, zmike

Tags: #efl

Maniphest Tasks: T7156

Differential Revision: https://phab.enlightenment.org/D6711
2018-07-31 17:03:16 -04:00
Marcel Hollerbach 70ab165a6d evas_focus: adjust to recent EFL_EVENT_DEL changes
Summary:
when focus events have been emitted the smart parent was persistent, now
its not anymore, lets restore this behaviour

Depends on D6227

Reviewers: cedric, zmike, stefan_schmidt

Subscribers: #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6228
2018-05-29 12:24:53 -04:00
Cedric BAIL 15995ff0eb evas: make evas_object_free work in case of lost reference to Eo object.
This is clearly a workaround to a bad situation, but there is no case
that I can find that solely lead to object being NULL nor is there any
code that should do that, but still it does in some case...
2018-05-24 16:02:20 -07:00
Cedric BAIL ddccd9e306 evas: destructor can not be called recursively, we should rely on Eo refcount. 2018-05-24 16:02:19 -07:00
Cedric BAIL fe14abd929 evas: refactor efl_input_event and remove some of the lifecycle hack.
Differential Revision: https://phab.enlightenment.org/D6101
2018-05-24 16:02:18 -07:00
Marcel Hollerbach dda350e3b4 evas: introduce a log domain to monitor which object gets focus 2018-05-10 13:34:32 +02:00
Xavi Artigas 55bd097a3d Efl.Gfx.Entity (from Efl.Gfx)
Ref https://phab.enlightenment.org/T6847

Reviewed-by: Cedric Bail <cedric@osg.samsung.com>
2018-04-24 09:03:32 -07:00
Mike Blumenkrantz bbbdfbecc4 Efl.Gesture: rename to Efl.Canvas.Gesture
most C api remains unchanged

ref T6714
ref T6716
2018-02-21 14:43:37 -05:00
Vincent Torri f5b01ac5ce all: Simplify definition of EAPI
This will help in the transition from Autotools to Meson. This has been
tested on Windows for which EFL_XXX_BUILD were first introduced.
2018-01-18 18:04:03 +09:00
Jean-Philippe Andre 24447641d3 evas gl: Properly verify that Evas GL works
For SW engine we need to verify that OSMesa is present. The patch
fb048e7312 broke the logic.

Tested by temporarily removing OSMesa from my system.

Fixes T6617 (again)
2018-01-17 15:22:46 +09:00
Sungtaek Hong 588995da31 efl_playable: split Efl.Player interface to Efl.Playable interface
Summary:
Efl.Player interface simply provides play functions,
but another interface which indicates Efl.Player will play is also
needed.

Test Plan: Run elementary_test->Efl.Animation tests

Reviewers: woohyun, conr2d, Jaehyun_Cho, jpeg, cedric

Differential Revision: https://phab.enlightenment.org/D5662
2018-01-16 22:04:55 +09:00
Amitesh Singh b734c132f9 efl.canvas.object: implement pointer_inside of Efl.Canvas.Pointer.
remove eo apis pointer_in, pointer_device_in, pointer_inside_get &
pointer_inside_by_device_get and add legacy APIs for
pointer_inside_get & pointer_inside_by_device_get.
These four APIs do almost same things.
2017-12-08 20:13:31 +09:00
Jean-Philippe Andre 8803040484 evas: Implement scale API in proper EO fashion
This removes the internal function pointer for scale_update. This makes
all relevant classes implement the scale API in EO.

This removes the duplicate function in Efl.Canvas.Object and only uses
the one from Efl.Ui.Base interface.

This *seems* to be working as expected. Fingers crossed!

PS: I don't like the name Efl.Ui.Base. It's an interface for a few
common API's between Gfx, Canvas and UI levels... Maybe scale simply
doesn't belong there.
2017-11-30 10:48:24 +09:00
subhransu mohanty f0b8c37d80 evas/vg: refactor ector engine api and backend . 2017-11-10 11:20:38 +09:00
subhransu mohanty befb7701a7 evas/engine: added new engine api for ector 2017-11-10 11:20:38 +09:00
subhransu mohanty b038d7df25 Remove evas internal dependency from the evas_font module
Summary:
dev branch : devs/subhransu/font

The Final goal is to move the evas_font module to ector so that both ector and evas can reuse the code.
make the api simple so that sam eapi can be used by evas_textblock and ector text.

This is the 1st stage to achive that gola, first remove the evas internal dependancy as much as possible before moving to ector library.

Reviewers: jpeg, raster, herdsman, cedric, id213sin

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D5419
2017-11-07 11:34:53 +09:00
Jean-Philippe Andre 9cec14918c evas: Move evas_canvas.eo to legacy-only
This isn't meant to be installed. The canvas API in EO is based around
the interfaces Efl.Canvas and the widget Efl.Ui.Win. Anything else is
not EO (eg: ecore_evas, evas, ...)

Note: evas_canvas3d is the last remaining thing that is installed along
EO files, but those are all beta APIs.
2017-11-01 11:22:33 +09:00
Subhransu Mohanty 48c1c4850a static_lib: added vg_common static lib
Features:
 Copied vg eet descriptor from edje_data
 Copied convert func  from Svg_Node to Efl_VG from edje
 added  convert function from Efl_VG to Svg_Node
2017-10-27 14:58:38 +09:00
Cedric BAIL 84907e719d evas: allow to suspend the rendering of an output. 2017-10-26 13:35:27 -07:00
Cedric BAIL 33d860f60d evas: propagate object data to evas_object_inform_call_changed_size_hints instead of fetching it again. 2017-10-19 16:32:54 -07:00
Cedric BAIL 8bcd960e70 evas: propagate object data to evas_object_inform_call_restack instead of fetching it again. 2017-10-19 16:32:54 -07:00
Cedric BAIL b55c96fe04 evas: propagate object data to evas_object_inform_call_resize instead of fetching it again. 2017-10-19 16:32:54 -07:00
Cedric BAIL 93c570b5dd evas: propagate object data to evas_object_inform_call_hide instead of fetching it again. 2017-10-19 16:32:51 -07:00