зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1736621 - [X11][EGL] Ensure to use the same swap interval as on Wayland, r=stransky,gfx-reviewers,jgilbert
While no issues with these cases are known yet, there is no reason why we would want this case to diverge between Wayland and X11. Spotted by Darkspirit. Differential Revision: https://phabricator.services.mozilla.com/D128910
This commit is contained in:
Родитель
f56bbf1ce2
Коммит
c3731eafe0
|
@ -307,9 +307,8 @@ already_AddRefed<GLContext> GLContextEGLFactory::CreateImpl(
|
||||||
gl->MakeCurrent();
|
gl->MakeCurrent();
|
||||||
gl->SetIsDoubleBuffered(doubleBuffered);
|
gl->SetIsDoubleBuffered(doubleBuffered);
|
||||||
|
|
||||||
#ifdef MOZ_GTK_WAYLAND
|
#ifdef MOZ_WIDGET_GTK
|
||||||
if (surface && GdkIsWaylandDisplay()) {
|
if (surface) {
|
||||||
// Make eglSwapBuffers() non-blocking on wayland
|
|
||||||
const int interval = gfxVars::SwapIntervalEGL() ? 1 : 0;
|
const int interval = gfxVars::SwapIntervalEGL() ? 1 : 0;
|
||||||
egl->fSwapInterval(interval);
|
egl->fSwapInterval(interval);
|
||||||
}
|
}
|
||||||
|
@ -500,10 +499,8 @@ bool GLContextEGL::RenewSurface(CompositorWidget* aWidget) {
|
||||||
}
|
}
|
||||||
const bool ok = MakeCurrent(true);
|
const bool ok = MakeCurrent(true);
|
||||||
MOZ_ASSERT(ok);
|
MOZ_ASSERT(ok);
|
||||||
#ifdef MOZ_GTK_WAYLAND
|
#ifdef MOZ_WIDGET_GTK
|
||||||
if (mSurface && GdkIsWaylandDisplay()) {
|
if (mSurface) {
|
||||||
// The swap interval pref is false by default so that eglSwapBuffers()
|
|
||||||
// is non-blocking on wayland.
|
|
||||||
const int interval = gfxVars::SwapIntervalEGL() ? 1 : 0;
|
const int interval = gfxVars::SwapIntervalEGL() ? 1 : 0;
|
||||||
mEgl->fSwapInterval(interval);
|
mEgl->fSwapInterval(interval);
|
||||||
}
|
}
|
||||||
|
|
Загрузка…
Ссылка в новой задаче