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-egl.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-egl.cpp')
| -rw-r--r-- | src/cairo-egl.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/cairo-egl.cpp b/src/cairo-egl.cpp index c422225..68dadcc 100644 --- a/src/cairo-egl.cpp +++ b/src/cairo-egl.cpp @@ -12,11 +12,12 @@ #endif #include "egl.h" +#include "device_config.h" static egl_state_t *state; cairo_surface_t * -create_cairo_surface_egl (int width, int height) +create_cairo_surface_egl (const device_config_t& config) { cairo_device_t *cairo_device; cairo_surface_t *cairo_surface; @@ -27,7 +28,7 @@ create_cairo_surface_egl (int width, int height) return NULL; } - if (!createEGLContextAndWindow(state, width, height)) { + if (!createEGLContextAndWindow(state, config.width, config.height)) { cleanup_state_egl(state); return NULL; } @@ -42,7 +43,7 @@ create_cairo_surface_egl (int width, int height) cairo_gl_device_set_thread_aware (cairo_device, 0); cairo_surface = cairo_gl_surface_create_for_egl (cairo_device, state->egl_surface, - width, height); + config.width, config.height); cairo_device_destroy (cairo_device); |