Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mw: move steate clean/invalidation calls to the main render function #873

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions MasterWindow.go
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,6 @@ func (w *MasterWindow) sizeChange(_, _ int) {
}

func (w *MasterWindow) beforeRender() {
Context.invalidAllState()
Context.FontAtlas.rebuildFontAtlas()

// process texture load requests
Expand All @@ -214,7 +213,6 @@ func (w *MasterWindow) beforeRender() {
}

func (w *MasterWindow) afterRender() {
Context.cleanState()
}

func (w *MasterWindow) beforeDestroy() {
Expand All @@ -223,6 +221,8 @@ func (w *MasterWindow) beforeDestroy() {
}

func (w *MasterWindow) render() {
Context.invalidAllState()

fin := w.setTheme()
defer fin()

Expand All @@ -234,6 +234,8 @@ func (w *MasterWindow) render() {
mainStylesheet.Push()
w.updateFunc()
mainStylesheet.Pop()

Context.cleanState()
}

// Run runs the main loop.
Expand Down
Loading