mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-25 19:28:57 +01:00
graphicscommand: Unexport RunOnMainThread
This commit is contained in:
parent
fe6a2daef4
commit
20b4a28801
@ -200,7 +200,7 @@ func (q *commandQueue) Enqueue(command command) {
|
||||
|
||||
// Flush flushes the command queue.
|
||||
func (q *commandQueue) Flush() error {
|
||||
return RunOnMainThread(func() error {
|
||||
return runOnMainThread(func() error {
|
||||
return q.flush()
|
||||
})
|
||||
}
|
||||
@ -725,7 +725,7 @@ func (c *newShaderCommand) CanMergeWithDrawTrianglesCommand(dst *Image, src [gra
|
||||
|
||||
// ResetGraphicsDriverState resets or initializes the current graphics driver state.
|
||||
func ResetGraphicsDriverState() error {
|
||||
return RunOnMainThread(func() error {
|
||||
return runOnMainThread(func() error {
|
||||
return theGraphicsDriver.Reset()
|
||||
})
|
||||
}
|
||||
@ -733,7 +733,7 @@ func ResetGraphicsDriverState() error {
|
||||
// MaxImageSize returns the maximum size of an image.
|
||||
func MaxImageSize() int {
|
||||
var size int
|
||||
_ = RunOnMainThread(func() error {
|
||||
_ = runOnMainThread(func() error {
|
||||
size = theGraphicsDriver.MaxImageSize()
|
||||
return nil
|
||||
})
|
||||
|
@ -24,7 +24,7 @@ func SetMainThread(thread *thread.Thread) {
|
||||
theThread = thread
|
||||
}
|
||||
|
||||
func RunOnMainThread(f func() error) error {
|
||||
func runOnMainThread(f func() error) error {
|
||||
// The thread is nil when 1) GOOS=js or 2) using golang.org/x/mobile/gl.
|
||||
// When golang.org/x/mobile/gl is used, all the GL functions are called via Context, which already runs on an
|
||||
// appropriate thread.
|
||||
|
Loading…
Reference in New Issue
Block a user