Use angle::Result and pass a context pointer to TransformFeedbackImpl
BUG=angleproject:3020
Change-Id: Ib0877dd33f9a8c6ea57976642f1b904258cb6a86
Reviewed-on: https://chromium-review.googlesource.com/c/1374273
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Geoff Lang <geofflang@chromium.org>
diff --git a/src/libANGLE/Context.cpp b/src/libANGLE/Context.cpp
index 390b58d..54a36fe 100644
--- a/src/libANGLE/Context.cpp
+++ b/src/libANGLE/Context.cpp
@@ -2785,7 +2785,7 @@
// Attachments to unbound container objects, such as
// deletion of a buffer attached to a vertex array object which is not bound to the context,
// are not affected and continue to act as references on the deleted object
- mGLState.detachBuffer(this, buffer);
+ ANGLE_CONTEXT_TRY(mGLState.detachBuffer(this, buffer));
}
void Context::detachFramebuffer(GLuint framebuffer)
@@ -3165,7 +3165,7 @@
ASSERT(transformFeedback != nullptr);
ASSERT(!transformFeedback->isPaused());
- transformFeedback->begin(this, primitiveMode, mGLState.getProgram());
+ ANGLE_CONTEXT_TRY(transformFeedback->begin(this, primitiveMode, mGLState.getProgram()));
mStateCache.onActiveTransformFeedbackChange(this);
}
@@ -5186,7 +5186,7 @@
GLsizeiptr size)
{
Buffer *object = mState.mBuffers->checkBufferAllocation(mImplementation.get(), buffer);
- mGLState.setIndexedBufferBinding(this, target, index, object, offset, size);
+ ANGLE_CONTEXT_TRY(mGLState.setIndexedBufferBinding(this, target, index, object, offset, size));
if (target == BufferBinding::Uniform)
{
mUniformBufferObserverBindings[index].bind(object);
@@ -6438,7 +6438,7 @@
void Context::endTransformFeedback()
{
TransformFeedback *transformFeedback = mGLState.getCurrentTransformFeedback();
- transformFeedback->end(this);
+ ANGLE_CONTEXT_TRY(transformFeedback->end(this));
mStateCache.onActiveTransformFeedbackChange(this);
}
@@ -6515,14 +6515,14 @@
void Context::pauseTransformFeedback()
{
TransformFeedback *transformFeedback = mGLState.getCurrentTransformFeedback();
- transformFeedback->pause();
+ ANGLE_CONTEXT_TRY(transformFeedback->pause(this));
mStateCache.onActiveTransformFeedbackChange(this);
}
void Context::resumeTransformFeedback()
{
TransformFeedback *transformFeedback = mGLState.getCurrentTransformFeedback();
- transformFeedback->resume();
+ ANGLE_CONTEXT_TRY(transformFeedback->resume(this));
mStateCache.onActiveTransformFeedbackChange(this);
}