and further work on buffer age support in evas... after more testing

on nvidia...
This commit is contained in:
Carsten Haitzler 2013-04-11 09:21:42 +09:00
parent 2d62ea88e5
commit 9dffb4eed8
3 changed files with 53 additions and 42 deletions

View File

@ -6,17 +6,17 @@
msgid "" msgid ""
msgstr "" msgstr ""
"Project-Id-Version: enlightenment\n" "Project-Id-Version: enlightenment\n"
"Report-Msgid-Bugs-To: $MSGID_BUGS_ADDRESS\n" "Report-Msgid-Bugs-To: enlightenment-devel@lists.sourceforge.net\n"
"POT-Creation-Date: 2013-01-05 11:32+0100\n" "POT-Creation-Date: 2013-04-11 08:15+0900\n"
"PO-Revision-Date: 2013-02-21 15:24+0000\n" "PO-Revision-Date: 2013-02-21 15:24+0000\n"
"Last-Translator: Michael Moroni <michael.moroni@mailoo.org>\n" "Last-Translator: Michael Moroni <michael.moroni@mailoo.org>\n"
"Language-Team: Esperanto <eo@li.org>\n" "Language-Team: Esperanto <eo@li.org>\n"
"Language: eo\n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2013-02-22 05:19+0000\n" "X-Launchpad-Export-Date: 2013-02-22 05:19+0000\n"
"X-Generator: Launchpad (build 16506)\n" "X-Generator: Launchpad (build 16506)\n"
"Language: eo\n"
#: src/lib/ecore/ecore_getopt.c:87 #: src/lib/ecore/ecore_getopt.c:87
msgid "Version:" msgid "Version:"

View File

@ -1219,22 +1219,32 @@ eng_output_redraws_next_update_get(void *data, int *x, int *y, int *w, int *h, i
{ {
if (re->info->swap_mode == EVAS_ENGINE_GL_X11_SWAP_MODE_AUTO) if (re->info->swap_mode == EVAS_ENGINE_GL_X11_SWAP_MODE_AUTO)
{ {
#ifdef GL_GLES
EGLint age = 0;
if (!eglQuerySurface(re->win->egl_disp,
re->win->egl_surface[0],
EGL_BUFFER_AGE_EXT, &age))
age = 0;
#else
unsigned int age = 0;
if (glsym_glXQueryDrawable)
glsym_glXQueryDrawable(re->win->disp, re->win->glxwin,
GLX_BACK_BUFFER_AGE_EXT, &age);
#endif
if (extn_have_buffer_age) if (extn_have_buffer_age)
{ {
#ifdef GL_GLES
EGLint age = 0;
if (!eglQuerySurface(re->win->egl_disp,
re->win->egl_surface[0],
EGL_BUFFER_AGE_EXT, &age))
age = 0;
#else
unsigned int age = 0;
if (glsym_glXQueryDrawable)
{
if (re->win->glxwin)
glsym_glXQueryDrawable(re->win->disp,
re->win->glxwin,
GLX_BACK_BUFFER_AGE_EXT,
&age);
else
glsym_glXQueryDrawable(re->win->disp,
re->win->win,
GLX_BACK_BUFFER_AGE_EXT,
&age);
}
#endif
if (age == 1) re->mode = MODE_COPY; if (age == 1) re->mode = MODE_COPY;
else if (age == 2) re->mode = MODE_DOUBLE; else if (age == 2) re->mode = MODE_DOUBLE;
else if (age == 3) re->mode = MODE_TRIPLE; else if (age == 3) re->mode = MODE_TRIPLE;

View File

@ -489,33 +489,33 @@ eng_window_use(Evas_GL_X11_Window *gw)
{ {
// EGL / GLES // EGL / GLES
#ifdef GL_GLES #ifdef GL_GLES
if (gw->egl_surface[0] != EGL_NO_SURFACE) if (gw->egl_surface[0] != EGL_NO_SURFACE)
{ {
if (eglMakeCurrent(gw->egl_disp, if (eglMakeCurrent(gw->egl_disp,
gw->egl_surface[0], gw->egl_surface[0],
gw->egl_surface[0], gw->egl_surface[0],
gw->egl_context[0]) == EGL_FALSE) gw->egl_context[0]) == EGL_FALSE)
{ {
ERR("eglMakeCurrent() failed!"); ERR("eglMakeCurrent() failed!");
} }
} }
// GLX // GLX
#else #else
if (gw->glxwin) if (gw->glxwin)
{ {
if (!glXMakeContextCurrent(gw->disp, gw->glxwin, gw->glxwin, if (!glXMakeContextCurrent(gw->disp, gw->glxwin, gw->glxwin,
gw->context)) gw->context))
{ {
ERR("glXMakeContextCurrent(%p, %p, %p, %p)", (void *)gw->disp, (void *)gw->glxwin, (void *)gw->glxwin, (void *)gw->context); ERR("glXMakeContextCurrent(%p, %p, %p, %p)", (void *)gw->disp, (void *)gw->glxwin, (void *)gw->glxwin, (void *)gw->context);
} }
} }
else else
{ {
if (!glXMakeCurrent(gw->disp, gw->win, gw->context)) if (!glXMakeCurrent(gw->disp, gw->win, gw->context))
{ {
ERR("glXMakeCurrent(%p, 0x%x, %p) failed", gw->disp, (unsigned int)gw->win, (void *)gw->context); ERR("glXMakeCurrent(%p, 0x%x, %p) failed", gw->disp, (unsigned int)gw->win, (void *)gw->context);
} }
} }
#endif #endif
} }
} }
@ -544,6 +544,7 @@ eng_window_unsurf(Evas_GL_X11_Window *gw)
if (gw->glxwin) if (gw->glxwin)
{ {
glXDestroyWindow(gw->disp, gw->glxwin); glXDestroyWindow(gw->disp, gw->glxwin);
gw->glxwin = 0;
} }
else else
{ {