[Title] Do not call eglMakeCurrent multiple times.
[Issue#] N/A
[Problem] WebGL performance is very poor on emulator.
[Cause] eglMakeCurrent function was called every time for gl commands.
[Solution] Do not call eglMakeCurrent multiple times.
Change-Id: I5bf02a78ea672d76d2dce5ce5584a003aea3d6f2
#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