Add limited support for frame pacing to EGLRenderer
This commit is contained in:
parent
4bbe571f5f
commit
5f25e0d4e2
1 changed files with 4 additions and 2 deletions
|
|
@ -401,8 +401,10 @@ bool EGLRenderer::initialize(PDECODER_PARAMETERS params)
|
||||||
glClear(GL_COLOR_BUFFER_BIT);
|
glClear(GL_COLOR_BUFFER_BIT);
|
||||||
|
|
||||||
if (params->enableVsync) {
|
if (params->enableVsync) {
|
||||||
/* Try to use adaptive VSYNC */
|
// Try to use adaptive VSYNC unless we're using frame pacing.
|
||||||
if (SDL_GL_SetSwapInterval(-1))
|
// Frame pacing relies on us blocking in renderFrame() to
|
||||||
|
// match the display refresh rate.
|
||||||
|
if (params->enableFramePacing || SDL_GL_SetSwapInterval(-1))
|
||||||
SDL_GL_SetSwapInterval(1);
|
SDL_GL_SetSwapInterval(1);
|
||||||
} else {
|
} else {
|
||||||
SDL_GL_SetSwapInterval(0);
|
SDL_GL_SetSwapInterval(0);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue