stw: Don't use the winsys.
authorJosé Fonseca <jfonseca@vmware.com>
Fri, 30 Jan 2009 21:51:59 +0000 (21:51 +0000)
committerJosé Fonseca <jfonseca@vmware.com>
Fri, 30 Jan 2009 21:51:59 +0000 (21:51 +0000)
src/gallium/winsys/gdi/gdi_softpipe_winsys.c
src/mesa/state_tracker/wgl/stw_device.c
src/mesa/state_tracker/wgl/stw_wgl_swapbuffers.c
src/mesa/state_tracker/wgl/stw_winsys.h

index 738bca3eac5ae3d270c0a6a8ddcd4e1107bd0540..1abe84b6a01a7c995bb71ea59e6e286e5176dca5 100644 (file)
@@ -177,9 +177,9 @@ gdi_softpipe_surface_buffer_create(struct pipe_winsys *winsys,
    nblocksy = pf_get_nblocksy(&block, height);
    *stride = round_up(nblocksx * block.size, alignment);
 
-   return winsys->_buffer_create(winsys, alignment,
-                                 usage,
-                                 *stride * nblocksy);
+   return winsys->buffer_create(winsys, alignment,
+                                usage,
+                                *stride * nblocksy);
 }
 
 
@@ -237,13 +237,13 @@ gdi_softpipe_screen_create(void)
 
    winsys->destroy = gdi_softpipe_destroy;
 
-   winsys->_buffer_create = gdi_softpipe_buffer_create;
-   winsys->_user_buffer_create = gdi_softpipe_user_buffer_create;
-   winsys->_buffer_map = gdi_softpipe_buffer_map;
-   winsys->_buffer_unmap = gdi_softpipe_buffer_unmap;
-   winsys->_buffer_destroy = gdi_softpipe_buffer_destroy;
+   winsys->buffer_create = gdi_softpipe_buffer_create;
+   winsys->user_buffer_create = gdi_softpipe_user_buffer_create;
+   winsys->buffer_map = gdi_softpipe_buffer_map;
+   winsys->buffer_unmap = gdi_softpipe_buffer_unmap;
+   winsys->buffer_destroy = gdi_softpipe_buffer_destroy;
 
-   winsys->_surface_buffer_create = gdi_softpipe_surface_buffer_create;
+   winsys->surface_buffer_create = gdi_softpipe_surface_buffer_create;
 
    winsys->fence_reference = gdi_softpipe_fence_reference;
    winsys->fence_signalled = gdi_softpipe_fence_signalled;
@@ -268,7 +268,7 @@ gdi_softpipe_context_create(struct pipe_screen *screen)
 
 
 static void
-gdi_softpipe_flush_frontbuffer(struct pipe_winsys *winsys,
+gdi_softpipe_flush_frontbuffer(struct pipe_screen *screen,
                                struct pipe_surface *surface,
                                HDC hDC)
 {
index 0073fdbc233ace5fc3333bac73700ccef9481e5b..546ab6c312f4739ee5ab4f825d677ee78cc3775e 100644 (file)
@@ -28,7 +28,6 @@
 #include <windows.h>
 
 #include "pipe/p_debug.h"
-#include "pipe/internal/p_winsys_screen.h"
 #include "pipe/p_screen.h"
 
 #include "stw_device.h"
@@ -44,15 +43,14 @@ struct stw_device *stw_dev = NULL;
  * stw_winsys::flush_front_buffer.
  */
 static void 
-st_flush_frontbuffer(struct pipe_winsys *ws,
+st_flush_frontbuffer(struct pipe_screen *screen,
                      struct pipe_surface *surf,
                      void *context_private )
 {
    const struct stw_winsys *stw_winsys = stw_dev->stw_winsys;
-   struct pipe_winsys *winsys = stw_dev->screen->winsys;
    HDC hdc = (HDC)context_private;
    
-   stw_winsys->flush_frontbuffer(winsys, surf, hdc);
+   stw_winsys->flush_frontbuffer(screen, surf, hdc);
 }
 
 
@@ -72,8 +70,7 @@ st_init(const struct stw_winsys *stw_winsys)
    if(!stw_dev->screen)
       goto error1;
 
-   /* XXX: pipe_winsys::flush_frontbuffer should go away */
-   stw_dev->screen->winsys->flush_frontbuffer = st_flush_frontbuffer;
+   stw_dev->screen->flush_frontbuffer = st_flush_frontbuffer;
    
    pixelformat_init();
 
index ddc482752b14c82bf38bd2b5cc7e96afd816a15b..41bfeadfb1ba111fddac906df657ec5e3ea21373 100644 (file)
@@ -27,7 +27,6 @@
 
 #include <windows.h>
 
-#include "pipe/internal/p_winsys_screen.h"
 #include "pipe/p_screen.h"
 #include "pipe/p_context.h"
 #include "state_tracker/st_context.h"
@@ -55,7 +54,7 @@ wglSwapBuffers(
 
    st_get_framebuffer_surface( fb->stfb, ST_SURFACE_BACK_LEFT, &surf );
 
-   stw_dev->stw_winsys->flush_frontbuffer(stw_dev->screen->winsys,
+   stw_dev->stw_winsys->flush_frontbuffer(stw_dev->screen,
                                           surf,
                                           hdc );
 
index 8557327ccddb0d21840bd06f5bf0ecab04793780..03fd8f6bd8617c82835bf2992d36f469025ed956 100644 (file)
@@ -46,7 +46,7 @@ struct stw_winsys
    (*create_context)( struct pipe_screen *screen );
 
    void
-   (*flush_frontbuffer)( struct pipe_winsys *winsys,
+   (*flush_frontbuffer)( struct pipe_screen *screen,
                          struct pipe_surface *surf,
                          HDC hDC );
 };