diff options
| author | Bryce Harrington <b.harrington@samsung.com> | 2014-03-27 18:03:33 -0700 |
|---|---|---|
| committer | Bryce Harrington <b.harrington@samsung.com> | 2014-03-27 18:34:04 -0700 |
| commit | 74bf3e1983ab557d236ee548494694692b1b1810 (patch) | |
| tree | 334d21357f0a22becbd8702e0ee7d43e17880833 /src/cairo-glx.cpp | |
| parent | dce2ef51f242460df7e8526cb0625f8f16983a24 (diff) | |
Add device_config_t
This structure will be used for communicating various configuration
settings to the image, egl, and glx setup routines. For now just use it
for passing width/height and the surface type.
Diffstat (limited to 'src/cairo-glx.cpp')
| -rw-r--r-- | src/cairo-glx.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/cairo-glx.cpp b/src/cairo-glx.cpp index ac4c7dd..4d21758 100644 --- a/src/cairo-glx.cpp +++ b/src/cairo-glx.cpp @@ -4,11 +4,12 @@ #include <cairo-gl.h> #include "glx.h" +#include "device_config.h" static glx_state_t *state; cairo_surface_t * -create_cairo_surface_glx (int width, int height) +create_cairo_surface_glx (const device_config_t& config) { cairo_device_t *cairo_device; cairo_surface_t *cairo_surface; @@ -19,7 +20,7 @@ create_cairo_surface_glx (int width, int height) return NULL; } - if (!createGLXContextAndWindow(state, width, height)) { + if (!createGLXContextAndWindow(state, config.width, config.height)) { warnx ("Could not create GLX context and window\n"); cleanup_state_glx(state); return NULL; @@ -29,8 +30,8 @@ create_cairo_surface_glx (int width, int height) cairo_gl_device_set_thread_aware (cairo_device, 0); cairo_surface = cairo_gl_surface_create_for_window (cairo_device, state->window, - width, - height); + config.width, + config.height); cairo_device_destroy (cairo_device); return cairo_surface; |