Skip to content

Commit 19ef604

Browse files
committed
Reduce noisiness of trace logging
1 parent add108c commit 19ef604

File tree

2 files changed

+12
-9
lines changed

2 files changed

+12
-9
lines changed

src/flitter/engine/control.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -293,8 +293,8 @@ async def run(self):
293293
for renderer in renderers:
294294
await renderer.purge()
295295

296-
elif count := gc.collect(0):
297-
logger.trace("Collected {} objects", count)
296+
else:
297+
gc.collect(0)
298298

299299
frame_count += 1
300300
frames.append(frame_time if self.realtime else now)

src/flitter/render/window/__init__.py

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -305,11 +305,15 @@ def render(self, node, references, *, srgb=False, colorbits=None, composite='ove
305305
elif name == 'downsample':
306306
downsample_member = member
307307
elif name in child_textures:
308-
sampler = self.glctx.sampler(texture=child_textures[name], **sampler_args)
309-
sampler.use(location=unit)
310-
samplers.append(sampler)
311-
member.value = unit
312-
unit += 1
308+
texture = child_textures[name]
309+
if texture is not None:
310+
sampler = self.glctx.sampler(texture=child_textures[name], **sampler_args)
311+
sampler.use(location=unit)
312+
samplers.append(sampler)
313+
member.value = unit
314+
unit += 1
315+
else:
316+
member.value = 0
313317
elif name in node and set_uniform_vector(member, node[name]):
314318
pass
315319
elif name in kwargs and set_uniform_vector(member, Vector.coerce(kwargs[name])):
@@ -662,8 +666,7 @@ def render(self, node, references, beat=None, **kwargs):
662666
self._beat = beat
663667
glfw.poll_events()
664668
RenderTarget.empty_pool(self.glctx, 1)
665-
if count := self.glctx.gc():
666-
logger.trace("Collected {} OpenGL objects", count)
669+
self.glctx.gc()
667670

668671
def make_secondary_texture(self):
669672
width, height = self.window.get_framebuffer_size()

0 commit comments

Comments
 (0)