Remove non-const FBO attachment queries.
Methods that need to mutate the Framebuffer should use
setAttachment, etc, instead of using mutable pointers.
BUG=angleproject:963
Change-Id: Ibe7b8f8245f762916e0224fdc78796b1c933195f
Reviewed-on: https://chromium-review.googlesource.com/263490
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Tested-by: Jamie Madill <jmadill@chromium.org>
diff --git a/src/libANGLE/validationES.cpp b/src/libANGLE/validationES.cpp
index 350f6f6..688202e 100644
--- a/src/libANGLE/validationES.cpp
+++ b/src/libANGLE/validationES.cpp
@@ -498,8 +498,8 @@
return false;
}
- gl::Framebuffer *readFramebuffer = context->getState().getReadFramebuffer();
- gl::Framebuffer *drawFramebuffer = context->getState().getDrawFramebuffer();
+ const gl::Framebuffer *readFramebuffer = context->getState().getReadFramebuffer();
+ const gl::Framebuffer *drawFramebuffer = context->getState().getDrawFramebuffer();
if (!readFramebuffer || !drawFramebuffer)
{
@@ -597,7 +597,7 @@
{
if (drawFramebuffer->isEnabledColorAttachment(colorAttachment))
{
- FramebufferAttachment *attachment = drawFramebuffer->getColorbuffer(colorAttachment);
+ const FramebufferAttachment *attachment = drawFramebuffer->getColorbuffer(colorAttachment);
ASSERT(attachment);
if (!(attachment->type() == GL_TEXTURE && attachment->getTextureImageIndex().type == GL_TEXTURE_2D) &&