From 0e15e5c2fe2b4adeb2c9c77f7c4f0657d5aa16e9 Mon Sep 17 00:00:00 2001 From: Cedric BAIL Date: Fri, 25 Oct 2019 15:45:14 -0400 Subject: [PATCH] evas: disable Eina Cow Garbage Collection on dynamic content. Summary: Dynamic content are likely to trigger an image state change at pretty much every frame. This lead to unecessary attempt by Eina_Cow to deduplicate/cleanup data that are changing all the time. This reduce memory consumption in Expedite tests that in some small amount. The gain get bigger the more animation you get on screen. There might be other potential gain for heavy animated case. Reviewers: zmike, Hermet, bu5hm4n, smohanty Reviewed By: zmike Subscribers: #reviewers, #committers Tags: #efl Maniphest Tasks: T8302 Differential Revision: https://phab.enlightenment.org/D10532 --- src/lib/evas/canvas/evas_image_private.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/lib/evas/canvas/evas_image_private.h b/src/lib/evas/canvas/evas_image_private.h index 2522ece..42499b8 100755 --- a/src/lib/evas/canvas/evas_image_private.h +++ b/src/lib/evas/canvas/evas_image_private.h @@ -254,7 +254,10 @@ void tizen_9patch_fetch(Evas_Object *eo_obj, Evas_Object_Protected_Data *obj, Ev EINA_COW_WRITE_BEGIN(evas_object_image_state_cow, Obj->cur, Evas_Object_Image_State, Write) # define EINA_COW_IMAGE_STATE_WRITE_END(Obj, Write) \ - EINA_COW_WRITE_END(evas_object_image_state_cow, Obj->cur, Write) + eina_cow_done(evas_object_image_state_cow, ((const Eina_Cow_Data**)&(Obj->cur)), Write, \ + Obj->content_hint == EFL_GFX_IMAGE_CONTENT_HINT_DYNAMIC ? EINA_FALSE : EINA_TRUE); \ + } \ + while (0); # define EINA_COW_PIXEL_WRITE_BEGIN(Obj, Write) \ EINA_COW_WRITE_BEGIN(evas_object_image_pixels_cow, Obj->pixels, Evas_Object_Image_Pixels, Write) -- 2.7.4