Evas GL: Fix build errors for glx backend
authorDongyeon Kim <dy5.kim@samsung.com>
Mon, 9 Mar 2015 11:41:58 +0000 (20:41 +0900)
committerJean-Philippe Andre <jp.andre@samsung.com>
Mon, 16 Mar 2015 06:56:49 +0000 (15:56 +0900)
Summary:
Fix build errors for glx backend made from previous commit
Revert parameter naming

Test Plan: Local Evas GL tests for 1.1, 2.0, and 3.0

Reviewers: jpeg

Subscribers: mythri, wonsik, cedric, mer.kim

Differential Revision: https://phab.enlightenment.org/D2117

src/modules/evas/engines/gl_common/evas_gl_common.h
src/modules/evas/engines/gl_common/evas_gl_core.c
src/modules/evas/engines/gl_common/evas_gl_core.h

index 2b63af92112b470b6da048db7c572677f89e2bbd..26557f420af2c4ab62c3855abe4fff94064ca560 100644 (file)
 #ifndef GL_TEXTURE_EXTERNAL_OES
 # define GL_TEXTURE_EXTERNAL_OES 0x8D65
 #endif
-
-
 #ifndef GL_UNPACK_ROW_LENGTH
 # define GL_UNPACK_ROW_LENGTH 0x0CF2
 #endif
-
+#ifndef EGL_NO_DISPLAY
+# define EGL_NO_DISPLAY 0
+#endif
 #ifndef EGL_NO_CONTEXT
 # define EGL_NO_CONTEXT 0
 #endif
index eaaee50f102732c4af9786028370b31ab0f2a1df..bfb8a9b290b081e873ae73793e01de250440b415 100644 (file)
@@ -236,9 +236,11 @@ _texture_attach_2d(GLuint tex, GLenum attach, GLenum attach2, int samples, Eina_
 void
 _egl_image_attach_texture(EVGL_Context *context, EvasGLImage *image, GLuint tex)
 {
+#ifdef GL_GLES
    EVGLNative_Display dpy = EGL_NO_DISPLAY;
    EVGLNative_Context ctx = EGL_NO_CONTEXT;
    EVGL_Resource *rsc = NULL;
+
    int attribs[] = {
       EVAS_GL_TEXTURE_LEVEL, 0,
       EVAS_GL_IMAGE_PRESERVED, 0,
@@ -256,6 +258,9 @@ _egl_image_attach_texture(EVGL_Context *context, EvasGLImage *image, GLuint tex)
    ctx = context->context;
 
    *image = EXT_FUNC(eglCreateImage)(dpy, ctx, EVAS_GL_TEXTURE_2D, (EGLClientBuffer)tex, attribs);
+#else
+   (void) context; (void) image; (void) tex;
+#endif
 }
 
 // Gen Renderbuffer
@@ -783,6 +788,7 @@ _context_ext_check(EVGL_Context *ctx)
    if (ctx->extension_checked)
       return 1;
 
+#ifdef GL_GLES
    switch (ctx->version)
      {
       case EVAS_GL_GLES_1_X:
@@ -798,6 +804,7 @@ _context_ext_check(EVGL_Context *ctx)
    if (EXTENSION_SUPPORT(EGL_KHR_image_base)
        && EXTENSION_SUPPORT(EGL_KHR_gl_texture_2D_image))
      egl_image_supported = 1;
+#endif
 
    if (fbo_supported && egl_image_supported)
       ctx->extension_supported = 1;
@@ -1094,6 +1101,7 @@ _surface_buffers_allocate(void *eng_data, EVGL_Surface *sfc, int w, int h, int m
                              GL_UNSIGNED_BYTE, w, h);
         if ((sfc->current_ctx) && (sfc->current_ctx->extension_supported))
           _egl_image_attach_texture(sfc->current_ctx, &sfc->egl_image, sfc->color_buf);
+
         sfc->buffer_mem[0] = w * h * 4;
      }
 
@@ -2211,6 +2219,7 @@ evgl_make_current(void *eng_data, EVGL_Surface *sfc, EVGL_Context *ctx)
              evas_gl_common_error_set(eng_data, EVAS_GL_NOT_INITIALIZED);
              return 0;
           }
+
         if (!_context_ext_check(ctx))
           {
              ERR("Unable to check required extension for the current context");
index 671fc0319f81ff55317b6629d21a90ffc4fbab67..4d244b7081f567c3747f4343713025a11bab88aa 100644 (file)
@@ -46,7 +46,7 @@ void         evgl_direct_override_get(Eina_Bool *override, Eina_Bool *force_off)
 void         evgl_direct_info_set(int win_w, int win_h, int rot,
                                   int img_x, int img_y, int img_w, int img_h,
                                   int clip_x, int clip_y, int clip_w, int clip_h,
-                                  void *hash_key);
+                                  void *surface);
 void         evgl_direct_info_clear(void);
 void         evgl_get_pixels_pre(void);
 void         evgl_get_pixels_post(void);