Bug 969632 - More const cleanup in gfx/gl. - r=bjacob

This commit is contained in:
Jeff Gilbert 2014-02-13 15:02:03 -08:00
Родитель 6c7fc28cfd
Коммит ee6f816ed1
5 изменённых файлов: 20 добавлений и 22 удалений

Просмотреть файл

@ -1162,7 +1162,7 @@ public:
AFTER_GL_CALL;
}
void fGetObjectPtrLabel(GLvoid* ptr, GLsizei bufSize, GLsizei* length, GLchar* label) {
void fGetObjectPtrLabel(const GLvoid* ptr, GLsizei bufSize, GLsizei* length, GLchar* label) {
BEFORE_GL_CALL;
ASSERT_SYMBOL_PRESENT(fGetObjectPtrLabel);
mSymbols.fGetObjectPtrLabel(ptr, bufSize, length, label);
@ -1193,7 +1193,7 @@ public:
AFTER_GL_CALL;
}
void fTexParameteriv(GLenum target, GLenum pname, GLint* params) {
void fTexParameteriv(GLenum target, GLenum pname, const GLint* params) {
BEFORE_GL_CALL;
mSymbols.fTexParameteriv(target, pname, params);
AFTER_GL_CALL;
@ -1227,13 +1227,13 @@ public:
AFTER_GL_CALL;
}
void fGetTexParameterfv(GLenum target, GLenum pname, const GLfloat *params) {
void fGetTexParameterfv(GLenum target, GLenum pname, GLfloat* params) {
BEFORE_GL_CALL;
mSymbols.fGetTexParameterfv(target, pname, params);
AFTER_GL_CALL;
}
void fGetTexParameteriv(GLenum target, GLenum pname, const GLint *params) {
void fGetTexParameteriv(GLenum target, GLenum pname, GLint* params) {
BEFORE_GL_CALL;
mSymbols.fGetTexParameteriv(target, pname, params);
AFTER_GL_CALL;
@ -1336,7 +1336,7 @@ public:
AFTER_GL_CALL;
}
void fObjectPtrLabel(GLvoid* ptr, GLsizei length, const GLchar* label) {
void fObjectPtrLabel(const GLvoid* ptr, GLsizei length, const GLchar* label) {
BEFORE_GL_CALL;
ASSERT_SYMBOL_PRESENT(fObjectPtrLabel);
mSymbols.fObjectPtrLabel(ptr, length, label);

Просмотреть файл

@ -142,12 +142,12 @@ GrGLvoid glCullFace_mozilla(GrGLenum mode)
GrGLvoid glDeleteBuffers_mozilla(GrGLsizei n, const GrGLuint* buffers)
{
return sGLContext.get()->fDeleteBuffers(n, const_cast<GrGLuint*>(buffers));
return sGLContext.get()->fDeleteBuffers(n, buffers);
}
GrGLvoid glDeleteFramebuffers_mozilla(GrGLsizei n, const GrGLuint* framebuffers)
{
return sGLContext.get()->fDeleteFramebuffers(n, const_cast<GrGLuint*>(framebuffers));
return sGLContext.get()->fDeleteFramebuffers(n, framebuffers);
}
GrGLvoid glDeleteProgram_mozilla(GrGLuint program)
@ -157,7 +157,7 @@ GrGLvoid glDeleteProgram_mozilla(GrGLuint program)
GrGLvoid glDeleteRenderbuffers_mozilla(GrGLsizei n, const GrGLuint* renderbuffers)
{
return sGLContext.get()->fDeleteRenderbuffers(n, const_cast<GrGLuint*>(renderbuffers));
return sGLContext.get()->fDeleteRenderbuffers(n, renderbuffers);
}
GrGLvoid glDeleteShader_mozilla(GrGLuint shader)
@ -167,7 +167,7 @@ GrGLvoid glDeleteShader_mozilla(GrGLuint shader)
GrGLvoid glDeleteTextures_mozilla(GrGLsizei n, const GrGLuint* textures)
{
return sGLContext.get()->fDeleteTextures(n, const_cast<GrGLuint*>(textures));
return sGLContext.get()->fDeleteTextures(n, textures);
}
GrGLvoid glDepthMask_mozilla(GrGLboolean flag)
@ -447,7 +447,7 @@ GrGLvoid glTexParameteri_mozilla(GrGLenum target, GrGLenum pname, GrGLint param)
GrGLvoid glTexParameteriv_mozilla(GrGLenum target, GrGLenum pname, const GrGLint* params)
{
return sGLContext.get()->fTexParameteriv(target, pname, const_cast<GrGLint*>(params));
return sGLContext.get()->fTexParameteriv(target, pname, params);
}
GrGLvoid glTexSubImage2D_mozilla(GrGLenum target, GrGLint level,
@ -619,7 +619,7 @@ GrGLvoid glGenQueries_mozilla(GrGLsizei n, GrGLuint* ids)
GrGLvoid glDeleteQueries_mozilla(GrGLsizei n, const GrGLuint* ids)
{
return sGLContext.get()->fDeleteQueries(n, const_cast<GrGLuint*>(ids));
return sGLContext.get()->fDeleteQueries(n, ids);
}
GrGLvoid glBeginQuery_mozilla(GrGLenum target, GrGLuint id)
@ -651,7 +651,7 @@ GrGLvoid glGetQueryObjectuiv_mozilla(GrGLuint id, GrGLenum pname, GrGLuint* para
GrGLvoid glDrawBuffers_mozilla(GrGLsizei n, const GrGLenum* bufs)
{
return sGLContext.get()->fDrawBuffers(n, const_cast<GrGLenum*>(bufs));
return sGLContext.get()->fDrawBuffers(n, bufs);
}
// GLContext supports glMapBuffer on everything (GL_OES_mapbuffer)

Просмотреть файл

@ -139,7 +139,7 @@ struct GLContextSymbols
PFNGLGETQUERYOBJECTUIVPROC fGetQueryObjectuiv;
typedef void (GLAPIENTRY * PFNGLTEXPARAMETERIPROC) (GLenum target, GLenum pname, GLint param);
PFNGLTEXPARAMETERIPROC fTexParameteri;
typedef void (GLAPIENTRY * PFNGLTEXPARAMETERIVPROC) (GLenum target, GLenum pname, GLint* param);
typedef void (GLAPIENTRY * PFNGLTEXPARAMETERIVPROC) (GLenum target, GLenum pname, const GLint* param);
PFNGLTEXPARAMETERIVPROC fTexParameteriv;
typedef void (GLAPIENTRY * PFNGLTEXPARAMETERFPROC) (GLenum target, GLenum pname, GLfloat param);
PFNGLTEXPARAMETERFPROC fTexParameterf;
@ -149,9 +149,9 @@ struct GLContextSymbols
PFNGLGETTEXIMAGEPROC fGetTexImage;
typedef void (GLAPIENTRY * PFNGLGETTEXLEVELPARAMETERIVPROC) (GLenum target, GLint level, GLenum pname, GLint *params);
PFNGLGETTEXLEVELPARAMETERIVPROC fGetTexLevelParameteriv;
typedef void (GLAPIENTRY * PFNGLGETTEXPARAMETERFVPROC) (GLenum target, GLenum pname, const GLfloat *params);
typedef void (GLAPIENTRY * PFNGLGETTEXPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params);
PFNGLGETTEXPARAMETERFVPROC fGetTexParameterfv;
typedef void (GLAPIENTRY * PFNGLGETTEXPARAMETERIVPROC) (GLenum target, GLenum pname, const GLint *params);
typedef void (GLAPIENTRY * PFNGLGETTEXPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params);
PFNGLGETTEXPARAMETERIVPROC fGetTexParameteriv;
typedef void (GLAPIENTRY * PFNGLGETUNIFORMFVPROC) (GLuint program, GLint location, GLfloat* params);
PFNGLGETUNIFORMFVPROC fGetUniformfv;
@ -464,9 +464,9 @@ struct GLContextSymbols
PFNGLOBJECTLABEL fObjectLabel;
typedef void (GLAPIENTRY * PFNGLGETOBJECTLABEL) (GLenum identifier, GLuint name, GLsizei bufSize, GLsizei* length, GLchar* label);
PFNGLGETOBJECTLABEL fGetObjectLabel;
typedef void (GLAPIENTRY * PFNGLOBJECTPTRLABEL) (GLvoid* ptr, GLsizei length, const GLchar* label);
typedef void (GLAPIENTRY * PFNGLOBJECTPTRLABEL) (const GLvoid* ptr, GLsizei length, const GLchar* label);
PFNGLOBJECTPTRLABEL fObjectPtrLabel;
typedef void (GLAPIENTRY * PFNGLGETOBJECTPTRLABEL) (GLvoid* ptr, GLsizei bufSize, GLsizei* length, GLchar* label);
typedef void (GLAPIENTRY * PFNGLGETOBJECTPTRLABEL) (const GLvoid* ptr, GLsizei bufSize, GLsizei* length, GLchar* label);
PFNGLGETOBJECTPTRLABEL fGetObjectPtrLabel;
};

Просмотреть файл

@ -294,8 +294,7 @@ SharedSurface_Basic::~SharedSurface_Basic()
if (!mGL->MakeCurrent())
return;
GLuint tex = mTex;
mGL->fDeleteTextures(1, &tex);
mGL->fDeleteTextures(1, &mTex);
}
void
@ -339,8 +338,7 @@ SharedSurface_GLTexture::~SharedSurface_GLTexture()
if (!mGL->MakeCurrent())
return;
GLuint tex = mTex;
mGL->fDeleteTextures(1, &tex);
mGL->fDeleteTextures(1, &mTex);
if (mSync) {
mGL->fDeleteSync(mSync);

Просмотреть файл

@ -141,7 +141,7 @@ SharedSurface_Gralloc::~SharedSurface_Gralloc()
DEBUG_PRINT("[SharedSurface_Gralloc %p] destroyed\n", this);
mGL->MakeCurrent();
mGL->fDeleteTextures(1, (GLuint*)&mProdTex);
mGL->fDeleteTextures(1, &mProdTex);
}
void