diff options
author | Giovanni Campagna <gcampagna@src.gnome.org> | 2013-02-12 13:42:42 +0100 |
---|---|---|
committer | Giovanni Campagna <gcampagna@src.gnome.org> | 2013-02-13 22:29:47 +0100 |
commit | f254879226b71cb3df5d575cd590acb38b9ef01e (patch) | |
tree | 3897fde0422be701ac6342e503e9cc74189d2251 | |
parent | 94ac7ff02cc6d9ff71b354ed6e10b00f8511fdf7 (diff) | |
download | mutter-f254879226b71cb3df5d575cd590acb38b9ef01e.tar.gz |
MetaBackgroundActor: remove GLSL shader support
That code made sense when MetaBackgroundActor was just painting a rectangular
texture. Now that it paints multiple primitives with different pipelines and
attributes it doesn't anymore, so users should go back to ClutterEffect and
FBO redirection (which should be by now a lot faster)
-rw-r--r-- | src/compositor/meta-background-actor.c | 84 | ||||
-rw-r--r-- | src/meta/meta-background-actor.h | 14 |
2 files changed, 0 insertions, 98 deletions
diff --git a/src/compositor/meta-background-actor.c b/src/compositor/meta-background-actor.c index 074e14675..195ddf09c 100644 --- a/src/compositor/meta-background-actor.c +++ b/src/compositor/meta-background-actor.c @@ -1100,87 +1100,3 @@ meta_background_actor_screen_size_changed (MetaScreen *screen, { clutter_actor_queue_relayout (CLUTTER_ACTOR (actor)); } - -/** - * meta_background_actor_add_glsl_snippet: - * @actor: a #MetaBackgroundActor - * @hook: where to insert the code - * @declarations: GLSL declarations - * @code: GLSL code - * @is_replace: wheter Cogl code should be replaced by the custom shader - * - * Adds a GLSL snippet to the pipeline used for drawing the background. - * See #CoglSnippet for details. - */ -void -meta_background_actor_add_glsl_snippet (MetaBackgroundActor *actor, - MetaSnippetHook hook, - const char *declarations, - const char *code, - gboolean is_replace) -{ - MetaBackgroundActorPrivate *priv; - CoglSnippet *snippet; - - g_return_if_fail (META_IS_BACKGROUND_ACTOR (actor)); - - priv = actor->priv; - - if (is_replace) - { - snippet = cogl_snippet_new (hook, declarations, NULL); - cogl_snippet_set_replace (snippet, code); - } - else - { - snippet = cogl_snippet_new (hook, declarations, code); - } - - if (hook == META_SNIPPET_HOOK_VERTEX || - hook == META_SNIPPET_HOOK_FRAGMENT) - { - cogl_pipeline_add_snippet (priv->pipeline, snippet); - } - else - { - cogl_pipeline_add_layer_snippet (priv->pipeline, 0, snippet); - } - - cogl_object_unref (snippet); -} - -/** - * meta_background_actor_set_uniform_float: - * @actor: a #MetaBackgroundActor - * @uniform_name: - * @n_components: number of components (for vector uniforms) - * @count: number of uniforms (for array uniforms) - * @uniform: (array length=uniform_length): the float values to set - * @uniform_length: the length of @uniform. Must be exactly @n_components x @count, - * and is provided mainly for language bindings. - * - * Sets a new GLSL uniform to the provided value. This is mostly - * useful in congiunction with meta_background_actor_add_glsl_snippet(). - */ - -void -meta_background_actor_set_uniform_float (MetaBackgroundActor *actor, - const char *uniform_name, - int n_components, - int count, - const float *uniform, - int uniform_length) -{ - MetaBackgroundActorPrivate *priv; - - g_return_if_fail (META_IS_BACKGROUND_ACTOR (actor)); - g_return_if_fail (uniform_length == n_components * count); - - priv = actor->priv; - - cogl_pipeline_set_uniform_float (priv->pipeline, - cogl_pipeline_get_uniform_location (priv->pipeline, - uniform_name), - n_components, count, uniform); -} - diff --git a/src/meta/meta-background-actor.h b/src/meta/meta-background-actor.h index 1d42fd0f5..6fff31d32 100644 --- a/src/meta/meta-background-actor.h +++ b/src/meta/meta-background-actor.h @@ -84,18 +84,4 @@ typedef enum { META_SNIPPET_HOOK_TEXTURE_LOOKUP } MetaSnippetHook; - -void meta_background_actor_add_glsl_snippet (MetaBackgroundActor *actor, - MetaSnippetHook hook, - const char *declarations, - const char *code, - gboolean is_replace); - -void meta_background_actor_set_uniform_float (MetaBackgroundActor *actor, - const char *uniform_name, - int n_components, - int count, - const float *uniform, - int uniform_length); - #endif /* META_BACKGROUND_ACTOR_H */ |