+_RestoreContext(void)
+{
+ if (__pPreviousSglInfo != null)
+ {
+ EGLDisplay display = __pPreviousSglInfo->display;
+ EGLSurface surface = __pPreviousSglInfo->surface;
+ EGLContext context = __pPreviousSglInfo->context;
+
+ if (__isDoublePixmapEnabled)
+ {
+ _SglInfo* pBackSglInfo = null;
+ _SglInfo* pFrontSglInfo = null;
+
+ if (__pPreviousSglInfo->isBackbuffer)
+ {
+ pBackSglInfo = __pPreviousSglInfo;
+ pFrontSglInfo = __pPreviousSglInfo->pSecondSglInfo;
+ }
+ else
+ {
+ pBackSglInfo = __pPreviousSglInfo->pSecondSglInfo;
+ pFrontSglInfo = __pPreviousSglInfo;
+ }
+
+ surface = pBackSglInfo->surface;
+ }
+
+ EGLBoolean ret = eglMakeCurrent(display, surface, surface, context);
+ SysTryLog(NID_GRP, ret == EGL_TRUE, "fail to restore previous surface and context. %#x %#x %#x %#x egl error:%#x"
+ , (unsigned int)display
+ , (unsigned int)surface
+ , (unsigned int)surface
+ , (unsigned int)context
+ , (unsigned int)eglGetError());
+ }
+}
+
+void