Mesa (master): egl_haiku: drop haiku_egl_driver struct
Eric Engeström
eric_engestrom at kemper.freedesktop.org
Thu Oct 12 13:55:35 UTC 2017
Module: Mesa
Branch: master
Commit: 3ba5a467a56c296490e641548cbb140de0083d03
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=3ba5a467a56c296490e641548cbb140de0083d03
Author: Eric Engestrom <eric at engestrom.ch>
Date: Mon Sep 25 22:04:24 2017 +0100
egl_haiku: drop haiku_egl_driver struct
The struct only contained the one field we're interested in.
Signed-off-by: Eric Engestrom <eric at engestrom.ch>
Reviewed-by: Emil Velikov <emil.velikov at collabora.com>
---
src/egl/drivers/haiku/egl_haiku.cpp | 34 ++++++++++++++--------------------
1 file changed, 14 insertions(+), 20 deletions(-)
diff --git a/src/egl/drivers/haiku/egl_haiku.cpp b/src/egl/drivers/haiku/egl_haiku.cpp
index 29ef7e854c..237cebf056 100644
--- a/src/egl/drivers/haiku/egl_haiku.cpp
+++ b/src/egl/drivers/haiku/egl_haiku.cpp
@@ -54,11 +54,6 @@
_EGL_DRIVER_STANDARD_TYPECASTS(haiku_egl)
-struct haiku_egl_driver
-{
- _EGLDriver base;
-};
-
struct haiku_egl_config
{
_EGLConfig base;
@@ -318,29 +313,28 @@ _eglBuiltInDriver(void)
{
CALLED();
- struct haiku_egl_driver* driver;
- driver = (struct haiku_egl_driver*) calloc(1, sizeof(*driver));
+ _EGLDriver* driver = calloc(1, sizeof(*driver));
if (!driver) {
_eglError(EGL_BAD_ALLOC, "_eglBuiltInDriverHaiku");
return NULL;
}
- _eglInitDriverFallbacks(&driver->base);
- driver->base.API.Initialize = init_haiku;
- driver->base.API.Terminate = haiku_terminate;
- driver->base.API.CreateContext = haiku_create_context;
- driver->base.API.DestroyContext = haiku_destroy_context;
- driver->base.API.MakeCurrent = haiku_make_current;
- driver->base.API.CreateWindowSurface = haiku_create_window_surface;
- driver->base.API.CreatePixmapSurface = haiku_create_pixmap_surface;
- driver->base.API.CreatePbufferSurface = haiku_create_pbuffer_surface;
- driver->base.API.DestroySurface = haiku_destroy_surface;
+ _eglInitDriverFallbacks(driver);
+ driver->API.Initialize = init_haiku;
+ driver->API.Terminate = haiku_terminate;
+ driver->API.CreateContext = haiku_create_context;
+ driver->API.DestroyContext = haiku_destroy_context;
+ driver->API.MakeCurrent = haiku_make_current;
+ driver->API.CreateWindowSurface = haiku_create_window_surface;
+ driver->API.CreatePixmapSurface = haiku_create_pixmap_surface;
+ driver->API.CreatePbufferSurface = haiku_create_pbuffer_surface;
+ driver->API.DestroySurface = haiku_destroy_surface;
- driver->base.API.SwapBuffers = haiku_swap_buffers;
+ driver->API.SwapBuffers = haiku_swap_buffers;
- driver->base.Name = "Haiku";
+ driver->Name = "Haiku";
TRACE("API Calls defined\n");
- return &driver->base;
+ return driver;
}
More information about the mesa-commit
mailing list