Nuke ValidationContext.
This pattern never really took off. It was intended to be used to
unit-test our Validation logic, but it become so complex because
of interactions with Framebuffer::syncState that we could never
really make use of it.
Nuke it entirely and simplify the Context class.
Bug: angleproject:2372
Change-Id: I40b9d46ce7706511a210da496ee19192cf609366
Reviewed-on: https://chromium-review.googlesource.com/954291
Reviewed-by: Luc Ferron <lucferron@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
diff --git a/src/libANGLE/Framebuffer.cpp b/src/libANGLE/Framebuffer.cpp
index d229110..9d83832 100644
--- a/src/libANGLE/Framebuffer.cpp
+++ b/src/libANGLE/Framebuffer.cpp
@@ -1437,6 +1437,8 @@
int Framebuffer::getCachedSamples(const Context *context)
{
+ ASSERT(mCachedStatus.valid() && mCachedStatus.value() == GL_FRAMEBUFFER_COMPLETE);
+
// For a complete framebuffer, all attachments must have the same sample count.
// In this case return the first nonzero sample size.
const auto *firstNonNullAttachment = mState.getFirstNonNullAttachment();
@@ -1791,11 +1793,6 @@
return (checkStatus(context) == GL_FRAMEBUFFER_COMPLETE);
}
-bool Framebuffer::cachedComplete() const
-{
- return (mCachedStatus.valid() && mCachedStatus == GL_FRAMEBUFFER_COMPLETE);
-}
-
bool Framebuffer::formsRenderingFeedbackLoopWith(const State &state) const
{
const Program *program = state.getProgram();
@@ -1924,17 +1921,6 @@
mDirtyBits.set(DIRTY_BIT_DEFAULT_FIXED_SAMPLE_LOCATIONS);
}
-// TODO(jmadill): Remove this kludge.
-GLenum Framebuffer::checkStatus(const ValidationContext *context)
-{
- return checkStatus(static_cast<const Context *>(context));
-}
-
-int Framebuffer::getSamples(const ValidationContext *context)
-{
- return getSamples(static_cast<const Context *>(context));
-}
-
GLsizei Framebuffer::getNumViews() const
{
return mState.getNumViews();