From 3ccfe087d9770a24116e9eadedf32b20f01a48ac Mon Sep 17 00:00:00 2001 From: Hajime Hoshi Date: Sat, 12 May 2018 02:29:39 +0900 Subject: [PATCH] Refactoring --- internal/graphics/framebuffer.go | 3 +-- internal/ui/ui_mobile.go | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/internal/graphics/framebuffer.go b/internal/graphics/framebuffer.go index ced24be6e..cba671744 100644 --- a/internal/graphics/framebuffer.go +++ b/internal/graphics/framebuffer.go @@ -95,7 +95,6 @@ func (f *framebuffer) projectionMatrix() []float32 { return f.proMatrix } w, h := f.viewportSize() - m := orthoProjectionMatrix(0, w, 0, h) - f.proMatrix = m + f.proMatrix = orthoProjectionMatrix(0, w, 0, h) return f.proMatrix } diff --git a/internal/ui/ui_mobile.go b/internal/ui/ui_mobile.go index f9461753e..c2c278d4e 100644 --- a/internal/ui/ui_mobile.go +++ b/internal/ui/ui_mobile.go @@ -161,12 +161,11 @@ func RunMainThreadLoop(ch <-chan error) error { } func (u *userInterface) updateGraphicsContext(g GraphicsContext) { - sizeChanged := false width, height := 0, 0 actualScale := 0.0 u.m.Lock() - sizeChanged = u.sizeChanged + sizeChanged := u.sizeChanged if sizeChanged { width = u.width height = u.height