Move EGL Display config into EGLPlatformParameters.

This CL moves all of the EGLDisplay configuration into an EGL platform
struct. Consolidating display configuration in the struct allows us to
move configuration out of the test constructor. Then when we filter
test configs we don't need to wait for the individual test setup.

Bug: angleproject:3393
Change-Id: I5bd06dcdc9f2867ebc43c1d4984077ada35cafc8
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1574674
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
This commit is contained in:
Jamie Madill
2019-05-01 15:11:46 -04:00
committed by Commit Bot
parent ca49e6dc71
commit 3089f92e8a
16 changed files with 261 additions and 310 deletions

View File

@@ -71,9 +71,9 @@ WGLWindow::~WGLWindow() {}
// Internally initializes GL resources.
bool WGLWindow::initializeGL(OSWindow *osWindow,
angle::Library *glWindowingLibrary,
const ConfigParameters &params)
const EGLPlatformParameters &platformParams,
const ConfigParameters &configParams)
{
mConfigParams = params;
glWindowingLibrary->getAs("wglGetProcAddress", &gCurrentWGLGetProcAddress);
if (!gCurrentWGLGetProcAddress)
@@ -141,7 +141,7 @@ bool WGLWindow::initializeGL(OSWindow *osWindow,
return false;
}
if (mConfigParams.webGLCompatibility.valid() || mConfigParams.robustResourceInit.valid())
if (configParams.webGLCompatibility.valid() || configParams.robustResourceInit.valid())
{
std::cerr << "WGLWindow does not support the requested feature set." << std::endl;
return false;
@@ -172,6 +172,9 @@ bool WGLWindow::initializeGL(OSWindow *osWindow,
return false;
}
mPlatform = platformParams;
mConfigParams = configParams;
angle::LoadGLES(GetProcAddressWithFallback);
return true;
}