Refactor internal format pixel math methods.
This removes the use of the ErrorOrResult class from these methods.
This will enable more performant Error handling. Also cleans up the
ANGLE_TRY_CHECKED_MATH macro to be more general.
Bug: angleproject:2713
Change-Id: I349947d320907839ca88ec1f9251e6ddc3858a08
Reviewed-on: https://chromium-review.googlesource.com/1128920
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Frank Henigman <fjhenigman@chromium.org>
diff --git a/src/libANGLE/renderer/d3d/VertexDataManager.cpp b/src/libANGLE/renderer/d3d/VertexDataManager.cpp
index 183c895..ca9a116 100644
--- a/src/libANGLE/renderer/d3d/VertexDataManager.cpp
+++ b/src/libANGLE/renderer/d3d/VertexDataManager.cpp
@@ -138,7 +138,7 @@
CheckedNumeric<unsigned int> offset;
offset = baseOffset + stride * static_cast<unsigned int>(startVertex);
- ANGLE_TRY_CHECKED_MATH(offset);
+ ANGLE_TRY_CHECKED_MATH(offset.IsValid());
return offset.ValueOrDie();
}