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()
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() << "Failed to resize ANGLE test window.";
}
FAIL() << "egl context creation failed.";
}
// Swap the buffers so that the default framebuffer picks up the resize
// which will allow follow-up test code to assume the framebuffer covers
// the whole window.
swapBuffers();
// Swap the buffers so that the default framebuffer picks up the resize
// which will allow follow-up test code to assume the framebuffer covers
// the whole window.
swapBuffers();
// 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
// in their UIs
glViewport(0, 0, mWidth, mHeight);
}
// 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
// in their UIs
glViewport(0, 0, mWidth, mHeight);
}
void ANGLETest::TearDown()
......@@ -253,6 +250,11 @@ bool ANGLETest::DestroyTestWindow()
return true;
}
bool ANGLETest::ResizeWindow(int width, int height)
{
return mOSWindow->resize(width, height);
}
void ANGLETest::SetWindowVisible(bool isVisible)
{
mOSWindow->setVisible(isVisible);
......
......@@ -67,6 +67,7 @@ class ANGLETest : public ::testing::TestWithParam<angle::PlatformParameters>
public:
static bool InitTestWindow();
static bool DestroyTestWindow();
static bool ResizeWindow(int width, int height);
static void SetWindowVisible(bool isVisible);
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