Program: Make LinkResult use gl::ErrorOrResult.
This simplifies the error handling code, and allows the use of the
ANGLE_TRY macro (and friends).
BUG=angleproject:1576
Change-Id: I3142388b10d0dd67a7f49a5c8c3d11102996be93
Reviewed-on: https://chromium-review.googlesource.com/411201
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
diff --git a/src/libANGLE/renderer/gl/ProgramGL.cpp b/src/libANGLE/renderer/gl/ProgramGL.cpp
index 7ca08e9..88c7df7 100644
--- a/src/libANGLE/renderer/gl/ProgramGL.cpp
+++ b/src/libANGLE/renderer/gl/ProgramGL.cpp
@@ -62,12 +62,12 @@
// Verify that the program linked
if (!checkLinkStatus(infoLog))
{
- return LinkResult(false, gl::Error(GL_NO_ERROR));
+ return false;
}
postLink();
- return LinkResult(true, gl::Error(GL_NO_ERROR));
+ return true;
}
gl::Error ProgramGL::save(gl::BinaryOutputStream *stream)
@@ -167,7 +167,7 @@
// Verify the link
if (!checkLinkStatus(infoLog))
{
- return LinkResult(false, gl::Error(GL_NO_ERROR));
+ return false;
}
if (mWorkarounds.alwaysCallUseProgramAfterLink)
@@ -177,7 +177,7 @@
postLink();
- return LinkResult(true, gl::Error(GL_NO_ERROR));
+ return true;
}
GLboolean ProgramGL::validate(const gl::Caps & /*caps*/, gl::InfoLog * /*infoLog*/)