summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJean Guyomarc'h <jean.guyomarch@openwide.fr>2016-08-24 10:20:38 +0200
committerJean Guyomarc'h <jean@guyomarch.bzh>2016-08-25 21:41:17 +0200
commit62c342c4e3ff1459849fc47ef44ecc67eb7b9a32 (patch)
treea0fa7e83315e7cfeacc66143a8944580d62057f5 /src
parent7b5ec6ce301b21619495b45cbc6b7f69b41f8317 (diff)
evas-gl_cocoa: init/shutdown cleanup
Diffstat (limited to 'src')
-rw-r--r--src/modules/evas/engines/gl_cocoa/evas_engine.c33
1 files changed, 21 insertions, 12 deletions
diff --git a/src/modules/evas/engines/gl_cocoa/evas_engine.c b/src/modules/evas/engines/gl_cocoa/evas_engine.c
index 27b159a..87f275c 100644
--- a/src/modules/evas/engines/gl_cocoa/evas_engine.c
+++ b/src/modules/evas/engines/gl_cocoa/evas_engine.c
@@ -1311,11 +1311,16 @@ module_open(Evas_Module *em)
1311 if (!evas_gl_common_module_open()) return 0; 1311 if (!evas_gl_common_module_open()) return 0;
1312 /* get whatever engine module we inherit from */ 1312 /* get whatever engine module we inherit from */
1313 if (!_evas_module_engine_inherit(&pfunc, "software_generic")) return 0; 1313 if (!_evas_module_engine_inherit(&pfunc, "software_generic")) return 0;
1314 _evas_engine_gl_cocoa_log_dom = eina_log_domain_register("evas-gl_cocoa", EVAS_DEFAULT_LOG_COLOR); 1314
1315 if(_evas_engine_gl_cocoa_log_dom < 0) 1315 if (_evas_engine_gl_cocoa_log_dom < 0)
1316 { 1316 {
1317 EINA_LOG_ERR("Impossible to create a log domain for GL (Cocoa) engine."); 1317 _evas_engine_gl_cocoa_log_dom =
1318 return 0; 1318 eina_log_domain_register("evas-gl_cocoa", EVAS_DEFAULT_LOG_COLOR);
1319 if (EINA_UNLIKELY(_evas_engine_gl_cocoa_log_dom < 0))
1320 {
1321 EINA_LOG_ERR("Cannot create a module log domain");
1322 return 0;
1323 }
1319 } 1324 }
1320 /* store it for later use */ 1325 /* store it for later use */
1321 func = pfunc; 1326 func = pfunc;
@@ -1399,20 +1404,24 @@ module_open(Evas_Module *em)
1399static void 1404static void
1400module_close(Evas_Module *em EINA_UNUSED) 1405module_close(Evas_Module *em EINA_UNUSED)
1401{ 1406{
1402 eina_log_domain_unregister(_evas_engine_gl_cocoa_log_dom); 1407 if (_evas_engine_gl_cocoa_log_dom >= 0)
1408 {
1409 eina_log_domain_unregister(_evas_engine_gl_cocoa_log_dom);
1410 _evas_engine_gl_cocoa_log_dom = -1;
1411 }
1403 evas_gl_common_module_close(); 1412 evas_gl_common_module_close();
1404} 1413}
1405 1414
1406static Evas_Module_Api evas_modapi = 1415static Evas_Module_Api evas_modapi =
1407 { 1416{
1408 EVAS_MODULE_API_VERSION, 1417 EVAS_MODULE_API_VERSION,
1409 "gl_cocoa", 1418 "gl_cocoa",
1410 "none", 1419 "none",
1411 { 1420 {
1412 module_open, 1421 module_open,
1413 module_close 1422 module_close
1414 } 1423 }
1415 }; 1424};
1416 1425
1417EVAS_MODULE_DEFINE(EVAS_MODULE_TYPE_ENGINE, engine, gl_cocoa); 1426EVAS_MODULE_DEFINE(EVAS_MODULE_TYPE_ENGINE, engine, gl_cocoa);
1418 1427