opengl: Fix build break for desktop gl backend
authorSubhransu Mohanty <smohantty@gmail.com>
Thu, 21 May 2020 04:48:20 +0000 (13:48 +0900)
committerJongmin Lee <jm105.lee@samsung.com>
Sun, 24 May 2020 21:37:13 +0000 (06:37 +0900)
The desktop gl backend was broken because of code addition related to TBM and egl .
fix the issue by putting them under GL_GLES flag.

Change-Id: Idb1ad0ee06bfa45e6cd31ba2f00654d3a3fa9434

src/modules/evas/engines/gl_common/evas_gl_api.c
src/modules/evas/engines/gl_common/evas_gl_core.c
src/modules/evas/engines/gl_generic/evas_engine.c

index f9d3b49..d728827 100755 (executable)
@@ -1512,6 +1512,8 @@ _evgl_glGetString(GLenum name)
         return (const GLubyte *) ret;
 #else
         // Desktop GL, we still keep the official name
+        static char _glsl[128] = {0};
+        static char _version[128] = {0};
         snprintf(_glsl, sizeof(_glsl), "OpenGL ES GLSL ES 1.00 Evas GL (%s)", (char *) ret);
         _version[sizeof(_glsl) - 1] = '\0';
         return (const GLubyte *) _glsl;
index 3e132b5..42f90d3 100755 (executable)
@@ -2199,6 +2199,7 @@ evgl_surface_create(void *eng_data, Evas_GL_Config *cfg, int w, int h)
         if (evas_gl_thread_enabled(EVAS_GL_THREAD_TYPE_GL))
           {
 #ifndef BUILD_ENGINE_GL_COCOA
+#ifdef GL_GLES
              // Now surface direct override is ON.
              // It means that EvasGL DIRECT rendering is enabled strictly
              // and Evas GL THREAD rendering needs disabled from now,
@@ -2215,6 +2216,7 @@ evgl_surface_create(void *eng_data, Evas_GL_Config *cfg, int w, int h)
                ERR("Evas GL thread fallback is failed");
 
              evas_gl_thread_disabled();
+#endif
 #endif /* ! BUILD_ENGINE_GL_COCOA */
           }
      }
index 635657d..8f01e0a 100755 (executable)
@@ -1629,6 +1629,7 @@ eng_image_stride_get(void *engine EINA_UNUSED, void *image, int *stride)
    Evas_GL_Image *im = image;
    int width = 0;
 
+#ifdef GL_GLES
    if (im->native.data)
      {
        Evas_Native_Surface *ns = im->native.data;
@@ -1641,6 +1642,7 @@ eng_image_stride_get(void *engine EINA_UNUSED, void *image, int *stride)
            return;
          }
      }
+#endif
 
    if ((im->tex) && (im->tex->pt->dyn.img))
      *stride = im->tex->pt->dyn.stride;