Remove all uses of "actual" formats.
BUG=angle:861
Change-Id: I7cd2d1a56772fdf18bcf926456399322d13e7a4f
Reviewed-on: https://chromium-review.googlesource.com/236305
Reviewed-by: Brandon Jones <bajones@chromium.org>
Tested-by: Geoff Lang <geofflang@chromium.org>
diff --git a/src/libANGLE/renderer/d3d/FramebufferD3D.cpp b/src/libANGLE/renderer/d3d/FramebufferD3D.cpp
index 3ca5d14..bc66f02 100644
--- a/src/libANGLE/renderer/d3d/FramebufferD3D.cpp
+++ b/src/libANGLE/renderer/d3d/FramebufferD3D.cpp
@@ -50,11 +50,6 @@
return mRenderTarget->getInternalFormat();
}
-GLenum DefaultAttachmentD3D::getActualFormat() const
-{
- return mRenderTarget->getActualFormat();
-}
-
GLsizei DefaultAttachmentD3D::getSamples() const
{
return mRenderTarget->getSamples();
@@ -222,10 +217,17 @@
return GL_NONE;
}
- GLenum actualFormat = mColorBuffers[0]->getActualFormat();
- const gl::InternalFormat &actualFormatInfo = gl::GetInternalFormatInfo(actualFormat);
+ RenderTarget *attachmentRenderTarget = NULL;
+ gl::Error error = GetAttachmentRenderTarget(mColorBuffers[0], &attachmentRenderTarget);
+ if (error.isError())
+ {
+ return GL_NONE;
+ }
- return actualFormatInfo.format;
+ GLenum implementationFormat = getRenderTargetImplementationFormat(attachmentRenderTarget);
+ const gl::InternalFormat &implementationFormatInfo = gl::GetInternalFormatInfo(implementationFormat);
+
+ return implementationFormatInfo.format;
}
GLenum FramebufferD3D::getImplementationColorReadType() const
@@ -238,10 +240,17 @@
return GL_NONE;
}
- GLenum actualFormat = mColorBuffers[0]->getActualFormat();
- const gl::InternalFormat &actualFormatInfo = gl::GetInternalFormatInfo(actualFormat);
+ RenderTarget *attachmentRenderTarget = NULL;
+ gl::Error error = GetAttachmentRenderTarget(mColorBuffers[0], &attachmentRenderTarget);
+ if (error.isError())
+ {
+ return GL_NONE;
+ }
- return actualFormatInfo.type;
+ GLenum implementationFormat = getRenderTargetImplementationFormat(attachmentRenderTarget);
+ const gl::InternalFormat &implementationFormatInfo = gl::GetInternalFormatInfo(implementationFormat);
+
+ return implementationFormatInfo.type;
}
gl::Error FramebufferD3D::readPixels(const gl::State &state, const gl::Rectangle &area, GLenum format, GLenum type, GLvoid *pixels) const