Make Framebuffer::checkStatus non-const.

BUG=angleproject:1388

Change-Id: Ia9befba0c915c087f2fe0557d91060256f6d4950
Reviewed-on: https://chromium-review.googlesource.com/348955
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
diff --git a/src/libANGLE/validationES2.cpp b/src/libANGLE/validationES2.cpp
index 4472249..9dd1eb0 100644
--- a/src/libANGLE/validationES2.cpp
+++ b/src/libANGLE/validationES2.cpp
@@ -1632,8 +1632,8 @@
         return false;
     }
 
-    const Framebuffer *readFramebuffer = context->getGLState().getReadFramebuffer();
-    const Framebuffer *drawFramebuffer = context->getGLState().getDrawFramebuffer();
+    Framebuffer *readFramebuffer = context->getGLState().getReadFramebuffer();
+    Framebuffer *drawFramebuffer = context->getGLState().getDrawFramebuffer();
 
     if (mask & GL_COLOR_BUFFER_BIT)
     {
@@ -1676,9 +1676,7 @@
                 }
             }
 
-            int readSamples = readFramebuffer->getSamples(context->getContextState());
-
-            if (readSamples != 0 &&
+            if (readFramebuffer->getSamples(context->getContextState()) != 0 &&
                 IsPartialBlit(context, readColorAttachment, drawColorAttachment, srcX0, srcY0,
                               srcX1, srcY1, dstX0, dstY0, dstX1, dstY1))
             {
@@ -1727,10 +1725,8 @@
 
 bool ValidateClear(ValidationContext *context, GLbitfield mask)
 {
-    const Framebuffer *framebufferObject = context->getGLState().getDrawFramebuffer();
-    ASSERT(framebufferObject);
-
-    if (framebufferObject->checkStatus(context->getContextState()) != GL_FRAMEBUFFER_COMPLETE)
+    auto fbo = context->getGLState().getDrawFramebuffer();
+    if (fbo->checkStatus(context->getContextState()) != GL_FRAMEBUFFER_COMPLETE)
     {
         context->handleError(Error(GL_INVALID_FRAMEBUFFER_OPERATION));
         return false;