Skip to content

Commit 03c70fc

Browse files
committed
check timestamp also calls needs_update (for MultipleRenderer)
1 parent 245d245 commit 03c70fc

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

webgpu/renderer.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ def check_timestamp(callback: Callable):
134134
"""Decorator to handle updates for render objects. The function is only called if the timestamp has changed."""
135135

136136
def wrapper(self, options, *args, **kwargs):
137-
if options.timestamp == self._timestamp:
137+
if options.timestamp == self._timestamp and not self.needs_update:
138138
return
139139
callback(self, options, *args, **kwargs)
140140
self._timestamp = options.timestamp
@@ -231,7 +231,7 @@ def active(self):
231231

232232
@active.setter
233233
def active(self, value):
234-
if value and not self._active:
234+
if value != self._active:
235235
self.set_needs_update()
236236
self._active = value
237237

0 commit comments

Comments
 (0)