From 9f98ccc611181069c1ebe8604748cf220aba8a20 Mon Sep 17 00:00:00 2001 From: Hajime Hoshi Date: Sat, 5 Aug 2017 20:14:49 +0900 Subject: [PATCH] loop: Rename UpdateAndDraw -> Update --- graphicscontext.go | 2 +- internal/loop/run.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/graphicscontext.go b/graphicscontext.go index 3d29b1113..70730b362 100644 --- a/graphicscontext.go +++ b/graphicscontext.go @@ -106,7 +106,7 @@ func (c *graphicsContext) drawToDefaultRenderTarget() error { return nil } -func (c *graphicsContext) UpdateAndDraw(updateCount int) error { +func (c *graphicsContext) Update(updateCount int) error { if err := c.initializeIfNeeded(); err != nil { return err } diff --git a/internal/loop/run.go b/internal/loop/run.go index 5038acfa0..2adcc479f 100644 --- a/internal/loop/run.go +++ b/internal/loop/run.go @@ -81,7 +81,7 @@ func (c *runContext) updateFPS(fps float64) { type GraphicsContext interface { SetSize(width, height int, scale float64) - UpdateAndDraw(updateCount int) error + Update(updateCount int) error Invalidate() } @@ -195,7 +195,7 @@ func (c *runContext) render(g GraphicsContext) error { c.m.Unlock() count := c.updateCount(n) - if err := g.UpdateAndDraw(count); err != nil { + if err := g.Update(count); err != nil { return err } c.framesForFPS++