We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a6f00db commit aed2fabCopy full SHA for aed2fab
1 file changed
webgpu/canvas.py
@@ -181,10 +181,10 @@ def on_update_html_canvas(self, func: Callable):
181
self._on_update_html_canvas.append(func)
182
183
def save_screenshot(self, filename: str):
184
- with self._update_mutex:
185
- if self.target_texture is None:
186
- self.resize._original(self)
+ if self.target_texture is None:
+ self.resize._original(self)
187
+ with self._update_mutex:
188
path = pathlib.Path(filename)
189
format = path.suffix[1:]
190
data = read_texture(self.target_texture)
0 commit comments