raster pushed a commit to branch master.
commit 9dffb4eed815e471e9aaa768626b41eb10eeef42
Author: Carsten Haitzler (Rasterman) <[email protected]>
Date: Thu Apr 11 09:21:42 2013 +0900
and further work on buffer age support in evas... after more testing
on nvidia...
---
po/eo.po | 6 ++--
src/modules/evas/engines/gl_x11/evas_engine.c | 32 +++++++++++------
src/modules/evas/engines/gl_x11/evas_x_main.c | 51 ++++++++++++++-------------
3 files changed, 50 insertions(+), 39 deletions(-)
diff --git a/po/eo.po b/po/eo.po
index 31004da..a20d834 100644
--- a/po/eo.po
+++ b/po/eo.po
@@ -6,17 +6,17 @@
msgid ""
msgstr ""
"Project-Id-Version: enlightenment\n"
-"Report-Msgid-Bugs-To: $MSGID_BUGS_ADDRESS\n"
-"POT-Creation-Date: 2013-01-05 11:32+0100\n"
+"Report-Msgid-Bugs-To: [email protected]\n"
+"POT-Creation-Date: 2013-04-11 08:15+0900\n"
"PO-Revision-Date: 2013-02-21 15:24+0000\n"
"Last-Translator: Michael Moroni <[email protected]>\n"
"Language-Team: Esperanto <[email protected]>\n"
+"Language: eo\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2013-02-22 05:19+0000\n"
"X-Generator: Launchpad (build 16506)\n"
-"Language: eo\n"
#: src/lib/ecore/ecore_getopt.c:87
msgid "Version:"
diff --git a/src/modules/evas/engines/gl_x11/evas_engine.c
b/src/modules/evas/engines/gl_x11/evas_engine.c
index 43d5f61..de3be42 100644
--- a/src/modules/evas/engines/gl_x11/evas_engine.c
+++ b/src/modules/evas/engines/gl_x11/evas_engine.c
@@ -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 (extn_have_buffer_age)
+ {
#ifdef GL_GLES
- EGLint age = 0;
+ EGLint age = 0;
- if (!eglQuerySurface(re->win->egl_disp,
- re->win->egl_surface[0],
- EGL_BUFFER_AGE_EXT, &age))
- 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;
+ unsigned int age = 0;
- if (glsym_glXQueryDrawable)
- glsym_glXQueryDrawable(re->win->disp, re->win->glxwin,
- GLX_BACK_BUFFER_AGE_EXT, &age);
+ 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 (extn_have_buffer_age)
- {
if (age == 1) re->mode = MODE_COPY;
else if (age == 2) re->mode = MODE_DOUBLE;
else if (age == 3) re->mode = MODE_TRIPLE;
diff --git a/src/modules/evas/engines/gl_x11/evas_x_main.c
b/src/modules/evas/engines/gl_x11/evas_x_main.c
index e024e77..5c75984 100644
--- a/src/modules/evas/engines/gl_x11/evas_x_main.c
+++ b/src/modules/evas/engines/gl_x11/evas_x_main.c
@@ -489,33 +489,33 @@ eng_window_use(Evas_GL_X11_Window *gw)
{
// EGL / GLES
#ifdef GL_GLES
- if (gw->egl_surface[0] != EGL_NO_SURFACE)
- {
- if (eglMakeCurrent(gw->egl_disp,
- gw->egl_surface[0],
- gw->egl_surface[0],
- gw->egl_context[0]) == EGL_FALSE)
- {
- ERR("eglMakeCurrent() failed!");
- }
- }
+ if (gw->egl_surface[0] != EGL_NO_SURFACE)
+ {
+ if (eglMakeCurrent(gw->egl_disp,
+ gw->egl_surface[0],
+ gw->egl_surface[0],
+ gw->egl_context[0]) == EGL_FALSE)
+ {
+ ERR("eglMakeCurrent() failed!");
+ }
+ }
// GLX
#else
- if (gw->glxwin)
- {
- if (!glXMakeContextCurrent(gw->disp, gw->glxwin, gw->glxwin,
- gw->context))
- {
- ERR("glXMakeContextCurrent(%p, %p, %p, %p)", (void
*)gw->disp, (void *)gw->glxwin, (void *)gw->glxwin, (void *)gw->context);
- }
- }
- else
- {
- if (!glXMakeCurrent(gw->disp, gw->win, gw->context))
- {
- ERR("glXMakeCurrent(%p, 0x%x, %p) failed", gw->disp,
(unsigned int)gw->win, (void *)gw->context);
- }
- }
+ if (gw->glxwin)
+ {
+ if (!glXMakeContextCurrent(gw->disp, gw->glxwin, gw->glxwin,
+ gw->context))
+ {
+ ERR("glXMakeContextCurrent(%p, %p, %p, %p)", (void
*)gw->disp, (void *)gw->glxwin, (void *)gw->glxwin, (void *)gw->context);
+ }
+ }
+ else
+ {
+ if (!glXMakeCurrent(gw->disp, gw->win, gw->context))
+ {
+ ERR("glXMakeCurrent(%p, 0x%x, %p) failed", gw->disp,
(unsigned int)gw->win, (void *)gw->context);
+ }
+ }
#endif
}
}
@@ -544,6 +544,7 @@ eng_window_unsurf(Evas_GL_X11_Window *gw)
if (gw->glxwin)
{
glXDestroyWindow(gw->disp, gw->glxwin);
+ gw->glxwin = 0;
}
else
{
--
------------------------------------------------------------------------------
Precog is a next-generation analytics platform capable of advanced
analytics on semi-structured data. The platform includes APIs for building
apps and a phenomenal toolset for data science. Developers can use
our toolset for easy data analysis & visualization. Get a free account!
http://www2.precog.com/precogplatform/slashdotnewsletter