[PATCH weston 4/4] clients & tests: use eglCreatePlatformWindowSurfaceEXT when supported
Bryce Harrington
bryce at osg.samsung.com
Thu Mar 19 12:32:23 PDT 2015
On Thu, Mar 19, 2015 at 03:07:14PM +0100, Jonny Lamb wrote:
> Reviewed-by: Derek Foreman <derekf at osg.samsung.com>
> ---
> clients/nested-client.c | 7 +++----
> clients/simple-egl.c | 7 ++++---
> clients/subsurfaces.c | 6 +++---
> clients/window.c | 8 ++++----
> shared/platform.h | 23 +++++++++++++++++++++++
> tests/buffer-count-test.c | 7 +++----
> 6 files changed, 40 insertions(+), 18 deletions(-)
>
snip
> +static inline EGLSurface
> +weston_platform_create_egl_window(EGLDisplay dpy, EGLConfig config,
> + void *native_window,
> + const EGLint *attrib_list)
> +{
> +#ifdef EGL_EXT_platform_base
> + if (!create_platform_window_surface_ext)
> + weston_platform_get_egl_proc_addresses();
> +
> + if (create_platform_window_surface_ext)
> + return create_platform_window_surface_ext(dpy, config,
> + native_window,
> + attrib_list);
> + else
You don't need this else.
With that gone, you can unindent the following return:
> +#endif
> + return eglCreateWindowSurface(dpy, config,
> + (EGLNativeWindowType) native_window,
> + attrib_list);
> +}
Reviewed-by: Bryce Harrington <bryce at osg.samsung.com>
More information about the wayland-devel
mailing list