[gtk/wip/baedert/for-master: 17/54] gl renderer: Ignore rendering if accumulated opacity is too small
- From: Timm Bäder <baedert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/wip/baedert/for-master: 17/54] gl renderer: Ignore rendering if accumulated opacity is too small
- Date: Tue, 13 Oct 2020 03:55:30 +0000 (UTC)
commit a27ef44564e1dcdb6457ad5bb0ed1a814cc0e39b
Author: Timm Bäder <mail baedert org>
Date: Thu Oct 1 08:29:10 2020 +0200
gl renderer: Ignore rendering if accumulated opacity is too small
gsk/gl/gskglrenderer.c | 18 +++++++++++-------
1 file changed, 11 insertions(+), 7 deletions(-)
---
diff --git a/gsk/gl/gskglrenderer.c b/gsk/gl/gskglrenderer.c
index edf6f402ce..9233799e0c 100644
--- a/gsk/gl/gskglrenderer.c
+++ b/gsk/gl/gskglrenderer.c
@@ -1375,20 +1375,24 @@ render_opacity_node (GskGLRenderer *self,
prev_opacity = ops_set_opacity (builder,
builder->current_opacity * opacity);
- ops_set_program (builder, &self->programs->blit_program);
- ops_set_texture (builder, region.texture_id);
+ if (builder->current_opacity >= ((float) 0x00ff / (float) 0xffff))
+ {
+ ops_set_program (builder, &self->programs->blit_program);
+ ops_set_texture (builder, region.texture_id);
- load_vertex_data_with_region (ops_draw (builder, NULL),
- node, builder,
- ®ion,
- is_offscreen);
+ load_vertex_data_with_region (ops_draw (builder, NULL),
+ node, builder,
+ ®ion,
+ is_offscreen);
+ }
}
else
{
prev_opacity = ops_set_opacity (builder,
builder->current_opacity * opacity);
- gsk_gl_renderer_add_render_ops (self, child, builder);
+ if (builder->current_opacity >= ((float) 0x00ff / (float) 0xffff))
+ gsk_gl_renderer_add_render_ops (self, child, builder);
}
ops_set_opacity (builder, prev_opacity);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]