When using cairo-gl non-triangle subsurface rendering code implicitly calls eglMakeCurrent(dpy, NULL, NULL, ctx) (since EGL_KHR_surfaceless_context is used), thus, triangle_frame_callback:eglSwapBuffers returns EGL_BAD_SURFACE error for all invocations other that the first one. Workaround: Add eglMakeCurrent(tri->egl->dpy, tri->egl_surface, tri->egl_surface, tri->egl->ctx) before glViewport(0, 0, tri->width, tri->height) in triangle_frame_callback
Hi Pekka/Tomeu - could you look into this please?
Stanislav, are you actually using cairo-gl and not cairo-glesv2? Anyway, the description and the proposed solution sound good. I suspect this has gone unnoticed before, because people rarely build Cairo with GLESv2, and that's only case where this can happen. Cairo with GL will explode anyway (and the build system refuses to build subsurfaces demo), and Cairo-image does not touch EGL. Rob, thanks for the heads-up. We are pretty busy here, and personally I'm way behind in all email on the lists. If anyone submits that patch, you have my ack. I won't have time to touch it this week.
Pekka, I'm using cairo-glesv2. >If anyone submits that patch, you have my ack. I won't have time to touch it >this week. I guess I'll be able to submit this patch tomorrow
commit 6346e501ac4146b3fdff8d36ef575e5fbbd96e34 Author: Stanislav Vorobiov <s.vorobiov@samsung.com> Date: Wed Aug 28 10:14:35 2013 +0400 subsurfaces: fix rendering problem with cairo-glesv2 when using cairo-glesv2 subsurface rendering code implicitly calls eglMakeCurrent(dpy, NULL, NULL, ctx) (since EGL_KHR_surfaceless_context is used), thus, triangle_frame_callback:eglSwapBuffers returns EGL_BAD_SURFACE error for all invocations other that the first one
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.