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/State.cpp b/src/libANGLE/State.cpp
index eea13f9..e150e57 100644
--- a/src/libANGLE/State.cpp
+++ b/src/libANGLE/State.cpp
@@ -2148,12 +2148,9 @@
         case GL_SAMPLES:
         {
             Framebuffer *framebuffer = mDrawFramebuffer;
-            bool complete            = false;
-            ANGLE_TRY(framebuffer->isComplete(context, &complete));
-            if (complete)
+            if (framebuffer->isComplete(context))
             {
-                GLint samples = 0;
-                ANGLE_TRY(framebuffer->getSamples(context, &samples));
+                GLint samples = framebuffer->getSamples(context);
                 switch (pname)
                 {
                     case GL_SAMPLE_BUFFERS: