Proliferate gl::Context everywhere.
This gives the D3D back-end access to the GL state almost anywhere.
This uses the onDestroy hook for Textures to push errors up from
destructors, although they still don't quite make it to the Context.
There are places, such as in EGL object (Context/Surface) destruction,
where we end up calling through to GL implementation internals without
having access to a gl::Context. We handle this via a proxy Context
to a Display, basically a null context, that has access to impl-side
state like the Renderer pointer if necessary. It does not have access
to the normal GL state.
Also Pass gl::Context to RefCountObject::release(). Since we're using
destroy() methods now, we should not ever call the destructor directly.
BUG=angleproject:1156
Change-Id: Ie4c32ad6bf6caaff0289901f30b5c6bafa2ce259
Reviewed-on: https://chromium-review.googlesource.com/529707
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
diff --git a/src/libANGLE/validationES.cpp b/src/libANGLE/validationES.cpp
index 1fa15f0..30044f5 100644
--- a/src/libANGLE/validationES.cpp
+++ b/src/libANGLE/validationES.cpp
@@ -1729,7 +1729,7 @@
return true;
}
-bool ValidateReadPixelsRobustANGLE(ValidationContext *context,
+bool ValidateReadPixelsRobustANGLE(Context *context,
GLint x,
GLint y,
GLsizei width,
@@ -1781,7 +1781,7 @@
nullptr, nullptr, pixels);
}
-bool ValidateReadnPixelsRobustANGLE(ValidationContext *context,
+bool ValidateReadnPixelsRobustANGLE(Context *context,
GLint x,
GLint y,
GLsizei width,
@@ -5232,7 +5232,7 @@
return true;
}
-bool ValidateReadPixelsBase(ValidationContext *context,
+bool ValidateReadPixelsBase(Context *context,
GLint x,
GLint y,
GLsizei width,
@@ -5298,8 +5298,8 @@
return false;
}
- GLenum currentFormat = framebuffer->getImplementationColorReadFormat();
- GLenum currentType = framebuffer->getImplementationColorReadType();
+ GLenum currentFormat = framebuffer->getImplementationColorReadFormat(context);
+ GLenum currentType = framebuffer->getImplementationColorReadType(context);
GLenum currentComponentType = readBuffer->getFormat().info->componentType;
bool validFormatTypeCombination =