evas/gl - make simple.
authorChunEon Park <hermet@hermet.pe.kr>
Mon, 28 Apr 2014 11:51:02 +0000 (20:51 +0900)
committerChunEon Park <hermet@hermet.pe.kr>
Mon, 28 Apr 2014 11:51:02 +0000 (20:51 +0900)
it already prints error msg inside new functions.

src/modules/evas/engines/gl_x11/evas_engine.c

index 719e29e069efcd476f464069b599c3cc6f2cac6b..7e9415c8da6de9606a1a601199dd1e8fc6414c29 100644 (file)
@@ -3711,18 +3711,9 @@ eng_context_3d_use(void *data)
 {
    Render_Engine *re = (Render_Engine *)data;
 
-   if (re->context_3d == NULL)
-     {
-        re->context_3d = eng_gl_context_new(re->win);
-
-        if (re->context_3d == NULL)
-          {
-             ERR("Failed to create OpenGL context for 3D.");
-             return;
-          }
-     }
-
-   eng_gl_context_use(re->context_3d);
+   if (!re->context_3d)
+     re->context_3d = eng_gl_context_new(re->win);
+   if (re->context_3d) eng_gl_context_use(re->context_3d);
 }
 
 static E3D_Renderer *
@@ -3730,17 +3721,8 @@ eng_renderer_3d_get(void *data)
 {
    Render_Engine *re = (Render_Engine *)data;
 
-   if (re->renderer_3d == NULL)
-     {
-        re->renderer_3d = e3d_renderer_new();
-
-        if (re->renderer_3d == NULL)
-          {
-             ERR("Failed to create 3D renderer.");
-             return NULL;
-          }
-     }
-
+   if (!re->renderer_3d)
+     re->renderer_3d = e3d_renderer_new();
    return re->renderer_3d;
 }