forked from enlightenment/efl
wayland-egl: Fix Outbuf structure not having evas & engine info
gl_generic functions expect the Outbuf to contain the canvas, so we fixed the eng_window_new function to accept that, And the engine info. This simplifies the calls to eng_window_new. @fix Signed-off-by: Chris Michael <cp.michael@samsung.com>
This commit is contained in:
parent
7c6b9637d9
commit
3311729f3c
|
@ -8,7 +8,7 @@ static EGLContext context = EGL_NO_CONTEXT;
|
||||||
static int win_count = 0;
|
static int win_count = 0;
|
||||||
|
|
||||||
Outbuf *
|
Outbuf *
|
||||||
eng_window_new(struct wl_display *disp, struct wl_surface *surface, int screen, int depth, int w, int h, int indirect EINA_UNUSED, int alpha, int rot, Render_Engine_Swap_Mode swap_mode)
|
eng_window_new(Evas *evas, Evas_Engine_Info_Wayland_Egl *einfo, int w, int h, Render_Engine_Swap_Mode swap_mode)
|
||||||
{
|
{
|
||||||
Outbuf *gw;
|
Outbuf *gw;
|
||||||
int context_attrs[3];
|
int context_attrs[3];
|
||||||
|
@ -23,15 +23,17 @@ eng_window_new(struct wl_display *disp, struct wl_surface *surface, int screen,
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
win_count++;
|
win_count++;
|
||||||
gw->disp = disp;
|
gw->info = einfo;
|
||||||
gw->surface = surface;
|
gw->evas = evas;
|
||||||
gw->screen = screen;
|
|
||||||
gw->depth = depth;
|
|
||||||
gw->w = w;
|
gw->w = w;
|
||||||
gw->h = h;
|
gw->h = h;
|
||||||
gw->alpha = alpha;
|
|
||||||
gw->rot = rot;
|
|
||||||
gw->swap_mode = swap_mode;
|
gw->swap_mode = swap_mode;
|
||||||
|
gw->disp = einfo->info.display;
|
||||||
|
gw->surface = einfo->info.surface;
|
||||||
|
gw->screen = einfo->info.screen;
|
||||||
|
gw->depth = einfo->info.depth;
|
||||||
|
gw->alpha = einfo->info.destination_alpha;
|
||||||
|
gw->rot = einfo->info.rotation;
|
||||||
|
|
||||||
context_attrs[0] = EGL_CONTEXT_CLIENT_VERSION;
|
context_attrs[0] = EGL_CONTEXT_CLIENT_VERSION;
|
||||||
context_attrs[1] = 2;
|
context_attrs[1] = 2;
|
||||||
|
@ -175,7 +177,7 @@ eng_window_new(struct wl_display *disp, struct wl_surface *surface, int screen,
|
||||||
gw->gl_context->eglctxt = gw->egl_context[0];
|
gw->gl_context->eglctxt = gw->egl_context[0];
|
||||||
|
|
||||||
eng_window_use(gw);
|
eng_window_use(gw);
|
||||||
glsym_evas_gl_common_context_resize(gw->gl_context, w, h, rot);
|
glsym_evas_gl_common_context_resize(gw->gl_context, w, h, gw->rot);
|
||||||
|
|
||||||
gw->surf = EINA_TRUE;
|
gw->surf = EINA_TRUE;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue