Rename gl::Framebuffer::Data to gl::FramebufferState.
Moving this out of the Framebuffer class allows us to forward-
declare it.
BUG=angleproject:1363
Change-Id: I91971c37a92151df508cdf7f0eb8c3e93506d112
Reviewed-on: https://chromium-review.googlesource.com/340741
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
diff --git a/src/libANGLE/renderer/d3d/FramebufferD3D.cpp b/src/libANGLE/renderer/d3d/FramebufferD3D.cpp
index 281a037..9d5503d 100644
--- a/src/libANGLE/renderer/d3d/FramebufferD3D.cpp
+++ b/src/libANGLE/renderer/d3d/FramebufferD3D.cpp
@@ -85,7 +85,7 @@
}
-FramebufferD3D::FramebufferD3D(const gl::Framebuffer::Data &data, RendererD3D *renderer)
+FramebufferD3D::FramebufferD3D(const gl::FramebufferState &data, RendererD3D *renderer)
: FramebufferImpl(data), mRenderer(renderer)
{
}
@@ -190,7 +190,7 @@
GLenum FramebufferD3D::getImplementationColorReadFormat() const
{
- const gl::FramebufferAttachment *readAttachment = mData.getReadAttachment();
+ const gl::FramebufferAttachment *readAttachment = mState.getReadAttachment();
if (readAttachment == nullptr)
{
@@ -212,7 +212,7 @@
GLenum FramebufferD3D::getImplementationColorReadType() const
{
- const gl::FramebufferAttachment *readAttachment = mData.getReadAttachment();
+ const gl::FramebufferAttachment *readAttachment = mState.getReadAttachment();
if (readAttachment == nullptr)
{
@@ -251,25 +251,22 @@
GLbitfield mask, GLenum filter, const gl::Framebuffer *sourceFramebuffer)
{
bool blitRenderTarget = false;
- if ((mask & GL_COLOR_BUFFER_BIT) &&
- sourceFramebuffer->getReadColorbuffer() != nullptr &&
- mData.getFirstColorAttachment() != nullptr)
+ if ((mask & GL_COLOR_BUFFER_BIT) && sourceFramebuffer->getReadColorbuffer() != nullptr &&
+ mState.getFirstColorAttachment() != nullptr)
{
blitRenderTarget = true;
}
bool blitStencil = false;
- if ((mask & GL_STENCIL_BUFFER_BIT) &&
- sourceFramebuffer->getStencilbuffer() != nullptr &&
- mData.getStencilAttachment() != nullptr)
+ if ((mask & GL_STENCIL_BUFFER_BIT) && sourceFramebuffer->getStencilbuffer() != nullptr &&
+ mState.getStencilAttachment() != nullptr)
{
blitStencil = true;
}
bool blitDepth = false;
- if ((mask & GL_DEPTH_BUFFER_BIT) &&
- sourceFramebuffer->getDepthbuffer() != nullptr &&
- mData.getDepthAttachment() != nullptr)
+ if ((mask & GL_DEPTH_BUFFER_BIT) && sourceFramebuffer->getDepthbuffer() != nullptr &&
+ mState.getDepthAttachment() != nullptr)
{
blitDepth = true;
}
@@ -292,14 +289,14 @@
{
// if we have both a depth and stencil buffer, they must refer to the same object
// since we only support packed_depth_stencil and not separate depth and stencil
- if (mData.getDepthAttachment() != nullptr && mData.getStencilAttachment() != nullptr &&
- mData.getDepthStencilAttachment() == nullptr)
+ if (mState.getDepthAttachment() != nullptr && mState.getStencilAttachment() != nullptr &&
+ mState.getDepthStencilAttachment() == nullptr)
{
return false;
}
// D3D11 does not allow for overlapping RenderTargetViews, so ensure uniqueness
- const auto &colorAttachments = mData.getColorAttachments();
+ const auto &colorAttachments = mState.getColorAttachments();
for (size_t colorAttachment = 0; colorAttachment < colorAttachments.size(); colorAttachment++)
{
const gl::FramebufferAttachment &attachment = colorAttachments[colorAttachment];
@@ -319,7 +316,7 @@
}
// D3D requires all render targets to have the same dimensions.
- if (!mData.attachmentsHaveSameDimensions())
+ if (!mState.attachmentsHaveSameDimensions())
{
return false;
}
@@ -354,8 +351,8 @@
// Does not actually free memory
gl::AttachmentList colorAttachmentsForRender;
- const auto &colorAttachments = mData.getColorAttachments();
- const auto &drawBufferStates = mData.getDrawBufferStates();
+ const auto &colorAttachments = mState.getColorAttachments();
+ const auto &drawBufferStates = mState.getDrawBufferStates();
const auto &workarounds = mRenderer->getWorkarounds();
for (size_t attachmentIndex = 0; attachmentIndex < colorAttachments.size(); ++attachmentIndex)