fixed Check MakeCurrent error for cairo gles
authorKyungjin Kim <gen.kim@samsung.com>
Fri, 29 Mar 2013 10:25:23 +0000 (19:25 +0900)
committerKyungjin Kim <gen.kim@samsung.com>
Fri, 29 Mar 2013 10:40:43 +0000 (19:40 +0900)
[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

Source/WebCore/platform/graphics/cairo/ImageBufferCairo.cpp

index e0866a8..9f75ffd 100644 (file)
@@ -281,6 +281,8 @@ ImageBuffer::~ImageBuffer()
 #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"));