Removes mConfig from Context, as it was only used for setting unused default values.

TRAC #21819 Signed-off-by: Daniel Koch Author: Shannon Woods git-svn-id: https://angleproject.googlecode.com/svn/branches/dx11proto@1345 736b8ea6-26fd-11df-bfd4-992fa37f6226
parent 4cfba2a9
...@@ -462,9 +462,7 @@ EGLContext Display::createContext(EGLConfig configHandle, const gl::Context *sha ...@@ -462,9 +462,7 @@ EGLContext Display::createContext(EGLConfig configHandle, const gl::Context *sha
return NULL; return NULL;
} }
const egl::Config *config = mConfigSet.get(configHandle); gl::Context *context = glCreateContext(shareContext, notifyResets, robustAccess);
gl::Context *context = glCreateContext(config, shareContext, notifyResets, robustAccess);
mContextSet.insert(context); mContextSet.insert(context);
return context; return context;
......
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
namespace gl namespace gl
{ {
Context::Context(const egl::Config *config, const gl::Context *shareContext, bool notifyResets, bool robustAccess) : mConfig(config) Context::Context(const gl::Context *shareContext, bool notifyResets, bool robustAccess)
{ {
ASSERT(robustAccess == false); // Unimplemented ASSERT(robustAccess == false); // Unimplemented
...@@ -96,15 +96,15 @@ Context::Context(const egl::Config *config, const gl::Context *shareContext, boo ...@@ -96,15 +96,15 @@ Context::Context(const egl::Config *config, const gl::Context *shareContext, boo
mState.viewportX = 0; mState.viewportX = 0;
mState.viewportY = 0; mState.viewportY = 0;
mState.viewportWidth = config->mDisplayMode.Width; mState.viewportWidth = 0;
mState.viewportHeight = config->mDisplayMode.Height; mState.viewportHeight = 0;
mState.zNear = 0.0f; mState.zNear = 0.0f;
mState.zFar = 1.0f; mState.zFar = 1.0f;
mState.scissorX = 0; mState.scissorX = 0;
mState.scissorY = 0; mState.scissorY = 0;
mState.scissorWidth = config->mDisplayMode.Width; mState.scissorWidth = 0;
mState.scissorHeight = config->mDisplayMode.Height; mState.scissorHeight = 0;
mState.colorMaskRed = true; mState.colorMaskRed = true;
mState.colorMaskGreen = true; mState.colorMaskGreen = true;
...@@ -4394,9 +4394,9 @@ void VertexDeclarationCache::markStateDirty() ...@@ -4394,9 +4394,9 @@ void VertexDeclarationCache::markStateDirty()
extern "C" extern "C"
{ {
gl::Context *glCreateContext(const egl::Config *config, const gl::Context *shareContext, bool notifyResets, bool robustAccess) gl::Context *glCreateContext(const gl::Context *shareContext, bool notifyResets, bool robustAccess)
{ {
return new gl::Context(config, shareContext, notifyResets, robustAccess); return new gl::Context(shareContext, notifyResets, robustAccess);
} }
void glDestroyContext(gl::Context *context) void glDestroyContext(gl::Context *context)
......
...@@ -35,7 +35,6 @@ namespace egl ...@@ -35,7 +35,6 @@ namespace egl
{ {
class Display; class Display;
class Surface; class Surface;
class Config;
} }
namespace gl namespace gl
...@@ -281,7 +280,7 @@ class VertexDeclarationCache ...@@ -281,7 +280,7 @@ class VertexDeclarationCache
class Context class Context
{ {
public: public:
Context(const egl::Config *config, const gl::Context *shareContext, bool notifyResets, bool robustAccess); Context(const gl::Context *shareContext, bool notifyResets, bool robustAccess);
~Context(); ~Context();
...@@ -544,7 +543,6 @@ class Context ...@@ -544,7 +543,6 @@ class Context
void initExtensionString(); void initExtensionString();
void initRendererString(); void initRendererString();
const egl::Config *const mConfig;
egl::Display *mDisplay; egl::Display *mDisplay;
IDirect3DDevice9 *mDevice; IDirect3DDevice9 *mDevice;
renderer::Renderer *mRenderer; renderer::Renderer *mRenderer;
...@@ -669,7 +667,7 @@ class Context ...@@ -669,7 +667,7 @@ class Context
extern "C" extern "C"
{ {
// Exported functions for use by EGL // Exported functions for use by EGL
gl::Context *glCreateContext(const egl::Config *config, const gl::Context *shareContext, bool notifyResets, bool robustAccess); gl::Context *glCreateContext(const gl::Context *shareContext, bool notifyResets, bool robustAccess);
void glDestroyContext(gl::Context *context); void glDestroyContext(gl::Context *context);
void glMakeCurrent(gl::Context *context, egl::Display *display, egl::Surface *surface); void glMakeCurrent(gl::Context *context, egl::Display *display, egl::Surface *surface);
gl::Context *glGetCurrentContext(); gl::Context *glGetCurrentContext();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment