Fix perf regression with checkStatus.

Returning an Error was costing us performance in extra
error checks. This intead uses the Context to process the
Error immediately, and returns a value from isComplete and
checkStatus.

Improves performance in draw call validation.

Bug: chromium:822235
Change-Id: I0793fc690e86137425fed593d45083e40aee8db9
Reviewed-on: https://chromium-review.googlesource.com/1011370
Reviewed-by: Luc Ferron <lucferron@chromium.org>
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
diff --git a/src/libANGLE/validationES31.cpp b/src/libANGLE/validationES31.cpp
index 097e463..8681136 100644
--- a/src/libANGLE/validationES31.cpp
+++ b/src/libANGLE/validationES31.cpp
@@ -1075,8 +1075,7 @@
     }
 
     Framebuffer *framebuffer = context->getGLState().getDrawFramebuffer();
-    GLint samples            = 0;
-    ANGLE_VALIDATION_TRY(framebuffer->getSamples(context, &samples));
+    GLint samples            = framebuffer->getSamples(context);
 
     if (index >= static_cast<GLuint>(samples))
     {