}
EGLDisplay eglDisplay = eglGetCurrentDisplay();
- _SglIndex readSurface = (_SglIndex)_SglGetCurrentSurface(EGL_READ);
- _SglIndex drawSurface = (_SglIndex)_SglGetCurrentSurface(EGL_DRAW);
+ EGLSurface readSurface = eglGetCurrentSurface(EGL_READ);
+ EGLSurface drawSurface = eglGetCurrentSurface(EGL_DRAW);
EGLSurface eglContext = eglGetCurrentContext();
eglMakeCurrent(pSglInfo->display, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT);
EGLBoolean ret = eglDestroySurface(pSglInfo->display, pSglInfo->surface);
+ pSglInfo->surface = null;
SysTryReturnVoidResult(NID_GRP, ret == EGL_TRUE, E_OPERATION_FAILED, "eglDestroySurface failed.");
FloatRectangle rect = pSglInfo->pVisualElement->GetBounds();
int height = int(rect.height);
SysTryReturnVoidResult(NID_GRP, width > 0 && height > 0, E_OUT_OF_RANGE, "Invalid size. w:%d h:%d", width, height);
- delete pSglInfo->pVisualElementSurface;
- pSglInfo->pVisualElementSurface = null;
-
Evas* pEvas = evas_object_evas_get(pSglInfo->pObject);
Evas_Object* pObject = evas_object_image_filled_add(pEvas);
SysTryReturnVoidResult(NID_GRP, pObject != null, E_INVALID_STATE, "Invalid object.");
+ delete pSglInfo->pVisualElementSurface;
+ pSglInfo->pVisualElementSurface = null;
+ pSglInfo->pObject = null;
+
int widthPhysical = static_cast<int> (CoordinateSystem::ConvertToPhysicalX(rect.width));
int heightPhysical = static_cast<int> (CoordinateSystem::ConvertToPhysicalY(rect.height));
eglMakeCurrent(pSglInfo->display, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT);
ret = eglDestroySurface(pSglInfoSecond->display, pSglInfoSecond->surface);
+ pSglInfoSecond->surface = null;
SysTryReturnVoidResult(NID_GRP, ret == EGL_TRUE, E_OPERATION_FAILED, "eglDestroySurface failed.");
delete pSglInfoSecond->pVisualElementSurface;
pSglInfoSecond->pVisualElementSurface = null;
+ pSglInfoSecond->pObject = null;
pObject = evas_object_image_filled_add(pEvas);
SysTryReturnVoidResult(NID_GRP, pObject != null, E_INVALID_STATE, "Invalid object.");
pSglInfo->pBitmap = bitmap.release();
_EvasObjectImageChange(pSglInfo);
- _SglMakeCurrent(eglDisplay, (EGLSurface)drawSurface, (EGLSurface)readSurface, eglContext);
+ eglMakeCurrent(eglDisplay, drawSurface, readSurface, eglContext);
return;
}