On Mit, 2014-04-09 at 02:15 +0200, Marek Olšák wrote: > From: Marek Olšák <marek.ol...@amd.com> > > Create the screen in the winsys while the mutex is locked. > This also results in a nice code cleanup! [...] > diff --git a/src/gallium/targets/egl-static/egl_pipe.c > b/src/gallium/targets/egl-static/egl_pipe.c > index eb1cff9..ce734fb 100644 > --- a/src/gallium/targets/egl-static/egl_pipe.c > +++ b/src/gallium/targets/egl-static/egl_pipe.c > @@ -119,19 +119,9 @@ pipe_r300_create_screen(int fd) > { > #if _EGL_PIPE_R300 > struct radeon_winsys *sws; > - struct pipe_screen *screen; > - > - sws = radeon_drm_winsys_create(fd); > - if (!sws) > - return NULL; > - > - screen = r300_screen_create(sws); > - if (!screen) > - return NULL; > > - screen = debug_screen_wrap(screen); > - > - return screen; > + sws = radeon_drm_winsys_create(fd, r300_screen_create); > + return sws ? debug_screen_wrap(sws->screen) : NULL;
I think it would be clearer to keep this as: sws = radeon_drm_winsys_create(fd, r300_screen_create); if (!sws) return NULL; return debug_screen_wrap(sws->screen); Either way though, the series is Reviewed-by: Michel Dänzer <michel.daen...@amd.com> -- Earthling Michel Dänzer | http://www.amd.com Libre software enthusiast | Mesa and X developer _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev