mutter/clutter/clutter/clutter-blur-private.h
Daniel van Vugt 85f173d0d7 clutter: Pass 'radius' to public blur APIs instead of 'sigma'
Although they're in the same units, `radius` is easier to understand than
`sigma` and makes the public API independent of the blur algorithm used
behind the scenes. We now only keep the `sigma` terminology where the
implementation is Gaussian-specific.

The assumption that `sigma = radius / 2.0` is actually not new here. We
just move it from `_st_create_shadow_pipeline` (gnome-shell!1905) into
`clutter_blur_new`.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1908>
2023-12-14 18:12:55 +00:00

38 lines
1.1 KiB
C

/*
* Copyright (C) 2020 Endless OS Foundation, LLC
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#pragma once
#include <glib-object.h>
#include "cogl/cogl.h"
G_BEGIN_DECLS
typedef struct _ClutterBlur ClutterBlur;
ClutterBlur * clutter_blur_new (CoglTexture *texture,
float radius);
void clutter_blur_apply (ClutterBlur *blur);
CoglTexture * clutter_blur_get_texture (ClutterBlur *blur);
void clutter_blur_free (ClutterBlur *blur);
G_END_DECLS