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/Framebuffer.cpp b/src/libANGLE/Framebuffer.cpp
index 2aadbf6..71fcba9 100644
--- a/src/libANGLE/Framebuffer.cpp
+++ b/src/libANGLE/Framebuffer.cpp
@@ -604,38 +604,32 @@
mData.mDepthAttachment.detach();
mData.mStencilAttachment.detach();
}
- mImpl->setDepthStencilAttachment(&mData.mDepthAttachment);
+ mImpl->onUpdateDepthStencilAttachment();
}
else
{
- FramebufferAttachment *attachment = nullptr;
-
switch (binding)
{
case GL_DEPTH:
case GL_DEPTH_ATTACHMENT:
- attachment = &mData.mDepthAttachment;
- attachment->attach(type, binding, textureIndex, resource);
- mImpl->setDepthAttachment(attachment);
+ mData.mDepthAttachment.attach(type, binding, textureIndex, resource);
+ mImpl->onUpdateDepthAttachment();
break;
case GL_STENCIL:
case GL_STENCIL_ATTACHMENT:
- attachment = &mData.mStencilAttachment;
- attachment->attach(type, binding, textureIndex, resource);
- mImpl->setStencilAttachment(attachment);
+ mData.mStencilAttachment.attach(type, binding, textureIndex, resource);
+ mImpl->onUpdateStencilAttachment();
break;
case GL_BACK:
- attachment = &mData.mColorAttachments[0];
- attachment->attach(type, binding, textureIndex, resource);
- mImpl->setColorAttachment(0, attachment);
+ mData.mColorAttachments[0].attach(type, binding, textureIndex, resource);
+ mImpl->onUpdateColorAttachment(0);
break;
default:
{
size_t colorIndex = binding - GL_COLOR_ATTACHMENT0;
ASSERT(colorIndex < mData.mColorAttachments.size());
- attachment = &mData.mColorAttachments[colorIndex];
- attachment->attach(type, binding, textureIndex, resource);
- mImpl->setColorAttachment(colorIndex, attachment);
+ mData.mColorAttachments[colorIndex].attach(type, binding, textureIndex, resource);
+ mImpl->onUpdateColorAttachment(colorIndex);
}
break;
}