[PATCH weston 04/10] compositor-{drm, wayland, x11}: remove useless tests for ->supports
Jonny Lamb
jonny.lamb at collabora.co.uk
Tue Mar 24 05:12:03 PDT 2015
Reviewed-by: Pekka Paalanen <pekka.paalanen at collabora.co.uk>
---
src/compositor-drm.c | 3 +--
src/compositor-wayland.c | 3 +--
src/compositor-x11.c | 2 +-
3 files changed, 3 insertions(+), 5 deletions(-)
diff --git a/src/compositor-drm.c b/src/compositor-drm.c
index 158929f..9e42a8b 100644
--- a/src/compositor-drm.c
+++ b/src/compositor-drm.c
@@ -1396,8 +1396,7 @@ drm_compositor_create_gl_renderer(struct drm_compositor *ec)
{
EGLint format;
- if (!gl_renderer->supports ||
- gl_renderer->supports(&ec->base, "gbm") < 0) {
+ if (gl_renderer->supports(&ec->base, "gbm") < 0) {
return -1;
}
diff --git a/src/compositor-wayland.c b/src/compositor-wayland.c
index 9b851b7..ca747c4 100644
--- a/src/compositor-wayland.c
+++ b/src/compositor-wayland.c
@@ -1962,8 +1962,7 @@ wayland_compositor_create(struct wl_display *display, int use_pixman,
}
if (!c->use_pixman) {
- if (!gl_renderer->supports ||
- gl_renderer->supports(&c->base, "wayland") < 0) {
+ if (gl_renderer->supports(&c->base, "wayland") < 0) {
weston_log("No support for "
"EGL_{KHR,EXT,MESA}_platform_wayland; "
"falling back to pixman.\n");
diff --git a/src/compositor-x11.c b/src/compositor-x11.c
index 3ef446c..731b37c 100644
--- a/src/compositor-x11.c
+++ b/src/compositor-x11.c
@@ -1492,7 +1492,7 @@ init_gl_renderer(struct x11_compositor *c)
if (!gl_renderer)
return -1;
- if (!gl_renderer->supports || gl_renderer->supports(&c->base, "x11") < 0)
+ if (gl_renderer->supports(&c->base, "x11") < 0)
return -1;
ret = gl_renderer->create(&c->base, EGL_PLATFORM_X11_KHR, (void *) c->dpy,
--
2.1.4
More information about the wayland-devel
mailing list