egl/wayland: Remove kooky flush code
authorKristian Høgsberg <krh@bitplanet.net>
Fri, 14 Dec 2012 04:32:51 +0000 (23:32 -0500)
committerKristian Høgsberg <krh@bitplanet.net>
Fri, 4 Jan 2013 16:20:12 +0000 (11:20 -0500)
We used to have to jump through hoops to call glFlush at swap buffer time,
but the flush extension made that unnecessary a long time ago.

src/egl/drivers/dri2/platform_wayland.c

index 434986893b849e0e87ff822c4dcc07d5fea499b0..a8069ba13c518b0da08b06d7589d03e690ecd260 100644 (file)
@@ -546,7 +546,6 @@ dri2_swap_buffers(_EGLDriver *drv, _EGLDisplay *disp, _EGLSurface *draw)
 {
    struct dri2_egl_display *dri2_dpy = dri2_egl_display(disp);
    struct dri2_egl_surface *dri2_surf = dri2_egl_surface(draw);
-   struct dri2_egl_driver *dri2_drv = dri2_egl_driver(drv);
    int ret = 0;
 
    while (dri2_surf->frame_callback && ret != -1)
@@ -594,13 +593,6 @@ dri2_swap_buffers(_EGLDriver *drv, _EGLDisplay *disp, _EGLSurface *draw)
       wl_surface_commit(dri2_surf->wl_win->surface);
    }
 
-   _EGLContext *ctx;
-   if (dri2_drv->glFlush) {
-      ctx = _eglGetCurrentContext();
-      if (ctx && ctx->DrawSurface == &dri2_surf->base)
-         dri2_drv->glFlush();
-   }
-
    (*dri2_dpy->flush->flush)(dri2_surf->dri_drawable);
    (*dri2_dpy->flush->invalidate)(dri2_surf->dri_drawable);