[gtk/wip/baedert/for-master: 95/101] gl renderer: Handle 0/1 progress in crossfade nodes
- From: Timm Bäder <baedert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/wip/baedert/for-master: 95/101] gl renderer: Handle 0/1 progress in crossfade nodes
- Date: Fri, 26 Jun 2020 06:02:18 +0000 (UTC)
commit fcc94d7cd9e322e66761d17535541c2bce6c2539
Author: Timm Bäder <mail baedert org>
Date: Sun Jun 21 07:17:54 2020 +0200
gl renderer: Handle 0/1 progress in crossfade nodes
gsk/gl/gskglrenderer.c | 13 ++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)
---
diff --git a/gsk/gl/gskglrenderer.c b/gsk/gl/gskglrenderer.c
index a451338d59..b626c9e7ce 100644
--- a/gsk/gl/gskglrenderer.c
+++ b/gsk/gl/gskglrenderer.c
@@ -2241,12 +2241,23 @@ render_cross_fade_node (GskGLRenderer *self,
{
GskRenderNode *start_node = gsk_cross_fade_node_get_start_child (node);
GskRenderNode *end_node = gsk_cross_fade_node_get_end_child (node);
- float progress = gsk_cross_fade_node_get_progress (node);
+ const float progress = gsk_cross_fade_node_get_progress (node);
TextureRegion start_region;
TextureRegion end_region;
gboolean is_offscreen1, is_offscreen2;
OpCrossFade *op;
+ if (progress <= 0)
+ {
+ gsk_gl_renderer_add_render_ops (self, start_node, builder);
+ return;
+ }
+ else if (progress >= 1)
+ {
+ gsk_gl_renderer_add_render_ops (self, end_node, builder);
+ return;
+ }
+
/* TODO: We create 2 textures here as big as the cross-fade node, but both the
* start and the end node might be a lot smaller than that. */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]