EGLWindow: remove the unused width and height
EGLWindow does nothing with it per se, but some code was relying on it
to store it. Add width and height to ANGLETest and SampleApplication
instead. Also fix a typo in PerfTestParams, widowWidth -> windowWidth.
BUG=angleproject:1105
Change-Id: I26da607a2e6342864b508a50ee3cf8944608f868
Reviewed-on: https://chromium-review.googlesource.com/287379
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Tested-by: Corentin Wallez <cwallez@chromium.org>
diff --git a/src/tests/test_utils/ANGLETest.cpp b/src/tests/test_utils/ANGLETest.cpp
index 5221a6a..2e6fdbd 100644
--- a/src/tests/test_utils/ANGLETest.cpp
+++ b/src/tests/test_utils/ANGLETest.cpp
@@ -3,9 +3,11 @@
#include "OSWindow.h"
ANGLETest::ANGLETest()
- : mEGLWindow(nullptr)
+ : mEGLWindow(nullptr),
+ mWidth(0),
+ mHeight(0)
{
- mEGLWindow = new EGLWindow(1280, 720, GetParam().majorVersion, GetParam().eglParameters);
+ mEGLWindow = new EGLWindow(GetParam().majorVersion, GetParam().eglParameters);
}
ANGLETest::~ANGLETest()
@@ -15,7 +17,7 @@
void ANGLETest::SetUp()
{
- if (!ResizeWindow(mEGLWindow->getWidth(), mEGLWindow->getHeight()))
+ if (!ResizeWindow(mWidth, mHeight))
{
FAIL() << "Failed to resize ANGLE test window.";
}
@@ -33,7 +35,7 @@
// 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, mEGLWindow->getWidth(), mEGLWindow->getHeight());
+ glViewport(0, 0, mWidth, mHeight);
}
void ANGLETest::TearDown()
@@ -144,12 +146,12 @@
void ANGLETest::setWindowWidth(int width)
{
- mEGLWindow->setWidth(width);
+ mWidth = width;
}
void ANGLETest::setWindowHeight(int height)
{
- mEGLWindow->setHeight(height);
+ mHeight = height;
}
void ANGLETest::setConfigRedBits(int bits)
@@ -199,12 +201,12 @@
int ANGLETest::getWindowWidth() const
{
- return mEGLWindow->getWidth();
+ return mWidth;
}
int ANGLETest::getWindowHeight() const
{
- return mEGLWindow->getHeight();
+ return mHeight;
}
bool ANGLETest::isMultisampleEnabled() const