* commit 'ef1e9fa0205b4d6499cf8a414f2d407f6ba77388': opengles emulator: GLES fix memory leaks
This commit is contained in:
@@ -87,7 +87,7 @@ EglConfig* pixelFormatToConfig(EGLNativeDisplayType dpy,int renderableType,EGLNa
|
|||||||
int bSize,red,green,blue,alpha,depth,stencil;
|
int bSize,red,green,blue,alpha,depth,stencil;
|
||||||
int supportedSurfaces,visualType,visualId;
|
int supportedSurfaces,visualType,visualId;
|
||||||
int caveat,transparentType,samples;
|
int caveat,transparentType,samples;
|
||||||
int tRed,tGreen,tBlue;
|
int tRed=0,tGreen=0,tBlue=0;
|
||||||
int pMaxWidth,pMaxHeight,pMaxPixels;
|
int pMaxWidth,pMaxHeight,pMaxPixels;
|
||||||
int tmp;
|
int tmp;
|
||||||
int configId,level,renderable;
|
int configId,level,renderable;
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ class EglDisplay;
|
|||||||
class GLEScontext;
|
class GLEScontext;
|
||||||
|
|
||||||
struct ThreadInfo {
|
struct ThreadInfo {
|
||||||
ThreadInfo():glesContext(NULL),objManager(NULL){}
|
ThreadInfo():eglDisplay(NULL),glesContext(NULL),objManager(NULL){}
|
||||||
|
|
||||||
void updateInfo(ContextPtr eglctx,
|
void updateInfo(ContextPtr eglctx,
|
||||||
EglDisplay* dpy,
|
EglDisplay* dpy,
|
||||||
|
|||||||
@@ -36,6 +36,7 @@ FramebufferData::FramebufferData(GLuint name):m_dirty(false) {
|
|||||||
m_attachPoints[i].target = 0;
|
m_attachPoints[i].target = 0;
|
||||||
m_attachPoints[i].name = 0;
|
m_attachPoints[i].name = 0;
|
||||||
m_attachPoints[i].obj = ObjectDataPtr(NULL);
|
m_attachPoints[i].obj = ObjectDataPtr(NULL);
|
||||||
|
m_attachPoints[i].owned = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -97,7 +97,7 @@ void doCompressedTexImage2D(GLEScontext * ctx, GLenum target, GLint level,
|
|||||||
glTexImage2DPtr(target,i,uncompressedFrmt,tmpWidth,tmpHeight,border,uncompressedFrmt,GL_UNSIGNED_BYTE,uncompressed);
|
glTexImage2DPtr(target,i,uncompressedFrmt,tmpWidth,tmpHeight,border,uncompressedFrmt,GL_UNSIGNED_BYTE,uncompressed);
|
||||||
tmpWidth/=2;
|
tmpWidth/=2;
|
||||||
tmpHeight/=2;
|
tmpHeight/=2;
|
||||||
delete uncompressed;
|
delete[] uncompressed;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -183,7 +183,7 @@ InitConfigStatus FBConfig::initConfigList(FrameBuffer *fb)
|
|||||||
}
|
}
|
||||||
s_numConfigs = j;
|
s_numConfigs = j;
|
||||||
|
|
||||||
delete configs;
|
delete[] configs;
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -303,6 +303,7 @@ FBConfig::FBConfig(EGLDisplay p_eglDpy, EGLConfig p_eglCfg)
|
|||||||
m_eglConfig = p_eglCfg;
|
m_eglConfig = p_eglCfg;
|
||||||
m_attribValues = new GLint[s_numConfigAttribs];
|
m_attribValues = new GLint[s_numConfigAttribs];
|
||||||
for (int i=0; i<s_numConfigAttribs; i++) {
|
for (int i=0; i<s_numConfigAttribs; i++) {
|
||||||
|
m_attribValues[i] = 0;
|
||||||
s_egl.eglGetConfigAttrib(p_eglDpy, p_eglCfg, s_configAttribs[i], &m_attribValues[i]);
|
s_egl.eglGetConfigAttrib(p_eglDpy, p_eglCfg, s_configAttribs[i], &m_attribValues[i]);
|
||||||
|
|
||||||
//
|
//
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ ReadBuffer::~ReadBuffer()
|
|||||||
int ReadBuffer::getData()
|
int ReadBuffer::getData()
|
||||||
{
|
{
|
||||||
if ((m_validData > 0) && (m_readPtr > m_buf)) {
|
if ((m_validData > 0) && (m_readPtr > m_buf)) {
|
||||||
memcpy(m_buf, m_readPtr, m_validData);
|
memmove(m_buf, m_readPtr, m_validData);
|
||||||
}
|
}
|
||||||
// get fresh data into the buffer;
|
// get fresh data into the buffer;
|
||||||
size_t len = m_size - m_validData;
|
size_t len = m_size - m_validData;
|
||||||
|
|||||||
Reference in New Issue
Block a user