evas cache: code refactoring.
authorHermet Park <hermetpark@gmail.com>
Mon, 27 Aug 2018 07:39:22 +0000 (07:39 +0000)
committerWooHyun Jung <wh0705.jung@samsung.com>
Wed, 29 Aug 2018 05:28:55 +0000 (14:28 +0900)
rename to proper internal variables.
Differential Revision: https://phab.enlightenment.org/D6911

src/lib/evas/cache/evas_cache_image.c
src/lib/evas/cache2/evas_cache2.c
src/lib/evas/include/evas_common_private.h
src/modules/evas/engines/gl_common/evas_gl_image.c

index 11b9a1d..d209a1a 100644 (file)
@@ -415,11 +415,11 @@ _evas_cache_image_preloaded_notify(Image_Entry *ie)
         ie->targets = (Evas_Cache_Target *)
           eina_inlist_remove(EINA_INLIST_GET(ie->targets),
                              EINA_INLIST_GET(ie->targets));
-        if (tmp->simple_cb)
+        if (tmp->preloaded_cb)
           {
              if (!tmp->delete_me)
                {
-                  tmp->simple_cb(tmp->simple_data);
+                  tmp->preloaded_cb(tmp->preloaded_data);
                }
           }
         else
index c791e99..893abe3 100644 (file)
@@ -314,11 +314,11 @@ _evas_cache2_image_preloaded_cb(void *data, Eina_Bool success)
                               EINA_INLIST_GET(ie->targets));
         if (!ie->flags.delete_me)
           {
-             if (tmp->simple_cb)
+             if (tmp->preloaded_cb)
                {
                   if (!tmp->delete_me)
                     {
-                       tmp->simple_cb(tmp->simple_data);
+                       tmp->preloaded_cb(tmp->preloaded_data);
                     }
                }
              else
index 95ab16c..7ee2a35 100755 (executable)
@@ -592,8 +592,8 @@ struct _Evas_Cache_Target
    EINA_INLIST;
    const Eo *target;
    void *data;
-   void (*simple_cb) (void *data);
-   void *simple_data;
+   void (*preloaded_cb) (void *data); //Call when preloading done.
+   void *preloaded_data;
    Eina_Bool delete_me;
 };
 
index 4bb42a1..fede635 100755 (executable)
@@ -204,8 +204,8 @@ evas_gl_common_image_preload_watch(Evas_GL_Image *im)
    tg = calloc(1, sizeof(Evas_Cache_Target));
    if (tg)
      {
-        tg->simple_cb = preload_done;
-        tg->simple_data = im;
+        tg->preloaded_cb = preload_done;
+        tg->preloaded_data = im;
         im->im->cache_entry.targets =  (Evas_Cache_Target *)
           eina_inlist_append(EINA_INLIST_GET(im->im->cache_entry.targets),
                              EINA_INLIST_GET(tg));
@@ -221,7 +221,7 @@ evas_gl_common_image_preload_unwatch(Evas_GL_Image *im)
    if (!im->im) return;
    EINA_INLIST_FOREACH_SAFE(im->im->cache_entry.targets, l2, tg)
      {
-        if ((tg->simple_cb != preload_done) || (tg->simple_data != im))
+        if ((tg->preloaded_cb != preload_done) || (tg->preloaded_data != im))
           continue;
         tg->delete_me = EINA_TRUE;
         break;