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/samples/sample_util/SampleApplication.cpp b/samples/sample_util/SampleApplication.cpp
index 268df64..5a3746a 100644
--- a/samples/sample_util/SampleApplication.cpp
+++ b/samples/sample_util/SampleApplication.cpp
@@ -10,9 +10,11 @@
SampleApplication::SampleApplication(const std::string& name, size_t width, size_t height,
EGLint glesMajorVersion, EGLint requestedRenderer)
: mName(name),
+ mWidth(width),
+ mHeight(height),
mRunning(false)
{
- mEGLWindow.reset(new EGLWindow(width, height, glesMajorVersion, EGLPlatformParameters(requestedRenderer)));
+ mEGLWindow.reset(new EGLWindow(glesMajorVersion, EGLPlatformParameters(requestedRenderer)));
mTimer.reset(CreateTimer());
mOSWindow.reset(CreateOSWindow());
@@ -80,7 +82,7 @@
int SampleApplication::run()
{
- if (!mOSWindow->initialize(mName, mEGLWindow->getWidth(), mEGLWindow->getHeight()))
+ if (!mOSWindow->initialize(mName, mWidth, mHeight))
{
return -1;
}
diff --git a/samples/sample_util/SampleApplication.h b/samples/sample_util/SampleApplication.h
index 3acfb59..74a8701 100644
--- a/samples/sample_util/SampleApplication.h
+++ b/samples/sample_util/SampleApplication.h
@@ -48,6 +48,8 @@
private:
std::string mName;
+ size_t mWidth;
+ size_t mHeight;
bool mRunning;
std::unique_ptr<Timer> mTimer;