aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2019-07-27 00:22:53 +0200
committerDavid Robillard <d@drobilla.net>2019-07-28 19:06:39 +0200
commite340a6025a130b6be189f8e4cfde6f934894940e (patch)
treee9f7827132e7fa08ea27bdf815196e60a7865d49
parent95bd290f52f4de376a4247af76ba18587f65cdfa (diff)
downloadpugl-e340a6025a130b6be189f8e4cfde6f934894940e.tar.gz
pugl-e340a6025a130b6be189f8e4cfde6f934894940e.tar.bz2
pugl-e340a6025a130b6be189f8e4cfde6f934894940e.zip
Cleanup: Remove redundant context type checks
-rw-r--r--pugl/pugl_x11_cairo.c10
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;
}