From e340a6025a130b6be189f8e4cfde6f934894940e Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sat, 27 Jul 2019 00:22:53 +0200 Subject: Cleanup: Remove redundant context type checks --- pugl/pugl_x11_cairo.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'pugl/pugl_x11_cairo.c') diff --git a/pugl/pugl_x11_cairo.c b/pugl/pugl_x11_cairo.c index 53304d8..be6fe36 100644 --- a/pugl/pugl_x11_cairo.c +++ b/pugl/pugl_x11_cairo.c @@ -52,10 +52,8 @@ puglX11CairoCreate(PuglView* view) impl->surface = surface; - if (view->ctx_type == PUGL_CAIRO) { - surface->surface = cairo_xlib_surface_create( - impl->display, impl->win, impl->vi->visual, view->width, view->height); - } + surface->surface = cairo_xlib_surface_create( + impl->display, impl->win, impl->vi->visual, view->width, view->height); if (!surface->surface) { return 1; @@ -106,9 +104,7 @@ puglX11CairoResize(PuglView* view, int width, int height) PuglInternals* const impl = view->impl; PuglX11CairoSurface* const surface = (PuglX11CairoSurface*)impl->surface; - if (view->ctx_type == PUGL_CAIRO) { - cairo_xlib_surface_set_size(surface->surface, width, height); - } + cairo_xlib_surface_set_size(surface->surface, width, height); return 0; } -- cgit v1.2.1