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/990809
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
diff --git a/src/libANGLE/validationES2.cpp b/src/libANGLE/validationES2.cpp
index b31ffc9..8260719 100644
--- a/src/libANGLE/validationES2.cpp
+++ b/src/libANGLE/validationES2.cpp
@@ -75,7 +75,7 @@
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 @@
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 @@
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 @@
return false;
}
- if (!context->hasPath(path))
+ if (!context->isPathGenerated(path))
{
ANGLE_VALIDATION_ERR(context, InvalidOperation(), NoSuchPath);
return false;
@@ -3442,7 +3442,7 @@
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 @@
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 @@
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;