Simplify message to FBO Impls of attachment changes.

We don't need to pass attachment pointers, since they are now
value types, and no longer change their address.

BUG=angleproject:963

Change-Id: I02cdce0886512cc847930f61c5bfb62fc1d7cd1a
Reviewed-on: https://chromium-review.googlesource.com/265938
Tested-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
diff --git a/src/libANGLE/renderer/gl/FramebufferGL.cpp b/src/libANGLE/renderer/gl/FramebufferGL.cpp
index e75692a..53c1ab8 100644
--- a/src/libANGLE/renderer/gl/FramebufferGL.cpp
+++ b/src/libANGLE/renderer/gl/FramebufferGL.cpp
@@ -93,39 +93,47 @@
     }
 }
 
-void FramebufferGL::setColorAttachment(size_t index, const gl::FramebufferAttachment *attachment)
+void FramebufferGL::onUpdateColorAttachment(size_t index)
 {
     if (mFramebufferID != 0)
     {
         mStateManager->bindFramebuffer(GL_FRAMEBUFFER, mFramebufferID);
-        BindFramebufferAttachment(mFunctions, GL_COLOR_ATTACHMENT0 + index, attachment);
+        BindFramebufferAttachment(mFunctions,
+                                  GL_COLOR_ATTACHMENT0 + index,
+                                  mData.getColorAttachment(static_cast<unsigned int>(index)));
     }
 }
 
-void FramebufferGL::setDepthAttachment(const gl::FramebufferAttachment *attachment)
+void FramebufferGL::onUpdateDepthAttachment()
 {
     if (mFramebufferID != 0)
     {
         mStateManager->bindFramebuffer(GL_FRAMEBUFFER, mFramebufferID);
-        BindFramebufferAttachment(mFunctions, GL_DEPTH_ATTACHMENT, attachment);
+        BindFramebufferAttachment(mFunctions,
+                                  GL_DEPTH_ATTACHMENT,
+                                  mData.getDepthAttachment());
     }
 }
 
-void FramebufferGL::setStencilAttachment(const gl::FramebufferAttachment *attachment)
+void FramebufferGL::onUpdateStencilAttachment()
 {
     if (mFramebufferID != 0)
     {
         mStateManager->bindFramebuffer(GL_FRAMEBUFFER, mFramebufferID);
-        BindFramebufferAttachment(mFunctions, GL_STENCIL_ATTACHMENT, attachment);
+        BindFramebufferAttachment(mFunctions,
+                                  GL_STENCIL_ATTACHMENT,
+                                  mData.getStencilAttachment());
     }
 }
 
-void FramebufferGL::setDepthStencilAttachment(const gl::FramebufferAttachment *attachment)
+void FramebufferGL::onUpdateDepthStencilAttachment()
 {
     if (mFramebufferID != 0)
     {
         mStateManager->bindFramebuffer(GL_FRAMEBUFFER, mFramebufferID);
-        BindFramebufferAttachment(mFunctions, GL_DEPTH_STENCIL_ATTACHMENT, attachment);
+        BindFramebufferAttachment(mFunctions,
+                                  GL_DEPTH_STENCIL_ATTACHMENT,
+                                  mData.getDepthStencilAttachment());
     }
 }