EGLImageKHR eglImage = 0;
LOG_DEBUG("X11EglImage", "creating EGL Image from client buffer");
- if (nativeSurface->eglImage != NULL)
+ if (nativeSurface->eglImage)
{
m_pfEglDestroyImageKHR(m_eglDisplay, nativeSurface->eglImage);
glDeleteTextures(1,&nativeSurface->texture);
+ nativeSurface->eglImage = 0;
+ nativeSurface->texture = 0;
}
eglImage = m_pfEglCreateImageKHR(m_eglDisplay,
EGL_NO_CONTEXT,
else
{
nativeSurface->eglImage = eglImage;
- glGenTextures(1,&nativeSurface->texture);
+ glGenTextures(1,&nativeSurface->texture);
}
}
}
void X11EglImage::destroyClientBuffer(Surface* surface)
{
EglXPlatformSurface* nativeSurface = (EglXPlatformSurface*)surface->platform;
- if (nativeSurface && nativeSurface->eglImage )
+ if (nativeSurface && nativeSurface->eglImage)
{
- m_pfEglDestroyImageKHR(m_eglDisplay, nativeSurface->eglImage);
- glDeleteTextures(1,&nativeSurface->texture);
+ m_pfEglDestroyImageKHR(m_eglDisplay, nativeSurface->eglImage);
+ glDeleteTextures(1,&nativeSurface->texture);
+ nativeSurface->eglImage = 0;
+ nativeSurface->texture = 0;
}
}