summaryrefslogtreecommitdiff
path: root/legacy/evas/src/modules/engines/gl_x11/evas_engine.c
diff options
context:
space:
mode:
authorCarsten Haitzler <raster@rasterman.com>2010-01-24 11:01:20 +0000
committerCarsten Haitzler <raster@rasterman.com>2010-01-24 11:01:20 +0000
commitc12557d8f08656d05ab7987b3bd3f12430024e75 (patch)
tree344c72cf8fe69b1a93c893798fe7921540df247a /legacy/evas/src/modules/engines/gl_x11/evas_engine.c
parentb9cbdd4a7dc36c0ab34774e1d69c5673e43b0709 (diff)
add pre/post swap callbacks. need them! :(
SVN revision: 45514
Diffstat (limited to '')
-rw-r--r--legacy/evas/src/modules/engines/gl_x11/evas_engine.c31
1 files changed, 17 insertions, 14 deletions
diff --git a/legacy/evas/src/modules/engines/gl_x11/evas_engine.c b/legacy/evas/src/modules/engines/gl_x11/evas_engine.c
index 68dc77e5d0..fb39614962 100644
--- a/legacy/evas/src/modules/engines/gl_x11/evas_engine.c
+++ b/legacy/evas/src/modules/engines/gl_x11/evas_engine.c
@@ -72,8 +72,10 @@ typedef struct _Render_Engine Render_Engine;
72 72
73struct _Render_Engine 73struct _Render_Engine
74{ 74{
75 Evas_GL_X11_Window *win; 75 Evas_GL_X11_Window *win;
76 int end; 76 Evas_Engine_Info_GL_X11 *info;
77 Evas *evas;
78 int end;
77 79
78 XrmDatabase xrdb; // xres - dpi 80 XrmDatabase xrdb; // xres - dpi
79 struct { // xres - dpi 81 struct { // xres - dpi
@@ -122,6 +124,8 @@ eng_setup(Evas *e, void *in)
122#endif 124#endif
123 re = calloc(1, sizeof(Render_Engine)); 125 re = calloc(1, sizeof(Render_Engine));
124 if (!re) return 0; 126 if (!re) return 0;
127 re->info = info;
128 re->evas = e;
125 e->engine.data.output = re; 129 e->engine.data.output = re;
126 re->win = eng_window_new(info->info.display, 130 re->win = eng_window_new(info->info.display,
127 info->info.drawable, 131 info->info.drawable,
@@ -391,8 +395,8 @@ eng_output_flush(void *data)
391 re->win->draw.drew = 0; 395 re->win->draw.drew = 0;
392 eng_window_use(re->win); 396 eng_window_use(re->win);
393 397
398#if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX)
394// glFlush(); 399// glFlush();
395# if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX)
396 eglSwapBuffers(re->win->egl_disp, re->win->egl_surface[0]); 400 eglSwapBuffers(re->win->egl_disp, re->win->egl_surface[0]);
397#else 401#else
398# ifdef VSYNC_TO_SCREEN 402# ifdef VSYNC_TO_SCREEN
@@ -403,18 +407,17 @@ eng_output_flush(void *data)
403// glXWaitVideoSyncSGI(2, (rc + 1) % 2, &rc); 407// glXWaitVideoSyncSGI(2, (rc + 1) % 2, &rc);
404// } 408// }
405# endif 409# endif
406# ifdef SLOW_GL_COPY_RECT 410 if (re->info->callback.pre_swap)
411 {
412 glXWaitGL();
413 re->info->callback.pre_swap(re->info->callback.data, re->evas);
414 }
407 glXSwapBuffers(re->win->disp, re->win->win); 415 glXSwapBuffers(re->win->disp, re->win->win);
408# else 416 if (re->info->callback.post_swap)
409// /* SLOW AS ALL HELL! */ 417 {
410// evas_gl_common_swap_rect(re->win->gl_context, 418 glXWaitGL();
411// re->win->draw.x1, re->win->draw.y1, 419 re->info->callback.post_swap(re->info->callback.data, re->evas);
412// re->win->draw.x2 - re->win->draw.x1 + 1, 420 }
413// re->win->draw.y2 - re->win->draw.y1 + 1);
414# endif
415// glFlush();
416// glXWaitGL();
417// XSync(re->win->disp, False);
418#endif 421#endif
419} 422}
420 423