Mesa (master): st/egl: Use native_surface::present callback.

Chia-I Wu olv at kemper.freedesktop.org
Wed Nov 3 08:29:26 UTC 2010


Module: Mesa
Branch: master
Commit: 0ae4b23c534bc4182a019ab7d6a174588a42f844
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=0ae4b23c534bc4182a019ab7d6a174588a42f844

Author: Chia-I Wu <olv at lunarg.com>
Date:   Wed Nov  3 15:57:06 2010 +0800

st/egl: Use native_surface::present callback.

Replace native_surface::flush_frontbuffer and
native_surface::swap_buffers calls by native_surface::present calls.

---

 .../state_trackers/egl/common/egl_g3d_api.c        |    6 +++---
 src/gallium/state_trackers/egl/common/egl_g3d_st.c |    3 ++-
 2 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/src/gallium/state_trackers/egl/common/egl_g3d_api.c b/src/gallium/state_trackers/egl/common/egl_g3d_api.c
index c10245b..7f85cf1 100644
--- a/src/gallium/state_trackers/egl/common/egl_g3d_api.c
+++ b/src/gallium/state_trackers/egl/common/egl_g3d_api.c
@@ -539,7 +539,8 @@ egl_g3d_swap_buffers(_EGLDriver *drv, _EGLDisplay *dpy, _EGLSurface *surf)
             PIPE_FLUSH_RENDER_CACHE | PIPE_FLUSH_FRAME, NULL);
    }
 
-   return gsurf->native->swap_buffers(gsurf->native);
+   return gsurf->native->present(gsurf->native,
+         NATIVE_ATTACHMENT_BACK_LEFT, FALSE, 0);
 }
 
 /**
@@ -607,8 +608,7 @@ egl_g3d_copy_buffers(_EGLDriver *drv, _EGLDisplay *dpy, _EGLSurface *surf,
       if (psrc) {
          gdpy->pipe->resource_copy_region(gdpy->pipe, ptex, subdst, 0, 0, 0,
                gsurf->render_texture, subsrc, 0, 0, 0, ptex->width0, ptex->height0);
-
-         nsurf->flush_frontbuffer(nsurf);
+         nsurf->present(nsurf, NATIVE_ATTACHMENT_FRONT_LEFT, FALSE, 0);
       }
 
       pipe_resource_reference(&ptex, NULL);
diff --git a/src/gallium/state_trackers/egl/common/egl_g3d_st.c b/src/gallium/state_trackers/egl/common/egl_g3d_st.c
index 0affe63..25e2999 100644
--- a/src/gallium/state_trackers/egl/common/egl_g3d_st.c
+++ b/src/gallium/state_trackers/egl/common/egl_g3d_st.c
@@ -192,7 +192,8 @@ egl_g3d_st_framebuffer_flush_front(struct st_framebuffer_iface *stfbi,
    _EGLSurface *surf = (_EGLSurface *) stfbi->st_manager_private;
    struct egl_g3d_surface *gsurf = egl_g3d_surface(surf);
 
-   return gsurf->native->flush_frontbuffer(gsurf->native);
+   return gsurf->native->present(gsurf->native,
+         NATIVE_ATTACHMENT_FRONT_LEFT, FALSE, 0);
 }
 
 static boolean 




More information about the mesa-commit mailing list