From d43e203ccffa58f01d773fffe12a8462d35b0a5b Mon Sep 17 00:00:00 2001 From: Hajime Hoshi Date: Sun, 10 Nov 2019 17:34:14 +0900 Subject: [PATCH] uidriver/glfw: Remove a redundant 'if' branch --- internal/uidriver/glfw/ui.go | 8 -------- 1 file changed, 8 deletions(-) diff --git a/internal/uidriver/glfw/ui.go b/internal/uidriver/glfw/ui.go index 91ed665d6..815075626 100644 --- a/internal/uidriver/glfw/ui.go +++ b/internal/uidriver/glfw/ui.go @@ -822,15 +822,7 @@ func (u *UserInterface) loop(context driver.UIContext) error { return err } - u.m.RLock() - vsync := u.vsync - u.m.RUnlock() - _ = u.t.Call(func() error { - if !vsync { - u.swapBuffers() - return nil - } u.swapBuffers() return nil })