evas vg: use tvg thread count not to reach to limit. 90/255190/1
authorHermet Park <chuneon.park@samsung.com>
Mon, 15 Mar 2021 05:38:38 +0000 (14:38 +0900)
committerHermet Park <chuneon.park@samsung.com>
Mon, 15 Mar 2021 05:38:38 +0000 (14:38 +0900)
Avoid tvg thread count not to reach to maximum physical count
since we already allocated main thread.

Change-Id: I9e84d838e7694413a2eeb9bbfc7add62cddda6e7

src/lib/evas/vg/evas_vg_cache.c

index e8610ae..ca262a3 100644 (file)
@@ -272,7 +272,9 @@ evas_cache_vg_init(void)
      }
 
 #ifdef HAVE_THORVG
-   tvg_engine_init(TVG_ENGINE_SW, eina_cpu_count());
+   int cpu_cnt = eina_cpu_count() - 1;
+   if (cpu_cnt < 0) cpu_cnt = 0;
+   tvg_engine_init(TVG_ENGINE_SW, cpu_cnt);
 #endif
 
    vg_cache->vfd_hash = eina_hash_string_superfast_new(_evas_cache_vg_data_free_cb);