efl/evas: make egl stuff compile with xcb

SVN revision: 80503
This commit is contained in:
Gustavo Sverzut Barbieri 2012-12-07 22:50:47 +00:00
parent ecadf8759c
commit 2abb5474c4
2 changed files with 29 additions and 7 deletions

View File

@ -16,7 +16,9 @@
# include "evas_xcb_xdefaults.h" # include "evas_xcb_xdefaults.h"
#endif #endif
#ifdef BUILD_ENGINE_SOFTWARE_XLIB
#include "evas_x_egl.h" #include "evas_x_egl.h"
#endif
int _evas_engine_soft_x11_log_dom = -1; int _evas_engine_soft_x11_log_dom = -1;
@ -638,7 +640,9 @@ eng_output_free(void *data)
if (re->rects_prev[0]) evas_common_tilebuf_free_render_rects(re->rects_prev[0]); if (re->rects_prev[0]) evas_common_tilebuf_free_render_rects(re->rects_prev[0]);
if (re->rects_prev[1]) evas_common_tilebuf_free_render_rects(re->rects_prev[1]); if (re->rects_prev[1]) evas_common_tilebuf_free_render_rects(re->rects_prev[1]);
if (re->rects_prev[2]) evas_common_tilebuf_free_render_rects(re->rects_prev[2]); if (re->rects_prev[2]) evas_common_tilebuf_free_render_rects(re->rects_prev[2]);
#ifdef BUILD_ENGINE_SOFTWARE_XLIB
_output_egl_shutdown(re); _output_egl_shutdown(re);
#endif
free(re); free(re);
} }

View File

@ -7,7 +7,6 @@
#endif #endif
#include "evas_common.h" #include "evas_common.h"
#include "evas_macros.h" #include "evas_macros.h"
#include "evas_x_egl.h"
#ifdef HAVE_DLSYM #ifdef HAVE_DLSYM
# include <dlfcn.h> /* dlopen,dlclose,etc */ # include <dlfcn.h> /* dlopen,dlclose,etc */
@ -16,6 +15,7 @@
#endif #endif
#ifdef BUILD_ENGINE_SOFTWARE_XLIB #ifdef BUILD_ENGINE_SOFTWARE_XLIB
#include "evas_x_egl.h"
#define EGL_SURFACE_TYPE 0x3033 #define EGL_SURFACE_TYPE 0x3033
#define EGL_WINDOW_BIT 0x0004 #define EGL_WINDOW_BIT 0x0004
@ -128,6 +128,7 @@ _egl_x_disp_get(void *d)
return egl.GetDisplay(d); return egl.GetDisplay(d);
#else #else
return NULL; return NULL;
(void)d;
#endif #endif
} }
@ -137,6 +138,8 @@ _egl_x_disp_terminate(void *ed)
#ifdef BUILD_ENGINE_SOFTWARE_XLIB #ifdef BUILD_ENGINE_SOFTWARE_XLIB
if (!_egl_find()) return; if (!_egl_find()) return;
egl.Terminate(ed); egl.Terminate(ed);
#else
(void)ed;
#endif #endif
} }
@ -150,6 +153,7 @@ _egl_x_disp_init(void *ed)
return 1; return 1;
#else #else
return 0; return 0;
(void)ed;
#endif #endif
} }
@ -187,19 +191,18 @@ _egl_x_disp_choose_config(void *ed)
return eglconfig; return eglconfig;
#else #else
return NULL; return NULL;
(void)ed;
#endif #endif
} }
#ifdef BUILD_ENGINE_SOFTWARE_XLIB
void * void *
_egl_x_win_surf_new(void *ed, Window win, void *config) _egl_x_win_surf_new(void *ed, Window win, void *config)
{ {
#ifdef BUILD_ENGINE_SOFTWARE_XLIB
if (!_egl_find()) return NULL; if (!_egl_find()) return NULL;
return egl.CreateWindowSurface(ed, config, win, NULL); return egl.CreateWindowSurface(ed, config, win, NULL);
#else
return NULL;
#endif
} }
#endif
void void
_egl_x_win_surf_free(void *ed, void *surf) _egl_x_win_surf_free(void *ed, void *surf)
@ -207,6 +210,9 @@ _egl_x_win_surf_free(void *ed, void *surf)
#ifdef BUILD_ENGINE_SOFTWARE_XLIB #ifdef BUILD_ENGINE_SOFTWARE_XLIB
if (!_egl_find()) return; if (!_egl_find()) return;
egl.DestroySurface(ed, surf); egl.DestroySurface(ed, surf);
#else
(void)ed;
(void)surf;
#endif #endif
} }
@ -249,6 +255,9 @@ err:
return NULL; return NULL;
#else #else
return NULL; return NULL;
(void)ed;
(void)surf;
(void)stride;
#endif #endif
} }
@ -257,7 +266,10 @@ _egl_x_surf_unmap(void *ed, void *surf)
{ {
#ifdef BUILD_ENGINE_SOFTWARE_XLIB #ifdef BUILD_ENGINE_SOFTWARE_XLIB
egl.UnlockSurface(ed, surf); egl.UnlockSurface(ed, surf);
#endif #else
(void)ed;
(void)surf;
#endif
} }
void void
@ -267,9 +279,14 @@ _egl_x_surf_swap(void *ed, void *surf, int vsync)
if (vsync) egl.SwapInterval(ed, 1); if (vsync) egl.SwapInterval(ed, 1);
else egl.SwapInterval(ed, 0); else egl.SwapInterval(ed, 0);
egl.SwapBuffers(ed, surf); egl.SwapBuffers(ed, surf);
#endif #else
(void)ed;
(void)surf;
(void)vsync;
#endif
} }
#ifdef BUILD_ENGINE_SOFTWARE_XLIB
Outbuf * Outbuf *
evas_software_egl_outbuf_setup_x(int w, int h, int rot, Outbuf_Depth depth, evas_software_egl_outbuf_setup_x(int w, int h, int rot, Outbuf_Depth depth,
Display *disp, Drawable draw, Visual *vis, Display *disp, Drawable draw, Visual *vis,
@ -293,3 +310,4 @@ evas_software_egl_outbuf_setup_x(int w, int h, int rot, Outbuf_Depth depth,
(void) vis; (void) vis;
return NULL; return NULL;
} }
#endif