Commit afa02a2f by Jamie Madill Committed by Commit Bot

ContextImpl: Make flush/finish take a gl::Context.

This will more easily allow us to call gl::BindingPointer methods. The binding pointer will be used temporarily in the command graph. This is only temporary since we will likely not be using BindingPointer in the end result code, but it could be necessary for future work. Bug: angleproject:2264 Change-Id: I33cf40ec2a1e334c4abfdcff2ad20bbcda3c9d78 Reviewed-on: https://chromium-review.googlesource.com/789532Reviewed-by: 's avatarCorentin Wallez <cwallez@chromium.org> Reviewed-by: 's avatarFrank Henigman <fjhenigman@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
parent ebee5b3b
......@@ -1760,12 +1760,12 @@ void Context::drawElementsIndirect(GLenum mode, GLenum type, const void *indirec
void Context::flush()
{
handleError(mImplementation->flush());
handleError(mImplementation->flush(this));
}
void Context::finish()
{
handleError(mImplementation->finish());
handleError(mImplementation->finish(this));
}
void Context::insertEventMarker(GLsizei length, const char *marker)
......
......@@ -36,8 +36,8 @@ class ContextImpl : public GLImplFactory
virtual gl::Error initialize() = 0;
// Flush and finish.
virtual gl::Error flush() = 0;
virtual gl::Error finish() = 0;
virtual gl::Error flush(const gl::Context *context) = 0;
virtual gl::Error finish(const gl::Context *context) = 0;
// Drawing methods.
virtual gl::Error drawArrays(const gl::Context *context,
......
......@@ -147,12 +147,12 @@ std::vector<PathImpl *> Context11::createPaths(GLsizei)
return std::vector<PathImpl *>();
}
gl::Error Context11::flush()
gl::Error Context11::flush(const gl::Context *context)
{
return mRenderer->flush();
}
gl::Error Context11::finish()
gl::Error Context11::finish(const gl::Context *context)
{
return mRenderer->finish();
}
......
......@@ -63,8 +63,8 @@ class Context11 : public ContextImpl
std::vector<PathImpl *> createPaths(GLsizei) override;
// Flush and finish.
gl::Error flush() override;
gl::Error finish() override;
gl::Error flush(const gl::Context *context) override;
gl::Error finish(const gl::Context *context) override;
// Drawing methods.
gl::Error drawArrays(const gl::Context *context,
......
......@@ -131,12 +131,12 @@ std::vector<PathImpl *> Context9::createPaths(GLsizei)
return std::vector<PathImpl *>();
}
gl::Error Context9::flush()
gl::Error Context9::flush(const gl::Context *context)
{
return mRenderer->flush();
}
gl::Error Context9::finish()
gl::Error Context9::finish(const gl::Context *context)
{
return mRenderer->finish();
}
......
......@@ -63,8 +63,8 @@ class Context9 : public ContextImpl
std::vector<PathImpl *> createPaths(GLsizei) override;
// Flush and finish.
gl::Error flush() override;
gl::Error finish() override;
gl::Error flush(const gl::Context *context) override;
gl::Error finish(const gl::Context *context) override;
// Drawing methods.
gl::Error drawArrays(const gl::Context *context,
......
......@@ -148,12 +148,12 @@ std::vector<PathImpl *> ContextGL::createPaths(GLsizei range)
return ret;
}
gl::Error ContextGL::flush()
gl::Error ContextGL::flush(const gl::Context *context)
{
return mRenderer->flush();
}
gl::Error ContextGL::finish()
gl::Error ContextGL::finish(const gl::Context *context)
{
return mRenderer->finish();
}
......
......@@ -71,8 +71,8 @@ class ContextGL : public ContextImpl
std::vector<PathImpl *> createPaths(GLsizei range) override;
// Flush and finish.
gl::Error flush() override;
gl::Error finish() override;
gl::Error flush(const gl::Context *context) override;
gl::Error finish(const gl::Context *context) override;
// Drawing methods.
gl::Error drawArrays(const gl::Context *context,
......
......@@ -103,12 +103,12 @@ gl::Error ContextNULL::initialize()
return gl::NoError();
}
gl::Error ContextNULL::flush()
gl::Error ContextNULL::flush(const gl::Context *context)
{
return gl::NoError();
}
gl::Error ContextNULL::finish()
gl::Error ContextNULL::finish(const gl::Context *context)
{
return gl::NoError();
}
......
......@@ -39,8 +39,8 @@ class ContextNULL : public ContextImpl
gl::Error initialize() override;
// Flush and finish.
gl::Error flush() override;
gl::Error finish() override;
gl::Error flush(const gl::Context *context) override;
gl::Error finish(const gl::Context *context) override;
// Drawing methods.
gl::Error drawArrays(const gl::Context *context,
......
......@@ -236,13 +236,13 @@ gl::Error ContextVk::initialize()
return gl::NoError();
}
gl::Error ContextVk::flush()
gl::Error ContextVk::flush(const gl::Context *context)
{
UNIMPLEMENTED();
return gl::InternalError();
}
gl::Error ContextVk::finish()
gl::Error ContextVk::finish(const gl::Context *context)
{
// TODO(jmadill): Implement finish.
// UNIMPLEMENTED();
......
......@@ -30,8 +30,8 @@ class ContextVk : public ContextImpl, public ResourceVk
void onDestroy(const gl::Context *context) override;
// Flush and finish.
gl::Error flush() override;
gl::Error finish() override;
gl::Error flush(const gl::Context *context) override;
gl::Error finish(const gl::Context *context) override;
// Drawing methods.
gl::Error drawArrays(const gl::Context *context,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment