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/tests/gl_tests/PbufferTest.cpp b/src/tests/gl_tests/PbufferTest.cpp
index fb381e1..01254f4 100644
--- a/src/tests/gl_tests/PbufferTest.cpp
+++ b/src/tests/gl_tests/PbufferTest.cpp
@@ -124,7 +124,7 @@
EGLWindow *window = getEGLWindow();
// Clear the window surface to blue and verify
- eglMakeCurrent(window->getDisplay(), window->getSurface(), window->getSurface(), window->getContext());
+ window->makeCurrent();
ASSERT_EGL_SUCCESS();
glClearColor(0.0f, 0.0f, 1.0f, 1.0f);
@@ -144,7 +144,7 @@
0, 255, 255);
// Rebind the window surface and verify that it is still blue
- eglMakeCurrent(window->getDisplay(), window->getSurface(), window->getSurface(), window->getContext());
+ window->makeCurrent();
ASSERT_EGL_SUCCESS();
EXPECT_PIXEL_EQ(getWindowWidth() / 2, getWindowHeight() / 2, 0, 0, 255, 255);
}
@@ -179,7 +179,7 @@
0, 255, 255);
// Apply the window surface
- eglMakeCurrent(window->getDisplay(), window->getSurface(), window->getSurface(), window->getContext());
+ window->makeCurrent();
// Create a texture and bind the Pbuffer to it
GLuint texture = 0;
@@ -299,7 +299,7 @@
0, 255, 255);
// Apply the window surface
- eglMakeCurrent(window->getDisplay(), window->getSurface(), window->getSurface(), window->getContext());
+ window->makeCurrent();
// Create a texture and bind the Pbuffer to it
GLuint texture = 0;