[gtk/fix-clipped-texture] gl: Fixed clipped offscreen rendering
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/fix-clipped-texture] gl: Fixed clipped offscreen rendering
- Date: Wed, 10 Feb 2021 01:31:26 +0000 (UTC)
commit e47ff00fcb2ab145309d0409f8bca335b0753341
Author: Matthias Clasen <mclasen redhat com>
Date: Tue Feb 9 20:28:42 2021 -0500
gl: Fixed clipped offscreen rendering
When we are rendering a texture node to an offscreen,
and we have a clip, we must force the offscreen rendering.
Otherwise, the code will notice: Hey, it already is a texture
node, so no need to render it to a texture again. But when
clipping is involved, that is exactly what we want to do.
Fixes: #3651
gsk/gl/gskglrenderer.c | 11 ++---------
1 file changed, 2 insertions(+), 9 deletions(-)
---
diff --git a/gsk/gl/gskglrenderer.c b/gsk/gl/gskglrenderer.c
index 5a15bf5911..a68b45e663 100644
--- a/gsk/gl/gskglrenderer.c
+++ b/gsk/gl/gskglrenderer.c
@@ -1741,7 +1741,6 @@ render_rounded_clip_node (GskGLRenderer *self,
return;
}
- /* TODO: Intersect current and new clip */
ops_push_clip (builder, &transformed_clip);
gsk_gl_renderer_add_render_ops (self, child, builder);
ops_pop_clip (builder);
@@ -1750,19 +1749,13 @@ render_rounded_clip_node (GskGLRenderer *self,
{
gboolean is_offscreen;
TextureRegion region;
- /* NOTE: We are *not* transforming the clip by the current modelview here.
- * We instead draw the untransformed clip to a texture and then transform
- * that texture.
- *
- * We do, however, apply the scale factor to the child clip of course.
- */
+
ops_push_clip (builder, &transformed_clip);
if (!add_offscreen_ops (self, builder, &node->bounds,
child,
®ion, &is_offscreen,
- 0))
+ FORCE_OFFSCREEN))
g_assert_not_reached ();
-
ops_pop_clip (builder);
ops_set_program (builder, &self->programs->blit_program);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]