Always assume GLSL is supported
The support for GLSL has been advertised as unconditionally supported by mutter for a while, and has now lost the 'GLSL' feature completely. Lets remove the checks. Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1985>
This commit is contained in:
parent
1bf446b373
commit
563437de91
@ -129,7 +129,7 @@ var Lightbox = GObject.registerClass({
|
|||||||
this._container = container;
|
this._container = container;
|
||||||
this._children = container.get_children();
|
this._children = container.get_children();
|
||||||
this._fadeFactor = params.fadeFactor;
|
this._fadeFactor = params.fadeFactor;
|
||||||
this._radialEffect = Clutter.feature_available(Clutter.FeatureFlags.SHADERS_GLSL) && params.radialEffect;
|
this._radialEffect = params.radialEffect;
|
||||||
|
|
||||||
if (this._radialEffect)
|
if (this._radialEffect)
|
||||||
this.add_effect(new RadialShaderEffect({ name: 'radial' }));
|
this.add_effect(new RadialShaderEffect({ name: 'radial' }));
|
||||||
|
@ -22,29 +22,6 @@ struct _ShellGLSLEffectPrivate
|
|||||||
|
|
||||||
G_DEFINE_TYPE_WITH_PRIVATE (ShellGLSLEffect, shell_glsl_effect, CLUTTER_TYPE_OFFSCREEN_EFFECT);
|
G_DEFINE_TYPE_WITH_PRIVATE (ShellGLSLEffect, shell_glsl_effect, CLUTTER_TYPE_OFFSCREEN_EFFECT);
|
||||||
|
|
||||||
static gboolean
|
|
||||||
shell_glsl_effect_pre_paint (ClutterEffect *effect,
|
|
||||||
ClutterPaintNode *node,
|
|
||||||
ClutterPaintContext *paint_context)
|
|
||||||
{
|
|
||||||
ClutterEffectClass *parent_class;
|
|
||||||
|
|
||||||
if (!clutter_feature_available (CLUTTER_FEATURE_SHADERS_GLSL))
|
|
||||||
{
|
|
||||||
/* if we don't have support for GLSL shaders then we
|
|
||||||
* forcibly disable the ActorMeta
|
|
||||||
*/
|
|
||||||
g_warning ("Unable to use the ShaderEffect: the graphics hardware "
|
|
||||||
"or the current GL driver does not implement support "
|
|
||||||
"for the GLSL shading language.");
|
|
||||||
clutter_actor_meta_set_enabled (CLUTTER_ACTOR_META (effect), FALSE);
|
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
parent_class = CLUTTER_EFFECT_CLASS (shell_glsl_effect_parent_class);
|
|
||||||
return parent_class->pre_paint (effect, node, paint_context);
|
|
||||||
}
|
|
||||||
|
|
||||||
static CoglPipeline *
|
static CoglPipeline *
|
||||||
shell_glsl_effect_create_pipeline (ClutterOffscreenEffect *effect,
|
shell_glsl_effect_create_pipeline (ClutterOffscreenEffect *effect,
|
||||||
CoglTexture *texture)
|
CoglTexture *texture)
|
||||||
@ -156,15 +133,12 @@ shell_glsl_effect_constructed (GObject *object)
|
|||||||
static void
|
static void
|
||||||
shell_glsl_effect_class_init (ShellGLSLEffectClass *klass)
|
shell_glsl_effect_class_init (ShellGLSLEffectClass *klass)
|
||||||
{
|
{
|
||||||
ClutterEffectClass *effect_class = CLUTTER_EFFECT_CLASS (klass);
|
|
||||||
GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
|
GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
|
||||||
ClutterOffscreenEffectClass *offscreen_class;
|
ClutterOffscreenEffectClass *offscreen_class;
|
||||||
|
|
||||||
offscreen_class = CLUTTER_OFFSCREEN_EFFECT_CLASS (klass);
|
offscreen_class = CLUTTER_OFFSCREEN_EFFECT_CLASS (klass);
|
||||||
offscreen_class->create_pipeline = shell_glsl_effect_create_pipeline;
|
offscreen_class->create_pipeline = shell_glsl_effect_create_pipeline;
|
||||||
|
|
||||||
effect_class->pre_paint = shell_glsl_effect_pre_paint;
|
|
||||||
|
|
||||||
gobject_class->constructed = shell_glsl_effect_constructed;
|
gobject_class->constructed = shell_glsl_effect_constructed;
|
||||||
gobject_class->dispose = shell_glsl_effect_dispose;
|
gobject_class->dispose = shell_glsl_effect_dispose;
|
||||||
}
|
}
|
||||||
|
@ -72,32 +72,6 @@ G_DEFINE_TYPE (ShellInvertLightnessEffect,
|
|||||||
shell_invert_lightness_effect,
|
shell_invert_lightness_effect,
|
||||||
CLUTTER_TYPE_OFFSCREEN_EFFECT);
|
CLUTTER_TYPE_OFFSCREEN_EFFECT);
|
||||||
|
|
||||||
static gboolean
|
|
||||||
shell_invert_lightness_effect_pre_paint (ClutterEffect *effect,
|
|
||||||
ClutterPaintNode *node,
|
|
||||||
ClutterPaintContext *paint_context)
|
|
||||||
{
|
|
||||||
ShellInvertLightnessEffect *self = SHELL_INVERT_LIGHTNESS_EFFECT (effect);
|
|
||||||
ClutterEffectClass *parent_class;
|
|
||||||
|
|
||||||
if (!clutter_feature_available (CLUTTER_FEATURE_SHADERS_GLSL))
|
|
||||||
{
|
|
||||||
/* if we don't have support for GLSL shaders then we
|
|
||||||
* forcibly disable the ActorMeta
|
|
||||||
*/
|
|
||||||
g_warning ("Unable to use the ShellInvertLightnessEffect: the "
|
|
||||||
"graphics hardware or the current GL driver does not "
|
|
||||||
"implement support for the GLSL shading language.");
|
|
||||||
clutter_actor_meta_set_enabled (CLUTTER_ACTOR_META (self), FALSE);
|
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
parent_class =
|
|
||||||
CLUTTER_EFFECT_CLASS (shell_invert_lightness_effect_parent_class);
|
|
||||||
|
|
||||||
return parent_class->pre_paint (effect, node, paint_context);
|
|
||||||
}
|
|
||||||
|
|
||||||
static CoglPipeline *
|
static CoglPipeline *
|
||||||
shell_glsl_effect_create_pipeline (ClutterOffscreenEffect *effect,
|
shell_glsl_effect_create_pipeline (ClutterOffscreenEffect *effect,
|
||||||
CoglTexture *texture)
|
CoglTexture *texture)
|
||||||
@ -126,15 +100,12 @@ shell_invert_lightness_effect_dispose (GObject *gobject)
|
|||||||
static void
|
static void
|
||||||
shell_invert_lightness_effect_class_init (ShellInvertLightnessEffectClass *klass)
|
shell_invert_lightness_effect_class_init (ShellInvertLightnessEffectClass *klass)
|
||||||
{
|
{
|
||||||
ClutterEffectClass *effect_class = CLUTTER_EFFECT_CLASS (klass);
|
|
||||||
GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
|
GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
|
||||||
ClutterOffscreenEffectClass *offscreen_class;
|
ClutterOffscreenEffectClass *offscreen_class;
|
||||||
|
|
||||||
offscreen_class = CLUTTER_OFFSCREEN_EFFECT_CLASS (klass);
|
offscreen_class = CLUTTER_OFFSCREEN_EFFECT_CLASS (klass);
|
||||||
offscreen_class->create_pipeline = shell_glsl_effect_create_pipeline;
|
offscreen_class->create_pipeline = shell_glsl_effect_create_pipeline;
|
||||||
|
|
||||||
effect_class->pre_paint = shell_invert_lightness_effect_pre_paint;
|
|
||||||
|
|
||||||
gobject_class->dispose = shell_invert_lightness_effect_dispose;
|
gobject_class->dispose = shell_invert_lightness_effect_dispose;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -214,15 +214,6 @@ st_scroll_view_fade_set_actor (ClutterActorMeta *meta,
|
|||||||
|
|
||||||
g_return_if_fail (actor == NULL || ST_IS_SCROLL_VIEW (actor));
|
g_return_if_fail (actor == NULL || ST_IS_SCROLL_VIEW (actor));
|
||||||
|
|
||||||
if (!clutter_feature_available (CLUTTER_FEATURE_SHADERS_GLSL))
|
|
||||||
{
|
|
||||||
/* if we don't have support for GLSL shaders then we
|
|
||||||
* forcibly disable the ActorMeta
|
|
||||||
*/
|
|
||||||
clutter_actor_meta_set_enabled (meta, FALSE);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (self->vadjustment)
|
if (self->vadjustment)
|
||||||
{
|
{
|
||||||
g_signal_handlers_disconnect_by_func (self->vadjustment,
|
g_signal_handlers_disconnect_by_func (self->vadjustment,
|
||||||
|
Loading…
Reference in New Issue
Block a user