diff options
author | David Robillard <d@drobilla.net> | 2019-07-27 00:22:53 +0200 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2019-07-28 19:06:39 +0200 |
commit | e340a6025a130b6be189f8e4cfde6f934894940e (patch) | |
tree | e9f7827132e7fa08ea27bdf815196e60a7865d49 /pugl/pugl_x11_cairo.c | |
parent | 95bd290f52f4de376a4247af76ba18587f65cdfa (diff) | |
download | pugl-e340a6025a130b6be189f8e4cfde6f934894940e.tar.gz pugl-e340a6025a130b6be189f8e4cfde6f934894940e.tar.bz2 pugl-e340a6025a130b6be189f8e4cfde6f934894940e.zip |
Cleanup: Remove redundant context type checks
Diffstat (limited to 'pugl/pugl_x11_cairo.c')
-rw-r--r-- | pugl/pugl_x11_cairo.c | 10 |
1 files changed, 3 insertions, 7 deletions
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; } |