From accb777f51fb0df086f44154284106114aa928b0 Mon Sep 17 00:00:00 2001 From: Hajime Hoshi Date: Sun, 29 Oct 2023 19:16:11 +0900 Subject: [PATCH] internal/ui: refactoring: remove unused functions --- internal/ui/context.go | 3 --- internal/ui/ui_glfw.go | 6 ------ internal/ui/ui_js.go | 6 ------ internal/ui/ui_mobile.go | 6 ------ internal/ui/ui_nintendosdk.go | 6 ------ internal/ui/ui_playstation5.go | 6 ------ 6 files changed, 33 deletions(-) diff --git a/internal/ui/context.go b/internal/ui/context.go index 32629aa57..5c54c6653 100644 --- a/internal/ui/context.go +++ b/internal/ui/context.go @@ -84,9 +84,6 @@ func (c *context) forceUpdateFrame(graphicsDriver graphicsdriver.Graphics, outsi } func (c *context) updateFrameImpl(graphicsDriver graphicsdriver.Graphics, updateCount int, outsideWidth, outsideHeight float64, deviceScaleFactor float64, ui *UserInterface, forceDraw bool, swapBuffersForGL func()) (err error) { - ui.beginFrame() - defer ui.endFrame() - // The given outside size can be 0 e.g. just after restoring from the fullscreen mode on Windows (#1589) // Just ignore such cases. Otherwise, creating a zero-sized framebuffer causes a panic. if outsideWidth == 0 || outsideHeight == 0 { diff --git a/internal/ui/ui_glfw.go b/internal/ui/ui_glfw.go index 76b53ee10..2cdad9ce6 100644 --- a/internal/ui/ui_glfw.go +++ b/internal/ui/ui_glfw.go @@ -930,12 +930,6 @@ func (u *UserInterface) createWindow() error { return nil } -func (u *UserInterface) beginFrame() { -} - -func (u *UserInterface) endFrame() { -} - // registerWindowCloseCallback must be called from the main thread. func (u *UserInterface) registerWindowCloseCallback() error { if u.closeCallback == nil { diff --git a/internal/ui/ui_js.go b/internal/ui/ui_js.go index b9dd6a710..08285167d 100644 --- a/internal/ui/ui_js.go +++ b/internal/ui/ui_js.go @@ -814,12 +814,6 @@ func (u *UserInterface) Monitor() *Monitor { return theMonitor } -func (u *UserInterface) beginFrame() { -} - -func (u *UserInterface) endFrame() { -} - func (u *UserInterface) updateIconIfNeeded() error { return nil } diff --git a/internal/ui/ui_mobile.go b/internal/ui/ui_mobile.go index 46f4088bd..fbf1fba53 100644 --- a/internal/ui/ui_mobile.go +++ b/internal/ui/ui_mobile.go @@ -481,12 +481,6 @@ func (u *UserInterface) ScheduleFrame() { } } -func (u *UserInterface) beginFrame() { -} - -func (u *UserInterface) endFrame() { -} - func (u *UserInterface) updateIconIfNeeded() error { return nil } diff --git a/internal/ui/ui_nintendosdk.go b/internal/ui/ui_nintendosdk.go index 6d19d1692..ab787ccd4 100644 --- a/internal/ui/ui_nintendosdk.go +++ b/internal/ui/ui_nintendosdk.go @@ -177,12 +177,6 @@ func (*UserInterface) Window() Window { return &nullWindow{} } -func (u *UserInterface) beginFrame() { -} - -func (u *UserInterface) endFrame() { -} - func (u *UserInterface) updateIconIfNeeded() error { return nil } diff --git a/internal/ui/ui_playstation5.go b/internal/ui/ui_playstation5.go index 47efaa6b4..5038efea6 100644 --- a/internal/ui/ui_playstation5.go +++ b/internal/ui/ui_playstation5.go @@ -150,12 +150,6 @@ func (*UserInterface) Window() Window { return &nullWindow{} } -func (u *UserInterface) beginFrame() { -} - -func (u *UserInterface) endFrame() { -} - func (u *UserInterface) updateIconIfNeeded() error { return nil }