rollback makecurrent behavior
authorSukwon Suh <sukwon.suh@samsung.com>
Fri, 24 May 2013 10:45:42 +0000 (19:45 +0900)
committerSukwon Suh <sukwon.suh@samsung.com>
Fri, 24 May 2013 10:45:42 +0000 (19:45 +0900)
Change-Id: Ia7a3409e5462944a0cceea345172346e81db70b7
Signed-off-by: Sukwon Suh <sukwon.suh@samsung.com>
src/graphics/opengl/FGrpEgl.cpp

index 2e1ab3a..bcfc939 100644 (file)
@@ -127,8 +127,6 @@ void _SaveCurrentContext(_SglInfo* pSglInfo);
 void _UnregisterRenderCallback(Evas_Object* pObject);
 int __registerCallbackCount = 0;
 _SglInfo* __pPreviousSglInfo = null;
-EGLSurface __pPreviousSurface = EGL_NO_SURFACE;
-EGLSurface __pPreviousContext = EGL_NO_CONTEXT;
 #endif
 
 #if !defined (_OSP_EMUL_)
@@ -347,11 +345,6 @@ _OnBoundsChanged(void* pData)
        EGLSurface readSurface = _SglGetCurrentSurface(EGL_READ);
        EGLSurface eglContext = eglGetCurrentContext();
 
-       if (__pPreviousSurface == drawSurface)
-       {
-               __pPreviousSurface = EGL_NO_SURFACE;
-       }
-
        if (drawSurface != EGL_NO_SURFACE && readSurface != EGL_NO_SURFACE)
        {
                needSglMakeCurrent = true;
@@ -966,8 +959,6 @@ _SglTerminate(EGLDisplay dpy)
        __pPreviousSglInfo = null;
 #endif
 
-       __pPreviousSurface = EGL_NO_SURFACE;
-       __pPreviousContext = EGL_NO_CONTEXT;
 
        return EGL_TRUE;
 }
@@ -1669,11 +1660,6 @@ CATCH_01:
 EGLBoolean
 _SglDestroySurface(EGLDisplay dpy, EGLSurface surface)
 {
-       if (__pPreviousSurface == surface)
-       {
-               __pPreviousSurface = EGL_NO_SURFACE;
-       }
-
        EGLBoolean ret = EGL_FALSE;
        _SglInfoTableManipulator* pSglInfoTableManipulatorInstance = _SglInfoTableManipulator::GetInstance();
 
@@ -1875,24 +1861,12 @@ _SglCreateContext(EGLDisplay dpy, EGLConfig config, EGLContext shareContext, con
 EGLBoolean
 _SglDestroyContext(EGLDisplay dpy, EGLContext ctx)
 {
-       if (__pPreviousContext == ctx)
-       {
-               __pPreviousContext = EGL_NO_CONTEXT;
-       }
-
        return eglDestroyContext(dpy, ctx);
 }
 
 EGLBoolean
 _SglMakeCurrent(EGLDisplay dpy, EGLSurface draw, EGLSurface read, EGLContext ctx)
 {
-       if (__pPreviousSurface == draw && __pPreviousContext == ctx)
-       {
-               return EGL_TRUE;
-       }
-       __pPreviousSurface = draw;
-       __pPreviousContext = ctx;
-
        _SglInfoTableManipulator* pSglInfoTableManipulatorInstance = _SglInfoTableManipulator::GetInstance();
 
        _SglIndex sglIndexDraw = (_SglIndex)draw;