Set swap interval explicitly.

The swap interval can be changed independent of the Surface config.
Thus it makes more sense to set it explicitly in test setup. This
simplifies the test config.

Also updates some of the API for GLWindowBase. Return an explicit
error from makeCurrent.

Bug: angleproject:3393
Change-Id: Ic62b33018e872bc0e38f2848e2427ed898b60749
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1574672
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
This commit is contained in:
Jamie Madill
2019-04-30 16:14:43 -04:00
committed by Commit Bot
parent 8f39cd8378
commit 0659c99131
6 changed files with 71 additions and 53 deletions

View File

@@ -136,14 +136,17 @@ int SampleApplication::run()
configParams.depthBits = 24;
configParams.stencilBits = 8;
// Disable vsync
configParams.swapInterval = 0;
if (!mEGLWindow->initializeGL(mOSWindow, mEntryPointsLib.get(), configParams))
{
return -1;
}
// Disable vsync
if (!mEGLWindow->setSwapInterval(0))
{
return -1;
}
angle::LoadGLES(eglGetProcAddress);
mRunning = true;