mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2025-01-15 14:50:06 +00:00
gl renderer: Fix blur nodes with radius 0
This commit is contained in:
parent
b3c4320bc2
commit
e847c030bd
@ -1268,10 +1268,17 @@ render_blur_node (GskGLRenderer *self,
|
|||||||
const float min_y = builder->dy + node->bounds.origin.y;
|
const float min_y = builder->dy + node->bounds.origin.y;
|
||||||
const float max_x = min_x + node->bounds.size.width;
|
const float max_x = min_x + node->bounds.size.width;
|
||||||
const float max_y = min_y + node->bounds.size.height;
|
const float max_y = min_y + node->bounds.size.height;
|
||||||
|
const float blur_radius = gsk_blur_node_get_radius (node);
|
||||||
int texture_id;
|
int texture_id;
|
||||||
gboolean is_offscreen;
|
gboolean is_offscreen;
|
||||||
RenderOp op;
|
RenderOp op;
|
||||||
|
|
||||||
|
if (blur_radius <= 0)
|
||||||
|
{
|
||||||
|
gsk_gl_renderer_add_render_ops (self, gsk_blur_node_get_child (node), builder);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/* TODO(perf): We're forcing the child offscreen even if it's a texture
|
/* TODO(perf): We're forcing the child offscreen even if it's a texture
|
||||||
* so the resulting offscreen texture is bigger by the gaussian blur factor
|
* so the resulting offscreen texture is bigger by the gaussian blur factor
|
||||||
* (see gsk_blur_node_new), but we didn't have to do that if the blur
|
* (see gsk_blur_node_new), but we didn't have to do that if the blur
|
||||||
|
Loading…
Reference in New Issue
Block a user