From cc5c464b0ac1f01d261cd47682c243a5e5111889 Mon Sep 17 00:00:00 2001 From: Alexis Hetu Date: Wed, 8 Jun 2016 15:04:56 -0400 Subject: [PATCH] Silence unused private member warning MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Removed mConfig from Context and related functions. Change-Id: I91eba6a4dbbd8ff48f212a246b1894009d513436 Reviewed-on: https://swiftshader-review.googlesource.com/5531 Tested-by: Alexis Hétu Reviewed-by: Nicolas Capens --- src/OpenGL/libEGL/Display.cpp | 4 ++-- src/OpenGL/libGLES_CM/Context.cpp | 6 +++--- src/OpenGL/libGLES_CM/Context.h | 2 +- src/OpenGL/libGLES_CM/libGLES_CM.hpp | 2 +- src/OpenGL/libGLES_CM/main.cpp | 2 +- src/OpenGL/libGLESv2/Context.cpp | 8 ++++---- src/OpenGL/libGLESv2/Context.h | 3 +-- src/OpenGL/libGLESv2/libGLESv2.hpp | 2 +- src/OpenGL/libGLESv2/main.cpp | 2 +- 9 files changed, 15 insertions(+), 16 deletions(-) diff --git a/src/OpenGL/libEGL/Display.cpp b/src/OpenGL/libEGL/Display.cpp index f2e855550..8e73114df 100644 --- a/src/OpenGL/libEGL/Display.cpp +++ b/src/OpenGL/libEGL/Display.cpp @@ -423,7 +423,7 @@ EGLContext Display::createContext(EGLConfig configHandle, const egl::Context *sh { if(libGLES_CM) { - context = libGLES_CM->es1CreateContext(this, config, shareContext); + context = libGLES_CM->es1CreateContext(this, shareContext); } } else if((clientVersion == 2 && config->mRenderableType & EGL_OPENGL_ES2_BIT) @@ -434,7 +434,7 @@ EGLContext Display::createContext(EGLConfig configHandle, const egl::Context *sh { if(libGLESv2) { - context = libGLESv2->es2CreateContext(this, config, shareContext, clientVersion); + context = libGLESv2->es2CreateContext(this, shareContext, clientVersion); } } else diff --git a/src/OpenGL/libGLES_CM/Context.cpp b/src/OpenGL/libGLES_CM/Context.cpp index 0c9fed1b8..307e6f0d6 100644 --- a/src/OpenGL/libGLES_CM/Context.cpp +++ b/src/OpenGL/libGLES_CM/Context.cpp @@ -37,7 +37,7 @@ using std::abs; namespace es1 { -Context::Context(egl::Display *const display, const egl::Config *config, const Context *shareContext) +Context::Context(egl::Display *const display, const Context *shareContext) : egl::Context(display), modelViewStack(MAX_MODELVIEW_STACK_DEPTH), projectionStack(MAX_PROJECTION_STACK_DEPTH), @@ -3452,8 +3452,8 @@ unsigned int Context::getActiveTexture() const } -egl::Context *es1CreateContext(egl::Display *display, const egl::Config *config, const egl::Context *shareContext) +egl::Context *es1CreateContext(egl::Display *display, const egl::Context *shareContext) { ASSERT(!shareContext || shareContext->getClientVersion() == 1); // Should be checked by eglCreateContext - return new es1::Context(display, config, static_cast(shareContext)); + return new es1::Context(display, static_cast(shareContext)); } diff --git a/src/OpenGL/libGLES_CM/Context.h b/src/OpenGL/libGLES_CM/Context.h index 1bef6b6b4..24e5a0805 100644 --- a/src/OpenGL/libGLES_CM/Context.h +++ b/src/OpenGL/libGLES_CM/Context.h @@ -294,7 +294,7 @@ struct State class Context : public egl::Context { public: - Context(egl::Display *display, const egl::Config *config, const Context *shareContext); + Context(egl::Display *display, const Context *shareContext); virtual void makeCurrent(egl::Surface *surface); virtual int getClientVersion() const; diff --git a/src/OpenGL/libGLES_CM/libGLES_CM.hpp b/src/OpenGL/libGLES_CM/libGLES_CM.hpp index b92e21fd8..08644c6f0 100644 --- a/src/OpenGL/libGLES_CM/libGLES_CM.hpp +++ b/src/OpenGL/libGLES_CM/libGLES_CM.hpp @@ -219,7 +219,7 @@ public: void (*glDrawTexfOES)(GLfloat x, GLfloat y, GLfloat z, GLfloat width, GLfloat height); void (*glDrawTexfvOES)(const GLfloat *coords); - egl::Context *(*es1CreateContext)(egl::Display *display, const egl::Config *config, const egl::Context *shareContext); + egl::Context *(*es1CreateContext)(egl::Display *display, const egl::Context *shareContext); __eglMustCastToProperFunctionPointerType (*es1GetProcAddress)(const char *procname); egl::Image *(*createBackBuffer)(int width, int height, const egl::Config *config); egl::Image *(*createDepthStencil)(unsigned int width, unsigned int height, sw::Format format, int multiSampleDepth, bool discard); diff --git a/src/OpenGL/libGLES_CM/main.cpp b/src/OpenGL/libGLES_CM/main.cpp index b44b0ec9b..77c4157e0 100644 --- a/src/OpenGL/libGLES_CM/main.cpp +++ b/src/OpenGL/libGLES_CM/main.cpp @@ -330,7 +330,7 @@ void DrawTexfOES(GLfloat x, GLfloat y, GLfloat z, GLfloat width, GLfloat height) void DrawTexfvOES(const GLfloat *coords); } -egl::Context *es1CreateContext(egl::Display *display, const egl::Config *config, const egl::Context *shareContext); +egl::Context *es1CreateContext(egl::Display *display, const egl::Context *shareContext); extern "C" __eglMustCastToProperFunctionPointerType es1GetProcAddress(const char *procname); egl::Image *createBackBuffer(int width, int height, const egl::Config *config); egl::Image *createDepthStencil(unsigned int width, unsigned int height, sw::Format format, int multiSampleDepth, bool discard); diff --git a/src/OpenGL/libGLESv2/Context.cpp b/src/OpenGL/libGLESv2/Context.cpp index dd44f7985..de1cb57b4 100644 --- a/src/OpenGL/libGLESv2/Context.cpp +++ b/src/OpenGL/libGLESv2/Context.cpp @@ -42,8 +42,8 @@ namespace es2 { -Context::Context(egl::Display *display, const egl::Config *config, const Context *shareContext, EGLint clientVersion) - : egl::Context(display), clientVersion(clientVersion), mConfig(config) +Context::Context(egl::Display *display, const Context *shareContext, EGLint clientVersion) + : egl::Context(display), clientVersion(clientVersion) { sw::Context *context = new sw::Context(); device = new es2::Device(context); @@ -4366,8 +4366,8 @@ const GLubyte* Context::getExtensions(GLuint index, GLuint* numExt) const } -egl::Context *es2CreateContext(egl::Display *display, const egl::Config *config, const egl::Context *shareContext, int clientVersion) +egl::Context *es2CreateContext(egl::Display *display, const egl::Context *shareContext, int clientVersion) { ASSERT(!shareContext || shareContext->getClientVersion() == clientVersion); // Should be checked by eglCreateContext - return new es2::Context(display, config, static_cast(shareContext), clientVersion); + return new es2::Context(display, static_cast(shareContext), clientVersion); } diff --git a/src/OpenGL/libGLESv2/Context.h b/src/OpenGL/libGLESv2/Context.h index bf1f4ae1d..10e6a5a35 100644 --- a/src/OpenGL/libGLESv2/Context.h +++ b/src/OpenGL/libGLESv2/Context.h @@ -425,7 +425,7 @@ struct State class Context : public egl::Context { public: - Context(egl::Display *display, const egl::Config *config, const Context *shareContext, EGLint clientVersion); + Context(egl::Display *display, const Context *shareContext, EGLint clientVersion); virtual void makeCurrent(egl::Surface *surface); virtual EGLint getClientVersion() const; @@ -720,7 +720,6 @@ private: Query *createQuery(GLuint handle, GLenum type); const EGLint clientVersion; - const egl::Config *const mConfig; State mState; diff --git a/src/OpenGL/libGLESv2/libGLESv2.hpp b/src/OpenGL/libGLESv2/libGLESv2.hpp index f858ba719..7b0354e8b 100644 --- a/src/OpenGL/libGLESv2/libGLESv2.hpp +++ b/src/OpenGL/libGLESv2/libGLESv2.hpp @@ -241,7 +241,7 @@ public: void (*glGenerateMipmapOES)(GLenum target); void (*glDrawBuffersEXT)(GLsizei n, const GLenum *bufs); - egl::Context *(*es2CreateContext)(egl::Display *display, const egl::Config *config, const egl::Context *shareContext, int clientVersion); + egl::Context *(*es2CreateContext)(egl::Display *display, const egl::Context *shareContext, int clientVersion); __eglMustCastToProperFunctionPointerType (*es2GetProcAddress)(const char *procname); egl::Image *(*createBackBuffer)(int width, int height, const egl::Config *config); egl::Image *(*createDepthStencil)(unsigned int width, unsigned int height, sw::Format format, int multiSampleDepth, bool discard); diff --git a/src/OpenGL/libGLESv2/main.cpp b/src/OpenGL/libGLESv2/main.cpp index 001aa7a83..12ed31dd1 100644 --- a/src/OpenGL/libGLESv2/main.cpp +++ b/src/OpenGL/libGLESv2/main.cpp @@ -1327,7 +1327,7 @@ GL_APICALL void GL_APIENTRY glDrawBuffersEXT(GLsizei n, const GLenum *bufs) } } -egl::Context *es2CreateContext(egl::Display *display, const egl::Config *config, const egl::Context *shareContext, int clientVersion); +egl::Context *es2CreateContext(egl::Display *display, const egl::Context *shareContext, int clientVersion); extern "C" __eglMustCastToProperFunctionPointerType es2GetProcAddress(const char *procname); egl::Image *createBackBuffer(int width, int height, const egl::Config *config); egl::Image *createDepthStencil(unsigned int width, unsigned int height, sw::Format format, int multiSampleDepth, bool discard); -- 2.11.0