diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2009-07-22 19:04:07 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2009-07-23 15:32:12 +0100 |
commit | 92ba74d760f20cd257b3916a51c8efef1c0e021e (patch) | |
tree | 78eb92f81d99b6563738d934d2a7a5c5e8dfd7b9 | |
parent | bfbe875ded0b0666a8048ef5fb598179a81c610a (diff) |
[vg] Compile fixes for EGL boilerplate
-rw-r--r-- | boilerplate/cairo-boilerplate-vg.c | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/boilerplate/cairo-boilerplate-vg.c b/boilerplate/cairo-boilerplate-vg.c index 224a2d53..75756ddb 100644 --- a/boilerplate/cairo-boilerplate-vg.c +++ b/boilerplate/cairo-boilerplate-vg.c @@ -195,7 +195,7 @@ _cairo_boilerplate_vg_cleanup_egl (void *closure) eglDestroyContext (vgc->dpy, vgc->ctx); eglDestroySurface (vgc->dpy, vgc->dummy); - eglDestroyDisplay (vgc->dpy); + eglTerminate (vgc->dpy); free (vgc); } @@ -216,7 +216,7 @@ _cairo_boilerplate_vg_create_surface_egl (const char *name, EGL_BLUE_SIZE, 8, EGL_ALPHA_SIZE, 8, EGL_SURFACE_TYPE, EGL_PBUFFER_BIT, - ELG_RENDERABLE_TYPE, EGL_OPENVG_BIT, + EGL_RENDERABLE_TYPE, EGL_OPENVG_BIT, None }; int rgb_attribs[] = { @@ -224,9 +224,9 @@ _cairo_boilerplate_vg_create_surface_egl (const char *name, EGL_GREEN_SIZE, 8, EGL_BLUE_SIZE, 8, EGL_ALPHA_SIZE, 8, - EGL_VG_ALPHA_FORMAT, VG_ALPHA_FORMAT_PRE, + EGL_VG_ALPHA_FORMAT, EGL_VG_ALPHA_FORMAT_PRE_BIT, EGL_SURFACE_TYPE, EGL_PBUFFER_BIT, - ELG_RENDERABLE_TYPE, EGL_OPENVG_BIT, + EGL_RENDERABLE_TYPE, EGL_OPENVG_BIT, None }; int dummy_attribs[] = { @@ -235,11 +235,12 @@ _cairo_boilerplate_vg_create_surface_egl (const char *name, }; EGLDisplay *dpy; int major, minor; - EGLConfig *config; + EGLConfig config; int num_configs; EGLContext *egl_context; + EGLSurface *dummy; cairo_vg_context_t *context; - cairo_vg_surface_t *surface; + cairo_surface_t *surface; vg_closure_egl_t *vgc; dpy = eglGetDisplay (EGL_DEFAULT_DISPLAY); @@ -250,10 +251,9 @@ _cairo_boilerplate_vg_create_surface_egl (const char *name, eglBindAPI (EGL_OPENVG_API); if (! eglChooseConfig (dpy, - attribs, content == CAIRO_CONTENT_COLOR_ALPHA ? rgba_attribs : rgb_attribs, - 1, &num_configs) || + &config, 1, &num_configs) || num_configs != 1) { return NULL; @@ -284,10 +284,9 @@ _cairo_boilerplate_vg_create_surface_egl (const char *name, *closure = vgc; context = cairo_vg_context_create_for_egl (vgc->dpy, vgc->ctx); - vgc->surface = cairo_vg_surface_create (context, content, width, height); + surface = cairo_vg_surface_create (context, content, width, height); cairo_vg_context_destroy (context); - surface = vgc->surface; if (cairo_surface_status (surface)) _cairo_boilerplate_vg_cleanup_egl (vgc); |