[EGIT] [core/efl] master 01/01: tests: fix a build error on the 0.12.0 check
hermet pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=f84408e3253e2573d71bbf0939e6ecc1e44f6e3a commit f84408e3253e2573d71bbf0939e6ecc1e44f6e3a Author: Shinwoo Kim Date: Tue Sep 4 14:58:10 2018 +0900 tests: fix a build error on the 0.12.0 check Summary: (1) EFL_START_TEST(TEST_NAME) is defined as follows if you are using the 0.12.0 check: START_TEST(TEST_NAME) \ _timing_start(); (2) START_TEST(__testname) is defined as follows (To make it simple I am using 'blah-blah' here): static void __testname_fn (blah-blah);\ static const TTest __testname_ttest = { blah-blah };\ static const TTest * __testname = & __testname_ttest;\ static void __testname_fn (blah-blah) For example we are using as follows in a test case: EFL_START_TEST(evas_object_smart_paragraph_direction) { ... } EFL_END_TEST This made a build error. Test Plan: make check Reviewers: Hermet, zmike Reviewed By: Hermet Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D6969 --- src/tests/efl_check.h | 2 ++ src/tests/eio/eio_suite.c | 2 ++ src/tests/elementary/elm_code_test_indent.c | 2 +- 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/tests/efl_check.h b/src/tests/efl_check.h index d1a064943b..29c9aeeb01 100644 --- a/src/tests/efl_check.h +++ b/src/tests/efl_check.h @@ -207,10 +207,12 @@ _timing_end(void) # define EFL_START_TEST(TEST_NAME) \ START_TEST(TEST_NAME) \ + { \ _timing_start(); # define EFL_END_TEST \ _timing_end(); \ + } \ END_TEST #else diff --git a/src/tests/eio/eio_suite.c b/src/tests/eio/eio_suite.c index 9998e1fac4..45ea556639 100644 --- a/src/tests/eio/eio_suite.c +++ b/src/tests/eio/eio_suite.c @@ -10,6 +10,8 @@ #include EFL_START_TEST(eio_init_test) +{ +} EFL_END_TEST static void diff --git a/src/tests/elementary/elm_code_test_indent.c b/src/tests/elementary/elm_code_test_indent.c index 6b564420f0..b27f1a0834 100644 --- a/src/tests/elementary/elm_code_test_indent.c +++ b/src/tests/elementary/elm_code_test_indent.c @@ -184,7 +184,7 @@ EFL_START_TEST (elm_code_indent_tab_matching_braces) elm_code_free(code); elm_shutdown(); } -END_TEST +EFL_END_TEST EFL_START_TEST (elm_code_indent_startswith_keyword) { --
[EGIT] [core/efl] master 01/01: Clean up efl_ui_XXX eo files.
hermet pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=7655a0d267ef59ba530cf7ad52bbc176049904da commit 7655a0d267ef59ba530cf7ad52bbc176049904da Author: Woochanlee Date: Tue Sep 4 09:37:00 2018 +0900 Clean up efl_ui_XXX eo files. Summary: Delete unnecessary interface references. Delete unnecessary annotations. Reviewers: Hermet, Jaehyun_Cho, zmike Reviewed By: Hermet Subscribers: segfaultxavi, q66, cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D6945 --- src/lib/elementary/efl_ui_button.eo | 2 +- src/lib/elementary/efl_ui_check.c | 6 -- src/lib/elementary/efl_ui_check.eo | 1 - src/lib/elementary/efl_ui_focus_layer.eo| 2 +- src/lib/elementary/efl_ui_image.eo | 1 - src/lib/elementary/efl_ui_image_zoomable.eo | 2 +- src/lib/elementary/efl_ui_image_zoomable_pan.eo | 12 src/lib/elementary/efl_ui_scroller.eo | 3 +-- src/lib/elementary/efl_ui_textpath.eo | 2 +- src/lib/elementary/efl_ui_video.eo | 3 +-- src/lib/elementary/efl_ui_view_list_pan.eo | 6 -- src/lib/elementary/efl_ui_widget_part_shadow.eo | 2 +- src/lib/elementary/efl_ui_win.eo| 1 - 13 files changed, 7 insertions(+), 36 deletions(-) diff --git a/src/lib/elementary/efl_ui_button.eo b/src/lib/elementary/efl_ui_button.eo index 3ce8c7dcc3..64c0b7f3a5 100644 --- a/src/lib/elementary/efl_ui_button.eo +++ b/src/lib/elementary/efl_ui_button.eo @@ -1,5 +1,5 @@ class Efl.Ui.Button (Efl.Ui.Layout.Object, Efl.Ui.Clickable, Efl.Ui.Autorepeat, - Efl.Text, Efl.Text_Markup, Efl.Content, + Efl.Text, Efl.Content, Efl.Access.Widget.Action, Efl.Ui.Translatable) { [[Push-button widget diff --git a/src/lib/elementary/efl_ui_check.c b/src/lib/elementary/efl_ui_check.c index 4b38992e3b..4e1d197cdf 100644 --- a/src/lib/elementary/efl_ui_check.c +++ b/src/lib/elementary/efl_ui_check.c @@ -305,12 +305,6 @@ _efl_ui_check_selected_set(Eo *obj, Efl_Ui_Check_Data *sd, Eina_Bool value) efl_ui_nstate_value_set(obj, value); } -EOLIAN static void -_efl_ui_check_efl_ui_nstate_count_set(Eo *obj EINA_UNUSED, Efl_Ui_Check_Data *pd EINA_UNUSED, int nstate EINA_UNUSED) -{ - //NOP; -} - EOLIAN static void _efl_ui_check_efl_ui_nstate_value_set(Eo *obj, Efl_Ui_Check_Data *pd EINA_UNUSED, int state) { diff --git a/src/lib/elementary/efl_ui_check.eo b/src/lib/elementary/efl_ui_check.eo index 43b23fbcb5..ef0f76de79 100644 --- a/src/lib/elementary/efl_ui_check.eo +++ b/src/lib/elementary/efl_ui_check.eo @@ -25,7 +25,6 @@ class Efl.Ui.Check (Efl.Ui.Nstate, Efl.Access.Widget.Action) Efl.Ui.Widget.on_access_activate; Efl.Ui.Widget.theme_apply; Efl.Ui.Widget.widget_event; - Efl.Ui.Nstate.count { set; } Efl.Ui.Nstate.value { set; } Efl.Access.Object.state_set { get; } Efl.Access.Widget.Action.elm_actions { get; } diff --git a/src/lib/elementary/efl_ui_focus_layer.eo b/src/lib/elementary/efl_ui_focus_layer.eo index 8650981425..a5a3564168 100644 --- a/src/lib/elementary/efl_ui_focus_layer.eo +++ b/src/lib/elementary/efl_ui_focus_layer.eo @@ -1,4 +1,4 @@ -mixin Efl.Ui.Focus.Layer (Efl.Interface, Efl.Ui.Widget, Efl.Gfx.Entity, Efl.Ui.Widget_Focus_Manager) { +mixin Efl.Ui.Focus.Layer (Efl.Interface, Efl.Ui.Widget, Efl.Ui.Widget_Focus_Manager) { [[This defines the inheriting widget as focus layer A focus layer is the uppermost one which received input and handles all focus related events for as long as it exists and is visible. It's NOT possible to escape this layer with focus movement. diff --git a/src/lib/elementary/efl_ui_image.eo b/src/lib/elementary/efl_ui_image.eo index a572d468d0..94ed732b88 100644 --- a/src/lib/elementary/efl_ui_image.eo +++ b/src/lib/elementary/efl_ui_image.eo @@ -107,7 +107,6 @@ class Efl.Ui.Image (Efl.Ui.Widget, Efl.Ui.Clickable, Efl.Ui.Draggable, Efl.Layout.Signal.signal_emit; Efl.Layout.Group.group_size_min { get; } Efl.Layout.Group.group_size_max { get; } - //Efl.Canvas.Layout_Group.group_data { get; } Efl.Layout.Calc.calc_size_min; Efl.Layout.Calc.calc_force; Efl.Canvas.Object.clip { set; } diff --git a/src/lib/elementary/efl_ui_image_zoomable.eo b/src/lib/elementary/efl_ui_image_zoomable.eo index 7695b592ac..1baeff1755 100644 --- a/src/lib/elementary/efl_ui_image_zoomable.eo +++ b/src/lib/elementary/efl_ui_image_zoomable.eo @@ -2,7 +2,7 @@ struct @extern Elm.Photocam.Error; struct @extern Elm.Photocam.Progress; -class Efl.Ui.Image_Zoomable (Efl.Ui.Widget, Efl.Ui.Image, Efl.Ui.Zoom, +class Efl.Ui.Image_Zoomable (Efl.Ui.Image, Efl.Ui.Zoom, Efl.Ui.Scrollable_Interactive, Efl.Ui.Scrollbar) { diff
[EGIT] [core/efl] master 01/01: eolian-cxx: Fix parallel compilation for eolian_cxx_test_wrapper.cc
hermet pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=fb5431b7bcac3208a8ac196e16889561e6ce9099 commit fb5431b7bcac3208a8ac196e16889561e6ce9099 Author: Felipe Magno de Almeida Date: Tue Sep 4 09:10:56 2018 +0900 eolian-cxx: Fix parallel compilation for eolian_cxx_test_wrapper.cc Summary: Test wasn't defining its own dependencies explicitly, which caused race conditions. Reviewers: Hermet Reviewed By: Hermet Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D6959 --- src/Makefile_Eolian_Cxx.am | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Makefile_Eolian_Cxx.am b/src/Makefile_Eolian_Cxx.am index 5b0099a33e..c2c66a6d91 100644 --- a/src/Makefile_Eolian_Cxx.am +++ b/src/Makefile_Eolian_Cxx.am @@ -114,6 +114,8 @@ tests/eolian_cxx/$(TESTS_EOLIAN_CXX_OBJNAME)eolian_cxx_suite-eolian_cxx_test_bin tests/eolian_cxx/$(TESTS_EOLIAN_CXX_OBJNAME)eolian_cxx_suite-eolian_cxx_test_address_of.$(OBJEXT): tests/eolian_cxx/a.eo.hh tests/eolian_cxx/b.eo.hh tests/eolian_cxx/c.eo.hh tests/eolian_cxx/d.eo.hh tests/eolian_cxx/a.eo.h tests/eolian_cxx/b.eo.h tests/eolian_cxx/c.eo.h tests/eolian_cxx/d.eo.h tests/eolian_cxx/$(TESTS_EOLIAN_CXX_OBJNAME)eolian_cxx_suite-eolian_cxx_test_cyclic.$(OBJEXT): tests/eolian_cxx/cyclic1.eo.hh tests/eolian_cxx/cyclic2.eo.hh tests/eolian_cxx/cyclic1.eo.c tests/eolian_cxx/cyclic2.eo.c tests/eolian_cxx/cyclic1.eo.h tests/eolian_cxx/cyclic2.eo.h +tests/eolian_cxx/$(TESTS_EOLIAN_CXX_OBJNAME)eolian_cxx_suite-eolian_cxx_test_wrapper.$(OBJEXT): tests/eolian_cxx/a.eo.h tests/eolian_cxx/a.eo.c tests/eolian_cxx/a.eo.hh + tests/eolian_cxx/$(TESTS_EOLIAN_CXX_OBJNAME)eolian_cxx_suite-simple.$(OBJEXT): tests/eolian_cxx/simple.eo.c tests/eolian_cxx/simple.eo.h tests/eolian_cxx/$(TESTS_EOLIAN_CXX_OBJNAME)eolian_cxx_suite-generic.$(OBJEXT): tests/eolian_cxx/generic.eo.c tests/eolian_cxx/generic.eo.h tests/eolian_cxx/$(TESTS_EOLIAN_CXX_OBJNAME)eolian_cxx_suite-a.$(OBJEXT): tests/eolian_cxx/a.eo.c tests/eolian_cxx/a.eo.h --
[EGIT] [core/efl] master 01/01: evas canvas: fix overflowed function initialization.
hermet pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=65648335c5b750fd808318b9b9641fa0a13d2543 commit 65648335c5b750fd808318b9b9641fa0a13d2543 Author: Hermet Park Date: Tue Sep 4 09:08:26 2018 +0900 evas canvas: fix overflowed function initialization. Summary: last function pointer indicates render_pre(), add one more element is unnecessary. Reviewers: #committers, netstar Reviewed By: #committers, netstar Subscribers: netstar, cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D6967 --- src/lib/evas/canvas/efl_canvas_vg_object.c | 3 +-- src/lib/evas/canvas/evas_object_polygon.c | 3 +-- src/lib/evas/canvas/evas_object_smart.c | 3 +-- src/lib/evas/canvas/evas_object_text.c | 3 +-- src/lib/evas/canvas/evas_object_textblock.c | 3 +-- 5 files changed, 5 insertions(+), 10 deletions(-) diff --git a/src/lib/evas/canvas/efl_canvas_vg_object.c b/src/lib/evas/canvas/efl_canvas_vg_object.c index 20fc1b3b06..99284d80bf 100644 --- a/src/lib/evas/canvas/efl_canvas_vg_object.c +++ b/src/lib/evas/canvas/efl_canvas_vg_object.c @@ -55,8 +55,7 @@ static const Evas_Object_Func object_func = NULL, NULL, NULL, - NULL, // render_prepare - NULL + NULL // render_prepare }; static void diff --git a/src/lib/evas/canvas/evas_object_polygon.c b/src/lib/evas/canvas/evas_object_polygon.c index c19824f567..8993f5fd0b 100644 --- a/src/lib/evas/canvas/evas_object_polygon.c +++ b/src/lib/evas/canvas/evas_object_polygon.c @@ -74,8 +74,7 @@ static const Evas_Object_Func object_func = NULL, NULL, NULL, - NULL, // render_prepare - NULL + NULL// render_prepare }; /* the actual api call to add a rect */ diff --git a/src/lib/evas/canvas/evas_object_smart.c b/src/lib/evas/canvas/evas_object_smart.c index 6b56028e95..a0e1e1108b 100644 --- a/src/lib/evas/canvas/evas_object_smart.c +++ b/src/lib/evas/canvas/evas_object_smart.c @@ -120,8 +120,7 @@ static const Evas_Object_Func object_func = NULL, NULL, NULL, - NULL, // render_prepare - NULL + NULL // render_prepare }; /* helpers */ diff --git a/src/lib/evas/canvas/evas_object_text.c b/src/lib/evas/canvas/evas_object_text.c index fe675c3836..4474c85db6 100644 --- a/src/lib/evas/canvas/evas_object_text.c +++ b/src/lib/evas/canvas/evas_object_text.c @@ -139,8 +139,7 @@ static const Evas_Object_Func object_func = NULL, NULL, NULL, - NULL, // render_prepare - NULL + NULL // render_prepare }; /* the actual api call to add a rect */ diff --git a/src/lib/evas/canvas/evas_object_textblock.c b/src/lib/evas/canvas/evas_object_textblock.c index 16f717ce41..86c422b74b 100644 --- a/src/lib/evas/canvas/evas_object_textblock.c +++ b/src/lib/evas/canvas/evas_object_textblock.c @@ -732,8 +732,7 @@ static const Evas_Object_Func object_func = NULL, NULL, NULL, - NULL, // render_prepare - NULL + NULL // render_prepare }; /* the actual api call to add a textblock */ --
[EGIT] [core/efl] master 01/01: efl-csharp: Use value_new/free for wrapped values
vitorsousa pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=840613235de6cabb878aadc163b8a46f7fb4440b commit 840613235de6cabb878aadc163b8a46f7fb4440b Author: Lauro Moura Date: Mon Sep 3 16:19:21 2018 -0300 efl-csharp: Use value_new/free for wrapped values Summary: Using malloc/free as it was used before would cause double frees and other issues when mixing with eina_values created from the value mempool inside Eina. Fixes T7359 Reviewers: felipealmeida, vitor.sousa, segfaultxavi Reviewed By: vitor.sousa Subscribers: cedric, #reviewers, #committers Tags: #efl Maniphest Tasks: T7359 Differential Revision: https://phab.enlightenment.org/D6958 --- src/bindings/mono/eina_mono/eina_value.cs| 54 +++- src/tests/efl_mono/libefl_mono_native_test.c | 6 ++-- 2 files changed, 41 insertions(+), 19 deletions(-) diff --git a/src/bindings/mono/eina_mono/eina_value.cs b/src/bindings/mono/eina_mono/eina_value.cs index 578c660b91..e0e2f5f76d 100644 --- a/src/bindings/mono/eina_mono/eina_value.cs +++ b/src/bindings/mono/eina_mono/eina_value.cs @@ -38,6 +38,12 @@ struct Value_List [SuppressUnmanagedCodeSecurityAttribute] static internal class UnsafeNativeMethods { +[DllImport(efl.Libs.Eina)] +internal static extern IntPtr eina_value_new(IntPtr type); + +[DllImport(efl.Libs.Eina)] +internal static extern void eina_value_free(IntPtr type); + [DllImport(efl.Libs.Eina)] [return: MarshalAsAttribute(UnmanagedType.U1)] internal static extern bool eina_value_convert(IntPtr handle, IntPtr convert); @@ -392,6 +398,11 @@ public struct Value_Native { public IntPtr Type; public IntPtr Value; // Atually an Eina_Value_Union, but it is padded to 8 bytes. + +public string ToString() +{ +return $"Value_Native"; +} } @@ -705,9 +716,19 @@ public class Value : IDisposable, IComparable, IEquatable } } +private static IntPtr Alloc() +{ +return eina_value_new(type_int32()); +} + +private static void Free(IntPtr ptr) +{ +eina_value_free(ptr); +} + // Constructor to be used by the "FromContainerDesc" methods. private Value() { -this.Handle = MemoryNative.Alloc(eina_value_sizeof()); +this.Handle = Alloc(); this.Ownership = Ownership.Managed; } @@ -722,7 +743,7 @@ public class Value : IDisposable, IComparable, IEquatable if (type.IsContainer()) throw new ArgumentException("To use container types you must provide a subtype"); -this.Handle = MemoryNative.Alloc(eina_value_sizeof()); +this.Handle = Alloc(); if (this.Handle == IntPtr.Zero) throw new OutOfMemoryException("Failed to allocate memory for eina.Value"); @@ -739,7 +760,7 @@ public class Value : IDisposable, IComparable, IEquatable if (!containerType.IsContainer()) throw new ArgumentException("First type must be a container type."); -this.Handle = MemoryNative.Alloc(eina_value_sizeof()); +this.Handle = Alloc(); this.Ownership = Ownership.Managed; Setup(containerType, subtype, step); @@ -748,27 +769,30 @@ public class Value : IDisposable, IComparable, IEquatable /// Constructor to build value from Values_Natives passed by value from C. public Value(Value_Native value) { -IntPtr tmp = MemoryNative.Alloc(Marshal.SizeOf(typeof(Value_Native))); +IntPtr tmp = IntPtr.Zero; try { -Marshal.StructureToPtr(value, tmp, false); // Can't get the address of a struct directly. +this.Handle = Alloc(); if (value.Type == IntPtr.Zero) // Got an EINA_VALUE_EMPTY by value. -{ -this.Handle = tmp; -tmp = IntPtr.Zero; -} +MemoryNative.Memset(this.Handle, 0, Marshal.SizeOf(typeof(Value_Native))); else { -this.Handle = MemoryNative.Alloc(Marshal.SizeOf(typeof(Value_Native))); +// We allocate this intermediate Value_Native using malloc to allow freeing with +// free(), avoiding a call to eina_value_flush that would wipe the underlying value contents +// for pointer types like string. +tmp = MemoryNative.Alloc(Marshal.SizeOf(typeof(Value_Native))); +Marshal.StructureToPtr(value, tmp, false); // Can't get the address of a struct directly. +this.Handle = Alloc(); // Copy is used to deep copy the pointed payload (e.g. strings) inside this struct, so we can own this value. if (!eina_value_copy(tmp, this.Handle)) throw new System.InvalidOperationException("Failed to copy value to managed memory."); } } catch
[EGIT] [core/efl] master 01/01: ecore_event: fix ecore event handler iterator range
bu5hm4n pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=3f306491a32a1880bccfe64861b5fec2ba09049b commit 3f306491a32a1880bccfe64861b5fec2ba09049b Author: Yeongjong Lee Date: Mon Sep 3 15:55:13 2018 + ecore_event: fix ecore event handler iterator range event handler start at 1 (see _ecore_event_message_handler_type_new and _ecore_event_message_handler_efl_object_constructor) so that handlers[0] is not allocated. this patch avoid invalid memory access. this fixes T7349 Differential Revision: https://phab.enlightenment.org/D6966 --- src/lib/ecore/ecore_event_message_handler.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/ecore/ecore_event_message_handler.c b/src/lib/ecore/ecore_event_message_handler.c index f5498832f9..6df1227cf0 100644 --- a/src/lib/ecore/ecore_event_message_handler.c +++ b/src/lib/ecore/ecore_event_message_handler.c @@ -314,7 +314,7 @@ _ecore_event_message_handler_efl_object_destructor(Eo *obj, Ecore_Event_Message_ { free(h); } -for (i = 0; i <= pd->event_type_count; i++) +for (i = 1; i <= pd->event_type_count; i++) { EINA_INLIST_FREE(pd->handlers[i], h) { --
[EGIT] [core/efl] master 01/01: build: add keymapheader to dist tarbal
stefan pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=40cce4620e6457082a1c0346da28601b2f86 commit 40cce4620e6457082a1c0346da28601b2f86 Author: Marcel Hollerbach Date: Mon Sep 3 11:54:18 2018 +0200 build: add keymapheader to dist tarbal Differential Revision: https://phab.enlightenment.org/D6962 --- src/Makefile_Ecore_Evas.am | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Makefile_Ecore_Evas.am b/src/Makefile_Ecore_Evas.am index 29bcea3f06..0c3c335679 100644 --- a/src/Makefile_Ecore_Evas.am +++ b/src/Makefile_Ecore_Evas.am @@ -272,7 +272,8 @@ endif if BUILD_ECORE_EVAS_VNC_SERVER VNCSERVERSOURCES = \ modules/ecore_evas/vnc_server/ecore_evas_vnc_server.c \ -modules/ecore_evas/vnc_server/ecore_evas_vnc_server_fb_keymap.c +modules/ecore_evas/vnc_server/ecore_evas_vnc_server_fb_keymap.c \ +modules/ecore_evas/vnc_server/ecore_evas_vnc_server_fb_keymap.h ecoreevasenginevncserverpkgdir = $(libdir)/ecore_evas/vnc_server/$(MODULE_ARCH) ecoreevasenginevncserverpkg_LTLIBRARIES = modules/ecore_evas/vnc_server/module.la --
[EGIT] [core/efl] master 01/01: evas image: fix a bug in image preloading.
hermet pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=423d8a22961436299df0feca17b03544678b8c0f commit 423d8a22961436299df0feca17b03544678b8c0f Author: Hermet Park Date: Mon Sep 3 15:19:02 2018 +0900 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 --- src/lib/evas/cache/evas_cache.h| 2 +- src/lib/evas/cache/evas_cache_image.c | 61 +- src/lib/evas/canvas/efl_canvas_image.c | 12 ++-- src/lib/evas/canvas/evas_image_legacy.c| 25 src/lib/evas/canvas/evas_image_private.h | 9 ++- src/lib/evas/canvas/evas_object_image.c| 74 +- src/lib/evas/canvas/evas_object_inform.c | 10 ++- src/lib/evas/include/evas_common_private.h | 3 +- src/lib/evas/include/evas_private.h| 4 +- src/modules/evas/engines/gl_common/evas_gl_image.c | 17 +++-- src/modules/evas/engines/gl_generic/evas_engine.c | 4 +- .../evas/engines/software_generic/evas_engine.c| 4 +- 12 files changed, 111 insertions(+), 114 deletions(-) diff --git a/src/lib/evas/cache/evas_cache.h b/src/lib/evas/cache/evas_cache.h index 1edd9e0f2b..b7bcb7d660 100644 --- a/src/lib/evas/cache/evas_cache.h +++ b/src/lib/evas/cache/evas_cache.h @@ -162,7 +162,7 @@ EAPI Engine_Image_Entry* evas_cache_engine_image_size_set(Engine_Image_Entr EAPI void evas_cache_engine_image_load_data(Engine_Image_Entry *eim); EAPI void evas_cache_image_preload_data(Image_Entry *im, const Eo *target, void (*preloaded_cb)(void *data), void *preloaded_data); -EAPI void evas_cache_image_preload_cancel(Image_Entry *im, const Eo *target); +EAPI void evas_cache_image_preload_cancel(Image_Entry *im, const Eo *target, Eina_Bool force); EAPI int evas_cache_async_frozen_get(void); EAPI void evas_cache_async_freeze(void); diff --git a/src/lib/evas/cache/evas_cache_image.c b/src/lib/evas/cache/evas_cache_image.c index 9be38b928d..52440a23eb 100644 --- a/src/lib/evas/cache/evas_cache_image.c +++ b/src/lib/evas/cache/evas_cache_image.c @@ -28,7 +28,7 @@ struct _Evas_Cache_Preload static SLK(engine_lock); static int _evas_cache_mutex_init = 0; -static void _evas_cache_image_entry_preload_remove(Image_Entry *ie, const Eo *target); +static void _evas_cache_image_entry_preload_remove(Image_Entry *ie, const Eo *target, Eina_Bool force); #define FREESTRC(Var) \ if (Var) \ @@ -71,7 +71,7 @@ _evas_cache_image_dirty_del(Image_Entry *im) if (!im->cache) return; im->flags.dirty = 0; im->flags.cached = 0; - im->cache->dirty = eina_inlist_remove(im->cache->dirty, EINA_INLIST_GET(im)); + im->cache->dirty = eina_inlist_remove(im->cache->dirty, EINA_INLIST_GET(im)); } static void @@ -175,7 +175,7 @@ _evas_cache_image_entry_delete(Evas_Cache_Image *cache, Image_Entry *ie) if (ie->preload) { ie->flags.delete_me = 1; -_evas_cache_image_entry_preload_remove(ie, NULL); +_evas_cache_image_entry_preload_remove(ie, NULL, EINA_TRUE); return; } _evas_cache_image_dirty_del(ie); @@ -364,8 +364,6 @@ _evas_cache_image_async_heavy(void *data)