[Mesa-dev] [PATCH 04/12] egl_dri2/haiku: whitespace cleanup

Alexander von Gluck IV kallisti5 at unixzen.com
Mon Dec 22 06:36:03 PST 2014


From: Emil Velikov <emil.l.velikov at gmail.com>

Signed-off-by: Emil Velikov <emil.l.velikov at gmail.com>
---
 src/egl/drivers/dri2/platform_haiku.cpp |  102 +++++++++++++++---------------
 1 files changed, 51 insertions(+), 51 deletions(-)

diff --git a/src/egl/drivers/dri2/platform_haiku.cpp b/src/egl/drivers/dri2/platform_haiku.cpp
index 77b88a9..dc5ed40 100644
--- a/src/egl/drivers/dri2/platform_haiku.cpp
+++ b/src/egl/drivers/dri2/platform_haiku.cpp
@@ -21,7 +21,7 @@
  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
  * DEALINGS IN THE SOFTWARE.
  */
- 
+
 #include <errno.h>
 #include <dlfcn.h>
 #include <stdio.h>
@@ -53,17 +53,19 @@ haiku_log(EGLint level, const char *msg)
    }
 }
 
-BWindow* 
+BWindow*
 haiku_create_window()
 {
-	BWindow* win=new BWindow(BRect(100,100,500,500),"EGL Test",B_TITLED_WINDOW,0);
-	return win;
+   BWindow* win = new BWindow(BRect(100, 100, 500, 500), "EGL Test",
+                              B_TITLED_WINDOW, 0);
+   return win;
 }
 
 static EGLBoolean
-dri2_haiku_add_configs_for_visuals(struct dri2_egl_display *dri2_dpy, _EGLDisplay *disp)
+dri2_haiku_add_configs_for_visuals(struct dri2_egl_display *dri2_dpy,
+                                   _EGLDisplay *disp)
 {
-	if (!_eglGetArraySize(disp->Configs)) {
+   if (!_eglGetArraySize(disp->Configs)) {
       _eglLog(_EGL_WARNING, "DRI2: failed to create any config");
       return EGL_FALSE;
    }
@@ -75,10 +77,10 @@ extern "C"
 EGLBoolean
 dri2_initialize_haiku(_EGLDriver *drv, _EGLDisplay *dpy)
 {
-	printf("INITIALIZING HAIKU");
-	struct dri2_egl_display_vtbl dri2_haiku_display_vtbl;
-	dri2_haiku_display_vtbl={};
-	dri2_haiku_display_vtbl.authenticate = NULL;
+   printf("INITIALIZING HAIKU");
+   struct dri2_egl_display_vtbl dri2_haiku_display_vtbl;
+   dri2_haiku_display_vtbl={};
+   dri2_haiku_display_vtbl.authenticate = NULL;
    dri2_haiku_display_vtbl.create_window_surface = NULL;
    dri2_haiku_display_vtbl.create_pixmap_surface = NULL;
    dri2_haiku_display_vtbl.create_pbuffer_surface = NULL;
@@ -92,53 +94,51 @@ dri2_initialize_haiku(_EGLDriver *drv, _EGLDisplay *dpy)
    dri2_haiku_display_vtbl.query_buffer_age = dri2_fallback_query_buffer_age,
    dri2_haiku_display_vtbl.create_wayland_buffer_from_image = dri2_fallback_create_wayland_buffer_from_image;
    dri2_haiku_display_vtbl.get_sync_values = dri2_fallback_get_sync_values;
-	
-	struct dri2_egl_display *dri2_dpy;
-	const char *err;
-	
-	_eglSetLogProc(haiku_log);
-	
-	//loader_set_logger(_eglLog);
-	
-	dri2_dpy =(struct dri2_egl_display*) calloc(1, sizeof(*dri2_dpy));
-	if (!dri2_dpy)
-		return _eglError(EGL_BAD_ALLOC, "eglInitialize");
-	dpy->DriverData=(void*) dri2_dpy;
-	if(dpy->PlatformDisplay == NULL)
-	{
-		/* OPEN DEVICE */
-		dri2_dpy->bwindow=(void*)haiku_create_window();
-		dri2_dpy->own_device=true;	
-	}else{
-		BWindow* win=(BWindow*)dpy->PlatformDisplay;
-		dri2_dpy->bwindow=win;
-	}
-	
-	dri2_dpy->driver_name = strdup("Haiku OpenGL");
-	if (!dri2_load_driver_swrast(dpy))
-		return EGL_FALSE;
-	
-	dri2_dpy->swrast_loader_extension.base.name = __DRI_SWRAST_LOADER;
+
+   struct dri2_egl_display *dri2_dpy;
+   const char *err;
+
+   _eglSetLogProc(haiku_log);
+
+   //loader_set_logger(_eglLog);
+
+   dri2_dpy =(struct dri2_egl_display*) calloc(1, sizeof(*dri2_dpy));
+   if (!dri2_dpy)
+      return _eglError(EGL_BAD_ALLOC, "eglInitialize");
+   dpy->DriverData=(void*) dri2_dpy;
+   if(dpy->PlatformDisplay == NULL)
+   {
+      /* OPEN DEVICE */
+      dri2_dpy->bwindow=(void*)haiku_create_window();
+      dri2_dpy->own_device=true;
+   }else{
+      BWindow* win=(BWindow*)dpy->PlatformDisplay;
+      dri2_dpy->bwindow=win;
+   }
+
+   dri2_dpy->driver_name = strdup("Haiku OpenGL");
+   if (!dri2_load_driver_swrast(dpy))
+      return EGL_FALSE;
+
+   dri2_dpy->swrast_loader_extension.base.name = __DRI_SWRAST_LOADER;
    dri2_dpy->swrast_loader_extension.base.version = __DRI_SWRAST_LOADER_VERSION;
    //dri2_dpy->swrast_loader_extension.getDrawableInfo = swrastGetDrawableInfo;
    //dri2_dpy->swrast_loader_extension.putImage = swrastPutImage;
    //dri2_dpy->swrast_loader_extension.getImage = swrastGetImage;
-   
-      dri2_dpy->extensions[0] = &dri2_dpy->swrast_loader_extension.base;
+
+   dri2_dpy->extensions[0] = &dri2_dpy->swrast_loader_extension.base;
    dri2_dpy->extensions[1] = NULL;
    dri2_dpy->extensions[2] = NULL;
-	
-	if (dri2_dpy->bwindow) {
+
+   if (dri2_dpy->bwindow) {
       if (!dri2_haiku_add_configs_for_visuals(dri2_dpy, dpy))
-      	return EGL_FALSE;
+         return EGL_FALSE;
     }
-	
-	
-	dpy->VersionMajor=1;
-	dpy->VersionMinor=4;
-	
-	dri2_dpy->vtbl = &dri2_haiku_display_vtbl;
-	
-	return EGL_TRUE;
-	
+
+   dpy->VersionMajor=1;
+   dpy->VersionMinor=4;
+
+   dri2_dpy->vtbl = &dri2_haiku_display_vtbl;
+
+   return EGL_TRUE;
 }
-- 
1.7.1



More information about the mesa-dev mailing list