Commit 59770806 by Brandon Jones Committed by Commit Bot

Refactor ANGLE Extensions Context Calls

Refactors ANGLE extensions context calls into a common format for future autogeneration. Any work that occurred in the entry point has been moved into its own context member function. Bug:angleproject:2263 Change-Id: I91cb3aca6a8c135ed3ae80a723d6cf16b54aeda6 Reviewed-on: https://chromium-review.googlesource.com/990809Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
parent b8e39660
......@@ -75,7 +75,7 @@ bool ValidatePathInstances(gl::Context *context,
for (GLsizei i = 0; i < numPaths; ++i)
{
const GLuint pathName = array[i] + pathBase;
if (context->hasPath(pathName) && !context->hasPathData(pathName))
if (context->isPathGenerated(pathName) && !context->isPath(pathName))
{
ANGLE_VALIDATION_ERR(context, InvalidOperation(), NoSuchPath);
return false;
......@@ -3181,7 +3181,7 @@ bool ValidatePathCommandsCHROMIUM(Context *context,
context->handleError(InvalidOperation() << "GL_CHROMIUM_path_rendering is not available.");
return false;
}
if (!context->hasPath(path))
if (!context->isPathGenerated(path))
{
ANGLE_VALIDATION_ERR(context, InvalidOperation(), NoSuchPath);
return false;
......@@ -3296,7 +3296,7 @@ bool ValidatePathParameterfCHROMIUM(Context *context, GLuint path, GLenum pname,
context->handleError(InvalidOperation() << "GL_CHROMIUM_path_rendering is not available.");
return false;
}
if (!context->hasPath(path))
if (!context->isPathGenerated(path))
{
ANGLE_VALIDATION_ERR(context, InvalidOperation(), NoSuchPath);
return false;
......@@ -3368,7 +3368,7 @@ bool ValidateGetPathParameterfvCHROMIUM(Context *context, GLuint path, GLenum pn
return false;
}
if (!context->hasPath(path))
if (!context->isPathGenerated(path))
{
ANGLE_VALIDATION_ERR(context, InvalidOperation(), NoSuchPath);
return false;
......@@ -3442,7 +3442,7 @@ bool ValidateStencilFillPathCHROMIUM(Context *context, GLuint path, GLenum fillM
context->handleError(InvalidOperation() << "GL_CHROMIUM_path_rendering is not available.");
return false;
}
if (context->hasPath(path) && !context->hasPathData(path))
if (context->isPathGenerated(path) && !context->isPath(path))
{
ANGLE_VALIDATION_ERR(context, InvalidOperation(), NoSuchPath);
return false;
......@@ -3474,7 +3474,7 @@ bool ValidateStencilStrokePathCHROMIUM(Context *context, GLuint path, GLint refe
context->handleError(InvalidOperation() << "GL_CHROMIUM_path_rendering is not available.");
return false;
}
if (context->hasPath(path) && !context->hasPathData(path))
if (context->isPathGenerated(path) && !context->isPath(path))
{
context->handleError(InvalidOperation() << "No such path or path has no data.");
return false;
......@@ -3500,7 +3500,7 @@ bool ValidateCoverPathCHROMIUM(Context *context, GLuint path, GLenum coverMode)
context->handleError(InvalidOperation() << "GL_CHROMIUM_path_rendering is not available.");
return false;
}
if (context->hasPath(path) && !context->hasPathData(path))
if (context->isPathGenerated(path) && !context->isPath(path))
{
ANGLE_VALIDATION_ERR(context, InvalidOperation(), NoSuchPath);
return false;
......
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