Commit f6d14799 by Jamie Madill Committed by Commit Bot

Vulkan: Move window re-init to test constructor.

Moving it from SetUp to the constructor allows the swapping to work even if the test decides to not call the SetUp base function. This fixes the Vulkan extension test, which skips normal test init. This requires us to change an ERR invocation into a print. BUG=angleproject:1810 Change-Id: I3be4bdb6df8c02fc1c9bbc7834ba485054272b8e Reviewed-on: https://chromium-review.googlesource.com/437284Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
parent a98a647e
...@@ -232,21 +232,6 @@ ANGLETest::ANGLETest() ...@@ -232,21 +232,6 @@ ANGLETest::ANGLETest()
{ {
mEGLWindow = mEGLWindow =
new EGLWindow(GetParam().majorVersion, GetParam().minorVersion, GetParam().eglParameters); new EGLWindow(GetParam().majorVersion, GetParam().minorVersion, GetParam().eglParameters);
}
ANGLETest::~ANGLETest()
{
if (mQuadVertexBuffer)
{
glDeleteBuffers(1, &mQuadVertexBuffer);
}
SafeDelete(mEGLWindow);
}
void ANGLETest::SetUp()
{
angle::g_testPlatformInstance.enableMessages();
angle::g_testPlatformInstance.setCurrentTest(this);
// Default vulkan layers to enabled. // Default vulkan layers to enabled.
EGLint renderer = GetParam().getRenderer(); EGLint renderer = GetParam().getRenderer();
...@@ -265,10 +250,25 @@ void ANGLETest::SetUp() ...@@ -265,10 +250,25 @@ void ANGLETest::SetUp()
DestroyTestWindow(); DestroyTestWindow();
if (!InitTestWindow()) if (!InitTestWindow())
{ {
FAIL() << "Failed to create ANGLE test window."; std::cerr << "Failed to create ANGLE test window.";
} }
} }
mLastRendererType = renderer; mLastRendererType = renderer;
}
ANGLETest::~ANGLETest()
{
if (mQuadVertexBuffer)
{
glDeleteBuffers(1, &mQuadVertexBuffer);
}
SafeDelete(mEGLWindow);
}
void ANGLETest::SetUp()
{
angle::g_testPlatformInstance.enableMessages();
angle::g_testPlatformInstance.setCurrentTest(this);
// Resize the window before creating the context so that the first make current // Resize the window before creating the context so that the first make current
// sets the viewport and scissor box to the right size. // sets the viewport and scissor box to the right size.
......
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