Use angle::Result in front-end (Part 3)

Handles the gl::Framebuffer class and its implementation.

Bug: angleproject:2491
Change-Id: I3b9c0609e9277264ccdb370596500562df3b7d15
Reviewed-on: https://chromium-review.googlesource.com/c/1280743
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
diff --git a/src/libANGLE/renderer/FramebufferImpl.h b/src/libANGLE/renderer/FramebufferImpl.h
index 756b596..04c5821 100644
--- a/src/libANGLE/renderer/FramebufferImpl.h
+++ b/src/libANGLE/renderer/FramebufferImpl.h
@@ -33,58 +33,58 @@
     virtual ~FramebufferImpl() {}
     virtual void destroy(const gl::Context *context) {}
 
-    virtual gl::Error discard(const gl::Context *context,
-                              size_t count,
-                              const GLenum *attachments) = 0;
-    virtual gl::Error invalidate(const gl::Context *context,
-                                 size_t count,
-                                 const GLenum *attachments) = 0;
-    virtual gl::Error invalidateSub(const gl::Context *context,
-                                    size_t count,
-                                    const GLenum *attachments,
-                                    const gl::Rectangle &area) = 0;
+    virtual angle::Result discard(const gl::Context *context,
+                                  size_t count,
+                                  const GLenum *attachments)       = 0;
+    virtual angle::Result invalidate(const gl::Context *context,
+                                     size_t count,
+                                     const GLenum *attachments)    = 0;
+    virtual angle::Result invalidateSub(const gl::Context *context,
+                                        size_t count,
+                                        const GLenum *attachments,
+                                        const gl::Rectangle &area) = 0;
 
-    virtual gl::Error clear(const gl::Context *context, GLbitfield mask) = 0;
-    virtual gl::Error clearBufferfv(const gl::Context *context,
-                                    GLenum buffer,
-                                    GLint drawbuffer,
-                                    const GLfloat *values) = 0;
-    virtual gl::Error clearBufferuiv(const gl::Context *context,
-                                     GLenum buffer,
-                                     GLint drawbuffer,
-                                     const GLuint *values) = 0;
-    virtual gl::Error clearBufferiv(const gl::Context *context,
-                                    GLenum buffer,
-                                    GLint drawbuffer,
-                                    const GLint *values) = 0;
-    virtual gl::Error clearBufferfi(const gl::Context *context,
-                                    GLenum buffer,
-                                    GLint drawbuffer,
-                                    GLfloat depth,
-                                    GLint stencil) = 0;
+    virtual angle::Result clear(const gl::Context *context, GLbitfield mask) = 0;
+    virtual angle::Result clearBufferfv(const gl::Context *context,
+                                        GLenum buffer,
+                                        GLint drawbuffer,
+                                        const GLfloat *values)               = 0;
+    virtual angle::Result clearBufferuiv(const gl::Context *context,
+                                         GLenum buffer,
+                                         GLint drawbuffer,
+                                         const GLuint *values)               = 0;
+    virtual angle::Result clearBufferiv(const gl::Context *context,
+                                        GLenum buffer,
+                                        GLint drawbuffer,
+                                        const GLint *values)                 = 0;
+    virtual angle::Result clearBufferfi(const gl::Context *context,
+                                        GLenum buffer,
+                                        GLint drawbuffer,
+                                        GLfloat depth,
+                                        GLint stencil)                       = 0;
 
     virtual GLenum getImplementationColorReadFormat(const gl::Context *context) const = 0;
     virtual GLenum getImplementationColorReadType(const gl::Context *context) const   = 0;
-    virtual gl::Error readPixels(const gl::Context *context,
-                                 const gl::Rectangle &area,
-                                 GLenum format,
-                                 GLenum type,
-                                 void *pixels) = 0;
+    virtual angle::Result readPixels(const gl::Context *context,
+                                     const gl::Rectangle &area,
+                                     GLenum format,
+                                     GLenum type,
+                                     void *pixels)                                    = 0;
 
-    virtual gl::Error blit(const gl::Context *context,
-                           const gl::Rectangle &sourceArea,
-                           const gl::Rectangle &destArea,
-                           GLbitfield mask,
-                           GLenum filter) = 0;
+    virtual angle::Result blit(const gl::Context *context,
+                               const gl::Rectangle &sourceArea,
+                               const gl::Rectangle &destArea,
+                               GLbitfield mask,
+                               GLenum filter) = 0;
 
     virtual bool checkStatus(const gl::Context *context) const = 0;
 
     virtual angle::Result syncState(const gl::Context *context,
                                     const gl::Framebuffer::DirtyBits &dirtyBits) = 0;
 
-    virtual gl::Error getSamplePosition(const gl::Context *context,
-                                        size_t index,
-                                        GLfloat *xy) const = 0;
+    virtual angle::Result getSamplePosition(const gl::Context *context,
+                                            size_t index,
+                                            GLfloat *xy) const = 0;
 
     const gl::FramebufferState &getState() const { return mState; }
 
diff --git a/src/libANGLE/renderer/FramebufferImpl_mock.h b/src/libANGLE/renderer/FramebufferImpl_mock.h
index 93ff876..8d841e7 100644
--- a/src/libANGLE/renderer/FramebufferImpl_mock.h
+++ b/src/libANGLE/renderer/FramebufferImpl_mock.h
@@ -23,30 +23,30 @@
     MockFramebufferImpl() : rx::FramebufferImpl(gl::FramebufferState()) {}
     virtual ~MockFramebufferImpl() { destructor(); }
 
-    MOCK_METHOD3(discard, gl::Error(const gl::Context *, size_t, const GLenum *));
-    MOCK_METHOD3(invalidate, gl::Error(const gl::Context *, size_t, const GLenum *));
+    MOCK_METHOD3(discard, angle::Result(const gl::Context *, size_t, const GLenum *));
+    MOCK_METHOD3(invalidate, angle::Result(const gl::Context *, size_t, const GLenum *));
     MOCK_METHOD4(invalidateSub,
-                 gl::Error(const gl::Context *, size_t, const GLenum *, const gl::Rectangle &));
+                 angle::Result(const gl::Context *, size_t, const GLenum *, const gl::Rectangle &));
 
-    MOCK_METHOD2(clear, gl::Error(const gl::Context *, GLbitfield));
-    MOCK_METHOD4(clearBufferfv, gl::Error(const gl::Context *, GLenum, GLint, const GLfloat *));
-    MOCK_METHOD4(clearBufferuiv, gl::Error(const gl::Context *, GLenum, GLint, const GLuint *));
-    MOCK_METHOD4(clearBufferiv, gl::Error(const gl::Context *, GLenum, GLint, const GLint *));
-    MOCK_METHOD5(clearBufferfi, gl::Error(const gl::Context *, GLenum, GLint, GLfloat, GLint));
+    MOCK_METHOD2(clear, angle::Result(const gl::Context *, GLbitfield));
+    MOCK_METHOD4(clearBufferfv, angle::Result(const gl::Context *, GLenum, GLint, const GLfloat *));
+    MOCK_METHOD4(clearBufferuiv, angle::Result(const gl::Context *, GLenum, GLint, const GLuint *));
+    MOCK_METHOD4(clearBufferiv, angle::Result(const gl::Context *, GLenum, GLint, const GLint *));
+    MOCK_METHOD5(clearBufferfi, angle::Result(const gl::Context *, GLenum, GLint, GLfloat, GLint));
 
     MOCK_CONST_METHOD1(getImplementationColorReadFormat, GLenum(const gl::Context *));
     MOCK_CONST_METHOD1(getImplementationColorReadType, GLenum(const gl::Context *));
     MOCK_METHOD5(readPixels,
-                 gl::Error(const gl::Context *, const gl::Rectangle &, GLenum, GLenum, void *));
+                 angle::Result(const gl::Context *, const gl::Rectangle &, GLenum, GLenum, void *));
 
-    MOCK_CONST_METHOD3(getSamplePosition, gl::Error(const gl::Context *, size_t, GLfloat *));
+    MOCK_CONST_METHOD3(getSamplePosition, angle::Result(const gl::Context *, size_t, GLfloat *));
 
     MOCK_METHOD5(blit,
-                 gl::Error(const gl::Context *,
-                           const gl::Rectangle &,
-                           const gl::Rectangle &,
-                           GLbitfield,
-                           GLenum));
+                 angle::Result(const gl::Context *,
+                               const gl::Rectangle &,
+                               const gl::Rectangle &,
+                               GLbitfield,
+                               GLenum));
 
     MOCK_CONST_METHOD1(checkStatus, bool(const gl::Context *));
 
diff --git a/src/libANGLE/renderer/d3d/FramebufferD3D.cpp b/src/libANGLE/renderer/d3d/FramebufferD3D.cpp
index ba09d2e..32caca6 100644
--- a/src/libANGLE/renderer/d3d/FramebufferD3D.cpp
+++ b/src/libANGLE/renderer/d3d/FramebufferD3D.cpp
@@ -101,16 +101,16 @@
 {
 }
 
-gl::Error FramebufferD3D::clear(const gl::Context *context, GLbitfield mask)
+angle::Result FramebufferD3D::clear(const gl::Context *context, GLbitfield mask)
 {
     ClearParameters clearParams = GetClearParameters(context->getGLState(), mask);
     return clearImpl(context, clearParams);
 }
 
-gl::Error FramebufferD3D::clearBufferfv(const gl::Context *context,
-                                        GLenum buffer,
-                                        GLint drawbuffer,
-                                        const GLfloat *values)
+angle::Result FramebufferD3D::clearBufferfv(const gl::Context *context,
+                                            GLenum buffer,
+                                            GLint drawbuffer,
+                                            const GLfloat *values)
 {
     // glClearBufferfv can be called to clear the color buffer or depth buffer
     ClearParameters clearParams = GetClearParameters(context->getGLState(), 0);
@@ -134,10 +134,10 @@
     return clearImpl(context, clearParams);
 }
 
-gl::Error FramebufferD3D::clearBufferuiv(const gl::Context *context,
-                                         GLenum buffer,
-                                         GLint drawbuffer,
-                                         const GLuint *values)
+angle::Result FramebufferD3D::clearBufferuiv(const gl::Context *context,
+                                             GLenum buffer,
+                                             GLint drawbuffer,
+                                             const GLuint *values)
 {
     // glClearBufferuiv can only be called to clear a color buffer
     ClearParameters clearParams = GetClearParameters(context->getGLState(), 0);
@@ -151,10 +151,10 @@
     return clearImpl(context, clearParams);
 }
 
-gl::Error FramebufferD3D::clearBufferiv(const gl::Context *context,
-                                        GLenum buffer,
-                                        GLint drawbuffer,
-                                        const GLint *values)
+angle::Result FramebufferD3D::clearBufferiv(const gl::Context *context,
+                                            GLenum buffer,
+                                            GLint drawbuffer,
+                                            const GLint *values)
 {
     // glClearBufferiv can be called to clear the color buffer or stencil buffer
     ClearParameters clearParams = GetClearParameters(context->getGLState(), 0);
@@ -178,11 +178,11 @@
     return clearImpl(context, clearParams);
 }
 
-gl::Error FramebufferD3D::clearBufferfi(const gl::Context *context,
-                                        GLenum buffer,
-                                        GLint drawbuffer,
-                                        GLfloat depth,
-                                        GLint stencil)
+angle::Result FramebufferD3D::clearBufferfi(const gl::Context *context,
+                                            GLenum buffer,
+                                            GLint drawbuffer,
+                                            GLfloat depth,
+                                            GLint stencil)
 {
     // glClearBufferfi can only be called to clear a depth stencil buffer
     ClearParameters clearParams   = GetClearParameters(context->getGLState(), 0);
@@ -240,20 +240,20 @@
     return implementationFormatInfo.getReadPixelsType(context->getClientVersion());
 }
 
-gl::Error FramebufferD3D::readPixels(const gl::Context *context,
-                                     const gl::Rectangle &origArea,
-                                     GLenum format,
-                                     GLenum type,
-                                     void *pixels)
+angle::Result FramebufferD3D::readPixels(const gl::Context *context,
+                                         const gl::Rectangle &area,
+                                         GLenum format,
+                                         GLenum type,
+                                         void *pixels)
 {
     // Clip read area to framebuffer.
     const gl::Extents fbSize = getState().getReadAttachment()->getSize();
     const gl::Rectangle fbRect(0, 0, fbSize.width, fbSize.height);
-    gl::Rectangle area;
-    if (!ClipRectangle(origArea, fbRect, &area))
+    gl::Rectangle clippedArea;
+    if (!ClipRectangle(area, fbRect, &clippedArea))
     {
         // nothing to read
-        return gl::NoError();
+        return angle::Result::Continue();
     }
 
     const gl::PixelPackState &packState = context->getGLState().getPackState();
@@ -264,24 +264,24 @@
 
     GLuint outputPitch = 0;
     ANGLE_CHECK_HR_MATH(contextD3D,
-                        sizedFormatInfo.computeRowPitch(type, origArea.width, packState.alignment,
+                        sizedFormatInfo.computeRowPitch(type, area.width, packState.alignment,
                                                         packState.rowLength, &outputPitch));
 
     GLuint outputSkipBytes = 0;
     ANGLE_CHECK_HR_MATH(contextD3D, sizedFormatInfo.computeSkipBytes(
                                         type, outputPitch, 0, packState, false, &outputSkipBytes));
-    outputSkipBytes +=
-        (area.x - origArea.x) * sizedFormatInfo.pixelBytes + (area.y - origArea.y) * outputPitch;
+    outputSkipBytes += (clippedArea.x - area.x) * sizedFormatInfo.pixelBytes +
+                       (clippedArea.y - area.y) * outputPitch;
 
-    return readPixelsImpl(context, area, format, type, outputPitch, packState,
+    return readPixelsImpl(context, clippedArea, format, type, outputPitch, packState,
                           static_cast<uint8_t *>(pixels) + outputSkipBytes);
 }
 
-gl::Error FramebufferD3D::blit(const gl::Context *context,
-                               const gl::Rectangle &sourceArea,
-                               const gl::Rectangle &destArea,
-                               GLbitfield mask,
-                               GLenum filter)
+angle::Result FramebufferD3D::blit(const gl::Context *context,
+                                   const gl::Rectangle &sourceArea,
+                                   const gl::Rectangle &destArea,
+                                   GLbitfield mask,
+                                   GLenum filter)
 {
     const auto &glState                      = context->getGLState();
     const gl::Framebuffer *sourceFramebuffer = glState.getReadFramebuffer();
@@ -290,7 +290,7 @@
                        (mask & GL_DEPTH_BUFFER_BIT) != 0, (mask & GL_STENCIL_BUFFER_BIT) != 0,
                        filter, sourceFramebuffer));
 
-    return gl::NoError();
+    return angle::Result::Continue();
 }
 
 bool FramebufferD3D::checkStatus(const gl::Context *context) const
diff --git a/src/libANGLE/renderer/d3d/FramebufferD3D.h b/src/libANGLE/renderer/d3d/FramebufferD3D.h
index dc67700..d7ad1d3 100644
--- a/src/libANGLE/renderer/d3d/FramebufferD3D.h
+++ b/src/libANGLE/renderer/d3d/FramebufferD3D.h
@@ -62,38 +62,38 @@
     FramebufferD3D(const gl::FramebufferState &data, RendererD3D *renderer);
     ~FramebufferD3D() override;
 
-    gl::Error clear(const gl::Context *context, GLbitfield mask) override;
-    gl::Error clearBufferfv(const gl::Context *context,
-                            GLenum buffer,
-                            GLint drawbuffer,
-                            const GLfloat *values) override;
-    gl::Error clearBufferuiv(const gl::Context *context,
-                             GLenum buffer,
-                             GLint drawbuffer,
-                             const GLuint *values) override;
-    gl::Error clearBufferiv(const gl::Context *context,
-                            GLenum buffer,
-                            GLint drawbuffer,
-                            const GLint *values) override;
-    gl::Error clearBufferfi(const gl::Context *context,
-                            GLenum buffer,
-                            GLint drawbuffer,
-                            GLfloat depth,
-                            GLint stencil) override;
+    angle::Result clear(const gl::Context *context, GLbitfield mask) override;
+    angle::Result clearBufferfv(const gl::Context *context,
+                                GLenum buffer,
+                                GLint drawbuffer,
+                                const GLfloat *values) override;
+    angle::Result clearBufferuiv(const gl::Context *context,
+                                 GLenum buffer,
+                                 GLint drawbuffer,
+                                 const GLuint *values) override;
+    angle::Result clearBufferiv(const gl::Context *context,
+                                GLenum buffer,
+                                GLint drawbuffer,
+                                const GLint *values) override;
+    angle::Result clearBufferfi(const gl::Context *context,
+                                GLenum buffer,
+                                GLint drawbuffer,
+                                GLfloat depth,
+                                GLint stencil) override;
 
     GLenum getImplementationColorReadFormat(const gl::Context *context) const override;
     GLenum getImplementationColorReadType(const gl::Context *context) const override;
-    gl::Error readPixels(const gl::Context *context,
-                         const gl::Rectangle &area,
-                         GLenum format,
-                         GLenum type,
-                         void *pixels) override;
+    angle::Result readPixels(const gl::Context *context,
+                             const gl::Rectangle &area,
+                             GLenum format,
+                             GLenum type,
+                             void *pixels) override;
 
-    gl::Error blit(const gl::Context *context,
-                   const gl::Rectangle &sourceArea,
-                   const gl::Rectangle &destArea,
-                   GLbitfield mask,
-                   GLenum filter) override;
+    angle::Result blit(const gl::Context *context,
+                       const gl::Rectangle &sourceArea,
+                       const gl::Rectangle &destArea,
+                       GLbitfield mask,
+                       GLenum filter) override;
 
     bool checkStatus(const gl::Context *context) const override;
 
diff --git a/src/libANGLE/renderer/d3d/d3d11/Framebuffer11.cpp b/src/libANGLE/renderer/d3d/d3d11/Framebuffer11.cpp
index 9f8dc64..d6ce2d2 100644
--- a/src/libANGLE/renderer/d3d/d3d11/Framebuffer11.cpp
+++ b/src/libANGLE/renderer/d3d/d3d11/Framebuffer11.cpp
@@ -113,16 +113,16 @@
     return angle::Result::Continue();
 }
 
-gl::Error Framebuffer11::invalidate(const gl::Context *context,
-                                    size_t count,
-                                    const GLenum *attachments)
+angle::Result Framebuffer11::invalidate(const gl::Context *context,
+                                        size_t count,
+                                        const GLenum *attachments)
 {
     return invalidateBase(context, count, attachments, false);
 }
 
-gl::Error Framebuffer11::discard(const gl::Context *context,
-                                 size_t count,
-                                 const GLenum *attachments)
+angle::Result Framebuffer11::discard(const gl::Context *context,
+                                     size_t count,
+                                     const GLenum *attachments)
 {
     return invalidateBase(context, count, attachments, true);
 }
@@ -219,13 +219,13 @@
     return angle::Result::Continue();
 }
 
-gl::Error Framebuffer11::invalidateSub(const gl::Context *context,
-                                       size_t,
-                                       const GLenum *,
-                                       const gl::Rectangle &)
+angle::Result Framebuffer11::invalidateSub(const gl::Context *context,
+                                           size_t count,
+                                           const GLenum *attachments,
+                                           const gl::Rectangle &area)
 {
     // A no-op implementation conforms to the spec, so don't call UNIMPLEMENTED()
-    return gl::NoError();
+    return angle::Result::Continue();
 }
 
 angle::Result Framebuffer11::invalidateAttachment(const gl::Context *context,
@@ -397,16 +397,16 @@
     return angle::Result::Continue();
 }
 
-gl::Error Framebuffer11::getSamplePosition(const gl::Context *context,
-                                           size_t index,
-                                           GLfloat *xy) const
+angle::Result Framebuffer11::getSamplePosition(const gl::Context *context,
+                                               size_t index,
+                                               GLfloat *xy) const
 {
     const gl::FramebufferAttachment *attachment = mState.getFirstNonNullAttachment();
     ASSERT(attachment);
     GLsizei sampleCount = attachment->getSamples();
 
     d3d11_gl::GetSamplePosition(sampleCount, index, xy);
-    return gl::NoError();
+    return angle::Result::Continue();
 }
 
 RenderTarget11 *Framebuffer11::getFirstRenderTarget() const
diff --git a/src/libANGLE/renderer/d3d/d3d11/Framebuffer11.h b/src/libANGLE/renderer/d3d/d3d11/Framebuffer11.h
index caf1691..dcd8531 100644
--- a/src/libANGLE/renderer/d3d/d3d11/Framebuffer11.h
+++ b/src/libANGLE/renderer/d3d/d3d11/Framebuffer11.h
@@ -24,14 +24,16 @@
     Framebuffer11(const gl::FramebufferState &data, Renderer11 *renderer);
     ~Framebuffer11() override;
 
-    gl::Error discard(const gl::Context *context, size_t count, const GLenum *attachments) override;
-    gl::Error invalidate(const gl::Context *context,
-                         size_t count,
-                         const GLenum *attachments) override;
-    gl::Error invalidateSub(const gl::Context *context,
-                            size_t count,
-                            const GLenum *attachments,
-                            const gl::Rectangle &area) override;
+    angle::Result discard(const gl::Context *context,
+                          size_t count,
+                          const GLenum *attachments) override;
+    angle::Result invalidate(const gl::Context *context,
+                             size_t count,
+                             const GLenum *attachments) override;
+    angle::Result invalidateSub(const gl::Context *context,
+                                size_t count,
+                                const GLenum *attachments,
+                                const gl::Rectangle &area) override;
 
     // Invalidate the cached swizzles of all bound texture attachments.
     angle::Result markAttachmentsDirty(const gl::Context *context) const;
@@ -50,9 +52,9 @@
 
     RenderTarget11 *getFirstRenderTarget() const;
 
-    gl::Error getSamplePosition(const gl::Context *context,
-                                size_t index,
-                                GLfloat *xy) const override;
+    angle::Result getSamplePosition(const gl::Context *context,
+                                    size_t index,
+                                    GLfloat *xy) const override;
 
   private:
     angle::Result clearImpl(const gl::Context *context,
diff --git a/src/libANGLE/renderer/d3d/d3d9/Framebuffer9.cpp b/src/libANGLE/renderer/d3d/d3d9/Framebuffer9.cpp
index 4205812..1e17090 100644
--- a/src/libANGLE/renderer/d3d/d3d9/Framebuffer9.cpp
+++ b/src/libANGLE/renderer/d3d/d3d9/Framebuffer9.cpp
@@ -34,28 +34,29 @@
 {
 }
 
-gl::Error Framebuffer9::discard(const gl::Context *context, size_t, const GLenum *)
+angle::Result Framebuffer9::discard(const gl::Context *context,
+                                    size_t count,
+                                    const GLenum *attachments)
 {
-    // Extension not implemented in D3D9 renderer
-    UNREACHABLE();
-    return gl::NoError();
+    ANGLE_HR_UNREACHABLE(GetImplAs<Context9>(context));
+    return angle::Result::Stop();
 }
 
-gl::Error Framebuffer9::invalidate(const gl::Context *context, size_t, const GLenum *)
+angle::Result Framebuffer9::invalidate(const gl::Context *context,
+                                       size_t count,
+                                       const GLenum *attachments)
 {
-    // Shouldn't ever reach here in D3D9
-    UNREACHABLE();
-    return gl::NoError();
+    ANGLE_HR_UNREACHABLE(GetImplAs<Context9>(context));
+    return angle::Result::Stop();
 }
 
-gl::Error Framebuffer9::invalidateSub(const gl::Context *context,
-                                      size_t,
-                                      const GLenum *,
-                                      const gl::Rectangle &)
+angle::Result Framebuffer9::invalidateSub(const gl::Context *context,
+                                          size_t count,
+                                          const GLenum *attachments,
+                                          const gl::Rectangle &area)
 {
-    // Shouldn't ever reach here in D3D9
-    UNREACHABLE();
-    return gl::NoError();
+    ANGLE_HR_UNREACHABLE(GetImplAs<Context9>(context));
+    return angle::Result::Stop();
 }
 
 angle::Result Framebuffer9::clearImpl(const gl::Context *context,
@@ -390,12 +391,12 @@
     return d3dFormatInfo.info().glInternalFormat;
 }
 
-gl::Error Framebuffer9::getSamplePosition(const gl::Context *context,
-                                          size_t index,
-                                          GLfloat *xy) const
+angle::Result Framebuffer9::getSamplePosition(const gl::Context *context,
+                                              size_t index,
+                                              GLfloat *xy) const
 {
-    UNREACHABLE();
-    return gl::InternalError() << "getSamplePosition is unsupported to d3d9.";
+    ANGLE_HR_UNREACHABLE(GetImplAs<Context9>(context));
+    return angle::Result::Stop();
 }
 
 angle::Result Framebuffer9::syncState(const gl::Context *context,
diff --git a/src/libANGLE/renderer/d3d/d3d9/Framebuffer9.h b/src/libANGLE/renderer/d3d/d3d9/Framebuffer9.h
index dbdedea..261db3b 100644
--- a/src/libANGLE/renderer/d3d/d3d9/Framebuffer9.h
+++ b/src/libANGLE/renderer/d3d/d3d9/Framebuffer9.h
@@ -23,18 +23,20 @@
     Framebuffer9(const gl::FramebufferState &data, Renderer9 *renderer);
     ~Framebuffer9() override;
 
-    gl::Error discard(const gl::Context *context, size_t count, const GLenum *attachments) override;
-    gl::Error invalidate(const gl::Context *context,
-                         size_t count,
-                         const GLenum *attachments) override;
-    gl::Error invalidateSub(const gl::Context *context,
-                            size_t count,
-                            const GLenum *attachments,
-                            const gl::Rectangle &area) override;
+    angle::Result discard(const gl::Context *context,
+                          size_t count,
+                          const GLenum *attachments) override;
+    angle::Result invalidate(const gl::Context *context,
+                             size_t count,
+                             const GLenum *attachments) override;
+    angle::Result invalidateSub(const gl::Context *context,
+                                size_t count,
+                                const GLenum *attachments,
+                                const gl::Rectangle &area) override;
 
-    gl::Error getSamplePosition(const gl::Context *context,
-                                size_t index,
-                                GLfloat *xy) const override;
+    angle::Result getSamplePosition(const gl::Context *context,
+                                    size_t index,
+                                    GLfloat *xy) const override;
 
     angle::Result syncState(const gl::Context *context,
                             const gl::Framebuffer::DirtyBits &dirtyBits) override;
diff --git a/src/libANGLE/renderer/gl/FramebufferGL.cpp b/src/libANGLE/renderer/gl/FramebufferGL.cpp
index c3b1913..a5a64cd 100644
--- a/src/libANGLE/renderer/gl/FramebufferGL.cpp
+++ b/src/libANGLE/renderer/gl/FramebufferGL.cpp
@@ -210,13 +210,17 @@
     mFramebufferID = 0;
 }
 
-Error FramebufferGL::discard(const gl::Context *context, size_t count, const GLenum *attachments)
+angle::Result FramebufferGL::discard(const gl::Context *context,
+                                     size_t count,
+                                     const GLenum *attachments)
 {
     // glInvalidateFramebuffer accepts the same enums as glDiscardFramebufferEXT
     return invalidate(context, count, attachments);
 }
 
-Error FramebufferGL::invalidate(const gl::Context *context, size_t count, const GLenum *attachments)
+angle::Result FramebufferGL::invalidate(const gl::Context *context,
+                                        size_t count,
+                                        const GLenum *attachments)
 {
     const GLenum *finalAttachmentsPtr = attachments;
 
@@ -243,13 +247,13 @@
                                          finalAttachmentsPtr);
     }
 
-    return gl::NoError();
+    return angle::Result::Continue();
 }
 
-Error FramebufferGL::invalidateSub(const gl::Context *context,
-                                   size_t count,
-                                   const GLenum *attachments,
-                                   const gl::Rectangle &area)
+angle::Result FramebufferGL::invalidateSub(const gl::Context *context,
+                                           size_t count,
+                                           const GLenum *attachments,
+                                           const gl::Rectangle &area)
 {
 
     const GLenum *finalAttachmentsPtr = attachments;
@@ -273,10 +277,10 @@
                                             area.height);
     }
 
-    return gl::NoError();
+    return angle::Result::Continue();
 }
 
-Error FramebufferGL::clear(const gl::Context *context, GLbitfield mask)
+angle::Result FramebufferGL::clear(const gl::Context *context, GLbitfield mask)
 {
     const FunctionsGL *functions = GetFunctionsGL(context);
     StateManagerGL *stateManager = GetStateManagerGL(context);
@@ -296,13 +300,13 @@
                                             GL_NONE, 0, nullptr, 0.0f, 0);
     }
 
-    return gl::NoError();
+    return angle::Result::Continue();
 }
 
-Error FramebufferGL::clearBufferfv(const gl::Context *context,
-                                   GLenum buffer,
-                                   GLint drawbuffer,
-                                   const GLfloat *values)
+angle::Result FramebufferGL::clearBufferfv(const gl::Context *context,
+                                           GLenum buffer,
+                                           GLint drawbuffer,
+                                           const GLfloat *values)
 {
     const FunctionsGL *functions = GetFunctionsGL(context);
     StateManagerGL *stateManager = GetStateManagerGL(context);
@@ -323,13 +327,13 @@
                                             reinterpret_cast<const uint8_t *>(values), 0.0f, 0);
     }
 
-    return gl::NoError();
+    return angle::Result::Continue();
 }
 
-Error FramebufferGL::clearBufferuiv(const gl::Context *context,
-                                    GLenum buffer,
-                                    GLint drawbuffer,
-                                    const GLuint *values)
+angle::Result FramebufferGL::clearBufferuiv(const gl::Context *context,
+                                            GLenum buffer,
+                                            GLint drawbuffer,
+                                            const GLuint *values)
 {
     const FunctionsGL *functions = GetFunctionsGL(context);
     StateManagerGL *stateManager = GetStateManagerGL(context);
@@ -350,13 +354,13 @@
                                             reinterpret_cast<const uint8_t *>(values), 0.0f, 0);
     }
 
-    return gl::NoError();
+    return angle::Result::Continue();
 }
 
-Error FramebufferGL::clearBufferiv(const gl::Context *context,
-                                   GLenum buffer,
-                                   GLint drawbuffer,
-                                   const GLint *values)
+angle::Result FramebufferGL::clearBufferiv(const gl::Context *context,
+                                           GLenum buffer,
+                                           GLint drawbuffer,
+                                           const GLint *values)
 {
     const FunctionsGL *functions = GetFunctionsGL(context);
     StateManagerGL *stateManager = GetStateManagerGL(context);
@@ -377,14 +381,14 @@
                                             reinterpret_cast<const uint8_t *>(values), 0.0f, 0);
     }
 
-    return gl::NoError();
+    return angle::Result::Continue();
 }
 
-Error FramebufferGL::clearBufferfi(const gl::Context *context,
-                                   GLenum buffer,
-                                   GLint drawbuffer,
-                                   GLfloat depth,
-                                   GLint stencil)
+angle::Result FramebufferGL::clearBufferfi(const gl::Context *context,
+                                           GLenum buffer,
+                                           GLint drawbuffer,
+                                           GLfloat depth,
+                                           GLint stencil)
 {
     const FunctionsGL *functions = GetFunctionsGL(context);
     StateManagerGL *stateManager = GetStateManagerGL(context);
@@ -405,7 +409,7 @@
                                             nullptr, depth, stencil);
     }
 
-    return gl::NoError();
+    return angle::Result::Continue();
 }
 
 GLenum FramebufferGL::getImplementationColorReadFormat(const gl::Context *context) const
@@ -422,11 +426,11 @@
     return format.info->getReadPixelsType(context->getClientVersion());
 }
 
-Error FramebufferGL::readPixels(const gl::Context *context,
-                                const gl::Rectangle &origArea,
-                                GLenum format,
-                                GLenum type,
-                                void *ptrOrOffset)
+angle::Result FramebufferGL::readPixels(const gl::Context *context,
+                                        const gl::Rectangle &area,
+                                        GLenum format,
+                                        GLenum type,
+                                        void *pixels)
 {
     ContextGL *contextGL             = GetImplAs<ContextGL>(context);
     const FunctionsGL *functions     = GetFunctionsGL(context);
@@ -436,11 +440,11 @@
     // Clip read area to framebuffer.
     const gl::Extents fbSize = getState().getReadAttachment()->getSize();
     const gl::Rectangle fbRect(0, 0, fbSize.width, fbSize.height);
-    gl::Rectangle area;
-    if (!ClipRectangle(origArea, fbRect, &area))
+    gl::Rectangle clippedArea;
+    if (!ClipRectangle(area, fbRect, &clippedArea))
     {
         // nothing to read
-        return gl::NoError();
+        return angle::Result::Continue();
     }
 
     PixelPackState packState     = context->getGLState().getPackState();
@@ -456,11 +460,11 @@
 
     bool useOverlappingRowsWorkaround = workarounds.packOverlappingRowsSeparatelyPackBuffer &&
                                         packBuffer && packState.rowLength != 0 &&
-                                        packState.rowLength < area.width;
+                                        packState.rowLength < clippedArea.width;
 
-    GLubyte *pixels = static_cast<GLubyte *>(ptrOrOffset);
-    int leftClip    = area.x - origArea.x;
-    int topClip     = area.y - origArea.y;
+    GLubyte *outPtr = static_cast<GLubyte *>(pixels);
+    int leftClip    = clippedArea.x - area.x;
+    int topClip     = clippedArea.y - area.y;
     if (leftClip || topClip)
     {
         // Adjust destination to match portion clipped off left and/or top.
@@ -468,16 +472,16 @@
 
         GLuint rowBytes = 0;
         ANGLE_CHECK_GL_MATH(contextGL,
-                            glFormat.computeRowPitch(readType, origArea.width, packState.alignment,
+                            glFormat.computeRowPitch(readType, area.width, packState.alignment,
                                                      packState.rowLength, &rowBytes));
-        pixels += leftClip * glFormat.pixelBytes + topClip * rowBytes;
+        outPtr += leftClip * glFormat.pixelBytes + topClip * rowBytes;
     }
 
-    if (packState.rowLength == 0 && area.width != origArea.width)
+    if (packState.rowLength == 0 && clippedArea.width != area.width)
     {
         // No rowLength was specified so it will derive from read width, but clipping changed the
         // read width.  Use the original width so we fill the user's buffer as they intended.
-        packState.rowLength = origArea.width;
+        packState.rowLength = area.width;
     }
 
     // We want to use rowLength, but that might not be supported.
@@ -486,26 +490,26 @@
 
     if (cannotSetDesiredRowLength || useOverlappingRowsWorkaround)
     {
-        return readPixelsRowByRow(context, area, readFormat, readType, packState, pixels);
+        return readPixelsRowByRow(context, clippedArea, readFormat, readType, packState, outPtr);
     }
 
     bool useLastRowPaddingWorkaround = false;
     if (workarounds.packLastRowSeparatelyForPaddingInclusion)
     {
         ANGLE_TRY(ShouldApplyLastRowPaddingWorkaround(
-            contextGL, gl::Extents(area.width, area.height, 1), packState, packBuffer, readFormat,
-            readType, false, pixels, &useLastRowPaddingWorkaround));
+            contextGL, gl::Extents(clippedArea.width, clippedArea.height, 1), packState, packBuffer,
+            readFormat, readType, false, outPtr, &useLastRowPaddingWorkaround));
     }
 
-    return readPixelsAllAtOnce(context, area, readFormat, readType, packState, pixels,
+    return readPixelsAllAtOnce(context, clippedArea, readFormat, readType, packState, outPtr,
                                useLastRowPaddingWorkaround);
 }
 
-Error FramebufferGL::blit(const gl::Context *context,
-                          const gl::Rectangle &sourceArea,
-                          const gl::Rectangle &destArea,
-                          GLbitfield mask,
-                          GLenum filter)
+angle::Result FramebufferGL::blit(const gl::Context *context,
+                                  const gl::Rectangle &sourceArea,
+                                  const gl::Rectangle &destArea,
+                                  GLbitfield mask,
+                                  GLenum filter)
 {
     const FunctionsGL *functions = GetFunctionsGL(context);
     StateManagerGL *stateManager = GetStateManagerGL(context);
@@ -579,7 +583,7 @@
 
     if (blitMask == 0)
     {
-        return gl::NoError();
+        return angle::Result::Continue();
     }
 
     const FramebufferGL *sourceFramebufferGL = GetImplAs<FramebufferGL>(sourceFramebuffer);
@@ -590,19 +594,19 @@
                                destArea.x, destArea.y, destArea.x1(), destArea.y1(), blitMask,
                                filter);
 
-    return gl::NoError();
+    return angle::Result::Continue();
 }
 
-gl::Error FramebufferGL::getSamplePosition(const gl::Context *context,
-                                           size_t index,
-                                           GLfloat *xy) const
+angle::Result FramebufferGL::getSamplePosition(const gl::Context *context,
+                                               size_t index,
+                                               GLfloat *xy) const
 {
     const FunctionsGL *functions = GetFunctionsGL(context);
     StateManagerGL *stateManager = GetStateManagerGL(context);
 
     stateManager->bindFramebuffer(GL_FRAMEBUFFER, mFramebufferID);
     functions->getMultisamplefv(GL_SAMPLE_POSITION, static_cast<GLuint>(index), xy);
-    return gl::NoError();
+    return angle::Result::Continue();
 }
 
 bool FramebufferGL::checkStatus(const gl::Context *context) const
diff --git a/src/libANGLE/renderer/gl/FramebufferGL.h b/src/libANGLE/renderer/gl/FramebufferGL.h
index cdab829..c6cc286 100644
--- a/src/libANGLE/renderer/gl/FramebufferGL.h
+++ b/src/libANGLE/renderer/gl/FramebufferGL.h
@@ -28,52 +28,54 @@
 
     void destroy(const gl::Context *context) override;
 
-    gl::Error discard(const gl::Context *context, size_t count, const GLenum *attachments) override;
-    gl::Error invalidate(const gl::Context *context,
-                         size_t count,
-                         const GLenum *attachments) override;
-    gl::Error invalidateSub(const gl::Context *context,
-                            size_t count,
-                            const GLenum *attachments,
-                            const gl::Rectangle &area) override;
+    angle::Result discard(const gl::Context *context,
+                          size_t count,
+                          const GLenum *attachments) override;
+    angle::Result invalidate(const gl::Context *context,
+                             size_t count,
+                             const GLenum *attachments) override;
+    angle::Result invalidateSub(const gl::Context *context,
+                                size_t count,
+                                const GLenum *attachments,
+                                const gl::Rectangle &area) override;
 
-    gl::Error clear(const gl::Context *context, GLbitfield mask) override;
-    gl::Error clearBufferfv(const gl::Context *context,
-                            GLenum buffer,
-                            GLint drawbuffer,
-                            const GLfloat *values) override;
-    gl::Error clearBufferuiv(const gl::Context *context,
-                             GLenum buffer,
-                             GLint drawbuffer,
-                             const GLuint *values) override;
-    gl::Error clearBufferiv(const gl::Context *context,
-                            GLenum buffer,
-                            GLint drawbuffer,
-                            const GLint *values) override;
-    gl::Error clearBufferfi(const gl::Context *context,
-                            GLenum buffer,
-                            GLint drawbuffer,
-                            GLfloat depth,
-                            GLint stencil) override;
+    angle::Result clear(const gl::Context *context, GLbitfield mask) override;
+    angle::Result clearBufferfv(const gl::Context *context,
+                                GLenum buffer,
+                                GLint drawbuffer,
+                                const GLfloat *values) override;
+    angle::Result clearBufferuiv(const gl::Context *context,
+                                 GLenum buffer,
+                                 GLint drawbuffer,
+                                 const GLuint *values) override;
+    angle::Result clearBufferiv(const gl::Context *context,
+                                GLenum buffer,
+                                GLint drawbuffer,
+                                const GLint *values) override;
+    angle::Result clearBufferfi(const gl::Context *context,
+                                GLenum buffer,
+                                GLint drawbuffer,
+                                GLfloat depth,
+                                GLint stencil) override;
 
     GLenum getImplementationColorReadFormat(const gl::Context *context) const override;
     GLenum getImplementationColorReadType(const gl::Context *context) const override;
 
-    gl::Error readPixels(const gl::Context *context,
-                         const gl::Rectangle &area,
-                         GLenum format,
-                         GLenum type,
-                         void *pixels) override;
+    angle::Result readPixels(const gl::Context *context,
+                             const gl::Rectangle &area,
+                             GLenum format,
+                             GLenum type,
+                             void *pixels) override;
 
-    gl::Error blit(const gl::Context *context,
-                   const gl::Rectangle &sourceArea,
-                   const gl::Rectangle &destArea,
-                   GLbitfield mask,
-                   GLenum filter) override;
+    angle::Result blit(const gl::Context *context,
+                       const gl::Rectangle &sourceArea,
+                       const gl::Rectangle &destArea,
+                       GLbitfield mask,
+                       GLenum filter) override;
 
-    gl::Error getSamplePosition(const gl::Context *context,
-                                size_t index,
-                                GLfloat *xy) const override;
+    angle::Result getSamplePosition(const gl::Context *context,
+                                    size_t index,
+                                    GLfloat *xy) const override;
 
     bool checkStatus(const gl::Context *context) const override;
 
diff --git a/src/libANGLE/renderer/null/FramebufferNULL.cpp b/src/libANGLE/renderer/null/FramebufferNULL.cpp
index f6eeeaa..e88c63d 100644
--- a/src/libANGLE/renderer/null/FramebufferNULL.cpp
+++ b/src/libANGLE/renderer/null/FramebufferNULL.cpp
@@ -26,64 +26,64 @@
 {
 }
 
-gl::Error FramebufferNULL::discard(const gl::Context *context,
-                                   size_t count,
-                                   const GLenum *attachments)
+angle::Result FramebufferNULL::discard(const gl::Context *context,
+                                       size_t count,
+                                       const GLenum *attachments)
 {
-    return gl::NoError();
+    return angle::Result::Continue();
 }
 
-gl::Error FramebufferNULL::invalidate(const gl::Context *context,
-                                      size_t count,
-                                      const GLenum *attachments)
+angle::Result FramebufferNULL::invalidate(const gl::Context *context,
+                                          size_t count,
+                                          const GLenum *attachments)
 {
-    return gl::NoError();
+    return angle::Result::Continue();
 }
 
-gl::Error FramebufferNULL::invalidateSub(const gl::Context *context,
-                                         size_t count,
-                                         const GLenum *attachments,
-                                         const gl::Rectangle &area)
+angle::Result FramebufferNULL::invalidateSub(const gl::Context *context,
+                                             size_t count,
+                                             const GLenum *attachments,
+                                             const gl::Rectangle &area)
 {
-    return gl::NoError();
+    return angle::Result::Continue();
 }
 
-gl::Error FramebufferNULL::clear(const gl::Context *context, GLbitfield mask)
+angle::Result FramebufferNULL::clear(const gl::Context *context, GLbitfield mask)
 {
-    return gl::NoError();
+    return angle::Result::Continue();
 }
 
-gl::Error FramebufferNULL::clearBufferfv(const gl::Context *context,
-                                         GLenum buffer,
-                                         GLint drawbuffer,
-                                         const GLfloat *values)
+angle::Result FramebufferNULL::clearBufferfv(const gl::Context *context,
+                                             GLenum buffer,
+                                             GLint drawbuffer,
+                                             const GLfloat *values)
 {
-    return gl::NoError();
+    return angle::Result::Continue();
 }
 
-gl::Error FramebufferNULL::clearBufferuiv(const gl::Context *context,
-                                          GLenum buffer,
-                                          GLint drawbuffer,
-                                          const GLuint *values)
+angle::Result FramebufferNULL::clearBufferuiv(const gl::Context *context,
+                                              GLenum buffer,
+                                              GLint drawbuffer,
+                                              const GLuint *values)
 {
-    return gl::NoError();
+    return angle::Result::Continue();
 }
 
-gl::Error FramebufferNULL::clearBufferiv(const gl::Context *context,
-                                         GLenum buffer,
-                                         GLint drawbuffer,
-                                         const GLint *values)
+angle::Result FramebufferNULL::clearBufferiv(const gl::Context *context,
+                                             GLenum buffer,
+                                             GLint drawbuffer,
+                                             const GLint *values)
 {
-    return gl::NoError();
+    return angle::Result::Continue();
 }
 
-gl::Error FramebufferNULL::clearBufferfi(const gl::Context *context,
-                                         GLenum buffer,
-                                         GLint drawbuffer,
-                                         GLfloat depth,
-                                         GLint stencil)
+angle::Result FramebufferNULL::clearBufferfi(const gl::Context *context,
+                                             GLenum buffer,
+                                             GLint drawbuffer,
+                                             GLfloat depth,
+                                             GLint stencil)
 {
-    return gl::NoError();
+    return angle::Result::Continue();
 }
 
 GLenum FramebufferNULL::getImplementationColorReadFormat(const gl::Context *context) const
@@ -112,11 +112,11 @@
     return format.info->getReadPixelsType(context->getClientVersion());
 }
 
-gl::Error FramebufferNULL::readPixels(const gl::Context *context,
-                                      const gl::Rectangle &origArea,
-                                      GLenum format,
-                                      GLenum type,
-                                      void *ptrOrOffset)
+angle::Result FramebufferNULL::readPixels(const gl::Context *context,
+                                          const gl::Rectangle &origArea,
+                                          GLenum format,
+                                          GLenum type,
+                                          void *ptrOrOffset)
 {
     const gl::PixelPackState &packState = context->getGLState().getPackState();
     gl::Buffer *packBuffer = context->getGLState().getTargetBuffer(gl::BufferBinding::PixelPack);
@@ -141,7 +141,7 @@
     if (!ClipRectangle(origArea, fbRect, &area))
     {
         // nothing to read
-        return gl::NoError();
+        return angle::Result::Continue();
     }
 
     // Compute size of unclipped rows and initial skip
@@ -171,16 +171,16 @@
         pixels += rowBytes;
     }
 
-    return gl::NoError();
+    return angle::Result::Continue();
 }
 
-gl::Error FramebufferNULL::blit(const gl::Context *context,
-                                const gl::Rectangle &sourceArea,
-                                const gl::Rectangle &destArea,
-                                GLbitfield mask,
-                                GLenum filter)
+angle::Result FramebufferNULL::blit(const gl::Context *context,
+                                    const gl::Rectangle &sourceArea,
+                                    const gl::Rectangle &destArea,
+                                    GLbitfield mask,
+                                    GLenum filter)
 {
-    return gl::NoError();
+    return angle::Result::Continue();
 }
 
 bool FramebufferNULL::checkStatus(const gl::Context *context) const
@@ -194,11 +194,11 @@
     return angle::Result::Continue();
 }
 
-gl::Error FramebufferNULL::getSamplePosition(const gl::Context *context,
-                                             size_t index,
-                                             GLfloat *xy) const
+angle::Result FramebufferNULL::getSamplePosition(const gl::Context *context,
+                                                 size_t index,
+                                                 GLfloat *xy) const
 {
-    return gl::NoError();
+    return angle::Result::Continue();
 }
 
 }  // namespace rx
diff --git a/src/libANGLE/renderer/null/FramebufferNULL.h b/src/libANGLE/renderer/null/FramebufferNULL.h
index 3975739..41f1650 100644
--- a/src/libANGLE/renderer/null/FramebufferNULL.h
+++ b/src/libANGLE/renderer/null/FramebufferNULL.h
@@ -21,56 +21,58 @@
     FramebufferNULL(const gl::FramebufferState &state);
     ~FramebufferNULL() override;
 
-    gl::Error discard(const gl::Context *context, size_t count, const GLenum *attachments) override;
-    gl::Error invalidate(const gl::Context *context,
-                         size_t count,
-                         const GLenum *attachments) override;
-    gl::Error invalidateSub(const gl::Context *context,
-                            size_t count,
-                            const GLenum *attachments,
-                            const gl::Rectangle &area) override;
+    angle::Result discard(const gl::Context *context,
+                          size_t count,
+                          const GLenum *attachments) override;
+    angle::Result invalidate(const gl::Context *context,
+                             size_t count,
+                             const GLenum *attachments) override;
+    angle::Result invalidateSub(const gl::Context *context,
+                                size_t count,
+                                const GLenum *attachments,
+                                const gl::Rectangle &area) override;
 
-    gl::Error clear(const gl::Context *context, GLbitfield mask) override;
-    gl::Error clearBufferfv(const gl::Context *context,
-                            GLenum buffer,
-                            GLint drawbuffer,
-                            const GLfloat *values) override;
-    gl::Error clearBufferuiv(const gl::Context *context,
-                             GLenum buffer,
-                             GLint drawbuffer,
-                             const GLuint *values) override;
-    gl::Error clearBufferiv(const gl::Context *context,
-                            GLenum buffer,
-                            GLint drawbuffer,
-                            const GLint *values) override;
-    gl::Error clearBufferfi(const gl::Context *context,
-                            GLenum buffer,
-                            GLint drawbuffer,
-                            GLfloat depth,
-                            GLint stencil) override;
+    angle::Result clear(const gl::Context *context, GLbitfield mask) override;
+    angle::Result clearBufferfv(const gl::Context *context,
+                                GLenum buffer,
+                                GLint drawbuffer,
+                                const GLfloat *values) override;
+    angle::Result clearBufferuiv(const gl::Context *context,
+                                 GLenum buffer,
+                                 GLint drawbuffer,
+                                 const GLuint *values) override;
+    angle::Result clearBufferiv(const gl::Context *context,
+                                GLenum buffer,
+                                GLint drawbuffer,
+                                const GLint *values) override;
+    angle::Result clearBufferfi(const gl::Context *context,
+                                GLenum buffer,
+                                GLint drawbuffer,
+                                GLfloat depth,
+                                GLint stencil) override;
 
     GLenum getImplementationColorReadFormat(const gl::Context *context) const override;
     GLenum getImplementationColorReadType(const gl::Context *context) const override;
-    gl::Error readPixels(const gl::Context *context,
-                         const gl::Rectangle &area,
-                         GLenum format,
-                         GLenum type,
-                         void *pixels) override;
+    angle::Result readPixels(const gl::Context *context,
+                             const gl::Rectangle &area,
+                             GLenum format,
+                             GLenum type,
+                             void *pixels) override;
 
-    gl::Error blit(const gl::Context *context,
-                   const gl::Rectangle &sourceArea,
-                   const gl::Rectangle &destArea,
-                   GLbitfield mask,
-                   GLenum filter) override;
+    angle::Result blit(const gl::Context *context,
+                       const gl::Rectangle &sourceArea,
+                       const gl::Rectangle &destArea,
+                       GLbitfield mask,
+                       GLenum filter) override;
 
     bool checkStatus(const gl::Context *context) const override;
 
     angle::Result syncState(const gl::Context *context,
                             const gl::Framebuffer::DirtyBits &dirtyBits) override;
 
-    gl::Error getSamplePosition(const gl::Context *context,
-                                size_t index,
-                                GLfloat *xy) const override;
+    angle::Result getSamplePosition(const gl::Context *context,
+                                    size_t index,
+                                    GLfloat *xy) const override;
 };
 
 }  // namespace rx
diff --git a/src/libANGLE/renderer/vulkan/FramebufferVk.cpp b/src/libANGLE/renderer/vulkan/FramebufferVk.cpp
index 4417ca1..8e91a53 100644
--- a/src/libANGLE/renderer/vulkan/FramebufferVk.cpp
+++ b/src/libANGLE/renderer/vulkan/FramebufferVk.cpp
@@ -142,32 +142,32 @@
     mBlitPixelBuffer.destroy(contextVk->getDevice());
 }
 
-gl::Error FramebufferVk::discard(const gl::Context *context,
-                                 size_t count,
-                                 const GLenum *attachments)
+angle::Result FramebufferVk::discard(const gl::Context *context,
+                                     size_t count,
+                                     const GLenum *attachments)
 {
-    UNIMPLEMENTED();
-    return gl::InternalError();
+    ANGLE_VK_UNREACHABLE(vk::GetImpl(context));
+    return angle::Result::Stop();
 }
 
-gl::Error FramebufferVk::invalidate(const gl::Context *context,
-                                    size_t count,
-                                    const GLenum *attachments)
+angle::Result FramebufferVk::invalidate(const gl::Context *context,
+                                        size_t count,
+                                        const GLenum *attachments)
 {
-    UNIMPLEMENTED();
-    return gl::InternalError();
+    ANGLE_VK_UNREACHABLE(vk::GetImpl(context));
+    return angle::Result::Stop();
 }
 
-gl::Error FramebufferVk::invalidateSub(const gl::Context *context,
-                                       size_t count,
-                                       const GLenum *attachments,
-                                       const gl::Rectangle &area)
+angle::Result FramebufferVk::invalidateSub(const gl::Context *context,
+                                           size_t count,
+                                           const GLenum *attachments,
+                                           const gl::Rectangle &area)
 {
-    UNIMPLEMENTED();
-    return gl::InternalError();
+    ANGLE_VK_UNREACHABLE(vk::GetImpl(context));
+    return angle::Result::Stop();
 }
 
-gl::Error FramebufferVk::clear(const gl::Context *context, GLbitfield mask)
+angle::Result FramebufferVk::clear(const gl::Context *context, GLbitfield mask)
 {
     ContextVk *contextVk = vk::GetImpl(context);
 
@@ -207,7 +207,7 @@
             // TODO(jmadill): Masked stencil clear. http://anglebug.com/2540
             ANGLE_TRY(clearWithClearAttachments(contextVk, false, clearDepth, clearStencil));
         }
-        return gl::NoError();
+        return angle::Result::Continue();
     }
 
     // If we clear the depth OR the stencil but not both, and we have a packed depth stencil
@@ -226,7 +226,7 @@
         // Masked stencil clears are currently not implemented.
         // TODO(jmadill): Masked stencil clear. http://anglebug.com/2540
         ANGLE_TRY(clearWithClearAttachments(contextVk, clearColor, clearDepth, clearStencil));
-        return gl::NoError();
+        return angle::Result::Continue();
     }
 
     // Standard Depth/stencil clear without scissor.
@@ -247,7 +247,7 @@
 
     if (!clearColor)
     {
-        return gl::NoError();
+        return angle::Result::Continue();
     }
 
     const auto *attachment = mState.getFirstNonNullAttachment();
@@ -283,44 +283,44 @@
                                colorRenderTarget->getLayerIndex(), 1, commandBuffer);
     }
 
-    return gl::NoError();
+    return angle::Result::Continue();
 }
 
-gl::Error FramebufferVk::clearBufferfv(const gl::Context *context,
-                                       GLenum buffer,
-                                       GLint drawbuffer,
-                                       const GLfloat *values)
+angle::Result FramebufferVk::clearBufferfv(const gl::Context *context,
+                                           GLenum buffer,
+                                           GLint drawbuffer,
+                                           const GLfloat *values)
 {
-    UNIMPLEMENTED();
-    return gl::InternalError();
+    ANGLE_VK_UNREACHABLE(vk::GetImpl(context));
+    return angle::Result::Stop();
 }
 
-gl::Error FramebufferVk::clearBufferuiv(const gl::Context *context,
-                                        GLenum buffer,
-                                        GLint drawbuffer,
-                                        const GLuint *values)
+angle::Result FramebufferVk::clearBufferuiv(const gl::Context *context,
+                                            GLenum buffer,
+                                            GLint drawbuffer,
+                                            const GLuint *values)
 {
-    UNIMPLEMENTED();
-    return gl::InternalError();
+    ANGLE_VK_UNREACHABLE(vk::GetImpl(context));
+    return angle::Result::Stop();
 }
 
-gl::Error FramebufferVk::clearBufferiv(const gl::Context *context,
-                                       GLenum buffer,
-                                       GLint drawbuffer,
-                                       const GLint *values)
+angle::Result FramebufferVk::clearBufferiv(const gl::Context *context,
+                                           GLenum buffer,
+                                           GLint drawbuffer,
+                                           const GLint *values)
 {
-    UNIMPLEMENTED();
-    return gl::InternalError();
+    ANGLE_VK_UNREACHABLE(vk::GetImpl(context));
+    return angle::Result::Stop();
 }
 
-gl::Error FramebufferVk::clearBufferfi(const gl::Context *context,
-                                       GLenum buffer,
-                                       GLint drawbuffer,
-                                       GLfloat depth,
-                                       GLint stencil)
+angle::Result FramebufferVk::clearBufferfi(const gl::Context *context,
+                                           GLenum buffer,
+                                           GLint drawbuffer,
+                                           GLfloat depth,
+                                           GLint stencil)
 {
-    UNIMPLEMENTED();
-    return gl::InternalError();
+    ANGLE_VK_UNREACHABLE(vk::GetImpl(context));
+    return angle::Result::Stop();
 }
 
 GLenum FramebufferVk::getImplementationColorReadFormat(const gl::Context *context) const
@@ -333,11 +333,11 @@
     return GetReadAttachmentInfo(context, mRenderTargetCache.getColorRead(mState)).type;
 }
 
-gl::Error FramebufferVk::readPixels(const gl::Context *context,
-                                    const gl::Rectangle &area,
-                                    GLenum format,
-                                    GLenum type,
-                                    void *pixels)
+angle::Result FramebufferVk::readPixels(const gl::Context *context,
+                                        const gl::Rectangle &area,
+                                        GLenum format,
+                                        GLenum type,
+                                        void *pixels)
 {
     // Clip read area to framebuffer.
     const gl::Extents &fbSize = getState().getReadAttachment()->getSize();
@@ -349,7 +349,7 @@
     if (!ClipRectangle(area, fbRect, &clippedArea))
     {
         // nothing to read
-        return gl::NoError();
+        return angle::Result::Continue();
     }
     gl::Rectangle flippedArea = clippedArea;
     if (contextVk->isViewportFlipEnabledForReadFBO())
@@ -386,7 +386,7 @@
                              getColorReadRenderTarget(),
                              static_cast<uint8_t *>(pixels) + outputSkipBytes));
     mReadPixelBuffer.releaseRetainedBuffers(renderer);
-    return gl::NoError();
+    return angle::Result::Continue();
 }
 
 RenderTargetVk *FramebufferVk::getDepthStencilRenderTarget() const
@@ -497,11 +497,11 @@
     return angle::Result::Continue();
 }
 
-gl::Error FramebufferVk::blit(const gl::Context *context,
-                              const gl::Rectangle &sourceArea,
-                              const gl::Rectangle &destArea,
-                              GLbitfield mask,
-                              GLenum filter)
+angle::Result FramebufferVk::blit(const gl::Context *context,
+                                  const gl::Rectangle &sourceArea,
+                                  const gl::Rectangle &destArea,
+                                  GLbitfield mask,
+                                  GLenum filter)
 {
     ContextVk *contextVk = vk::GetImpl(context);
     RendererVk *renderer = contextVk->getRenderer();
@@ -524,12 +524,12 @@
         const gl::Rectangle scissorRect = glState.getScissor();
         if (!ClipRectangle(sourceArea, scissorRect, &readRect))
         {
-            return gl::NoError();
+            return angle::Result::Continue();
         }
 
         if (!ClipRectangle(destArea, scissorRect, &drawRect))
         {
-            return gl::NoError();
+            return angle::Result::Continue();
         }
     }
 
@@ -542,7 +542,7 @@
         gl::Rectangle readRenderTargetRect;
         if (!ClipToRenderTarget(readRect, readRenderTarget, &readRenderTargetRect))
         {
-            return gl::NoError();
+            return angle::Result::Continue();
         }
 
         for (size_t colorAttachment : mState.getEnabledDrawBuffers())
@@ -555,7 +555,7 @@
             gl::Rectangle drawRenderTargetRect;
             if (!ClipToRenderTarget(drawRect, drawRenderTarget, &drawRenderTargetRect))
             {
-                return gl::NoError();
+                return angle::Result::Continue();
             }
 
             ANGLE_TRY(blitWithCommand(contextVk, readRenderTargetRect, drawRenderTargetRect,
@@ -572,7 +572,7 @@
         gl::Rectangle readRenderTargetRect;
         if (!ClipToRenderTarget(readRect, readRenderTarget, &readRenderTargetRect))
         {
-            return gl::NoError();
+            return angle::Result::Continue();
         }
 
         RenderTargetVk *drawRenderTarget = mRenderTargetCache.getDepthStencil();
@@ -581,7 +581,7 @@
         gl::Rectangle drawRenderTargetRect;
         if (!ClipToRenderTarget(drawRect, drawRenderTarget, &drawRenderTargetRect))
         {
-            return gl::NoError();
+            return angle::Result::Continue();
         }
 
         ASSERT(readRenderTargetRect == drawRenderTargetRect);
@@ -619,7 +619,7 @@
         }
     }
 
-    return gl::NoError();
+    return angle::Result::Continue();
 }
 
 angle::Result FramebufferVk::blitWithCommand(ContextVk *contextVk,
@@ -1064,12 +1064,12 @@
     return angle::Result::Continue();
 }
 
-gl::Error FramebufferVk::getSamplePosition(const gl::Context *context,
-                                           size_t index,
-                                           GLfloat *xy) const
+angle::Result FramebufferVk::getSamplePosition(const gl::Context *context,
+                                               size_t index,
+                                               GLfloat *xy) const
 {
-    UNIMPLEMENTED();
-    return gl::InternalError() << "getSamplePosition is unimplemented.";
+    ANGLE_VK_UNREACHABLE(vk::GetImpl(context));
+    return angle::Result::Stop();
 }
 
 angle::Result FramebufferVk::getCommandBufferForDraw(ContextVk *contextVk,
diff --git a/src/libANGLE/renderer/vulkan/FramebufferVk.h b/src/libANGLE/renderer/vulkan/FramebufferVk.h
index 627fb21..ca0fbdc 100644
--- a/src/libANGLE/renderer/vulkan/FramebufferVk.h
+++ b/src/libANGLE/renderer/vulkan/FramebufferVk.h
@@ -38,56 +38,58 @@
     ~FramebufferVk() override;
     void destroy(const gl::Context *context) override;
 
-    gl::Error discard(const gl::Context *context, size_t count, const GLenum *attachments) override;
-    gl::Error invalidate(const gl::Context *context,
-                         size_t count,
-                         const GLenum *attachments) override;
-    gl::Error invalidateSub(const gl::Context *context,
-                            size_t count,
-                            const GLenum *attachments,
-                            const gl::Rectangle &area) override;
+    angle::Result discard(const gl::Context *context,
+                          size_t count,
+                          const GLenum *attachments) override;
+    angle::Result invalidate(const gl::Context *context,
+                             size_t count,
+                             const GLenum *attachments) override;
+    angle::Result invalidateSub(const gl::Context *context,
+                                size_t count,
+                                const GLenum *attachments,
+                                const gl::Rectangle &area) override;
 
-    gl::Error clear(const gl::Context *context, GLbitfield mask) override;
-    gl::Error clearBufferfv(const gl::Context *context,
-                            GLenum buffer,
-                            GLint drawbuffer,
-                            const GLfloat *values) override;
-    gl::Error clearBufferuiv(const gl::Context *context,
-                             GLenum buffer,
-                             GLint drawbuffer,
-                             const GLuint *values) override;
-    gl::Error clearBufferiv(const gl::Context *context,
-                            GLenum buffer,
-                            GLint drawbuffer,
-                            const GLint *values) override;
-    gl::Error clearBufferfi(const gl::Context *context,
-                            GLenum buffer,
-                            GLint drawbuffer,
-                            GLfloat depth,
-                            GLint stencil) override;
+    angle::Result clear(const gl::Context *context, GLbitfield mask) override;
+    angle::Result clearBufferfv(const gl::Context *context,
+                                GLenum buffer,
+                                GLint drawbuffer,
+                                const GLfloat *values) override;
+    angle::Result clearBufferuiv(const gl::Context *context,
+                                 GLenum buffer,
+                                 GLint drawbuffer,
+                                 const GLuint *values) override;
+    angle::Result clearBufferiv(const gl::Context *context,
+                                GLenum buffer,
+                                GLint drawbuffer,
+                                const GLint *values) override;
+    angle::Result clearBufferfi(const gl::Context *context,
+                                GLenum buffer,
+                                GLint drawbuffer,
+                                GLfloat depth,
+                                GLint stencil) override;
 
     GLenum getImplementationColorReadFormat(const gl::Context *context) const override;
     GLenum getImplementationColorReadType(const gl::Context *context) const override;
-    gl::Error readPixels(const gl::Context *context,
-                         const gl::Rectangle &area,
-                         GLenum format,
-                         GLenum type,
-                         void *pixels) override;
+    angle::Result readPixels(const gl::Context *context,
+                             const gl::Rectangle &area,
+                             GLenum format,
+                             GLenum type,
+                             void *pixels) override;
 
-    gl::Error blit(const gl::Context *context,
-                   const gl::Rectangle &sourceArea,
-                   const gl::Rectangle &destArea,
-                   GLbitfield mask,
-                   GLenum filter) override;
+    angle::Result blit(const gl::Context *context,
+                       const gl::Rectangle &sourceArea,
+                       const gl::Rectangle &destArea,
+                       GLbitfield mask,
+                       GLenum filter) override;
 
     bool checkStatus(const gl::Context *context) const override;
 
     angle::Result syncState(const gl::Context *context,
                             const gl::Framebuffer::DirtyBits &dirtyBits) override;
 
-    gl::Error getSamplePosition(const gl::Context *context,
-                                size_t index,
-                                GLfloat *xy) const override;
+    angle::Result getSamplePosition(const gl::Context *context,
+                                    size_t index,
+                                    GLfloat *xy) const override;
     RenderTargetVk *getDepthStencilRenderTarget() const;
     const vk::RenderPassDesc &getRenderPassDesc();