Remove Application.ForceDraw

This commit is contained in:
Trevor Slocum 2020-10-07 21:27:30 -07:00
parent 86d39b1867
commit 94351006a1
4 changed files with 5 additions and 13 deletions

View File

@ -5,6 +5,7 @@ v1.5.1 (WIP)
- Allow modification of scroll bar render text
- Optimize TextView (writing is 90% faster, drawing is 50% faster)
- Remove return values from methods which return their primitive (breaks chaining)
- Remove Application.ForceDraw (Application.Draw may be called anywhere)
v1.5.0 (2020-10-03)
- Add scroll bar to TextView

View File

@ -72,6 +72,10 @@ This greatly improves buffer efficiency. [TextView.Write](https://docs.rocketnin
is 90% faster and [TextView.Draw](https://docs.rocketnine.space/gitlab.com/tslocum/cview/#TextView.Draw)
is 50% faster.
## `Application.ForceDraw` has been removed
`Application.Draw` may be called anywhere as it is thread-safe.
# Merged pull requests
The following tview pull requests have been merged into cview:

View File

@ -547,18 +547,6 @@ func (a *Application) Draw() {
a.QueueUpdate(func() {
a.draw()
})
}
// ForceDraw refreshes the screen immediately. Use this function with caution as
// it may lead to race conditions with updates to primitives in other
// goroutines. It is always preferrable to use Draw() instead. Never call this
// function from a goroutine.
//
// It is safe to call this function during queued updates and direct event
// handling.
func (a *Application) ForceDraw() {
a.draw()
}
// draw actually does what Draw() promises to do.

1
box.go
View File

@ -392,7 +392,6 @@ func (b *Box) SetTitleAlign(align int) {
defer b.l.Unlock()
b.titleAlign = align
}
// Draw draws this primitive onto the screen.