From 767a46c4599656f4e9d50a7adb7168d622379fb1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=98yvind=20Kol=C3=A5s?= <pippin@gimp.org> Date: Thu, 24 Aug 2023 20:15:13 +0200 Subject: [PATCH] py,ui: only create one compositing group for ViewTransitionBlend ctx.start_group and ctx.end_group are expensive calls creating an off-screen 32bpp rendering texture, redirecting rendering to it, and rendering this result back to the screen. --- python_payload/st3m/ui/view.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/python_payload/st3m/ui/view.py b/python_payload/st3m/ui/view.py index 90aef9e574..4c1801e224 100644 --- a/python_payload/st3m/ui/view.py +++ b/python_payload/st3m/ui/view.py @@ -87,13 +87,11 @@ class ViewTransitionBlend(ViewTransition): def draw( self, ctx: Context, transition: float, incoming: Responder, outgoing: Responder ) -> None: - ctx.start_group() outgoing.draw(ctx) - ctx.end_group() ctx.start_group() - ctx.global_alpha = transition incoming.draw(ctx) + ctx.global_alpha = transition ctx.end_group() -- GitLab