summaryrefslogtreecommitdiff
path: root/src/modules/evas/engines/gl_common/evas_gl_preload.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/modules/evas/engines/gl_common/evas_gl_preload.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/modules/evas/engines/gl_common/evas_gl_preload.c b/src/modules/evas/engines/gl_common/evas_gl_preload.c
index 17836c2ec2..5344473c1d 100644
--- a/src/modules/evas/engines/gl_common/evas_gl_preload.c
+++ b/src/modules/evas/engines/gl_common/evas_gl_preload.c
@@ -351,7 +351,8 @@ evas_gl_preload_target_unregister(Evas_GL_Texture *tex, Eo *target)
351EAPI int 351EAPI int
352evas_gl_preload_init(void) 352evas_gl_preload_init(void)
353{ 353{
354 if (getenv("EVAS_GL_NOPRELOAD")) return 0; 354 const char *s = getenv("EVAS_GL_PRELOAD");
355 if (!s || (atoi(s) != 1)) return 0;
355 if (async_loader_init++) return async_loader_init; 356 if (async_loader_init++) return async_loader_init;
356 357
357 eina_lock_new(&async_loader_lock); 358 eina_lock_new(&async_loader_lock);
@@ -368,7 +369,8 @@ evas_gl_preload_init(void)
368EAPI int 369EAPI int
369evas_gl_preload_shutdown(void) 370evas_gl_preload_shutdown(void)
370{ 371{
371 if (getenv("EVAS_GL_NOPRELOAD")) return 0; 372 const char *s = getenv("EVAS_GL_PRELOAD");
373 if (!s || (atoi(s) != 1)) return 0;
372 if (--async_loader_init) return async_loader_init; 374 if (--async_loader_init) return async_loader_init;
373 375
374 async_loader_exit = EINA_TRUE; 376 async_loader_exit = EINA_TRUE;
@@ -381,3 +383,9 @@ evas_gl_preload_shutdown(void)
381 383
382 return async_loader_init; 384 return async_loader_init;
383} 385}
386
387EAPI Eina_Bool
388evas_gl_preload_enabled(void)
389{
390 return (async_loader_init >= 1);
391}