From ebe7f10af1737bd142fb1ec73dada54408f77cc2 Mon Sep 17 00:00:00 2001 From: Hajime Hoshi Date: Tue, 12 Jul 2016 01:58:04 +0900 Subject: [PATCH] graphics: Make NewVolatileImage unexported --- graphicscontext.go | 4 ++-- image.go | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/graphicscontext.go b/graphicscontext.go index f7412165a..f207d3a75 100644 --- a/graphicscontext.go +++ b/graphicscontext.go @@ -43,7 +43,7 @@ func (c *graphicsContext) SetSize(screenWidth, screenHeight int, screenScale flo if c.offscreen != nil { c.offscreen.Dispose() } - offscreen, err := NewVolatileImage(screenWidth, screenHeight, FilterNearest) + offscreen, err := newVolatileImage(screenWidth, screenHeight, FilterNearest) if err != nil { return err } @@ -51,7 +51,7 @@ func (c *graphicsContext) SetSize(screenWidth, screenHeight int, screenScale flo intScreenScale := int(math.Ceil(screenScale)) w := screenWidth * intScreenScale h := screenHeight * intScreenScale - offscreen2, err := NewVolatileImage(w, h, FilterLinear) + offscreen2, err := newVolatileImage(w, h, FilterLinear) if err != nil { return err } diff --git a/image.go b/image.go index 665a2bef8..c9367a512 100644 --- a/image.go +++ b/image.go @@ -217,7 +217,7 @@ func NewImage(width, height int, filter Filter) (*Image, error) { return eimg, nil } -// NewVolatileImage returns an empty 'volatile' image. +// newVolatileImage returns an empty 'volatile' image. // A volatile image is always cleared at the start of a frame. // // This is suitable for offscreen images that pixels are changed often. @@ -228,7 +228,7 @@ func NewImage(width, height int, filter Filter) (*Image, error) { // Saving pixels is an expensive operation, and it is desirable to avoid it if possible. // // This function is concurrent-safe. -func NewVolatileImage(width, height int, filter Filter) (*Image, error) { +func newVolatileImage(width, height int, filter Filter) (*Image, error) { img, err := newImageImpl(width, height, filter, true) if err != nil { return nil, err