evas-gl_cocoa: init/shutdown cleanup
This commit is contained in:
parent
7b5ec6ce30
commit
62c342c4e3
|
@ -1311,12 +1311,17 @@ module_open(Evas_Module *em)
|
|||
if (!evas_gl_common_module_open()) return 0;
|
||||
/* get whatever engine module we inherit from */
|
||||
if (!_evas_module_engine_inherit(&pfunc, "software_generic")) return 0;
|
||||
_evas_engine_gl_cocoa_log_dom = eina_log_domain_register("evas-gl_cocoa", EVAS_DEFAULT_LOG_COLOR);
|
||||
|
||||
if (_evas_engine_gl_cocoa_log_dom < 0)
|
||||
{
|
||||
EINA_LOG_ERR("Impossible to create a log domain for GL (Cocoa) engine.");
|
||||
_evas_engine_gl_cocoa_log_dom =
|
||||
eina_log_domain_register("evas-gl_cocoa", EVAS_DEFAULT_LOG_COLOR);
|
||||
if (EINA_UNLIKELY(_evas_engine_gl_cocoa_log_dom < 0))
|
||||
{
|
||||
EINA_LOG_ERR("Cannot create a module log domain");
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
/* store it for later use */
|
||||
func = pfunc;
|
||||
/* now to override methods */
|
||||
|
@ -1398,8 +1403,12 @@ module_open(Evas_Module *em)
|
|||
|
||||
static void
|
||||
module_close(Evas_Module *em EINA_UNUSED)
|
||||
{
|
||||
if (_evas_engine_gl_cocoa_log_dom >= 0)
|
||||
{
|
||||
eina_log_domain_unregister(_evas_engine_gl_cocoa_log_dom);
|
||||
_evas_engine_gl_cocoa_log_dom = -1;
|
||||
}
|
||||
evas_gl_common_module_close();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue