Refactor FBO related entry points.
Change the validation to the consistent style for easy auto-generation
and make the context itself implement the entry points. This will more
easily allow us to sync state without passing the Context to the
Texture methods, or doing work in the entry point.
BUG=angleproject:1260
BUG=angleproject:747
Change-Id: I7ed6ec5418b7f51d9e59529267b14b76b87743fb
Reviewed-on: https://chromium-review.googlesource.com/319823
Tryjob-Request: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Tested-by: Jamie Madill <jmadill@chromium.org>
diff --git a/src/libANGLE/Framebuffer.h b/src/libANGLE/Framebuffer.h
index 57e8de5..43e0df3 100644
--- a/src/libANGLE/Framebuffer.h
+++ b/src/libANGLE/Framebuffer.h
@@ -137,11 +137,17 @@
Error invalidate(size_t count, const GLenum *attachments);
Error invalidateSub(size_t count, const GLenum *attachments, const gl::Rectangle &area);
- Error clear(Context *context, GLbitfield mask);
- Error clearBufferfv(Context *context, GLenum buffer, GLint drawbuffer, const GLfloat *values);
- Error clearBufferuiv(Context *context, GLenum buffer, GLint drawbuffer, const GLuint *values);
- Error clearBufferiv(Context *context, GLenum buffer, GLint drawbuffer, const GLint *values);
- Error clearBufferfi(Context *context,
+ Error clear(const gl::Data &data, GLbitfield mask);
+ Error clearBufferfv(const gl::Data &data,
+ GLenum buffer,
+ GLint drawbuffer,
+ const GLfloat *values);
+ Error clearBufferuiv(const gl::Data &data,
+ GLenum buffer,
+ GLint drawbuffer,
+ const GLuint *values);
+ Error clearBufferiv(const gl::Data &data, GLenum buffer, GLint drawbuffer, const GLint *values);
+ Error clearBufferfi(const gl::Data &data,
GLenum buffer,
GLint drawbuffer,
GLfloat depth,
@@ -149,18 +155,18 @@
GLenum getImplementationColorReadFormat() const;
GLenum getImplementationColorReadType() const;
- Error readPixels(Context *context,
+ Error readPixels(const gl::State &state,
const gl::Rectangle &area,
GLenum format,
GLenum type,
GLvoid *pixels) const;
- Error blit(Context *context,
- const gl::Rectangle &sourceArea,
- const gl::Rectangle &destArea,
+ Error blit(const State &state,
+ const Rectangle &sourceArea,
+ const Rectangle &destArea,
GLbitfield mask,
GLenum filter,
- const gl::Framebuffer *sourceFramebuffer);
+ const Framebuffer *sourceFramebuffer);
protected:
void detachResourceById(GLenum resourceType, GLuint resourceId);