Commit 7f8dc494 by Geoff Lang

Revert "ANGLETest::SetUp: resize the window only if needed."

Going to try reverting this as a potential fix to failures seen on the bots. Can re-land in the morning if the failures don't clear up. Failures seen on all windows bots now. This reverts commit 15ca8296. Change-Id: Ic2904e00e8d53b2cc8939b36953f47f131c5e6c2 Reviewed-on: https://chromium-review.googlesource.com/287846Reviewed-by: 's avatarGeoff Lang <geofflang@chromium.org> Tested-by: 's avatarGeoff Lang <geofflang@chromium.org>
parent e2bfe2cd
...@@ -17,28 +17,25 @@ ANGLETest::~ANGLETest() ...@@ -17,28 +17,25 @@ ANGLETest::~ANGLETest()
void ANGLETest::SetUp() void ANGLETest::SetUp()
{ {
if (!createEGLContext()) if (!ResizeWindow(mWidth, mHeight))
{ {
FAIL() << "egl context creation failed."; FAIL() << "Failed to resize ANGLE test window.";
} }
if (mOSWindow->getWidth() != mWidth || mOSWindow->getHeight() != mHeight) if (!createEGLContext())
{ {
if (!mOSWindow->resize(mWidth, mHeight)) FAIL() << "egl context creation failed.";
{ }
FAIL() << "Failed to resize ANGLE test window.";
}
// Swap the buffers so that the default framebuffer picks up the resize // Swap the buffers so that the default framebuffer picks up the resize
// which will allow follow-up test code to assume the framebuffer covers // which will allow follow-up test code to assume the framebuffer covers
// the whole window. // the whole window.
swapBuffers(); swapBuffers();
// This Viewport command is not strictly necessary but we add it so that programs // This Viewport command is not strictly necessary but we add it so that programs
// taking OpenGL traces can guess the size of the default framebuffer and show it // taking OpenGL traces can guess the size of the default framebuffer and show it
// in their UIs // in their UIs
glViewport(0, 0, mWidth, mHeight); glViewport(0, 0, mWidth, mHeight);
}
} }
void ANGLETest::TearDown() void ANGLETest::TearDown()
...@@ -253,6 +250,11 @@ bool ANGLETest::DestroyTestWindow() ...@@ -253,6 +250,11 @@ bool ANGLETest::DestroyTestWindow()
return true; return true;
} }
bool ANGLETest::ResizeWindow(int width, int height)
{
return mOSWindow->resize(width, height);
}
void ANGLETest::SetWindowVisible(bool isVisible) void ANGLETest::SetWindowVisible(bool isVisible)
{ {
mOSWindow->setVisible(isVisible); mOSWindow->setVisible(isVisible);
......
...@@ -67,6 +67,7 @@ class ANGLETest : public ::testing::TestWithParam<angle::PlatformParameters> ...@@ -67,6 +67,7 @@ class ANGLETest : public ::testing::TestWithParam<angle::PlatformParameters>
public: public:
static bool InitTestWindow(); static bool InitTestWindow();
static bool DestroyTestWindow(); static bool DestroyTestWindow();
static bool ResizeWindow(int width, int height);
static void SetWindowVisible(bool isVisible); static void SetWindowVisible(bool isVisible);
protected: protected:
......
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