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/Framebuffer.h b/src/libANGLE/Framebuffer.h
index 6f38917..e07bfbc 100644
--- a/src/libANGLE/Framebuffer.h
+++ b/src/libANGLE/Framebuffer.h
@@ -235,7 +235,7 @@
// This method calls checkStatus.
int getSamples(const Context *context);
- Error getSamplePosition(const Context *context, size_t index, GLfloat *xy) const;
+ angle::Result getSamplePosition(const Context *context, size_t index, GLfloat *xy) const;
GLint getDefaultWidth() const;
GLint getDefaultHeight() const;
@@ -274,47 +274,47 @@
bool hasValidDepthStencil() const;
- Error discard(const Context *context, size_t count, const GLenum *attachments);
- Error invalidate(const Context *context, size_t count, const GLenum *attachments);
- Error invalidateSub(const Context *context,
- size_t count,
- const GLenum *attachments,
- const Rectangle &area);
+ angle::Result discard(const Context *context, size_t count, const GLenum *attachments);
+ angle::Result invalidate(const Context *context, size_t count, const GLenum *attachments);
+ angle::Result invalidateSub(const Context *context,
+ size_t count,
+ const GLenum *attachments,
+ const Rectangle &area);
- Error clear(const Context *context, GLbitfield mask);
- Error clearBufferfv(const Context *context,
- GLenum buffer,
- GLint drawbuffer,
- const GLfloat *values);
- Error clearBufferuiv(const Context *context,
- GLenum buffer,
- GLint drawbuffer,
- const GLuint *values);
- Error clearBufferiv(const Context *context,
- GLenum buffer,
- GLint drawbuffer,
- const GLint *values);
- Error clearBufferfi(const Context *context,
- GLenum buffer,
- GLint drawbuffer,
- GLfloat depth,
- GLint stencil);
+ angle::Result clear(const Context *context, GLbitfield mask);
+ angle::Result clearBufferfv(const Context *context,
+ GLenum buffer,
+ GLint drawbuffer,
+ const GLfloat *values);
+ angle::Result clearBufferuiv(const Context *context,
+ GLenum buffer,
+ GLint drawbuffer,
+ const GLuint *values);
+ angle::Result clearBufferiv(const Context *context,
+ GLenum buffer,
+ GLint drawbuffer,
+ const GLint *values);
+ angle::Result clearBufferfi(const Context *context,
+ GLenum buffer,
+ GLint drawbuffer,
+ GLfloat depth,
+ GLint stencil);
// These two methods call syncState() internally.
- Error getImplementationColorReadFormat(const Context *context, GLenum *formatOut);
- Error getImplementationColorReadType(const Context *context, GLenum *typeOut);
+ angle::Result getImplementationColorReadFormat(const Context *context, GLenum *formatOut);
+ angle::Result getImplementationColorReadType(const Context *context, GLenum *typeOut);
- Error readPixels(const Context *context,
- const Rectangle &area,
- GLenum format,
- GLenum type,
- void *pixels);
+ angle::Result readPixels(const Context *context,
+ const Rectangle &area,
+ GLenum format,
+ GLenum type,
+ void *pixels);
- Error blit(const Context *context,
- const Rectangle &sourceArea,
- const Rectangle &destArea,
- GLbitfield mask,
- GLenum filter);
+ angle::Result blit(const Context *context,
+ const Rectangle &sourceArea,
+ const Rectangle &destArea,
+ GLbitfield mask,
+ GLenum filter);
bool isDefault() const;
enum DirtyBitType : size_t
@@ -350,12 +350,12 @@
GLint copyTextureLevel,
GLint copyTextureLayer) const;
- Error ensureClearAttachmentsInitialized(const Context *context, GLbitfield mask);
- Error ensureClearBufferAttachmentsInitialized(const Context *context,
- GLenum buffer,
- GLint drawbuffer);
+ angle::Result ensureClearAttachmentsInitialized(const Context *context, GLbitfield mask);
+ angle::Result ensureClearBufferAttachmentsInitialized(const Context *context,
+ GLenum buffer,
+ GLint drawbuffer);
angle::Result ensureDrawAttachmentsInitialized(const Context *context);
- Error ensureReadAttachmentInitialized(const Context *context, GLbitfield blitMask);
+ angle::Result ensureReadAttachmentInitialized(const Context *context, GLbitfield blitMask);
Box getDimensions() const;
private:
@@ -404,7 +404,9 @@
void markDrawAttachmentsInitialized(bool color, bool depth, bool stencil);
void markBufferInitialized(GLenum bufferType, GLint bufferIndex);
- Error ensureBufferInitialized(const Context *context, GLenum bufferType, GLint bufferIndex);
+ angle::Result ensureBufferInitialized(const Context *context,
+ GLenum bufferType,
+ GLint bufferIndex);
// Checks that we have a partially masked clear:
// * some color channels are masked out