From f0c44e01287e153c1cccbb0e12d53cc3b1c0ebce Mon Sep 17 00:00:00 2001 From: Bryce Harrington Date: Thu, 20 Mar 2014 23:41:00 -0700 Subject: Fix failure to run in EGL mode In addition to breaking out the cairo and skia claims on the egl context separately, we also need to call eglMakeCurrent and eglSwapBuffers so that it will actually draw to the screen. --- src/cairo-egl.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/cairo-egl.cpp') diff --git a/src/cairo-egl.cpp b/src/cairo-egl.cpp index 5a81308..253bc7c 100644 --- a/src/cairo-egl.cpp +++ b/src/cairo-egl.cpp @@ -32,6 +32,8 @@ create_cairo_surface_egl (int width, int height) return NULL; } + eglMakeCurrent(state->egl_display, state->egl_surface, state->egl_surface, state->egl_context); + cairo_device = cairo_egl_device_create (state->egl_display, state->egl_context); cairo_gl_device_set_thread_aware (cairo_device, 0); cairo_surface = cairo_gl_surface_create_for_egl (cairo_device, @@ -40,6 +42,9 @@ create_cairo_surface_egl (int width, int height) cairo_device_destroy (cairo_device); + glClearColor(1, 1, 1, 1); + glClear(GL_COLOR_BUFFER_BIT); + return cairo_surface; } @@ -52,4 +57,5 @@ destroy_cairo_egl(void) void update_cairo_egl(void) { + eglSwapBuffers(state->egl_display, state->egl_surface); } -- cgit v1.3.1-4-g156e