if (windowPixmap == 0)
{
LOG_ERROR("X11EglImage", "didnt create pixmap!");
+ } else {
+ nativeSurface->pixmap = windowPixmap;
}
EGLImageKHR eglImage = 0;
void X11EglImage::destroyClientBuffer(Surface* surface)
{
EglXPlatformSurface* nativeSurface = (EglXPlatformSurface*)surface->platform;
+ // We have to clean up the gpu texture memory
if (nativeSurface && nativeSurface->eglImage)
{
m_pfEglDestroyImageKHR(m_eglDisplay, nativeSurface->eglImage);
nativeSurface->eglImage = 0;
nativeSurface->texture = 0;
}
+ // We have to clean up the XServer side pixmap too
+ if (nativeSurface && nativeSurface->pixmap )
+ {
+ XFreePixmap(m_x11display, nativeSurface->pixmap);
+ nativeSurface->pixmap = None;
+ }
}