egl: Remove st/egl probe code.
[mesa.git] / src / gallium / state_trackers / egl / gdi / native_gdi.c
index 4ec229a3f2a2602629bb6c4066c38919b173112a..06e3edfc391c6a95647aa2f84dcd04478dc593f2 100644 (file)
@@ -343,10 +343,11 @@ gdi_display_destroy(struct native_display *ndpy)
 }
 
 static struct native_display *
-gdi_create_display(HDC hDC, struct pipe_screen *screen,
-                   struct native_event_handler *event_handler)
+gdi_create_display(HDC hDC, struct native_event_handler *event_handler,
+                   void *user_data)
 {
    struct gdi_display *gdpy;
+   struct sw_winsys *winsys;
 
    gdpy = CALLOC_STRUCT(gdi_display);
    if (!gdpy)
@@ -354,8 +355,21 @@ gdi_create_display(HDC hDC, struct pipe_screen *screen,
 
    gdpy->hDC = hDC;
    gdpy->event_handler = event_handler;
+   gdpy->base.user_data = user_data;
+
+   winsys = gdi_create_sw_winsys();
+   if (!winsys) {
+      FREE(gdpy);
+      return NULL;
+   }
 
-   gdpy->base.screen = screen;
+   gdpy->base.screen = gdpy->event_handler->create_sw_screen(winsys);
+   if (!gdpy->base.screen) {
+      if (winsys->destroy)
+         winsys->destroy(winsys);
+      FREE(gdpy);
+      return NULL;
+   }
 
    gdpy->base.destroy = gdi_display_destroy;
    gdpy->base.get_param = gdi_display_get_param;
@@ -367,29 +381,14 @@ gdi_create_display(HDC hDC, struct pipe_screen *screen,
 }
 
 static struct native_display *
-native_create_display(void *dpy, struct native_event_handler *event_handler)
+native_create_display(void *dpy, struct native_event_handler *event_handler,
+                      void *user_data)
 {
-   struct sw_winsys *winsys;
-   struct pipe_screen *screen;
-
-   winsys = gdi_create_sw_winsys();
-   if (!winsys)
-      return NULL;
-
-   screen = native_create_sw_screen(winsys);
-   if (!screen) {
-      if (winsys->destroy)
-         winsys->destroy(winsys);
-      return NULL;
-   }
-
-   return gdi_create_display((HDC) dpy, screen, event_handler);
+   return gdi_create_display((HDC) dpy, event_handler, user_data);
 }
 
 static const struct native_platform gdi_platform = {
    "GDI", /* name */
-   NULL, /* create_probe */
-   NULL, /* get_probe_result */
    native_create_display
 };