diff options
| author | Bryce Harrington <b.harrington@samsung.com> | 2014-03-20 23:41:00 -0700 |
|---|---|---|
| committer | Bryce Harrington <b.harrington@samsung.com> | 2014-03-20 23:41:00 -0700 |
| commit | f0c44e01287e153c1cccbb0e12d53cc3b1c0ebce (patch) | |
| tree | 1400f157e0644b4067fbe0f766ffff77e9faead8 /src/cairo-egl.cpp | |
| parent | b56dc8ecba6265c2efd4eff28bfc4d269fd1d906 (diff) | |
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.
Diffstat (limited to 'src/cairo-egl.cpp')
| -rw-r--r-- | src/cairo-egl.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
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); } |