mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 05:18:08 +02:00
egl: simplify refcounting after screen creation
If the specific initialize was successfull, dri2_egl_display() will return a non NULL pointer. Thus we can drop the check and flatten the codeflow. Signed-off-by: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Tapani Pälli <tapani.palli@intel.com> Acked-by: Daniel Stone <daniels@collabora.com>
This commit is contained in:
parent
0ac78dc925
commit
2f76dff65f
1 changed files with 5 additions and 9 deletions
|
|
@ -905,17 +905,13 @@ dri2_initialize(_EGLDriver *drv, _EGLDisplay *disp)
|
|||
return EGL_FALSE;
|
||||
}
|
||||
|
||||
if (ret) {
|
||||
dri2_dpy = dri2_egl_display(disp);
|
||||
if (!ret)
|
||||
return EGL_FALSE;
|
||||
|
||||
if (!dri2_dpy) {
|
||||
return EGL_FALSE;
|
||||
}
|
||||
dri2_dpy = dri2_egl_display(disp);
|
||||
dri2_dpy->ref_count++;
|
||||
|
||||
dri2_dpy->ref_count++;
|
||||
}
|
||||
|
||||
return ret;
|
||||
return EGL_TRUE;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue