summaryrefslogtreecommitdiff
path: root/gsk/gl/gskglrenderer.c
diff options
context:
space:
mode:
authorTimm Bäder <mail@baedert.org>2020-10-10 19:39:33 +0200
committerMatthias Clasen <mclasen@redhat.com>2020-10-14 15:06:12 -0400
commit0a4d442849c606f2a6874c650d757eb4b3eff124 (patch)
tree41762f00ef30c2eae657c7269078dad29a8304cc /gsk/gl/gskglrenderer.c
parent5f9fa13c65af6e6fd3e333004b6b305a77ead247 (diff)
downloadgtk+-0a4d442849c606f2a6874c650d757eb4b3eff124.tar.gz
gl renderer: return empty texture for too small blurred nodes
Diffstat (limited to 'gsk/gl/gskglrenderer.c')
-rw-r--r--gsk/gl/gskglrenderer.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/gsk/gl/gskglrenderer.c b/gsk/gl/gskglrenderer.c
index ae64a0f76b..58943ab44b 100644
--- a/gsk/gl/gskglrenderer.c
+++ b/gsk/gl/gskglrenderer.c
@@ -1798,10 +1798,15 @@ blur_texture (GskGLRenderer *self,
g_assert (blur_radius > 0);
gsk_gl_driver_create_render_target (self->gl_driver,
- texture_to_blur_width, texture_to_blur_height,
+ MAX (texture_to_blur_width, 1), MAX (texture_to_blur_height, 1),
GL_NEAREST, GL_NEAREST,
&pass1_texture_id, &pass1_render_target);
+ if (texture_to_blur_width <= 0 || texture_to_blur_height <= 0)
+ {
+ return pass1_texture_id;
+ }
+
gsk_gl_driver_create_render_target (self->gl_driver,
texture_to_blur_width, texture_to_blur_height,
GL_NEAREST, GL_NEAREST,