Proliferate gl::Context.
This enables a few small things: it will enable making the platform
a property of the Display rather than a global. The same goes for the
global logging annotator. Also it ensures all back-end implementations
have access to the GL / EGL state when available.
Also introduces a smart pointer helper class to angleutils for objects
that prefer to be destroyed with a context (gl::Context/egl::Display)
parameter. We were using std::unique_ptr in a few places that would
not work well with these objects.
BUG=angleproject:1156
Change-Id: I59e288a3d6f766ff8a0f4b48ff3a1fbf7489daba
Reviewed-on: https://chromium-review.googlesource.com/529706
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
diff --git a/src/libANGLE/Context.cpp b/src/libANGLE/Context.cpp
index f924c4a..5e2619b 100644
--- a/src/libANGLE/Context.cpp
+++ b/src/libANGLE/Context.cpp
@@ -2752,7 +2752,7 @@
void Context::syncRendererState()
{
const State::DirtyBits &dirtyBits = mGLState.getDirtyBits();
- mImplementation->syncState(dirtyBits);
+ mImplementation->syncState(this, dirtyBits);
mGLState.clearDirtyBits();
mGLState.syncDirtyObjects(this);
}
@@ -2761,7 +2761,7 @@
const State::DirtyObjects &objectMask)
{
const State::DirtyBits &dirtyBits = (mGLState.getDirtyBits() & bitMask);
- mImplementation->syncState(dirtyBits);
+ mImplementation->syncState(this, dirtyBits);
mGLState.clearDirtyBits(dirtyBits);
mGLState.syncDirtyObjects(this, objectMask);
}
@@ -4114,7 +4114,7 @@
return;
}
- mImplementation->dispatchCompute(numGroupsX, numGroupsY, numGroupsZ);
+ mImplementation->dispatchCompute(this, numGroupsX, numGroupsY, numGroupsZ);
}
void Context::texStorage2D(GLenum target,