Bug 1576968 - Use glFlush() instead of -[NSOpenGLContext flushBuffer] when we have no framebuffer zero. r=mattwoodrow

Differential Revision: https://phabricator.services.mozilla.com/D43648

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Markus Stange 2019-08-28 21:45:23 +00:00
Родитель ddd89317c8
Коммит 19057e1f9d
1 изменённых файлов: 8 добавлений и 1 удалений

Просмотреть файл

@ -123,7 +123,14 @@ bool GLContextCGL::IsDoubleBuffered() const { return sCGLLibrary.UseDoubleBuffer
bool GLContextCGL::SwapBuffers() {
AUTO_PROFILER_LABEL("GLContextCGL::SwapBuffers", GRAPHICS);
[mContext flushBuffer];
if (StaticPrefs::gfx_core_animation_enabled_AtStartup()) {
// We do not have a framebuffer zero. Just do a flush.
// Flushing is necessary if we want our IOSurfaces to have the correct
// content once they're picked up by the WindowServer from our CALayers.
fFlush();
} else {
[mContext flushBuffer];
}
return true;
}