Evas GL generic: Fix log domain

The log domain EvasGL is used by evas_gl_common and initialized
only when an Evas GL surface is created.
This commit is contained in:
Jean-Philippe Andre 2015-04-14 17:27:06 +09:00
parent b0c6a32d68
commit c2f5d41f39
1 changed files with 12 additions and 1 deletions

View File

@ -33,6 +33,17 @@
static int _evas_engine_GL_log_dom = -1;
#undef ERR
#undef DBG
#undef INF
#undef WRN
#undef CRI
#define ERR(...) EINA_LOG_DOM_ERR(_evas_engine_GL_log_dom, __VA_ARGS__)
#define DBG(...) EINA_LOG_DOM_DBG(_evas_engine_GL_log_dom, __VA_ARGS__)
#define INF(...) EINA_LOG_DOM_INFO(_evas_engine_GL_log_dom, __VA_ARGS__)
#define WRN(...) EINA_LOG_DOM_WARN(_evas_engine_GL_log_dom, __VA_ARGS__)
#define CRI(...) EINA_LOG_DOM_CRIT(_evas_engine_GL_log_dom, __VA_ARGS__)
static int eng_gl_image_direct_get(void *data EINA_UNUSED, void *image);
static void
@ -2296,7 +2307,7 @@ module_open(Evas_Module *em)
/* get whatever engine module we inherit from */
if (!_evas_module_engine_inherit(&pfunc, "software_generic")) return 0;
if (_evas_engine_GL_log_dom < 0)
_evas_engine_GL_log_dom = eina_log_domain_register("evas-gl", EVAS_DEFAULT_LOG_COLOR);
_evas_engine_GL_log_dom = eina_log_domain_register("evas-gl_generic", EVAS_DEFAULT_LOG_COLOR);
if (_evas_engine_GL_log_dom < 0)
{
EINA_LOG_ERR("Can not create a module log domain.");