Commit b28126ef by Geoff Lang

Remove the gl::error function.

BUG=angle:520 Change-Id: Iefd4345aa347041143d5452cc2fcf48c071d494b Reviewed-on: https://chromium-review.googlesource.com/222839Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org> Reviewed-by: 's avatarShannon Woods <shannonwoods@chromium.org> Tested-by: 's avatarGeoff Lang <geofflang@chromium.org>
parent bafefdf3
...@@ -159,7 +159,7 @@ Context *getNonLostContext() ...@@ -159,7 +159,7 @@ Context *getNonLostContext()
{ {
if (context->isContextLost()) if (context->isContextLost())
{ {
gl::error(GL_OUT_OF_MEMORY); context->recordError(Error(GL_OUT_OF_MEMORY, "Context has been lost."));
return NULL; return NULL;
} }
else else
...@@ -177,31 +177,4 @@ egl::Display *getDisplay() ...@@ -177,31 +177,4 @@ egl::Display *getDisplay()
return current->display; return current->display;
} }
// Records an error code
void error(GLenum errorCode)
{
gl::Context *context = glGetCurrentContext();
context->recordError(Error(errorCode));
switch (errorCode)
{
case GL_INVALID_ENUM:
TRACE("\t! Error generated: invalid enum\n");
break;
case GL_INVALID_VALUE:
TRACE("\t! Error generated: invalid value\n");
break;
case GL_INVALID_OPERATION:
TRACE("\t! Error generated: invalid operation\n");
break;
case GL_OUT_OF_MEMORY:
TRACE("\t! Error generated: out of memory\n");
break;
case GL_INVALID_FRAMEBUFFER_OPERATION:
TRACE("\t! Error generated: invalid framebuffer operation\n");
break;
default: UNREACHABLE();
}
}
} }
...@@ -37,16 +37,6 @@ Context *getContext(); ...@@ -37,16 +37,6 @@ Context *getContext();
Context *getNonLostContext(); Context *getNonLostContext();
egl::Display *getDisplay(); egl::Display *getDisplay();
void error(GLenum errorCode);
template<class T>
const T &error(GLenum errorCode, const T &returnValue)
{
error(errorCode);
return returnValue;
}
} }
namespace rx namespace rx
......
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