[Problem] When multi windows are shown, the latest window does not shown.
[Cause] The latest window can not call glViewport with the updated coordinate
[Solution] Force call glViewport when window resizing occurs
[Team] Graphics
Change-Id: I89059b59a9f47464aa0c1aa85768b9a188947d43
re = (Render_Engine *)data;
re->win->width = w;
re->win->height = h;
-
+
eng_window_resize(re->win, w, h);
- evas_gl_common_context_resize(re->win->gl_context, w, h, 0);
+ evas_gl_common_context_resize(re->win->gl_context, w, h, 0,1);
}
static void
return NULL;
}
evas_gl_common_context_use(gw->gl_context);
- evas_gl_common_context_resize(gw->gl_context, w, h, 0);
+ evas_gl_common_context_resize(gw->gl_context, w, h, 0,1);
return gw;
}
EAPI void evas_gl_common_context_use(Evas_Engine_GL_Context *gc);
EAPI void evas_gl_common_context_newframe(Evas_Engine_GL_Context *gc);
EAPI void evas_gl_common_context_done(Evas_Engine_GL_Context *gc);
-
-EAPI void evas_gl_common_context_resize(Evas_Engine_GL_Context *gc, int w, int h, int rot);
+//Tizen Only : when multi window are shown, latest window does not show. so force call glviewport when window resizing occur
+//EAPI void evas_gl_common_context_resize(Evas_Engine_GL_Context *gc, int w, int h, int rot);
+EAPI void evas_gl_common_context_resize(Evas_Engine_GL_Context *gc, int w, int h, int rot, int force_update);
EAPI int evas_gl_common_buffer_dump(Evas_Engine_GL_Context *gc, const char* dname, const char* fname, int frame, const char* suffix);
EAPI void evas_gl_preload_render_lock(evas_gl_make_current_cb make_current, void *engine_data);
typedef Evas_GL_Image *(*Evas_GL_Common_Image_New_From_Data)(Evas_Engine_GL_Context *gc, unsigned int w, unsigned int h, DATA32 *data, int alpha, Evas_Colorspace cspace);
typedef void (*Evas_GL_Preload_Render_Call)(evas_gl_make_current_cb make_current, void *engine_data);
typedef Evas_Engine_GL_Context *(*Evas_GL_Common_Context_New)(void);
-typedef void (*Evas_GL_Common_Context_Resize_Call)(Evas_Engine_GL_Context *gc, int w, int h, int rot);
+//Tizen Only : when multi window are shown, latest window does not show. so force call glviewport when window resizing occur
+//typedef void (*Evas_GL_Common_Context_Resize_Call)(Evas_Engine_GL_Context *gc, int w, int h, int rot);
+typedef void (*Evas_GL_Common_Context_Resize_Call)(Evas_Engine_GL_Context *gc, int w, int h, int rot,int force_update);
typedef int (*Evas_GL_Common_Buffer_Dump_Call)(Evas_Engine_GL_Context *gc,const char* dname, const char* fname, int frame, const char* suffix);
typedef void (*Evas_Gl_Symbols)(void *(*GetProcAddress)(const char *sym));
return 0;
}
+//Tizen Only : when multi window are shown, latest window does not show. so force call glviewport when window resizing occur
+//static void _evas_gl_common_viewport_set(Evas_Engine_GL_Context *gc)
static void
-_evas_gl_common_viewport_set(Evas_Engine_GL_Context *gc)
+_evas_gl_common_viewport_set(Evas_Engine_GL_Context *gc, int force_update)
{
GLfloat proj[16];
unsigned int i;
}
#ifdef GL_GLES
- if (gc->shared->eglctxt == gc->eglctxt)
-#endif
+ if ((gc->shared->eglctxt == gc->eglctxt) && (!force_update ))
+#endif
{
if ((!gc->change.size) ||
(
}
gc->shared = shared;
gc->shared->references++;
- _evas_gl_common_viewport_set(gc);
+ _evas_gl_common_viewport_set(gc,1);
gc->def_surface = evas_gl_common_image_surface_new(gc, 1, 1, 1);
{
if (_evas_gl_common_context == gc) return;
_evas_gl_common_context = gc;
- if (gc) _evas_gl_common_viewport_set(gc);
+ if (gc) _evas_gl_common_viewport_set(gc,0);
}
EAPI void
glBindTexture(GL_TEXTURE_2D, gc->pipe[0].shader.cur_tex);
GLERR(__FUNCTION__, __FILE__, __LINE__, "");
- _evas_gl_common_viewport_set(gc);
+ _evas_gl_common_viewport_set(gc,1);
}
+//Tizen Only : when multi window are shown, latest window does not show. so force call glviewport when window resizing occur
+//EAPI void evas_gl_common_context_resize(Evas_Engine_GL_Context *gc, int w, int h, int rot)
EAPI void
-evas_gl_common_context_resize(Evas_Engine_GL_Context *gc, int w, int h, int rot)
+evas_gl_common_context_resize(Evas_Engine_GL_Context *gc, int w, int h, int rot, int force_update)
{
- if ((gc->w == w) && (gc->h == h) && (gc->rot == rot)) return;
+ if ((!force_update) && (gc->w == w) && (gc->h == h) && (gc->rot == rot)) return;
evas_gl_common_context_flush(gc);
gc->change.size = 1;
gc->rot = rot;
gc->w = w;
gc->h = h;
- if (_evas_gl_common_context == gc) _evas_gl_common_viewport_set(gc);
+ if (_evas_gl_common_context == gc) _evas_gl_common_viewport_set(gc,1);
}
void
glsym_glBindFramebuffer(GL_FRAMEBUFFER, surface->tex->pt->fb);
GLERR(__FUNCTION__, __FILE__, __LINE__, "");
}
- _evas_gl_common_viewport_set(gc);
+ _evas_gl_common_viewport_set(gc,0);
}
#define PUSH_VERTEX(n, x, y, z) do { \
gc->px = p[0].px >> FP;
gc->py = p[0].py >> FP;
gc->change.size = 1;
- _evas_gl_common_viewport_set(gc);
+ _evas_gl_common_viewport_set(gc,0);
}
pn = _evas_gl_common_context_push(RTYPE_MAP,
gc->px = 0;
gc->py = 0;
gc->change.size = 1;
- _evas_gl_common_viewport_set(gc);
+ _evas_gl_common_viewport_set(gc,0);
}
}
gw->gl_context->eglctxt = gw->egl_context[0];
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, rot,1);
gw->surf = EINA_TRUE;
ob->h = h;
ob->rot = rot;
eng_window_use(ob);
- glsym_evas_gl_common_context_resize(ob->gl_context, w, h, rot);
+ glsym_evas_gl_common_context_resize(ob->gl_context, w, h, rot,1);
//TODO: need drm gbm surface destroy & re-create.?
}
eng_window_use(ob);
if (!_re_wincheck(ob)) return EINA_TRUE;
- glsym_evas_gl_common_context_resize(ob->gl_context, ob->w, ob->h, ob->rot);
+ glsym_evas_gl_common_context_resize(ob->gl_context, ob->w, ob->h, ob->rot,0);
glsym_evas_gl_common_context_flush(ob->gl_context);
glsym_evas_gl_common_context_newframe(ob->gl_context);
if (!ob->gl_context) goto on_error;
glsym_evas_gl_common_context_use(ob->gl_context);
- glsym_evas_gl_common_context_resize(ob->gl_context, w, h, ob->gl_context->rot);
+ glsym_evas_gl_common_context_resize(ob->gl_context, w, h, ob->gl_context->rot,1);
/* End GL Initialization */
return ob;
eng_window_free(gw);
return NULL;
}
-
+
context = _tls_context_get();
gw->egl_context[0] = eglCreateContext
(gw->egl_disp, gw->egl_config, context, context_attrs);
eng_window_free(gw);
return NULL;
}
+
if (context == EGL_NO_CONTEXT)
_tls_context_set(gw->egl_context[0]);
-
+
if (eglMakeCurrent(gw->egl_disp,
gw->egl_surface[0],
gw->egl_surface[0],
gw->gl_context->eglctxt = gw->egl_context[0];
#endif
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, rot,1);
gw->surf = 1;
return gw;
}
ob->h = h;
ob->rot = rot;
eng_window_use(ob);
- glsym_evas_gl_common_context_resize(ob->gl_context, w, h, rot);
+ glsym_evas_gl_common_context_resize(ob->gl_context, w, h, rot,1);
}
int
glsym_evas_gl_common_context_resize(ob->gl_context,
ob->w, ob->h,
- ob->rot);
+ ob->rot,0);
glsym_evas_gl_common_context_flush(ob->gl_context);
glsym_evas_gl_common_context_newframe(ob->gl_context);
}
}
else
- eglSwapBuffers(ob->egl_disp, ob->egl_surface[0]);
+ eglSwapBuffers(ob->egl_disp, ob->egl_surface[0]);
//xx if (!safe_native) eglWaitGL();
if (ob->info->callback.post_swap)
gw->gl_context->eglctxt = gw->egl_context[0];
eng_window_use(gw);
- glsym_evas_gl_common_context_resize(gw->gl_context, w, h, gw->rot);
+ glsym_evas_gl_common_context_resize(gw->gl_context, w, h, gw->rot,1);
gw->surf = EINA_TRUE;
return gw;
}
-void
+void
eng_window_free(Outbuf *gw)
{
int ref = 0;
free(gw);
}
-void
+void
eng_window_use(Outbuf *gw)
{
Eina_Bool force = EINA_FALSE;
if (gw)
{
glsym_evas_gl_common_context_use(gw->gl_context);
- glsym_evas_gl_common_context_resize(gw->gl_context, gw->w, gw->h, gw->rot);
+ glsym_evas_gl_common_context_resize(gw->gl_context, gw->w, gw->h, gw->rot,0);
}
}
ob->h = h;
ob->rot = rot;
eng_window_use(ob);
- glsym_evas_gl_common_context_resize(ob->gl_context, w, h, rot);
+ glsym_evas_gl_common_context_resize(ob->gl_context, w, h, rot,1);
if (ob->win)
{