Skip to content

Commit

Permalink
Merge pull request #1153 from cogentcore/webok
Browse files Browse the repository at this point in the history
remove special web stuff that was unnecessary once certain other things were fixed
  • Loading branch information
kkoreilly authored Aug 19, 2024
2 parents be2a0d3 + a33811a commit 796f362
Showing 1 changed file with 0 additions and 22 deletions.
22 changes: 0 additions & 22 deletions core/render.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,13 @@ import (
"cogentcore.org/core/colors/cam/hct"
"cogentcore.org/core/math32"
"cogentcore.org/core/styles"
"cogentcore.org/core/system"
"cogentcore.org/core/tree"
)

// AsyncLock must be called before making any updates in a separate goroutine
// outside of the main configuration, rendering, and event handling structure.
// It must have a matching [WidgetBase.AsyncUnlock] after it.
func (wb *WidgetBase) AsyncLock() {
if TheApp.Platform() == system.Web {
return
}
rc := wb.Scene.renderContext()
if rc == nil {
// if there is no render context, we are probably
Expand All @@ -48,9 +44,6 @@ func (wb *WidgetBase) AsyncLock() {
// outside of the main configuration, rendering, and event handling structure.
// It must have a matching [WidgetBase.AsyncLock] before it.
func (wb *WidgetBase) AsyncUnlock() {
if TheApp.Platform() == system.Web {
return
}
rc := wb.Scene.renderContext()
if rc == nil {
return
Expand All @@ -61,21 +54,6 @@ func (wb *WidgetBase) AsyncUnlock() {
}
}

// RenderUpdateWindow updates the window.
// It should not be called by end users.
// TODO(wgpu): remove.
func (sc *Scene) RenderUpdateWindow() {
// todo: get events
w := sc.RenderWindow()
if w == nil {
return
}
rc := w.renderContext()
rc.unlock()
w.renderWindow() // todo: this doesn't end up actually updating the drawer window..
rc.lock()
}

// NeedsRender specifies that the widget needs to be rendered.
func (wb *WidgetBase) NeedsRender() {
if DebugSettings.UpdateTrace {
Expand Down

0 comments on commit 796f362

Please sign in to comment.