egl: Improve driver selection.
[mesa.git] / src / gallium / state_trackers / egl / gdi / native_gdi.c
index e010c1c4e69c7cea8b00e0d8d43ce8345432f84d..3cc4aefa937af1b04df90e796bff847fb6d255f1 100644 (file)
@@ -257,9 +257,7 @@ gdi_display_create_window_surface(struct native_display *ndpy,
    gdi_surface_update_geometry(&gsurf->base);
 
    gsurf->base.destroy = gdi_surface_destroy;
-   gsurf->base.swap_buffers = gdi_surface_swap_buffers;
-   gsurf->base.flush_frontbuffer = gdi_surface_flush_frontbuffer;
-   xsurf->base.present = gdi_surface_present;
+   gsurf->base.present = gdi_surface_present;
    gsurf->base.validate = gdi_surface_validate;
    gsurf->base.wait = gdi_surface_wait;
 
@@ -321,7 +319,6 @@ gdi_display_get_configs(struct native_display *ndpy, int *num_configs)
          nconf->color_format = formats[i];
 
          nconf->window_bit = TRUE;
-         nconf->slow_config = TRUE;
       }
 
       gdpy->num_configs = count;
@@ -409,15 +406,23 @@ gdi_create_display(HDC hDC, struct native_event_handler *event_handler,
    return &gdpy->base;
 }
 
+static struct native_event_handler *gdi_event_handler;
+
+static void
+native_set_event_handler(struct native_event_handler *event_handler)
+{
+   gdi_event_handler = event_handler;
+}
+
 static struct native_display *
-native_create_display(void *dpy, struct native_event_handler *event_handler,
-                      void *user_data)
+native_create_display(void *dpy, boolean use_sw, void *user_data)
 {
-   return gdi_create_display((HDC) dpy, event_handler, user_data);
+   return gdi_create_display((HDC) dpy, gdi_event_handler, user_data);
 }
 
 static const struct native_platform gdi_platform = {
    "GDI", /* name */
+   native_set_event_handler,
    native_create_display
 };