From fc125eb5316e9745ba5800435708de768bdf12f1 Mon Sep 17 00:00:00 2001 From: Hajime Hoshi Date: Sat, 16 Sep 2017 15:49:29 +0900 Subject: [PATCH] graphics: Add comments --- image.go | 1 + internal/graphics/command.go | 2 ++ 2 files changed, 3 insertions(+) diff --git a/image.go b/image.go index ab54c44d9..219b0b5f6 100644 --- a/image.go +++ b/image.go @@ -281,6 +281,7 @@ func newImageWithScreenFramebuffer(width, height int, offsetX, offsetY float64) return i } +// MaxImageSize represents the maximum width/height of an image. const MaxImageSize = restorable.MaxImageSize func checkSize(width, height int) { diff --git a/internal/graphics/command.go b/internal/graphics/command.go index 0717e1b7f..a1d297b06 100644 --- a/internal/graphics/command.go +++ b/internal/graphics/command.go @@ -37,6 +37,7 @@ type command interface { Exec(indexOffsetInBytes int) error } +// commandQueue is a command queue for drawing commands. type commandQueue struct { commands []command vertices []float32 @@ -44,6 +45,7 @@ type commandQueue struct { m sync.Mutex } +// theCommandQueue is the command queue for the current process. var theCommandQueue = &commandQueue{} func (q *commandQueue) appendVertices(vertices []float32) {