[Title] fixed Check makeCurrent error for cairo gles
[Issue#] N/A
[Problem] Check MakeCurrent error happens in DDK when destroying ImageBuffer
[Cause] Because we don't call makeCurrent for gl surface, some gl calls could remain although the context already gone
[Solution] fixed to call glFlush to make sure all gl calls have been committed before destroying pixmaps
Change-Id: I7a3e7edb661985b55cc41e26767613493d2d7cb5
#if ENABLE(TIZEN_CANVAS_CAIRO_GLES_RENDERING) || ENABLE(TIZEN_CANVAS_SURFACE_LOCKING)
if (m_platformSurfaceID > 0) {
#if ENABLE(TIZEN_CANVAS_CAIRO_GLES_RENDERING)
+ if (!m_isLockable)
+ glFlush();
if (m_eglImage) {
if (!eglDestroyImageKHR)
eglDestroyImageKHR = reinterpret_cast<PFNEGLDESTROYIMAGEKHRPROC>(eglGetProcAddress("eglDestroyImageKHR"));