Merge "Do not call eglMakeCurrent multiple times." into 2.0_beta
authorGyongJin Joung <gj421.joung@tizendev.org>
Thu, 6 Sep 2012 05:39:44 +0000 (14:39 +0900)
committerGerrit Code Review <gerrit2@localhost>
Thu, 6 Sep 2012 05:39:44 +0000 (14:39 +0900)
Source/WebCore/platform/graphics/efl/GraphicsContext3DOffscreen.cpp

index 9c20962..3e0a631 100755 (executable)
@@ -288,8 +288,10 @@ bool GraphicsContext3DOffscreen::createSurface(Evas_Object* view)
 #if ENABLE(TIZEN_WEBKIT2)
 bool GraphicsContext3DOffscreen::makeContextCurrent() {
 
-    return eglMakeCurrent(m_display, m_surface, m_surface, m_context);
+    if (eglGetCurrentSurface(EGL_READ) == m_surface && eglGetCurrentContext() == m_context)
+        return true;
 
+    return eglMakeCurrent(m_display, m_surface, m_surface, m_context);
 }
 #endif