Make angle::Result an enum.
This moves away from a class type to a value type. This should improve
performance when using angle::Result as a return value. Previously the
generated code would return a pointer instead of a value.
Improves performance in the most targeted microbenchmark by 10%. In
more realistic scanarios it will have a smaller improvement. Also
simplifies the class implementation and usage.
Includes some unrelated code generation changes.
Bug: angleproject:2491
Change-Id: Ifcf86870bf1c00a2f73c39ea6e4f05ca705050aa
Reviewed-on: https://chromium-review.googlesource.com/c/1356139
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
diff --git a/src/libANGLE/renderer/renderer_utils.cpp b/src/libANGLE/renderer/renderer_utils.cpp
index 14beeed..5eb2b06 100644
--- a/src/libANGLE/renderer/renderer_utils.cpp
+++ b/src/libANGLE/renderer/renderer_utils.cpp
@@ -414,7 +414,7 @@
*textureOut = mIncompleteTextures[type].get();
if (*textureOut != nullptr)
{
- return angle::Result::Continue();
+ return angle::Result::Continue;
}
ContextImpl *implFactory = context->getImplementation();
@@ -468,7 +468,7 @@
mIncompleteTextures[type].set(context, t.release());
*textureOut = mIncompleteTextures[type].get();
- return angle::Result::Continue();
+ return angle::Result::Continue;
}
#define ANGLE_INSTANTIATE_SET_UNIFORM_MATRIX_FUNC(cols, rows) \
@@ -580,7 +580,7 @@
ANGLE_CHECK_GL_MATH(contextImpl, startVertexInt64 <= std::numeric_limits<GLint>::max())
*firstVertexOut = static_cast<GLint>(startVertexInt64);
- return angle::Result::Continue();
+ return angle::Result::Continue;
}
angle::Result GetVertexRangeInfo(const gl::Context *context,
@@ -606,6 +606,6 @@
*startVertexOut = firstVertex;
*vertexCountOut = vertexOrIndexCount;
}
- return angle::Result::Continue();
+ return angle::Result::Continue;
}
} // namespace rx