* 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 supportedSurfaces,visualType,visualId;
|
||||
int caveat,transparentType,samples;
|
||||
int tRed,tGreen,tBlue;
|
||||
int tRed=0,tGreen=0,tBlue=0;
|
||||
int pMaxWidth,pMaxHeight,pMaxPixels;
|
||||
int tmp;
|
||||
int configId,level,renderable;
|
||||
|
||||
@@ -22,7 +22,7 @@ class EglDisplay;
|
||||
class GLEScontext;
|
||||
|
||||
struct ThreadInfo {
|
||||
ThreadInfo():glesContext(NULL),objManager(NULL){}
|
||||
ThreadInfo():eglDisplay(NULL),glesContext(NULL),objManager(NULL){}
|
||||
|
||||
void updateInfo(ContextPtr eglctx,
|
||||
EglDisplay* dpy,
|
||||
|
||||
@@ -36,6 +36,7 @@ FramebufferData::FramebufferData(GLuint name):m_dirty(false) {
|
||||
m_attachPoints[i].target = 0;
|
||||
m_attachPoints[i].name = 0;
|
||||
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);
|
||||
tmpWidth/=2;
|
||||
tmpHeight/=2;
|
||||
delete uncompressed;
|
||||
delete[] uncompressed;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -183,7 +183,7 @@ InitConfigStatus FBConfig::initConfigList(FrameBuffer *fb)
|
||||
}
|
||||
s_numConfigs = j;
|
||||
|
||||
delete configs;
|
||||
delete[] configs;
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -303,6 +303,7 @@ FBConfig::FBConfig(EGLDisplay p_eglDpy, EGLConfig p_eglCfg)
|
||||
m_eglConfig = p_eglCfg;
|
||||
m_attribValues = new GLint[s_numConfigAttribs];
|
||||
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]);
|
||||
|
||||
//
|
||||
|
||||
@@ -36,7 +36,7 @@ ReadBuffer::~ReadBuffer()
|
||||
int ReadBuffer::getData()
|
||||
{
|
||||
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;
|
||||
size_t len = m_size - m_validData;
|
||||
|
||||
Reference in New Issue
Block a user